From patchwork Wed Apr 15 16:11:29 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: 221158 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 9BA16C38A2B for ; Wed, 15 Apr 2020 16:12:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 73A6C206F9 for ; Wed, 15 Apr 2020 16:12:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="kWfXi4xg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410237AbgDOQMc (ORCPT ); Wed, 15 Apr 2020 12:12:32 -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 S1415192AbgDOQMT (ORCPT ); Wed, 15 Apr 2020 12:12:19 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FeinoMT7uEA8YyflQJhJy5jRcWOwow6j728t737yiX6KhDs4YW3G9IEQJeEHqE9Fq7CGtamd7DbbvTIlBfvGsoi7tJ1d9QbJIPaE0CrbqxlkgudGHnJxMyxWu0RBQ78FrfWEJsRpijyyLY+2cDV+03yVzybfkC455UIDTyhE8InqHkJSv8TSMWJhw6iz0b0JsdIUlj36ry1RfCkqPtrweTsM/znpk7mxvQqeGjhR1TXOLPLQ/XIID7Mfb5axDqlrtFIggiisFEBe1dBVDGRjpo4OhXLZQ1kS4J1/OfiU4aODT/X/sGVMMuc4s+TYeLWNyukN6biVZVdyk7Vub284PA== 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=g62HYkkGU/coH6qCoMkXIzdcdD18sCGRgbclU1snP4E=; b=R3huz/zR8+bt1jCzYNbGyjkX2ep+5RJWqUhQ0fgFPujPIwhZirzBzdfbF4U72ZRopVlPlYiberqv6kfW4vwb8bZDwIj/SZiXKuYzaNlW1WRxxVTKoUPav0JcGOLSKtX7RhUcli0QlB23U8tCquLYpcombDYwRDtrEWfFuMBVNJt2adFZkbnx+WEXtGGUWrgyeRtRmluYU9owDivgtTaw31FN8dOiF4CSCFHcp60nYja30iWb1o8uevViQMfS0laFtuPYxYHPlVLgVXHDRjbkKh7XO9Yzb6N2cqNXHmJGYEUwkAP0o7fXRHV1sn0XXgtjy+7KXiUOoDkg8YiCVv5ZDw== 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=g62HYkkGU/coH6qCoMkXIzdcdD18sCGRgbclU1snP4E=; b=kWfXi4xgvHLsaLYQF63etnGpdAzIpLWW5z5sETSj8/B1cn/ZaUMZQ6Kdje1LyzGALUI/Xhyj2uFqLNLUqC45fqv2lyKfoJ/7RlPyWl2vkwqEER2LRTG6Pe1jZO8oZ22nhEg99UGsnnksCa44SatIU2M7J1GOkw1Qu2DH+BFHXuQ= 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:15 +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:15 +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 02/20] staging: wfx: simplify wfx_update_filtering() Date: Wed, 15 Apr 2020 18:11:29 +0200 Message-Id: <20200415161147.69738-3-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:13 +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: ca8e450f-87b0-45cb-34a3-08d7e157c301 X-MS-TrafficTypeDiagnostic: MWHPR11MB1408: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:221; 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: F3kt4/H7pIyA2iGASpp2DVAa0k/DJJGBSVIhuyltXOl0JfomK90OmK4hydVoZ1LFyUPkJUxlrT4O58LomOgiF9xSfvCp/jkDdQhsRCU0YpSQ8oiJNzIVqzfJCLgwFsCuJL3lM5ErtEN0gD0OAFHD1ovgQgdX69S/zNQSx7GlJgIVsOwD+EjfO06I16EPC0+sFaHxD7eaWmyVjz2FfgLFAhYgI6604Nf401ut0SeRgsZiDbBh346PpyHiJALZMS3KM9D2c8xhTrDuPl9K7/nCY10BfHwsxvaCs83yYK3GgIUE+4TPsFDNAuEl0hs7crIMR+B5ULsV0QbmjUeXKHiRYNtJRmQRqM2aaH83oLFB90KrirzoS/rfB7OIPCjOpdyLmfwOp7GuwOlcfSKuvE7IY1xR5LNTkF+XbdTX1FhzTtRDSqhyG8SBGtU+ZVOaEgVY X-MS-Exchange-AntiSpam-MessageData: KHDp3y6EJb3akgI8kZ8HqZ9nnwcvfXCkt2BS23bHgcS5UdAUjQugEOgVDvraYTbpBfi5DwsWK95ffygiTov7BLpC5H+DBAm3bZa6HXbXP8iNgJIS7SgbNHKeap445Is/gxx+yi6FO9DlnTvS12oNeMhy3Hdp1+EVOLc9PB3fyggifzhSrXE594t2YtfJSTm9ocqkZXSpDTz4JOyTT3t7ig== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ca8e450f-87b0-45cb-34a3-08d7e157c301 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 16:12:14.9203 (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: uLXjjrwHfbA3dAVwjRdka7hiBSD+Ms3LZxSit0kWr/HTDr7kIPFpmB/Vmkhkuk2N2kUson6lfGuRdfLoAdUKUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1408 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Inline wfx_set_mcast_filter() into wfx_update_filtering() and remove useless intermediate variables. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 69 ++++++++++++++------------------------- 1 file changed, 25 insertions(+), 44 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index cb9d14471745..14e2f106b042 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -120,34 +120,9 @@ int wfx_fwd_probe_req(struct wfx_vif *wvif, bool enable) wvif->fwd_probe_req); } -static int wfx_set_mcast_filter(struct wfx_vif *wvif, - struct wfx_grp_addr_table *fp) -{ - int i; - - // Temporary workaround for filters - return hif_set_data_filtering(wvif, false, true); - - if (!fp->enable) - return hif_set_data_filtering(wvif, false, true); - - for (i = 0; i < fp->num_addresses; i++) - hif_set_mac_addr_condition(wvif, i, fp->address_list[i]); - hif_set_uc_mc_bc_condition(wvif, 0, - HIF_FILTER_UNICAST | HIF_FILTER_BROADCAST); - hif_set_config_data_filter(wvif, true, 0, BIT(1), - BIT(fp->num_addresses) - 1); - hif_set_data_filtering(wvif, true, true); - - return 0; -} - void wfx_update_filtering(struct wfx_vif *wvif) { - int ret; - int bf_enable; - int bf_count; - int n_filter_ies; + int i; const struct hif_ie_table_entry filter_ies[] = { { .ie_id = WLAN_EID_VENDOR_SPECIFIC, @@ -168,29 +143,35 @@ void wfx_update_filtering(struct wfx_vif *wvif) } }; + hif_set_rx_filter(wvif, wvif->filter_bssid, wvif->fwd_probe_req); if (wvif->disable_beacon_filter) { - bf_enable = 0; - bf_count = 1; - n_filter_ies = 0; + hif_set_beacon_filter_table(wvif, 0, NULL); + hif_beacon_filter_control(wvif, 0, 1); } else if (wvif->vif->type != NL80211_IFTYPE_STATION) { - bf_enable = HIF_BEACON_FILTER_ENABLE | HIF_BEACON_FILTER_AUTO_ERP; - bf_count = 0; - n_filter_ies = 2; + hif_set_beacon_filter_table(wvif, 2, filter_ies); + hif_beacon_filter_control(wvif, HIF_BEACON_FILTER_ENABLE | + HIF_BEACON_FILTER_AUTO_ERP, 0); } else { - bf_enable = HIF_BEACON_FILTER_ENABLE; - bf_count = 0; - n_filter_ies = 3; + hif_set_beacon_filter_table(wvif, 3, filter_ies); + hif_beacon_filter_control(wvif, HIF_BEACON_FILTER_ENABLE, 0); } - ret = hif_set_rx_filter(wvif, wvif->filter_bssid, wvif->fwd_probe_req); - if (!ret) - ret = hif_set_beacon_filter_table(wvif, n_filter_ies, filter_ies); - if (!ret) - ret = hif_beacon_filter_control(wvif, bf_enable, bf_count); - if (!ret) - ret = wfx_set_mcast_filter(wvif, &wvif->mcast_filter); - if (ret) - dev_err(wvif->wdev->dev, "update filtering failed: %d\n", ret); + // Temporary workaround for filters + hif_set_data_filtering(wvif, false, true); + return; + + if (!wvif->mcast_filter.enable) { + hif_set_data_filtering(wvif, false, true); + return; + } + for (i = 0; i < wvif->mcast_filter.num_addresses; i++) + hif_set_mac_addr_condition(wvif, i, + wvif->mcast_filter.address_list[i]); + hif_set_uc_mc_bc_condition(wvif, 0, + HIF_FILTER_UNICAST | HIF_FILTER_BROADCAST); + hif_set_config_data_filter(wvif, true, 0, BIT(1), + BIT(wvif->mcast_filter.num_addresses) - 1); + hif_set_data_filtering(wvif, true, true); } static void wfx_update_filtering_work(struct work_struct *work) From patchwork Wed Apr 15 16:11:30 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: 221149 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 708C0C3815B for ; Wed, 15 Apr 2020 16:15:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 457C920656 for ; Wed, 15 Apr 2020 16:15:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="abQmF4Ft" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410325AbgDOQPo (ORCPT ); Wed, 15 Apr 2020 12:15:44 -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 S1415208AbgDOQMW (ORCPT ); Wed, 15 Apr 2020 12:12:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Iv+v3roAq2CxG1em9YkenbvLrO1QCzl4VM2GbhKrxGxOeywNYmw5H8qD+aTfcCzIPFT+oA4TgAu6gdRu4kO0FFktVRu5RSnxnOTHQtomjiFoZkRAqjhyX+jueh5bdXJmUeoCrwHXzDKyS6jUX3nauM3JRocJwFhQgHWBNA/h7YawkBTejDQ3zjXhRnWG4Hy+Neg2gJp1a0NTPpSMWO309OyE1AWQxy5P11OQMJqWfNqYLDwvh0bzlRql9/RLxfumetIfSrCZ5B+sGAyNm9CYBfOYFKAwzvsxIey1dtnMfwqmbcsla7q0K3yjETUu/fjtJxA4JBbN8jl4nSQvkpoNaw== 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=bxulB34wil+80Clk2MTntwTOBSVESVKF8em79hHSyRA=; b=gjZRvSx1v7V0nInKsou2kLFcV/JTLwolWQSdGac8lplL0W6a3Yk3a3/RYJZWcTMZD8d+cUSukiOKTes0CBR+UYU+visAVl5oFk35jgYtZojCyNB+7qgJDDC3Na19Vzt6pgdn1he3jZHuf+tXSOBl5ZuMoIcJNvJbJq1LBM0PdufTfZSBbscjfxREDwlvbUfoT1F1jg85OpLet14SMVP7aOIyFrSYqvQHjIstpocMbVXJb+rIcEMmDfGCYmeBLreTN+ac9qwGeCZF+16L/BICEYYFn6vQm0pujhESQoSmb1h0PsfBCK+MHYE7t5sCWqsVHN+JgtRrjxgOmIfu83CsUg== 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=bxulB34wil+80Clk2MTntwTOBSVESVKF8em79hHSyRA=; b=abQmF4FtVdGncQt0iJsAhKuVkXbzRpMQPg3xUWYUymKzd1ib+MX6/Ln2v0AbRPmi06Jz19eJmHl09a+QaMl3uJu+gvufyCJmovbMiYb52m81ht4/3vcg0ZRzUvtOYOQ9VnQM8dRpjQwEVi691anxMVdRM3s5L7aHzUnX3oxJgiE= 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:18 +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:18 +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 03/20] staging: wfx: rework wfx_configure_filter() Date: Wed, 15 Apr 2020 18:11:30 +0200 Message-Id: <20200415161147.69738-4-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:15 +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: 8bcf12df-12b1-474e-2b9d-08d7e157c529 X-MS-TrafficTypeDiagnostic: MWHPR11MB1408: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:873; 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: 3jW8jBz2bc3zjS7i30fOOJKmxbe40tKGxhDT2INm46/CvzL5hmlh3Yi31lNhJDTrRit3eqTRitWjBZLvNbc2/uCWxRsXKLuQ9MGp1RDpLbSme6WpRuBX9Um/9yPCchZIaIwUWopNd0SmC3SyAlP+A0mFiYJDxbIC9sth/aDzgwmrQnS8DdnkfS42nKfgNx25p6IExMpC9FFSwlggduz0mf4gv+SbjFgjD8Efel2C+EVdYJoepRnLPkGEzi0FtWa0gkP9ZTI+Pwclc0G/CnDNewNUqMtO2cH4gBWDbtJ4bszDOQjANINS4rprxJUAtQS2oaQeSD+pLPC3n2r5/eHKjbMBGlxqFY2VtwmXSkpIwVrngXE9OPoJL3l3RZx6669hV92clr8uLI4uV3/OS/XnCxj/cTA4wlcFVKuQskPkwxmH5O10WUBrGh/QlZnROzFV X-MS-Exchange-AntiSpam-MessageData: mnGDHs53Gvntec9HGDU3dQuM+0jYy/8e9t/LV/vkTlOieokFL1aTkxYdxQJj249JrSL3Q3TV8S06qe5IfEg9SWh+GgCIPKzlIOCKzKIEya3bqO0e73vACN6+to1mW0VQ98xtShBJC/gNiglCe6AnaahdDqw89yzkdjGkZeuHBmAEkCRNHmcp0hex+V9by5PeVkFQeJuBblwjDR4RW4grRA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8bcf12df-12b1-474e-2b9d-08d7e157c529 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 16:12:18.6646 (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: eCeFJX0oHHdaL95xgoQMdEovtvEBtEiOh22nJrHM8bQsjQb+6JgyUb4No4b6qduGD721s5nAW2HUAAybLCGp7Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1408 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller wfx_configure_filter() lacks of coherency. In add, some corner cases seems to not been handled properly. Rework the whole function(). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 41 +++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 14e2f106b042..ec949ce0b256 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -203,7 +203,6 @@ u64 wfx_prepare_multicast(struct ieee80211_hw *hw, ha->addr); i++; } - wvif->mcast_filter.enable = true; wvif->mcast_filter.num_addresses = count; } @@ -218,16 +217,46 @@ void wfx_configure_filter(struct ieee80211_hw *hw, struct wfx_vif *wvif = NULL; struct wfx_dev *wdev = hw->priv; - *total_flags &= FIF_OTHER_BSS | FIF_FCSFAIL | FIF_PROBE_REQ; + // Notes: + // - Probe responses (FIF_BCN_PRBRESP_PROMISC) are never filtered + // - PS-Poll (FIF_PSPOLL) are never filtered + // - RTS, CTS and Ack (FIF_CONTROL) are always filtered + // - Broken frames (FIF_FCSFAIL and FIF_PLCPFAIL) are always filtered + // - Firmware does (yet) allow to forward unicast traffic sent to + // other stations (aka. promiscuous mode) + *total_flags &= FIF_BCN_PRBRESP_PROMISC | FIF_ALLMULTI | FIF_OTHER_BSS | + FIF_PROBE_REQ | FIF_PSPOLL; mutex_lock(&wdev->conf_mutex); while ((wvif = wvif_iterate(wdev, wvif)) != NULL) { mutex_lock(&wvif->scan_lock); - wvif->filter_bssid = (*total_flags & - (FIF_OTHER_BSS | FIF_PROBE_REQ)) ? 0 : 1; - wvif->disable_beacon_filter = !(*total_flags & FIF_PROBE_REQ); - wfx_fwd_probe_req(wvif, true); + + // Note: FIF_BCN_PRBRESP_PROMISC covers probe response and + // beacons from other BSS + if (*total_flags & FIF_BCN_PRBRESP_PROMISC) + wvif->disable_beacon_filter = true; + else + wvif->disable_beacon_filter = false; + + if (*total_flags & FIF_ALLMULTI) { + wvif->mcast_filter.enable = false; + } else if (!wvif->mcast_filter.num_addresses) { + dev_dbg(wdev->dev, "disabling unconfigured multicast filter"); + wvif->mcast_filter.enable = false; + } else { + wvif->mcast_filter.enable = true; + } wfx_update_filtering(wvif); + + if (*total_flags & FIF_OTHER_BSS) + wvif->filter_bssid = false; + else + wvif->filter_bssid = true; + + if (*total_flags & FIF_PROBE_REQ) + wfx_fwd_probe_req(wvif, true); + else + wfx_fwd_probe_req(wvif, false); mutex_unlock(&wvif->scan_lock); } mutex_unlock(&wdev->conf_mutex); From patchwork Wed Apr 15 16:11:32 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: 221157 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 63888C3815B for ; Wed, 15 Apr 2020 16:12:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D06321734 for ; Wed, 15 Apr 2020 16:12:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="F7+Xcn/M" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410264AbgDOQMr (ORCPT ); Wed, 15 Apr 2020 12:12:47 -0400 Received: from mail-eopbgr700062.outbound.protection.outlook.com ([40.107.70.62]:8193 "EHLO NAM04-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2410231AbgDOQMk (ORCPT ); Wed, 15 Apr 2020 12:12:40 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dyeyaohJRUvWYvmZy7uWYPkGQzx/y6WCs6nSSGgArulGV/J1AW9rMlCyNy5PhA6z8CzAKE4JOnfTlPHkaC4bZ14dhCZaOnRPKzRfX+LoP6MyYes48HNgj0UWNVsNhGwu+hrZN8p9B8iQirQHJHp5CvRIIkw4lTnh8hDPwBzUj3VmgjqLSaw7EfI6iFEjh2tZY+sCSK9hz7hL7P/QJhiIIL+eLLj+EVlS/Mh53qebRvW2ZrM9XsdgmFaOyLc+d9QBaeC4JUbUmHHvHbpQ6ycQg9AHEo2dGHfNZ0jQ/y7+W4CVR+61NhVyFQLwGMVE3lAUn/voASIt5q4rM9Wdlw/uvA== 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=nDWAPKa+MkGx2M2EgfVD/JmyF/BXWhVHZkL2pNm8UEE=; b=lVfg3dbRksw6tfAYJvOUpj9spv1sLArCO2zZwbDpv22bh1evSqjxhprctHANFjznyiYQ6h4cx8Zvcem9DionfSYc8VM7Y6sZKQXmIwgR+UCOMYE1VE19KfeSdmVw4fjlQaN0RgVhSaA6h4VZ618CjPTkFnxjsTVhJDDI4u3MMxyLsOrg+e2FCAwXZZhETJe8ftvLNuF7UNXtdgoqRMHIxXYnmPrJWf06QH1ghORgko2tN+aTCwjbv3lQVmsP5FAQisoodxhO93z6TcgdkPSsEYtVT63m7Uusw3Mljut00azq2AtMlPZSbr+Fi5hmkL37CWqk0wersf5DaKaO2OFmTA== 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=nDWAPKa+MkGx2M2EgfVD/JmyF/BXWhVHZkL2pNm8UEE=; b=F7+Xcn/MZIrS9v2juJvyxtzUnw8kJhCx7tNkNw2tanJGeVgXu6ntgX5sLUJ1A1Hm+/y47gxdpj+4CBe1/x7UZ4zvKq77xGmXdvjb24GbAwT2expQlFi+FrWSXl4YZOFrfqlayI7rY4a2FXJmSnXgjAtUNKQ0yUWe2jz+VgObmvA= 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:24 +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:24 +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 05/20] staging: wfx: wfx_update_filtering_work() is no more used Date: Wed, 15 Apr 2020 18:11:32 +0200 Message-Id: <20200415161147.69738-6-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:21 +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: c796be65-b557-43fa-15af-08d7e157c895 X-MS-TrafficTypeDiagnostic: MWHPR11MB1408: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1443; 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)(29513003); 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: qyeyFVYPDUVrp8Cb6XnEhVeIWBjyuTW/nKjG6sHvKL/VhRzal6rfHY5UIpLmBEtxiw/MJu8JrtLYlROVzIIfQY7mgT5HZCBGk/U9E83Xq7SbLxB1+CNr7MPHVC8Ha0Qdq4UEDKmRHDvcFj3P+Q6fQ6KPqH9VEp9Q8+yRlzLsCWrrJVGVMij4j/wjtyyButRUORY8nRgOIu943tO3CfX3FXiyTnL7V2cFDlTszbuMX7oSBeEETJkPiyebnimmXk/4M8dGSCGT2MMIYXXs8LmaUEdgnVNWCVlelK2YfsH/6Xje/MgirfcxFPjqlw6yaJcfhhEy3P7c0RuPSjkUurAAquqVGJ35rJnyNcJY1MzneVSi2eKgSOskOF4ZcW5kTBFobMWyXYwthsHZKr1E6RRU38VD6JsKR+HHIQm8xaW8ro4M4nZlsLMxZwDPhmc6e+0VObBQ1VAjecviz96aDrdvHRJ8r7rHA+KZFaNWuuZi3qukEyBCMVk2MW2uGgzFkSdB X-MS-Exchange-AntiSpam-MessageData: U76sgXc/T8wFvR8pWE1GM2aJoKRmlO4jJxwSSuzebWt58minc3or+Ynq3XkBPPfjLdqJowOCH7x3ZzkkTHBsInivfxs32SndKZoWvY23oo+7QaOU7uPYu6VU+dE59udfBCxPzqx87iHOpWIFN4axj7ZvAfECxLNcZWQE4ruVUzitqbPlUNk2Sb36ce4BScQ2Zktuv0h2H8M8mKZbShIANg== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: c796be65-b557-43fa-15af-08d7e157c895 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 16:12:24.1521 (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: Y+Ivbn4PNecfBgkDFT5qKmqvN0nkEiTXVZUB6PKvLMKGkoPKZm9q+ip97D3SbyO5otdazan8DddJgj91B3eqNQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1408 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Since we had simplified the join process, update_filtering_work is no more used. Drop it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 10 ---------- drivers/staging/wfx/sta.h | 1 - drivers/staging/wfx/wfx.h | 1 - 3 files changed, 12 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index b01467f7606a..7255899b4a5a 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -174,14 +174,6 @@ void wfx_update_filtering(struct wfx_vif *wvif) hif_set_data_filtering(wvif, true, true); } -static void wfx_update_filtering_work(struct work_struct *work) -{ - struct wfx_vif *wvif = container_of(work, struct wfx_vif, - update_filtering_work); - - wfx_update_filtering(wvif); -} - u64 wfx_prepare_multicast(struct ieee80211_hw *hw, struct netdev_hw_addr_list *mc_list) { @@ -415,7 +407,6 @@ static void wfx_do_unjoin(struct wfx_vif *wvif) if (wvif->state == WFX_STATE_AP) return; - cancel_work_sync(&wvif->update_filtering_work); wvif->state = WFX_STATE_PASSIVE; /* Unjoin is a reset. */ @@ -934,7 +925,6 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) init_completion(&wvif->set_pm_mode_complete); complete(&wvif->set_pm_mode_complete); - INIT_WORK(&wvif->update_filtering_work, wfx_update_filtering_work); INIT_WORK(&wvif->bss_params_work, wfx_bss_params_work); INIT_WORK(&wvif->tx_policy_upload_work, wfx_tx_policy_upload_work); diff --git a/drivers/staging/wfx/sta.h b/drivers/staging/wfx/sta.h index 3002d89dc871..8d76fba5f504 100644 --- a/drivers/staging/wfx/sta.h +++ b/drivers/staging/wfx/sta.h @@ -88,7 +88,6 @@ void wfx_suspend_resume_mc(struct wfx_vif *wvif, enum sta_notify_cmd cmd); // Other Helpers void wfx_cqm_bssloss_sm(struct wfx_vif *wvif, int init, int good, int bad); -void wfx_update_filtering(struct wfx_vif *wvif); int wfx_fwd_probe_req(struct wfx_vif *wvif, bool enable); u32 wfx_rate_mask_to_hw(struct wfx_dev *wdev, u32 rates); diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 41d67dc091a6..a69d9c9c37b6 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -91,7 +91,6 @@ struct wfx_vif { bool filter_bssid; bool fwd_probe_req; bool disable_beacon_filter; - struct work_struct update_filtering_work; unsigned long uapsd_mask; struct hif_req_set_bss_params bss_params; From patchwork Wed Apr 15 16:11:33 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: 221150 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 6D75EC2BB85 for ; Wed, 15 Apr 2020 16:15:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 435D6206F9 for ; Wed, 15 Apr 2020 16:15:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="QQ9un7Y5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2410300AbgDOQPR (ORCPT ); Wed, 15 Apr 2020 12:15:17 -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 S2410232AbgDOQMl (ORCPT ); Wed, 15 Apr 2020 12:12:41 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TbsgMox4z5MMRNQuSiBH6Ej3Q4gA2LSK/vGnqtalXNJnO15WZzXQjJ1udqKykceX6cXbGVVdiL1RkWKrEVBNgj89XX1Ctm2DGX1jboC8IIsV3fXXVzv9GS4auRwsDn7aeSoHBD5VmGH4gnmbfUkw8Koh1jI/POqWhcKZ+D/ZVmZFxWkSj4yBS5PmFiIJ+AWXMVtaMEoFS9EsKXM0ZZFVo3eW4XFvVZnvkD3SNKp2dJzwGtaEROiN3LPQig/ZfmqXBwzxu8PTcUlC2aRDhWaiLShAl9HkhW32T9DLmoOzOM5qmW3JBmezkXXM5OR6KI7cDxYvP7jMFveZBJ6PjNpYfA== 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=QnDQbYauOVk+7VMzQsHEDc6STiuq5cdmmsNP+qWKSoA=; b=U2F/wGEeeVmYha7MxScQlFBI8P6W5cPiFmBQ+UL/5HAXtJcgFsCR98Eg1AReKJzhjimf8OEksQ9EISLv+WuVRZeXXNlpDJGwUD5hyq6wd8HxLK19mHjM0WDfUYX6qLvqvJTMzejsV8xHixuKVStAyHbU2E/VmcWTq8xH546VVtF/RohmrA7jHIvQyB0uAs+dEVn3PMdWYLItFG6W15290+rOMlm48s2njzGTO/qLQHCFn/VY8sXiKSqROHcPx3Tg0yfXfQCQohbYBOlm+O9mJQOYAPykXI59cx+QujpbZ4wcSKbsNhlsgN37rnbWrQkEINCHIhacyhRG4hm0kQLXAg== 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=QnDQbYauOVk+7VMzQsHEDc6STiuq5cdmmsNP+qWKSoA=; b=QQ9un7Y5qP+yVKN6zfTThYztyVPAUUVJpe9Ge1tBKsNk67yNUGH6EFOYSreCeUSdiWehILe6MdprgEyjcvL8Oxg1Fwnd6s0RKKeQTKBnoeA8xmot3If0FfZfEOYBrfIsVJAVq9AyD6JRiqbJOtruzAUvgRlcTjA0VZOt+dITvX0= 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:27 +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:27 +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 06/20] staging: wfx: do not wait for a dtim before associate Date: Wed, 15 Apr 2020 18:11:33 +0200 Message-Id: <20200415161147.69738-7-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:24 +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: 45611e6e-b141-4af5-6d1e-08d7e157ca39 X-MS-TrafficTypeDiagnostic: MWHPR11MB1408: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; 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: PH4AjniiZu/Fdl2fZBwAUNKv2i5EbVR5NzOWDnucaN+s6IgxX93vqDKywQDkUWOx42IuKRy6avn7clBoxwXahWhGaEjBHaSr7imKe8M28wbcPXMJYtqAPZD4EA7Zr3d+clvE8BYoYj6yxzZ/vqMiol2wVp5y4b1bQ/BqPUjwp+ty76WOK+DaSCIQk95p2u/tO+QjPGqhs62XLdi2ZGlDWYk3IaTr+KRdOYue6qYLdLIiGZgLbNUPnpdBocM5+SqBc35dGFJWYLTMTFQT1T8xIdIsNy552wCidKJ/ZwyRQ6iNB6T2PrmBEOEY/bA4VaZUpDMCo6DMdHTSBgj4zSM4C96HhYmg66+kq7IJIWYOSeTk+FgGYEi2C2g2FkwcTUoPhGcHaaKhXawxLxxIyQd5TTYW/YaEpG41f8vjXsVrKavh1P+fbmAt04UxUJAnCTMb X-MS-Exchange-AntiSpam-MessageData: TSnaeVkNvOWueAgiLDiIHBD0OQE4ml9GZgBjv0C6GzeyfqjxA8XwyUGXV0ETw9+odL5v/kDQZO8ocKdN2vywsmPJPpWkb8ARBfrv83PwJp77FcMkjaz557lRK1U1pLJsVGZ8KqAEH4202MXEMU3uMrczgzTqSNaeQH44zMCpZi9YE/GLs8+B8M7qkJ15xddJUs1LS9Hx1d033U5NGXcjqA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45611e6e-b141-4af5-6d1e-08d7e157ca39 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 16:12:26.9079 (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: BECVX+Br893c0ueyx2yJkyuVa7DirG7oW9PejcFNIuGrNT0vTLsuIHJpR+XLoXNlrpfIZVqOpwDkheQh/jEpKA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1408 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The only reason we ask to mac80211 to wait for a dtim before to associate is to get an accurate DTIM value. However, we can temporary set the dtim period to 1. Then we can waiting for BSS_CHANGED_BEACON_INFO for the real value. Thus, the association process is faster. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 1 - drivers/staging/wfx/sta.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index b8a01ba0d381..8a2c96dacd63 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -288,7 +288,6 @@ struct wfx_dev *wfx_init_common(struct device *dev, SET_IEEE80211_DEV(hw, dev); - ieee80211_hw_set(hw, NEED_DTIM_BEFORE_ASSOC); ieee80211_hw_set(hw, TX_AMPDU_SETUP_IN_HW); ieee80211_hw_set(hw, AMPDU_AGGREGATION); ieee80211_hw_set(hw, CONNECTION_MONITOR); diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 7255899b4a5a..c8a23146cae0 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -630,8 +630,7 @@ static void wfx_join_finalize(struct wfx_vif *wvif, wvif->state = WFX_STATE_STA; hif_keep_alive_period(wvif, 0); hif_set_bss_params(wvif, &wvif->bss_params); - hif_set_beacon_wakeup_period(wvif, info->dtim_period, - info->dtim_period); + hif_set_beacon_wakeup_period(wvif, 1, 1); wfx_update_pm(wvif); } } From patchwork Wed Apr 15 16:11:36 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: 221156 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=ham 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 419B6C2BA19 for ; Wed, 15 Apr 2020 16:12:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 10F99206F9 for ; Wed, 15 Apr 2020 16:12:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="hVcCur3O" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1415228AbgDOQMy (ORCPT ); Wed, 15 Apr 2020 12:12:54 -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 S2410260AbgDOQMr (ORCPT ); Wed, 15 Apr 2020 12:12:47 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P6182+L9AyRlyyXJW+3iFVmhhTKq/5SFWxCkJVeoBNPSBxYgwVqKYrvJh47jb8sXkNhDVFRj8LpVG9CcQ34pz1kgLxKdHWD9eUqLUD6juJmG3G9LXYSCI4s7045mIMPP1Y+JQN7xa5DghEYwcREtWZp9XqkvSgE4rxy7SefmkbPlvtlaYLo8oCK40UP3DnZ//nHVOiy84V+rxZTg6P2mdvcoMPcd5I7pakSGTjIO1COkqxtKdet1CITtKfDXETyzcCvoeOl/Z0JSeYotPZqogcd0dF1rO9ZMx/gB6MD5+1bCnMdP3yGEHRvVhb8WPiZEL2wxGgpnBxDbOLhMqYoftA== 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=/GgTYWIabQecCI7PUZfPoM9nNc6ZjdlRRo9IajxQppw=; b=R/PbykHEmbSjhK7qUAvRBPi5KlYfjNBWiY7u/2St3JGtJnb7eGbgLcXGUh5kTaxdSamHrm7O0jTWO/FQaaOWSdnaWcm9Zn6EUBBggLEuD1LiDWguSybaf3vgbSgDqsH/7e0oEkT186GEcolJvT630p7L17YV4a9zZL8UuZVvd1o/dURT8S6kND4YZ7mCvslRDgTEd+b/VY6x3qKCapFYAUshTTlXvY/Q2+fNKui56gpNmkhnI/Wi18ALd+yRXWBeMnZHgQztUccDNu9NLPHtHwmUeeQ/+V2IL1E5+tp/+1FZgL2oaDpX1fPc6zWCKUlNykBB7cUjYoogUjqVLJWUtQ== 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=/GgTYWIabQecCI7PUZfPoM9nNc6ZjdlRRo9IajxQppw=; b=hVcCur3Om5eSyV4o5FNHipaMDP1SuXO+sSSyfMOWvgPUElf/Pc95BoLi/FhGCblAqiePKbIKXsJOsYEvNXF/rfTfX/PSe4bCIFbc+PRBXfniWy3dJlVAaRbX14DyliiSuk2WDcSG7FccpkAAmFa3CaOf1Lx9QrPYyBLsxwGztVM= 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:35 +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:35 +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 09/20] staging: wfx: stop changing filtering rule in wfx_hw_scan() Date: Wed, 15 Apr 2020 18:11:36 +0200 Message-Id: <20200415161147.69738-10-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:32 +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: 2b14572a-2c9e-4600-78dc-08d7e157cf09 X-MS-TrafficTypeDiagnostic: MWHPR11MB1408: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2512; 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)(4744005)(5660300002)(2906002)(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: Jh12hm997oRmI0gUR2Ph5zCOBwwWno6Jz+Le+QSLbxBefb9UPf/6j9QvqHuQCSCfP8dO6+YpvNLECrXmAGD3X8kUnsrxcA0IwqaqvZI0eWr+IQZoWed+aDbszb7JYE5HZ2rz4M53UzdlGKgeuwsO3UJ52pZy/dVsUii9mHMMj+vVUTfEbXpdEyuxPBMIi2N9NU+ZklB7JEyDNag9LcevODA6AXH5w2/J0+R/lVrzk68EJhbeNexuwcydnbl5+DLFokLlkaJaGlBPmqZ8inQvt6RbLmh146UbZeU0gwAMXzYGRFsGJFHxYJ9wqBXJlOGeEjQOtm4TmHlOgLAU5cww78hZnWsbcl02WomTChGzNbKk6agXO0yoqm4kgZng+LanMESthMi3orFaV4c9US7N07ZMx7iMkW2IEsHBXn4/60OTLXhTg016G0W4sJdXfn4p X-MS-Exchange-AntiSpam-MessageData: kO8pTUS0KVhMRgpMuMUbKeWjalWIf9S2qBTP1Tl8Es6d8Tj0CaiQt+Hu3mVwimV0xSzWIyPRONaulM9cDgkwWWkN5SyyhLYLPe7GPCRx3hDfS7v5KT429ZeSqgK7jFFn66o7KfZ6SVsawActD4vGQ5DiBrAZOzVHZjyjXUtbMN+wu34gnZS7TmElfIFH2Lx8+iWP8HsvG6d9hrYu7GbNNw== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2b14572a-2c9e-4600-78dc-08d7e157cf09 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 16:12:35.0922 (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: ApX7y/UCqVb9mBWkvKwvd07U7QfxSVFVbzv61/E7prQuUgIFlDzjKfMaie08JpUw1nF+xndp3KUdXSHs8z/2Ag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1408 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller It is not very clear why driver ask to firmware to stop filtering probe request during scan. It is particularly weird because scan is not supported in AP mode. In add, it does not restore previous filtering state after scanning. It seems to be a mistake and should be dropped. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/scan.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c index 0c7f4eef045c..276fdacd7143 100644 --- a/drivers/staging/wfx/scan.c +++ b/drivers/staging/wfx/scan.c @@ -89,7 +89,6 @@ void wfx_hw_scan_work(struct work_struct *work) mutex_lock(&wvif->wdev->conf_mutex); mutex_lock(&wvif->scan_lock); update_probe_tmpl(wvif, &hw_req->req); - wfx_fwd_probe_req(wvif, true); chan_cur = 0; do { ret = send_scan_req(wvif, &hw_req->req, chan_cur); From patchwork Wed Apr 15 16:11:38 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: 221151 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 51851C3815B for ; Wed, 15 Apr 2020 16:14:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 28CC220656 for ; Wed, 15 Apr 2020 16:14:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="XFZBFdOG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1415424AbgDOQOn (ORCPT ); Wed, 15 Apr 2020 12:14:43 -0400 Received: from mail-bn7nam10on2054.outbound.protection.outlook.com ([40.107.92.54]:6037 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2410241AbgDOQMp (ORCPT ); Wed, 15 Apr 2020 12:12:45 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ndF1JfnpJbO/0LaHBYgaBWTsukZ1YivN0LbyVbPYvBann3LTTP2H1PCwN0ow0rkw1MS3uN+TIpYuEkQD3Efao5K1eYdl+uDKXpaEXb73+xdYH0gLWNCg1BaMluV6QXQgxTvHfBgqS4Q83dxajbUzO7L+nxyDLxsZXfL5rxWwWMw237U1xuXf58/bfRI8/cJ/FEFGPlFPMuPLEZl6yzqQPlQLn2nOHpoR+nshTCn2fW0PEkxIfZSp35S8hT7NW+XsV6KFd/EDU5ERZ3aG/y2pXvt/sXnbkMEf0W1+WEpmxbo7OFeTNWnEETndA+wjU4M5CryJcGElxhaeW4+uLcCotw== 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=nU6sNOskPMXTlqA3I0Fivrf0FKMczAep9cVTArvKfOU=; b=Ku7j/bWfbKZkbPbnsPEXuo3wyaakQuVlLhCjFKgcMPcMHKhmNIPgFkFmL0Ole9MfYudIzJjASVpI/isuVqfxCKfTMwk/W1vAv25aMKn1CrP5yJ9BMd+IaZB82A96EHEP3kXdQC3/2RGjaLC5dWdknKRx/tipHmFmm0w3SyojbxLpkllO18xeRhqGOv70DA1R2gCcW5aX7l576HeCtI3uepbWvAMbOyn50YTqvKPcC2c30J1atx/VXssJy2Ks/6MXdTl2MWpOpUDrYbgVWZlH5/bLGI9feotTFp6umL4TL6V8O6k+lnyLWHoQox5jfue9OhAx0LRNGoL1jn7H8qTTQg== 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=nU6sNOskPMXTlqA3I0Fivrf0FKMczAep9cVTArvKfOU=; b=XFZBFdOG+b9fXIG8kRvoAQMQ/LnpvHYoxiJw4Yh8pIkrXKZi7qKAHza8AA9cewCrkYi8KLPacfNXpPS6j9a1z5edF30ZJxgH1P8Kj4XwojrM1THNyMuzjXZypfNa4Rqb+gRP9zdQaq0d6co8i2KbftLD0YkO1qcZcz+fiuqSybI= 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 MWHPR11MB1599.namprd11.prod.outlook.com (2603:10b6:301:e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.28; Wed, 15 Apr 2020 16:12:40 +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:39 +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 11/20] staging: wfx: drop useless wfx_fwd_probe_req() Date: Wed, 15 Apr 2020 18:11:38 +0200 Message-Id: <20200415161147.69738-12-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:38 +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: 6db4add9-f980-415e-6884-08d7e157d1ee X-MS-TrafficTypeDiagnostic: MWHPR11MB1599: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:454; 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)(376002)(396003)(346002)(366004)(39850400004)(136003)(4326008)(66476007)(107886003)(81156014)(86362001)(8936002)(2616005)(6512007)(6486002)(316002)(52116002)(66556008)(66946007)(6506007)(8886007)(2906002)(1076003)(36756003)(66574012)(5660300002)(54906003)(478600001)(16526019)(8676002)(186003); 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: Xzva1H4bY0AVbYCJ6GhpMnLhSa4Flltz1Gq0iBGgLD+fHn6izER94j1zyMuy69cDnlV+qhE4nSvHDlPXfQXIVLoii1rtHdJMDRlI8iO1FvbTM+HdRfzKC3+qEpvLekYZGqIotquU64hT4mk6SxOBgC0rbzV52sRMWLNzDplB19uCBDPdjLiRYXVu0teYqaHeL8HBO4UpC2iIz9ltPDWA2TQb3y4olQhAPe/kOggszX69+cHK/bHwq3pGqDJI0Ms9a23vf9oC+PlfdE5j96lVAUYZ1hKm2H6Xy7GdyplaAPPnK4W3Z0ZCqWtWIKC3qqyk8z6pEDTmYpRRnK9tz6cM5vxGj89yN9472jIUAjTee3HqHnkkZ+x2SW1h+jGJ1QbQBgAPuLqNx54y3H/gC2UPpU4RYcWJlYx9WOCr6tljrrUngSaT08k43Fc7Y+a/OSSO X-MS-Exchange-AntiSpam-MessageData: zOY6d8KMU4yzr8kbCuWIF2rQAC6QjvC834oyQJXAfuUXpL+xkZCPqKVJDjsfAmSMNNz1VvmxoOojDlSYml7o8BOKNJOC2Fvj5+bXIqtpobgO9kGpNKzj/ur41+VnrJC16D/uNN8Ko95H+w6+TZA6xuY/dhZWgOooiaAlcbM7HJHSTAR0DbjkS5xciR5aCIyfDoqPtBU/xoFur5Msb5lDZQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6db4add9-f980-415e-6884-08d7e157d1ee X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 16:12:39.8270 (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: HSrEAxeCthlfTUz8M8hQ9w4FzOxk0ogD4sj8fv6igRPQpzx8gzqyh0SFXW0JJLJy1UWbszj3ld8g5VGWahoKEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1599 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller wfx_fwd_probe_req() is a function of two lines called from only one place. In order to uniformize all filtering functions, drop wfx_fwd_probe_req(). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 14 +++++--------- drivers/staging/wfx/sta.h | 1 - 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index b785b1b7d583..8d2365a2e35b 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -113,13 +113,6 @@ void wfx_cqm_bssloss_sm(struct wfx_vif *wvif, int init, int good, int bad) mutex_unlock(&wvif->bss_loss_lock); } -int wfx_fwd_probe_req(struct wfx_vif *wvif, bool enable) -{ - wvif->fwd_probe_req = enable; - return hif_set_rx_filter(wvif, wvif->filter_bssid, - wvif->fwd_probe_req); -} - void wfx_update_filtering(struct wfx_vif *wvif) { int i; @@ -249,9 +242,12 @@ void wfx_configure_filter(struct ieee80211_hw *hw, } if (*total_flags & FIF_PROBE_REQ) - wfx_fwd_probe_req(wvif, true); + wvif->fwd_probe_req = true; else - wfx_fwd_probe_req(wvif, false); + wvif->fwd_probe_req = false; + hif_set_rx_filter(wvif, wvif->filter_bssid, + wvif->fwd_probe_req); + mutex_unlock(&wvif->scan_lock); } mutex_unlock(&wdev->conf_mutex); diff --git a/drivers/staging/wfx/sta.h b/drivers/staging/wfx/sta.h index 8d76fba5f504..a90eaf5043a8 100644 --- a/drivers/staging/wfx/sta.h +++ b/drivers/staging/wfx/sta.h @@ -88,7 +88,6 @@ void wfx_suspend_resume_mc(struct wfx_vif *wvif, enum sta_notify_cmd cmd); // Other Helpers void wfx_cqm_bssloss_sm(struct wfx_vif *wvif, int init, int good, int bad); -int wfx_fwd_probe_req(struct wfx_vif *wvif, bool enable); u32 wfx_rate_mask_to_hw(struct wfx_dev *wdev, u32 rates); #endif /* WFX_STA_H */ From patchwork Wed Apr 15 16:11:40 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: 221152 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 3E129C3815B for ; Wed, 15 Apr 2020 16:14:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F4D9214D8 for ; Wed, 15 Apr 2020 16:14:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="MCNDluEQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1415247AbgDOQM6 (ORCPT ); Wed, 15 Apr 2020 12:12:58 -0400 Received: from mail-bn7nam10on2054.outbound.protection.outlook.com ([40.107.92.54]:6037 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2410281AbgDOQMz (ORCPT ); Wed, 15 Apr 2020 12:12:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z/W43N+FM2AveQtp4tQHvDt87MaW/Xn0fo7CRcQH3i/JHc6+cq4Wxo+FvG0ZzKWzyqW6P6QSXxO0yCCC734z3AEnU/s3J9LnnmLeEAYLhZvw3U/FHkYVmSGWKfQS8Pmm3K8Y3+sjvJZXPV0wiLph20W/cVcbKae13a3JlGmJ/oY3LWo4F16MagroovXa7JthPn+NJlH+vUgtPofqDo7xGYWSIY9C5o8/L96ssPCaF4GgXbSz+vNGQGmS/XIrHxNfsOaK52uy/aHBXz9+b8QLaJsWYM8wIP32AjJ05++9kXoYIsOUNTP7Rk+3yi3KWbP8rTAeanKB+imxeYxHRAt+gg== 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=fiI1Ngo5lz8VctH56hbGmIIpcY5X2PxEb0j7B11g3Rs=; b=HG9/SKf2+JmsQKfDPC7fYv73YpTbBBNbWfvyEJ8y4opNPwkgP63QI/L4nnomzv+QnLvxentibZwbVRPwdA/C+/aTwE+kfMyep5P6FddbfMyz0lXAY1cVGowJnpmESx5TNQBYKIn866pgvRhj9Ggrjtfv4Mnlu0Sa8w9TgzIDp4Zar2clp0oIS2d//MFOveT9xyEGSsaA/uQGJjon0EQhbHStX5f0oAigHvanIo6qkgMkOIqXb0Hxh/p+PVlJVggh4+A5ICPayxsX+u9NYNXXU48WSgWN2g+uZMvJclwF4NNGoCHhj9fouSzU8Wsl8TiM1HHh0YTH/3EEnRQI8fFRxg== 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=fiI1Ngo5lz8VctH56hbGmIIpcY5X2PxEb0j7B11g3Rs=; b=MCNDluEQs2Q8p6wTjvZO2twkVobOdqHWme0IVCvWYTpgooOkNlQTpyoVU1G8RZi96ByB2rmfU8b4y4zcqOOVr+ouuo5oIRn2Emc/Tw6wiRLBs9JH6d629GZ3rdG4oEfkKUrfpshe7IAD2OLzHruSrk12ys76bJ/UiO1MSKEJj3U= 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 MWHPR11MB1599.namprd11.prod.outlook.com (2603:10b6:301:e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.28; Wed, 15 Apr 2020 16:12:45 +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:45 +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 13/20] staging: wfx: align semantic of probe request filter with other filters Date: Wed, 15 Apr 2020 18:11:40 +0200 Message-Id: <20200415161147.69738-14-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:42 +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: 688a55d0-704b-421c-a88a-08d7e157d507 X-MS-TrafficTypeDiagnostic: MWHPR11MB1599: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:949; 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)(376002)(396003)(346002)(366004)(39850400004)(136003)(4326008)(66476007)(107886003)(81156014)(86362001)(8936002)(2616005)(6512007)(6486002)(316002)(52116002)(66556008)(66946007)(6506007)(8886007)(2906002)(1076003)(36756003)(66574012)(5660300002)(54906003)(478600001)(16526019)(8676002)(186003); 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: WhW18EeacP7X1k0ag8vbAqkNov7m87/hIOEijDbdjFb1cuxEsX8Sqi7opukIjhl89L5RCAZLKKYz+c6hwCRqPARbK0E1EChzTm6x46fN/2CW8Nn+7fFEwzUJX/koIcEu2kjcHq7iHBPzpoTZVnyTUSAVdAOamr1ed93sUlVz3fz8y0UdRGn0oFjPN6wNAQhfOxeCvSB+TFbYAjWxlxNZUR6yM92qwsF7dlKigrBLb+TxV+SEtzRQLqZnnUcG4PtHTZpc9euQRs186gv1RzGlxL6+aVtk/VM3g7oam5eqqL8Q/zMb8CTPAMCSa14gkN6nr1plMFWa06CbN/IYJZqHHbs2cgRqj8hRBpwi7sp9FqJdwgbrz6z3Es4+FxNynv7X5b9k4CI41Z6b8BJv+Wp+TfucCjnuWcKjr+OWIF3nl5FokvxkyMDcXWjv8316d0gB X-MS-Exchange-AntiSpam-MessageData: vOOjjA/3rcbF9pn96qqRPoTaPWd5mbly0JMENR/mEdB+a01K7lZ2Ra0JnzLntieO9/VReMriLYtYHHDdQEhghrAakwZ/7vvzZyNq5kX2iS1/Ge5z/8Xk/4ghEQ2LlGYh1/05D39L00WjlNSXEtKKQz3bl3Q1Caw5kFYS4oogsvoMG6pdZIfV1kNQNqgdJDmvkzFVfUp3KdXBzCeOivwMzQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 688a55d0-704b-421c-a88a-08d7e157d507 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 16:12:44.9647 (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: fBbScTTXrtsZPuZB0OseV9H/1hoORNum0dYroprtaKlJP8Ltom6h1yZPsFfKGVTTUVFBxD+PCHOmCs/YZl9LwQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1599 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Filters provided by HIF API are sometime inclusive, sometime exclusive. This patch align the behavior and name of the probe request filter with the other filters. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx_mib.c | 4 ++-- drivers/staging/wfx/sta.c | 8 ++++---- drivers/staging/wfx/wfx.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index 41f3090d29be..1d26d740bd0b 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -90,13 +90,13 @@ int hif_set_macaddr(struct wfx_vif *wvif, u8 *mac) } int hif_set_rx_filter(struct wfx_vif *wvif, - bool filter_bssid, bool fwd_probe_req) + bool filter_bssid, bool filter_prbreq) { struct hif_mib_rx_filter val = { }; if (filter_bssid) val.bssid_filter = 1; - if (fwd_probe_req) + if (!filter_prbreq) val.fwd_probe_req = 1; return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_RX_FILTER, &val, sizeof(val)); diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 963cac83b6a8..3a105d485237 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -136,7 +136,7 @@ void wfx_update_filtering(struct wfx_vif *wvif) } }; - hif_set_rx_filter(wvif, wvif->filter_bssid, wvif->fwd_probe_req); + hif_set_rx_filter(wvif, wvif->filter_bssid, wvif->filter_prbreq); if (!wvif->filter_beacon) { hif_set_beacon_filter_table(wvif, 0, NULL); hif_beacon_filter_control(wvif, 0, 1); @@ -242,11 +242,11 @@ void wfx_configure_filter(struct ieee80211_hw *hw, } if (*total_flags & FIF_PROBE_REQ) - wvif->fwd_probe_req = true; + wvif->filter_prbreq = false; else - wvif->fwd_probe_req = false; + wvif->filter_prbreq = true; hif_set_rx_filter(wvif, wvif->filter_bssid, - wvif->fwd_probe_req); + wvif->filter_prbreq); mutex_unlock(&wvif->scan_lock); } diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 53ed4c137b19..3941462097a4 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -89,7 +89,7 @@ struct wfx_vif { struct work_struct update_tim_work; bool filter_bssid; - bool fwd_probe_req; + bool filter_prbreq; bool filter_beacon; unsigned long uapsd_mask; From patchwork Wed Apr 15 16:11:44 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: 221155 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 42E13C2BA19 for ; Wed, 15 Apr 2020 16:13:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0D49B206F9 for ; Wed, 15 Apr 2020 16:13:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="frVDpIDi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1415284AbgDOQNJ (ORCPT ); Wed, 15 Apr 2020 12:13:09 -0400 Received: from mail-bn8nam12on2054.outbound.protection.outlook.com ([40.107.237.54]:6138 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1415244AbgDOQNA (ORCPT ); Wed, 15 Apr 2020 12:13:00 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gRhExUrctMZxxmugiV57+YkvEAV8rFGVWXsb7NcmOjOwdIzDBo0R5E8E/F2wCQcqWwjrQav1+2LjEErRMWC9q+A5hWOYkN1blLd3HeJmDF1312xODFoYQv4pYPTz1M+5HUpUnT4eqVdruR6v6K0YBb71aziWRjRxmmb8bm0xgPVmvFoB//D9KwxwQNWHLY2oeHDBpmAKRUzO1Zwwnj//FnXYYxTANiRaW61D6Dx43C8+Zhv/zozOAyB2PwaF6+SCtFGh9boYcppUakoo8veHxIpfJed+hrYKpETa9e7jiC2agLcdAlR2ilcyBa8ZEgFwWeXWvqv136xCYKZI1jxg8w== 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=PsLs1OxEeKp373acEswvEzW2lwt+yt9ZoQQ9xvugGxc=; b=CErpnoB3ydnf5AwfRodH6hQ9idkEY9vP9eN6RjrpLGOdSGH8Oe0H68jA+mf1ourRDcHBaLj8n/ljrl8dwNsmlLi1md2hky8yvXJFhKaQfT0hRdYHl5IlSZd182KyDLvhuQjvDhF1iZHhDp9IzuMzUXjCvM+9E2Yz+ZyFvIdMIv9687Tv6uK9z2mutVVQRe/eDQTOofSAFMysZ9Dob6APLiZS4A+rYJGKI0qXTLvZi75RCtz/FajPYDrTJvXlr+zT6rMEIrgbf933PRDBtK7UbZe5iWHQ9nUHh2c0uH4RMe2aE5vwhJv8GHNdLM9xT+K/F4dbBM77BT3nsD/vBKZyzQ== 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=PsLs1OxEeKp373acEswvEzW2lwt+yt9ZoQQ9xvugGxc=; b=frVDpIDi/GshSU3iwaa3n/84W7bQyYS4otzWPuPP3PrU0kNNwdyJKUGczHMSPmFx6Kf+zjxLAQV3lO+qQCMVAq51TMab3y0XC7Qgg6aR8sYNTMwtaSMBheAgHJE0nOlsPZNoDxvzTsiPxBH1T+8boeqzPcIMEZFQ3ilxXxL55dg= 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 MWHPR11MB1327.namprd11.prod.outlook.com (2603:10b6:300:2a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Wed, 15 Apr 2020 16:12:56 +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:56 +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 17/20] staging: wfx: split out wfx_filter_beacon() Date: Wed, 15 Apr 2020 18:11:44 +0200 Message-Id: <20200415161147.69738-18-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:53 +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: ea04f042-a629-4c60-e80a-08d7e157db9d X-MS-TrafficTypeDiagnostic: MWHPR11MB1327: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; 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)(39850400004)(136003)(346002)(366004)(376002)(396003)(4326008)(81156014)(107886003)(52116002)(54906003)(8676002)(478600001)(8936002)(6506007)(5660300002)(6512007)(36756003)(8886007)(86362001)(316002)(6486002)(1076003)(2616005)(186003)(2906002)(66574012)(6666004)(66556008)(16526019)(66946007)(66476007); 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: O2Lp7+U/OT/rMJQBeD0/iBf8c2b/yhzRtiCQNs+i48TsH3kW3V4lGONUcI8DosZPexZKXibdizDt6QyxBvMQBQZlxP3B/LZlhSY1BgDUSibI1ExNxo1dS+E5CCkfBBS1OW/i+MsgrH4UbE37CYm/ESlfN0w0tQSqaM4YYcDLpP9GONWUvoF2UEfSj6RKWsesVQsrZsbr0yd+OZfR8MpW6FGpLy3GAZ+jw94UuJHlIVavP4dsn4PxM/1UcrpdM5kTozJRXtvJ1jLtBxKINWlOgXxelbwsjnY1kZZzhcJTaCr17Ix0KkvbJ0PxK9teYFreYNdoCtaR5pompl+Vg1D0B4Eo0xtePjL4HBpIzaYZZdHRaxhKCRh36XG+YmOZccWV5yLW8EXovjpY+OYjTBZYyAb0jDq70jnb/XX+HDHLwUnP9gbRNzFCjH6PiMRSNjcY X-MS-Exchange-AntiSpam-MessageData: 05Osgtzraxa5JC0PyCJDDxDkke/AGxh74JWqKTJRwrdYsv3urwAdvrYes4v8gcVU3Ee7T2MwucWTmg/nmOZGLA5mYV8vqzTdf1/2xGe8RIYq4mwpXNfJiclDXt5bDxT/nZ8Mn4ihRVDEAQSR6md0J/u+4KJGHVI7dVvWPXPpA9kEGbYBUp8p8b7oU504quxt3T6QwBEYOAxwuncruHlidg== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea04f042-a629-4c60-e80a-08d7e157db9d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 16:12:56.2256 (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: isU5zsJC5pe/1+Sc0h0ujkpKofWmY/dSbC0oxiA5pvJOOQl9z0YXYmmzKej6I/xELhKERMCrn3SYON0xN7MH2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1327 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Currently, wfx_update_filtering() is sometime called only to apply the value of wvif->filter_beacon to the hardware. It is nicer to have a specific function for beacon filtering. In add, an attentive reader would note that wfx_update_filtering() is always called after change of wvif->filter_beacon. Thus, it not necessary to store filter_beacon in the struct wfx_vif. We can just pass it as parameter. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 23 +++++++++++++---------- drivers/staging/wfx/wfx.h | 1 - 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index a9261ef4b4c5..1ccd40a3322f 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -113,9 +113,8 @@ void wfx_cqm_bssloss_sm(struct wfx_vif *wvif, int init, int good, int bad) mutex_unlock(&wvif->bss_loss_lock); } -void wfx_update_filtering(struct wfx_vif *wvif) +static void wfx_filter_beacon(struct wfx_vif *wvif, bool filter_beacon) { - int i; const struct hif_ie_table_entry filter_ies[] = { { .ie_id = WLAN_EID_VENDOR_SPECIFIC, @@ -136,13 +135,18 @@ void wfx_update_filtering(struct wfx_vif *wvif) } }; - if (!wvif->filter_beacon) { + if (!filter_beacon) { hif_set_beacon_filter_table(wvif, 0, NULL); hif_beacon_filter_control(wvif, 0, 1); } else { hif_set_beacon_filter_table(wvif, 3, filter_ies); hif_beacon_filter_control(wvif, HIF_BEACON_FILTER_ENABLE, 0); } +} + +void wfx_update_filtering(struct wfx_vif *wvif) +{ + int i; // Temporary workaround for filters hif_set_data_filtering(wvif, false, true); @@ -194,7 +198,7 @@ void wfx_configure_filter(struct ieee80211_hw *hw, { struct wfx_vif *wvif = NULL; struct wfx_dev *wdev = hw->priv; - bool filter_bssid, filter_prbreq; + bool filter_bssid, filter_prbreq, filter_beacon; // Notes: // - Probe responses (FIF_BCN_PRBRESP_PROMISC) are never filtered @@ -213,9 +217,10 @@ void wfx_configure_filter(struct ieee80211_hw *hw, // Note: FIF_BCN_PRBRESP_PROMISC covers probe response and // beacons from other BSS if (*total_flags & FIF_BCN_PRBRESP_PROMISC) - wvif->filter_beacon = false; + filter_beacon = false; else - wvif->filter_beacon = true; + filter_beacon = true; + wfx_filter_beacon(wvif, filter_beacon); if (*total_flags & FIF_ALLMULTI) { wvif->filter_mcast = false; @@ -501,8 +506,7 @@ static void wfx_do_join(struct wfx_vif *wvif) * Disable filtering temporary to make sure the stack * receives at least one */ - wvif->filter_beacon = false; - wfx_update_filtering(wvif); + wfx_filter_beacon(wvif, false); } wfx_tx_unlock(wvif->wdev); } @@ -703,8 +707,7 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, info->dtim_period); // We temporary forwarded beacon for join process. It is now no // more necessary. - wvif->filter_beacon = true; - wfx_update_filtering(wvif); + wfx_filter_beacon(wvif, true); } /* assoc/disassoc, or maybe AID changed */ diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 310d95478824..c30e6984aec1 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -90,7 +90,6 @@ struct wfx_vif { int filter_mcast_count; u8 filter_mcast_addr[8][ETH_ALEN]; bool filter_mcast; - bool filter_beacon; unsigned long uapsd_mask; struct hif_req_set_bss_params bss_params; From patchwork Wed Apr 15 16:11:45 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: 221153 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 E513CC2BA19 for ; Wed, 15 Apr 2020 16:13:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BDDBC206F9 for ; Wed, 15 Apr 2020 16:13:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="C2JOXtjM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1415347AbgDOQNn (ORCPT ); Wed, 15 Apr 2020 12:13:43 -0400 Received: from mail-bn8nam12on2054.outbound.protection.outlook.com ([40.107.237.54]:6138 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1415267AbgDOQNE (ORCPT ); Wed, 15 Apr 2020 12:13:04 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UIeFKwUWQrzZgt1hBWGSAdMhvg469GL0/WgQqSrx9V3NkvDOZZxxBDC7Tq3NY5zrELZZWZ+tdOgI+WHlRlRkyZQe73X5qbdLo3/zGZbKoOAUz8TeYNnPlNe95dcvakyKo7IHNqOTRR0f4DRoFFXjD/sE6OMDWk2e/O+cKDaHXYNb/BFJc9JIxHPs9KPvEetGWW1/3MEZiC9UGJ1yiU8eNvdtF7P9XwvGLgtBRzDYC2AQvhlHuZOA4aa+rUU4YrZC66RMG0a+bTSfcx3bYLQ7Iz3ZVQg42wbFhPkEGepJ1sXybk5rlWJx3L+DcQmwMtywWi5Iqe0c+biBQb6jwH3bxw== 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=hcCr24adU8BKj8HLPi7q1EyV3rxYejoJm4kfH/IpBDE=; b=EV8BRHC5nAgVQDuoHZdYdN5mvnlfJgAcxAfJFL2bIrf+oBi20A3L07RJ71KoS3lxIFnTOO73YYedJzW8qZiXdb0MNPw3BcUYFPUJycTjps7hDZzDovYZTJqYLaT3vnZLbI/9ds0mbqNu41kz7zdzpSRSrzL45n/rpd4KUn49mNvPq+iIksgTIAsIk/RyT7fmW2237AQyJ7PFwxyECn++Nfm8iTM4IDsYZhjordi7qzix3MtNMz55vl/vJmW60+fG5Ig/usbc/PqGF+sYI3e9bqK4U7l9ND6zWtvzlFY9/pTES7CCih5s1zLgOnmxpxMRFSF81FPbN8DAM+GgL9+PvA== 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=hcCr24adU8BKj8HLPi7q1EyV3rxYejoJm4kfH/IpBDE=; b=C2JOXtjMmYlwMW/mJ3RqnHP9AjeFNdp1zp1MR/aqzvp5dTNseZw9rGlUxTHyw3iGPdSrJbH60WKsvkbjmXpdy1ZwBiOf/FhIzmfCwFvUkrmmtBl5C+wmjcHfnNIMuD51bsfTYZs/i9eJ/1+LEJ6VN45O3ErgwgbRSHvy/SG17Xg= 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 MWHPR11MB1327.namprd11.prod.outlook.com (2603:10b6:300:2a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Wed, 15 Apr 2020 16:12:59 +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:59 +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 18/20] staging: wfx: drop useless filter update when starting AP Date: Wed, 15 Apr 2020 18:11:45 +0200 Message-Id: <20200415161147.69738-19-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:56 +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: 8981bb6d-dc74-4ba9-cbe7-08d7e157dd1d X-MS-TrafficTypeDiagnostic: MWHPR11MB1327: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:497; 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)(39850400004)(136003)(346002)(366004)(376002)(396003)(4326008)(81156014)(107886003)(52116002)(54906003)(8676002)(478600001)(8936002)(6506007)(5660300002)(6512007)(36756003)(8886007)(86362001)(316002)(6486002)(1076003)(2616005)(4744005)(186003)(2906002)(66574012)(6666004)(66556008)(16526019)(66946007)(66476007); 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: dViXQkS0VuxntBvbUWkqRT4blSsR0qNqSI3IfrgG/EVLjr2+9yvHhXFslqx3YIBm2xtK88EdpT2DZuL8QCdqEsGnXTEIxgbDdHYG4tNs5DEpI6qZeXBCBtJKz0vzAjP2l8PAMEf30sJVC4CwgVho3N4gB1FinA0tuCbaNbM2TBgz5bxFckJg/pZRe4QVcWY4osKr1ExaZr0QuOC2Ax1mrkoN+oV56E7gFfvoxrf6Q/Hyh8uRRsLthwDqDveC/M5F2YvkqQhG742hkSAibn5y4hkkaTyi65/P+HxE/g+Bxm/Bce6XMBEJEobqGfSZnmDEtvnpt9P/+ZrHKk69x9GeS+MUAPeNRILYmUK3X2flZguFwndh12rfw6WMF0nNeX3UZFJwBsveXYblIWZ38sYs/jP9955PNBC0Bsm7YQ3Sl6NK8MhBwqlskDtM7cP5Fm8v X-MS-Exchange-AntiSpam-MessageData: 5y2aEezPkh1X+OS0XKavQqDgbAJyyDvyjFO6Ee9PXd+D2n3a6GZKFK+5vUcAafn3e/Hwi4CjpjSHIFi2zm1YvOCANjxQ3ArLL325zqLbp3mq0Su/+FSBJJq3m5tmgWj+qfh+2DxFedTRohsskixTX6TWFfdEZ4PKLfLlGxOZH0jBUcfcz512Fs17daJX3d8uw0NUbK0LqBhY89uViojQ7A== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8981bb6d-dc74-4ba9-cbe7-08d7e157dd1d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 16:12:58.9104 (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: xNb6VtJBtn/KjTBgsDnREvSEVLeqUIA70mqOgORT4Thofx/52rVL6cX2q1554WLLUwrFSgy46POKeHyeOsN/Jg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1327 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller mac80211 explicitly call wfx_configure_filters() before/after starting AP. Thus, it is not necessary to call wfx_update_filtering() from wfx_start_ap(). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 1ccd40a3322f..69a5823af284 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -579,7 +579,6 @@ int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) wfx_upload_keys(wvif); wvif->state = WFX_STATE_AP; - wfx_update_filtering(wvif); wfx_upload_ap_templates(wvif); hif_start(wvif, &vif->bss_conf, wvif->channel); return 0; From patchwork Wed Apr 15 16:11:47 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: 221154 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 7D9C6C38A2B for ; Wed, 15 Apr 2020 16:13:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4EC96206F9 for ; Wed, 15 Apr 2020 16:13:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="fCxQBa+h" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1415328AbgDOQNe (ORCPT ); Wed, 15 Apr 2020 12:13:34 -0400 Received: from mail-bn8nam12on2054.outbound.protection.outlook.com ([40.107.237.54]:6138 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1415293AbgDOQNT (ORCPT ); Wed, 15 Apr 2020 12:13:19 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jpXGtCFGELEqSPYIPzJfzget8T7ZEk1z1+RCOYaM+rd9kK8+aNfgN5rRHhuKjTVqOY+r9pykab2jwpPFMWBfGo4JLIlFO48EhM3kV78gh6CdrY3Ll6C3V7axBxUoJxjxy6kn466y7OBIbzDq7vJPMmiwtKiK4JAU6JPdJ2ft7RFOtSwTX0NTnlFYUw7+3XGoDs776TCkjMSdNbIC2OUCSvZCyJXlKxRocaWhXri+KvsSxWZosw5kZa4t6o6zY/mGySTMkHLs2Zedlcpm73HBUhxaqXK8VdxCAfqPNEZsejNF4Uj+KLCz17gisiuHO+/tJHnzFNv0Pm8JIBRRZ1NQMQ== 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=xMMpG8gnISmIROGGpUscDAlczvuyFeJmquYoEVpkyCc=; b=LzMRUz1SYcRd2U+L/akzoL7CzfaRb3XW2VbKaBloheFyRq7RQNvHIUmUWdj2LzZMy8JnDM2hk8gQDybqMPqBYhptHWWdIHZVgdcGTIk1DBw1rwv076QGV8NvVjo/gnI/d7LvB7sMzi9pw+9tGkFWOtDBqOZwWd3yPak2TuDXkGgz9cyJ/R1SRCM/dc2yWm8JODGkzi+Opqk79BICLUpl/ExgxqxHJSmxUczlHatmF5MXx+CTKT2JIwAy9Q63SuWd+y+zFlBZhXnkAWUJmK2BNP1TqZn7txEC7P9jJtH+qi0fnqpp6Tb/GJZZQI88xvLljHpWvsHU/PGprvjhQI82Zw== 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=xMMpG8gnISmIROGGpUscDAlczvuyFeJmquYoEVpkyCc=; b=fCxQBa+hQFwVK5FWAA73+Evh7H2VLdOy4+W6tyuUJARgu8LcJYdO1Y7xXTbzGLqKJ8+DS4PKtwq2/5iYvzX9PEN5B/3ppgxiE0C1BxmV204b4YadSvALQCtwMd8/JBQmF/+J3abhEcusuzbdFXIebRfcNaYsJ3Z0/yRATAS2t+k= 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 MWHPR11MB1327.namprd11.prod.outlook.com (2603:10b6:300:2a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Wed, 15 Apr 2020 16:13:03 +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:13:03 +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 20/20] staging: wfx: update TODO Date: Wed, 15 Apr 2020 18:11:47 +0200 Message-Id: <20200415161147.69738-21-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:13:01 +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: a1a22fcc-e692-45d0-a3ad-08d7e157dfcf X-MS-TrafficTypeDiagnostic: MWHPR11MB1327: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; 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)(39850400004)(136003)(346002)(366004)(376002)(396003)(4326008)(966005)(81156014)(107886003)(52116002)(54906003)(8676002)(478600001)(8936002)(6506007)(5660300002)(6512007)(36756003)(8886007)(86362001)(316002)(6486002)(1076003)(2616005)(186003)(2906002)(66574012)(6666004)(66556008)(16526019)(66946007)(66476007)(15650500001); 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: KiB6MGJ3LRxuqSR9ScBeyqxStb7RTb+RkengRBAsQ2e0oVag/7uoLTuK7Amle7WzDmniCXO47tFcuPUx02NcPAlvjgLv9PiNg0Bi3JfVLVOLybnzVBI1WUFMXGQFJLrpUoumWVXAjc2dmJJkShPUXlDgG56gAX51R2BxwBVFVCQ+Yljtq6HeKTvLzB4j3gezFbUpAQsFu16yDKlko6LBo6m+TEB5P1Lv9y/003X5eB34PAu3SxaqkzP141WvGjkQIQ1wDfOo16X35JyPDnD6yCwTVvIl8/AflzHmJAWz804/s+WK+zTziwvhn1V5VDp9NqcTc4/wHBr+vLWpDbQcd1/3Dvj6NEOMm4gGBD0UleDyjZaH17zX+eV7a8XUAjgEF6J2iOHvNnKghvlRSsTgHhhydm0oQeQ02vTgX8N0TMY0OvPGqqZiU09twAurTUFiw1tgMSm+WyQ5MREzDm3xucyzlfMAkiQUoif29bCy/hyB4epXdXev4vmEYWvHPLoNuy+qEw8C1BROXWh20YD+SQ== X-MS-Exchange-AntiSpam-MessageData: 3ImYzr2IDHDpw+QGVHWrxWCEaO++cRZ0WTIPpjcWED8fv+atShJRumVSzxW9z6tP3Do7oFvG2sOU0aJiFr4eKi0WRegwbLwv5m26wwQ/oAR4O25qrqT6lIp1twjMwtJx//GpccBmpDtRsUH04Y/qY7QERWUsK76fEqIesbRm3AGJ/fL/+A6bueTJ8mhNEWXA9nZyOT4eEcIpvzn8JrwsNQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1a22fcc-e692-45d0-a3ad-08d7e157dfcf X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 16:13:03.0635 (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: zqMko9GGvsZMwM7qX9CPHvKCC9ctloagB2NdmXMYs5kr1CgS1IskcfnuozwEIjMD0C1TtYIT22z9SLXRAa/Siw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1327 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Update the TODO list associated to the wfx driver with the last progresses and last remarks made by reviewers. The items about support for P2P and mesh have also been removed. Indeed, it seems that the device does not fully support them. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/TODO | 40 ++++++++++++---------------------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/drivers/staging/wfx/TODO b/drivers/staging/wfx/TODO index efcb7c6a5aa7..fca3332e42ce 100644 --- a/drivers/staging/wfx/TODO +++ b/drivers/staging/wfx/TODO @@ -1,26 +1,18 @@ This is a list of things that need to be done to get this driver out of the staging directory. - - All structures defined in hif_api_*.h are intended to sent/received to/from - hardware. All their members whould be declared __le32 or __le16. - See: + - The HIF API is not yet clean enough. + + - Fix support for big endian architectures. See: https://lore.kernel.org/lkml/20191111202852.GX26530@ZenIV.linux.org.uk - - Once previous item done, it will be possible to audit the driver with - `sparse'. It will probably find tons of problems with big endian - architectures. + - The pointers returned by allocation functions are always checked. - - hif_api_*.h whave been imported from firmware code. Some of the structures - are never used in driver. + - The code that check the corectness of received message (in rx_helper()) can + be improved. See: + https://lore.kernel.org/driverdev-devel/2302785.6C7ODC2LYm@pc-42/ - - Driver try to maintains power save status of the stations. However, this - work is already done by mac80211. sta_asleep_mask and pspoll_mask should be - dropped. - - - wfx_tx_queues_get() should be reworked. It currently try compute itself the - QoS policy. However, firmware already do the job. Firmware would prefer to - have a few packets in each queue and be able to choose itself which queue to - use. + - Support for SDIO with external IRQ is broken. - As suggested by Felix, rate control could be improved following this idea: https://lore.kernel.org/lkml/3099559.gv3Q75KnN1@pc-42/ @@ -28,17 +20,8 @@ staging directory. - When driver is about to loose BSS, it forge its own Null Func request (see wfx_cqm_bssloss_sm()). It should use mechanism provided by mac80211. - - AP is actually is setup after a call to wfx_bss_info_changed(). Yet, - ieee80211_ops provide callback start_ap(). - - - The current process for joining a network is incredibly complex. Should be - reworked. - - Monitoring mode is not implemented despite being mandatory by mac80211. - - "compatible" value are not correct. They should be "vendor,chip". See: - https://lore.kernel.org/driverdev-devel/5226570.CMH5hVlZcI@pc-42 - - The "state" field from wfx_vif should be replaced by "vif->type". - It seems that wfx_upload_keys() is useless. @@ -49,12 +32,13 @@ staging directory. - Feature called "secure link" should be either developed (using kernel crypto API) or dropped. + - The device allows to filter multicast traffic. The code to support these + filters exists in the driver but it is disabled because it has never been + tested. + - In wfx_cmd_send(), "async" allow to send command without waiting the reply. It may help in some situation, but it is not yet used. In add, it may cause some trouble: https://lore.kernel.org/driverdev-devel/alpine.DEB.2.21.1910041317381.2992@hadrien/ So, fix it (by replacing the mutex with a semaphore) or drop it. - - Chip support P2P, but driver does not implement it. - - - Chip support kind of Mesh, but driver does not implement it.