From patchwork Wed Dec 17 11:01:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nishikawa, Kenzoh" X-Patchwork-Id: 5506751 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 462F1BEEA8 for ; Wed, 17 Dec 2014 11:15:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 648E120A26 for ; Wed, 17 Dec 2014 11:15:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 11C5620A25 for ; Wed, 17 Dec 2014 11:15:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751853AbaLQLPr (ORCPT ); Wed, 17 Dec 2014 06:15:47 -0500 Received: from mail-sg1on0115.outbound.protection.outlook.com ([134.170.132.115]:36891 "EHLO APAC01-SG1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751385AbaLQLPq (ORCPT ); Wed, 17 Dec 2014 06:15:46 -0500 X-Greylist: delayed 851 seconds by postgrey-1.27 at vger.kernel.org; Wed, 17 Dec 2014 06:15:46 EST Received: from SINPR01CA0049.apcprd01.prod.exchangelabs.com (10.141.109.49) by SG2PR01MB0441.apcprd01.prod.exchangelabs.com (25.161.6.143) with Microsoft SMTP Server (TLS) id 15.1.36.23; Wed, 17 Dec 2014 11:01:31 +0000 Received: from DB3FFO11FD037.protection.gbl (2a01:111:f400:7e04::193) by SINPR01CA0049.outlook.office365.com (2a01:111:e400:a817::49) with Microsoft SMTP Server (TLS) id 15.1.31.17 via Frontend Transport; Wed, 17 Dec 2014 11:01:31 +0000 Received: from JPYOKXEG101.jp.sony.com (117.103.190.41) by DB3FFO11FD037.mail.protection.outlook.com (10.47.217.68) with Microsoft SMTP Server (TLS) id 15.1.26.17 via Frontend Transport; Wed, 17 Dec 2014 11:01:29 +0000 Received: from JPYOKXHT112.jp.sony.com (117.103.191.59) by JPYOKXEG101.jp.sony.com (117.103.190.41) with Microsoft SMTP Server (TLS) id 14.3.210.2; Wed, 17 Dec 2014 11:01:13 +0000 Received: from JPYOKXMS113.jp.sony.com ([169.254.3.95]) by JPYOKXHT112.jp.sony.com ([117.103.191.59]) with mapi id 14.03.0210.002; Wed, 17 Dec 2014 11:01:12 +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: [Resend PATCH v5] mac80211: keep sending peer candidate events while in listen state Thread-Topic: [Resend PATCH v5] mac80211: keep sending peer candidate events while in listen state Thread-Index: AdAZ6FJo5oknsZ2uT3OyTE+0T1sShw== Date: Wed, 17 Dec 2014 11:01:11 +0000 Message-ID: <2EB4F5C65A3B8E4E92660930F4EF6B5B07C4AC@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)(46102003)(110136001)(21056001)(87936001)(4396001)(64706001)(66066001)(47776003)(20776003)(97756001)(31966008)(102836002)(62966003)(77156002)(15975445007)(2930100002)(2900100001)(16796002)(2920100001)(33656002)(50466002)(86362001)(101416001)(229853001)(106466001)(6806004)(107046002)(19580395003)(2656002)(55846006)(23726002)(120916001)(92566001)(50986999)(105586002)(99396003)(54356999)(46406003); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR01MB0441; 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:SG2PR01MB0441; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:SG2PR01MB0441; X-Forefront-PRVS: 042857DBB5 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:SG2PR01MB0441; X-OriginatorOrg: jp.sony.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2014 11:01:29.1827 (UTC) X-MS-Exchange-CrossTenant-Id: 1819a9a6-5d86-4a54-8a55-b19046df293a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=1819a9a6-5d86-4a54-8a55-b19046df293a; Ip=[117.103.190.41] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR01MB0441 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: