From patchwork Fri Nov 21 11:24:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nishikawa, Kenzoh" X-Patchwork-Id: 5354371 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 682CC9F2F1 for ; Fri, 21 Nov 2014 11:24:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 87C012010E for ; Fri, 21 Nov 2014 11:24:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2600520108 for ; Fri, 21 Nov 2014 11:24:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751670AbaKULYc (ORCPT ); Fri, 21 Nov 2014 06:24:32 -0500 Received: from mail-hk1on0130.outbound.protection.outlook.com ([134.170.140.130]:2370 "EHLO APAC01-HK1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750734AbaKULYb (ORCPT ); Fri, 21 Nov 2014 06:24:31 -0500 Received: from SIXPR01CA009.apcprd01.prod.exchangelabs.com (10.242.58.19) by SG2PR01MB0442.apcprd01.prod.exchangelabs.com (25.161.6.144) with Microsoft SMTP Server (TLS) id 15.1.16.15; Fri, 21 Nov 2014 11:24:28 +0000 Received: from AM1FFO11FD003.protection.gbl (2a01:111:f400:7e00::173) by SIXPR01CA009.outlook.office365.com (2a01:111:e400:2000::19) with Microsoft SMTP Server (TLS) id 15.1.16.15 via Frontend Transport; Fri, 21 Nov 2014 11:24:28 +0000 Received: from JPYOKXEG102.jp.sony.com (117.103.190.42) by AM1FFO11FD003.mail.protection.outlook.com (10.174.64.85) with Microsoft SMTP Server (TLS) id 15.1.6.13 via Frontend Transport; Fri, 21 Nov 2014 11:24:26 +0000 Received: from JPYOKXHT108.jp.sony.com (117.103.191.55) by JPYOKXEG102.jp.sony.com (117.103.190.42) with Microsoft SMTP Server (TLS) id 14.3.210.2; Fri, 21 Nov 2014 11:24:08 +0000 Received: from JPYOKXMS113.jp.sony.com ([169.254.3.151]) by JPYOKXHT108.jp.sony.com ([117.103.191.55]) with mapi id 14.03.0210.002; Fri, 21 Nov 2014 11:24:13 +0000 From: "Nishikawa, Kenzoh" To: "linux-wireless@vger.kernel.org" CC: "devel@lists.open80211s.org" , Johannes Berg , "Bob Copeland (me@bobcopeland.com)" , "Thomas Pedersen (thomas@noack.us)" Subject: [PATCH v4] mac80211: keep sending peer candidate events while in listen state Thread-Topic: [PATCH v4] mac80211: keep sending peer candidate events while in listen state Thread-Index: AdAFchKOVqjQzgthT2q5d3KoH1+/+g== Date: Fri, 21 Nov 2014 11:24:12 +0000 Message-ID: <2EB4F5C65A3B8E4E92660930F4EF6B5B06C981@JPYOKXMS113.jp.sony.com> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [43.22.83.18] MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:117.103.190.42; CTRY:JP; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(428002)(189002)(199003)(44976005)(77096003)(77156002)(16796002)(120916001)(31966008)(6806004)(101416001)(19580395003)(106466001)(33656002)(46406003)(62966003)(99396003)(21056001)(105586002)(15975445006)(66066001)(64706001)(47776003)(97756001)(2656002)(107046002)(50986999)(50466002)(46102003)(2351001)(4396001)(95666004)(23726002)(86362001)(92566001)(54356999)(92726001)(20776003)(15202345003)(55846006)(110136001)(229853001)(87936001); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR01MB0442; H:JPYOKXEG102.jp.sony.com; FPR:; MLV:sfv; PTR:jpyokxeg102.jp.sony.com; MX:1; A:1; LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:SG2PR01MB0442; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:SG2PR01MB0442; X-Forefront-PRVS: 0402872DA1 Received-SPF: None (protection.outlook.com: jp.sony.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is 117.103.190.42) smtp.mailfrom=kenzoh.nishikawa@jp.sony.com; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:SG2PR01MB0442; X-OriginatorOrg: jp.sony.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Instead of sending peer candidate events just once, send them as long as the peer remains in the LISTEN state in the peering state machine, when userspace is implementing the peering manager. Userspace may silence the events from a peer by progressing the state machine or by setting the link state to BLOCKED. Fixes the problem that a mesh peering process won't be fired again after the previous first peering trial fails due to like air propagation error if the peering is managed by user space such as wpa_supplicant. This patch works with another patch for wpa_supplicant described here which fires a peering process again triggered by the notice from kernel. http://lists.shmoo.com/pipermail/hostap/2014-November/031235.html Signed-off-by: Kenzoh Nishikawa --- net/mac80211/mesh_plink.c | 7 +++++++ 1 file changed, 7 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c index 32c7bd0..dfc429b 100644 --- a/net/mac80211/mesh_plink.c +++ b/net/mac80211/mesh_plink.c @@ -524,6 +524,13 @@ void mesh_neighbour_update(struct ieee80211_sub_if_data *sdata, sdata->u.mesh.mshcfg.auto_open_plinks && rssi_threshold_check(sta, sdata)) changed = mesh_plink_open(sta); + else if (sta->plink_state == NL80211_PLINK_LISTEN && + (sdata->u.mesh.user_mpm || + sdata->u.mesh.security & IEEE80211_MESH_SEC_AUTHED)) + cfg80211_notify_new_peer_candidate(sdata->dev, hw_addr, + elems->ie_start, + elems->total_len, + GFP_ATOMIC); ieee80211_mps_frame_release(sta, elems); out: