From patchwork Wed Apr 15 16:11:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 215998 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42CA9C2BA19 for ; Wed, 15 Apr 2020 16:15:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 18B1B20656 for ; Wed, 15 Apr 2020 16:15:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="Rz7R/kSv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1415217AbgDOQMl (ORCPT ); Wed, 15 Apr 2020 12:12:41 -0400 Received: from mail-eopbgr700077.outbound.protection.outlook.com ([40.107.70.77]:38433 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2410235AbgDOQMd (ORCPT ); Wed, 15 Apr 2020 12:12:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C4X+dWKGir9hmlC69xsQl0BrG+RW6tFS2+ejSn6ATxwV4NH5BXjw60QkB3GKDuyQDjygMfHeWvx78BqCkOgYS6mVja+wJauj2Ex8KsMQb8D4HPNk8AiORGFqsn3QMiPBeD4f3Y7T35LVlH35/p5di+wRp4yGh7ttsmwEwD4e4NaEXSgt/uJqazTyszZTma+H7hxo6HLqPV7D4vDZMEEE3zUM1zK/0isKsWXlbfev7bmagbACFtZEZTGlo0Ak8G26Y4Fh2P/pAkhLYiDTGjU4mUmgEx7wYt6GpiQP0JzJ3yH80ahrAAgcF1dU9ATiQVGyv2nRuAG1HuWGMHiqmRNIUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+YT2VADB+GGJ3Msh7hizMM+OgRTfpOnA8TW0G5pIreY=; b=XPHICGMB61pJuUD7ReNsU5j0cMfla5634B3ZEwbCYUpn/2eQi19AehVXsVM919vrMyXD7e1qIb+p8pAgDyRKVnIz+wlrKDAXKpxzh3d3YSpmM/c/cZLVdsLynEZDtpB1kU0Z8YaZl8hFbqlcoBvyuDte2UZWuhMyO2KDZZKNQ1175NFEBO7fp12HSGcav1ZqZP3WElg94V9V9ADHEBCZzwUD4UW++ijrHfBgMWjB/10se6OolmDlEQy/bQKLaG/5+KdKhSDSG5fuZD7iZ/kyNQ7qplS8gmp2bYnMOPVQ7CR5hwLlGb0yaPWidCQrlfQDwCzy5yLDN+CEK+iYXxPFew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+YT2VADB+GGJ3Msh7hizMM+OgRTfpOnA8TW0G5pIreY=; b=Rz7R/kSva9UsHxmnl005M8eNJDFtF4blxp0UBtj58sVUHGf9nzqPkk2wf2ANyCH0HLc0ul9MDQah8UbwwVV8tbCbbCyqi2NGZzbU9st8aTNxvSZ3gkLwGfb+dTzjK/W7vd5K19LN9T3zNs0gGRpUPYoF8qB4wr3I6PG7+qRUPDU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) by MWHPR11MB1408.namprd11.prod.outlook.com (2603:10b6:300:24::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.25; Wed, 15 Apr 2020 16:12:21 +0000 Received: from MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe]) by MWHPR11MB1775.namprd11.prod.outlook.com ([fe80::81d5:b62b:3770:ffbe%10]) with mapi id 15.20.2921.024; Wed, 15 Apr 2020 16:12:21 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 04/20] staging: wfx: simplify handling of beacon filter during join process Date: Wed, 15 Apr 2020 18:11:31 +0200 Message-Id: <20200415161147.69738-5-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200415161147.69738-1-Jerome.Pouiller@silabs.com> References: <20200415161147.69738-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR1PR01CA0027.eurprd01.prod.exchangelabs.com (2603:10a6:102::40) To MWHPR11MB1775.namprd11.prod.outlook.com (2603:10b6:300:10e::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:544b:f17b:7ae8:fb7) by PR1PR01CA0027.eurprd01.prod.exchangelabs.com (2603:10a6:102::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.25 via Frontend Transport; Wed, 15 Apr 2020 16:12:19 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:544b:f17b:7ae8:fb7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 47210ce1-d1af-41f9-f4c5-08d7e157c6b4 X-MS-TrafficTypeDiagnostic: MWHPR11MB1408: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-Forefront-PRVS: 0374433C81 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1775.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(136003)(396003)(376002)(346002)(39850400004)(366004)(8886007)(8936002)(5660300002)(2906002)(6666004)(86362001)(8676002)(478600001)(81156014)(66574012)(1076003)(4326008)(52116002)(316002)(54906003)(107886003)(186003)(16526019)(66556008)(66476007)(36756003)(2616005)(6512007)(6486002)(6506007)(66946007); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: silabs.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: euYUjX9R6wi7fdXtf8ebMg+hsPV5rSRbv71WN0LP6bOHpDmQnxP4RFP3Xjun0rpd/ebVrLD5O7HeU9TX74SsyIz9ZuZFfynnKh+HPv9FGirRMjf9DQ6rqolzOvOTiMeaPI3DAPRfQjBuBZamy2jvTExbpBsZ3owG/9Zt8p2EMWNXAYfgih2He3fFPyHSzNdzOL76YuWGYxQgHOXZwCaH37brTeB/XsOfS1DfEH8XYN+Zt56RuZ4fibNDR/KL7dcrCZaBBxW1ci1Z8lk55YaHv3J7EG2uWtwGOymUnWKTgzp9idiGBCzgLX9sm7ZUFMVq7JnghMJEFLcogfbpUm87YIFLJasuA9aZjrZW9N3JyNAyw5xlThqIlavDSL0h+BHnhjEzZMYkKnO8tgDT72ffsoSFdL11EM8PGlnzAPmxxvcyWprbsFy8RRFBHNdTD1ED X-MS-Exchange-AntiSpam-MessageData: DoIew2VXx8pq2u51uoFtaI4BFoARMs3Ve3xe/llbwC1JsP9jvCID4cwpwEht2Y6swUshrpancGvvGfMDl37PF1shYVYzi2MJMSKEaUehxlCWT8ZCw1hTWoh9Tkef9zG+cXuf6ktkWmXH3LkpXhfRXLlNWpiBc4tkVrryh3BQ5P6uFbuq8eMrwxVRsTQ6NDs4fbOL6LOqHdF6iprr15QZaQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 47210ce1-d1af-41f9-f4c5-08d7e157c6b4 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 16:12:21.1885 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9PMnHxfvb+lFwHmAcP5kTHFUYoYox97m/ptrwar0e+Kpg7dq7ajW3oBaydSmPS0m938dKuuyj8LHXO27TUhqHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1408 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller When the device joins an AP, beacon are forwarded to the host. Once has retrieved all necessary parameters, we can start to filter the beacon (and only beacon with changed/new data will be forwarded). Currently, the driver detect beacons in data Rx process. It is far more easier to just wait for the BSS_CHANGED_BEACON_INFO event. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_rx.c | 12 ------------ drivers/staging/wfx/sta.c | 10 +++++++++- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c index c5b83fedeb55..c3b3edae3420 100644 --- a/drivers/staging/wfx/data_rx.c +++ b/drivers/staging/wfx/data_rx.c @@ -118,18 +118,6 @@ void wfx_rx_cb(struct wfx_vif *wvif, arg->rx_flags.match_uc_addr && mgmt->u.action.category == WLAN_CATEGORY_BACK) goto drop; - if (ieee80211_is_beacon(frame->frame_control) && - !arg->status && wvif->vif && - ether_addr_equal(ieee80211_get_SA(frame), - wvif->vif->bss_conf.bssid)) { - /* Disable beacon filter once we're associated... */ - if (wvif->disable_beacon_filter && - (wvif->vif->bss_conf.assoc || - wvif->vif->bss_conf.ibss_joined)) { - wvif->disable_beacon_filter = false; - schedule_work(&wvif->update_filtering_work); - } - } ieee80211_rx_irqsafe(wvif->wdev->hw, skb); return; diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index ec949ce0b256..b01467f7606a 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -712,9 +712,17 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, if (changed & BSS_CHANGED_BEACON_ENABLED) wfx_enable_beacon(wvif, info->enable_beacon); - if (changed & BSS_CHANGED_BEACON_INFO) + if (changed & BSS_CHANGED_BEACON_INFO) { + if (vif->type != NL80211_IFTYPE_STATION) + dev_warn(wdev->dev, "%s: misunderstood change: BEACON_INFO\n", + __func__); hif_set_beacon_wakeup_period(wvif, info->dtim_period, info->dtim_period); + // We temporary forwarded beacon for join process. It is now no + // more necessary. + wvif->disable_beacon_filter = false; + wfx_update_filtering(wvif); + } /* assoc/disassoc, or maybe AID changed */ if (changed & BSS_CHANGED_ASSOC) {