From patchwork Tue Dec 16 01:41:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nishikawa, Kenzoh" X-Patchwork-Id: 5499151 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 183F1BEEA8 for ; Tue, 16 Dec 2014 01:42:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3DBED209F9 for ; Tue, 16 Dec 2014 01:42:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F0E7E209F5 for ; Tue, 16 Dec 2014 01:42:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751042AbaLPBmV (ORCPT ); Mon, 15 Dec 2014 20:42:21 -0500 Received: from mail-hk1on0141.outbound.protection.outlook.com ([134.170.140.141]:32670 "EHLO APAC01-HK1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750862AbaLPBmU (ORCPT ); Mon, 15 Dec 2014 20:42:20 -0500 Received: from SINPR01CA0032.apcprd01.prod.exchangelabs.com (10.141.109.32) by HKXPR01MB0440.apcprd01.prod.exchangelabs.com (25.161.178.23) with Microsoft SMTP Server (TLS) id 15.1.31.17; Tue, 16 Dec 2014 01:42:14 +0000 Received: from AM1FFO11FD016.protection.gbl (2a01:111:f400:7e00::154) by SINPR01CA0032.outlook.office365.com (2a01:111:e400:a817::32) with Microsoft SMTP Server (TLS) id 15.1.31.17 via Frontend Transport; Tue, 16 Dec 2014 01:42:13 +0000 Received: from JPYOKXEG101.jp.sony.com (117.103.190.41) by AM1FFO11FD016.mail.protection.outlook.com (10.174.64.94) with Microsoft SMTP Server (TLS) id 15.1.26.17 via Frontend Transport; Tue, 16 Dec 2014 01:42:11 +0000 Received: from JPYOKXHT109.jp.sony.com (117.103.191.56) by JPYOKXEG101.jp.sony.com (117.103.190.41) with Microsoft SMTP Server (TLS) id 14.3.210.2; Tue, 16 Dec 2014 01:41:08 +0000 Received: from JPYOKXMS113.jp.sony.com ([169.254.3.95]) by JPYOKXHT109.jp.sony.com ([117.103.191.56]) with mapi id 14.03.0210.002; Tue, 16 Dec 2014 01:41:07 +0000 From: "Nishikawa, Kenzoh" To: 'Johannes Berg' CC: "'linux-wireless@vger.kernel.org'" , "'devel@lists.open80211s.org'" , "'Bob Copeland (me@bobcopeland.com)'" , "'Thomas Pedersen (thomas@noack.us)'" Subject: [PATCH v5] mac80211: keep sending peer candidate events while in listen state Thread-Topic: [PATCH v5] mac80211: keep sending peer candidate events while in listen state Thread-Index: AdAY0Ptg+bLpst1+SQOHgjo4/B+A/Q== Date: Tue, 16 Dec 2014 01:41:06 +0000 Message-ID: <2EB4F5C65A3B8E4E92660930F4EF6B5B07AB81@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 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.41) smtp.mailfrom=kenzoh.nishikawa@jp.sony.com; X-Forefront-Antispam-Report: CIP:117.103.190.41; CTRY:JP; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(428002)(199003)(189002)(54356999)(21056001)(97756001)(102836002)(15975445007)(66066001)(99396003)(105586002)(120916001)(23726002)(110136001)(16796002)(31966008)(55846006)(86362001)(50986999)(229853001)(92566001)(62966003)(107046002)(77156002)(50466002)(106466001)(46406003)(101416001)(2656002)(87936001)(46102003)(33656002)(4396001)(19580395003)(20776003)(64706001)(47776003)(6806004); DIR:OUT; SFP:1102; SCL:1; SRVR:HKXPR01MB0440; H:JPYOKXEG101.jp.sony.com; FPR:; SPF:None; MLV:sfv; PTR:jpyokxeg101.jp.sony.com; A:1; MX:1; LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:HKXPR01MB0440; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601003); SRVR:HKXPR01MB0440; X-Forefront-PRVS: 04270EF89C X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:HKXPR01MB0440; 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: