From patchwork Fri Nov 21 09:11:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nishikawa, Kenzoh" X-Patchwork-Id: 5353581 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9E26BC11AC for ; Fri, 21 Nov 2014 09:12:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B8ACB20176 for ; Fri, 21 Nov 2014 09:12:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5249F20160 for ; Fri, 21 Nov 2014 09:12:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754103AbaKUJMl (ORCPT ); Fri, 21 Nov 2014 04:12:41 -0500 Received: from mail-hk1hn0121.outbound.protection.outlook.com ([134.170.140.121]:5528 "EHLO APAC01-HK1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751857AbaKUJMf (ORCPT ); Fri, 21 Nov 2014 04:12:35 -0500 Received: from SIXPR01CA001.apcprd01.prod.exchangelabs.com (10.242.58.11) by HK2PR01MB0433.apcprd01.prod.exchangelabs.com (25.161.184.20) with Microsoft SMTP Server (TLS) id 15.1.16.15; Fri, 21 Nov 2014 09:12:31 +0000 Received: from AM1FFO11FD055.protection.gbl (2a01:111:f400:7e00::100) by SIXPR01CA001.outlook.office365.com (2a01:111:e400:2000::11) with Microsoft SMTP Server (TLS) id 15.1.16.15 via Frontend Transport; Fri, 21 Nov 2014 09:12:30 +0000 Received: from JPYOKXEG103.jp.sony.com (117.103.190.43) by AM1FFO11FD055.mail.protection.outlook.com (10.174.65.74) with Microsoft SMTP Server (TLS) id 15.1.6.13 via Frontend Transport; Fri, 21 Nov 2014 09:12:29 +0000 Received: from JPYOKXHT112.jp.sony.com (117.103.191.59) by JPYOKXEG103.jp.sony.com (117.103.190.43) with Microsoft SMTP Server (TLS) id 14.3.210.2; Fri, 21 Nov 2014 09:11:28 +0000 Received: from JPYOKXMS113.jp.sony.com ([169.254.3.151]) by JPYOKXHT112.jp.sony.com ([117.103.191.59]) with mapi id 14.03.0210.002; Fri, 21 Nov 2014 09:11:26 +0000 From: "Nishikawa, Kenzoh" To: "linux-wireless@vger.kernel.org" CC: "devel@lists.open80211s.org" , "Bob Copeland (me@bobcopeland.com)" Subject: [PATCH v3] mac80211: keep sending peer candidate events while in listen state Thread-Topic: [PATCH v3] mac80211: keep sending peer candidate events while in listen state Thread-Index: AdAFanLsfm24mckQQ26vzHXw5nmkkw== Date: Fri, 21 Nov 2014 09:11:25 +0000 Message-ID: <2EB4F5C65A3B8E4E92660930F4EF6B5B06C8BC@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.43; CTRY:JP; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(428002)(189002)(199003)(15975445006)(15202345003)(20776003)(106466001)(50466002)(110136001)(33656002)(46406003)(101416001)(16796002)(229853001)(31966008)(2656002)(50986999)(21056001)(97756001)(64706001)(92566001)(55846006)(23726002)(66066001)(77096003)(62966003)(77156002)(120916001)(47776003)(87936001)(99396003)(4396001)(54356999)(2351001)(6806004)(46102003)(95666004)(19580395003)(92726001)(107046002)(44976005)(105586002)(86362001); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR01MB0433; H:JPYOKXEG103.jp.sony.com; FPR:; MLV:sfv; PTR:jpyokxeg103.jp.sony.com; MX:1; A:1; LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:HK2PR01MB0433; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:HK2PR01MB0433; 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.43) smtp.mailfrom=kenzoh.nishikawa@jp.sony.com; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:HK2PR01MB0433; 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: