From patchwork Wed Apr 15 16:11:39 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: 216000 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 058D0C2BA19 for ; Wed, 15 Apr 2020 16:14:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D250520656 for ; Wed, 15 Apr 2020 16:14:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="T9oG9EHA" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1415398AbgDOQOd (ORCPT ); Wed, 15 Apr 2020 12:14:33 -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 S2410266AbgDOQMt (ORCPT ); Wed, 15 Apr 2020 12:12:49 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gmdcbN2X22IRIYvAaFD6rV8G77/wY/mw9hAZhc/yVAjD6w7YeTrJL67E1+vU7ZUFMseSN5MdInsjwTPuotko2lI8HhTllLN9Po65fzAw7D8KmLwQcvJKTxLeieS9kwQwFGIPNPu8kKBryihDUz5FVBnBdQ3YQkMxOL+yUy1CCvYnjFjd2BD/qnRCHBESzM9gYTEn12yAkIiN4O0IGs/jPoVMmG8Jvh157Ee32lSvXDH8yWqg0W1t8M0ecFg9zKtJOQyPldNpj1/njJ4Cg9VTzQuE6tfIitH3AzLZCjKkhM6nfS5h3KqpfKVNizN1dxamKzCLknYKAGfFlwoouwmEyQ== 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=rK17iCaJqdfonxdRRm6js7bY5I5PDEuTiddcxTRb2M0=; b=VPTMlIlDv/RT73xFW/HaqKklDNdJnOAIvFxfddpG5cEQ7Zgb8FNEXhjC4rz0GdqAQz+NKXn27l/753eL3fIQQYAtvYPjsZQuJH5RuClrYPROePsXAfZA+1wgfwULMiGcOtHVwVOM+TCRLiPaqV3e//xmlbQJlSiTlsKQCZoVlwJBgK87V7fVIdr/Ixjze3yePEhCiDJQk2Ie76uKtq3+xVSQZoQYaIsy2cYnYVxxkaAcITo8ODxzD3PoUb+BLcPw2+486qwZciwHQidOlOTC7xfjk8H1bT47vNm3MQMqWYmiG2J7CH98NPG090og8YmAxo5xzdr2xFPwA7mkpC1t6Q== 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=rK17iCaJqdfonxdRRm6js7bY5I5PDEuTiddcxTRb2M0=; b=T9oG9EHAxuL4p4zYhVzzJFtetK9vgnunZSGVrGQnU1VLLBmCpnaEGCHEa3CamAo3HDNldZ3m7ShCH7QR7r4GaJ/T3A0PqXB63fF6KcrL2W35pLv7c5XnzNf02LiDj5et2u+e8+Swatk2JjzONyV4LWDVtdVv9XBF2TNoKfiIBr8= 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:42 +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:42 +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 12/20] staging: wfx: align semantic of beacon filter with other filters Date: Wed, 15 Apr 2020 18:11:39 +0200 Message-Id: <20200415161147.69738-13-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:40 +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: 12467678-01af-404a-bc48-08d7e157d382 X-MS-TrafficTypeDiagnostic: MWHPR11MB1599: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; 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: 2ZIlRigiESqv+m513K7CPYI0ZnrwEVmbqyCH34GWjVTBX0yJ/bsKFZ1k5+ObIgkpnFPN7thCDGIS2TvXMlqlYYQO6ApxKqMe+/hMVfA1yivc7kiLTWoTAYEBENvkpyAIKr/xGf4msni7AOeYDpLGQZrI6onZydQt83xFR7MF7to7oQd0mbO2gZR37EhMUPWX/NBKQF1ANZYKno7cXFbiOkMugUpfgtbjPuGEblsRIurrxa6hIJ6TiUWXOmSRnz1uUXWnz7CKBdTRU+BG+L7OchIk0DSjT+9qNdaKZ403gK2Fcm3f3UqkVdMhjABtmBEw+CmOjUWH+BJeZm9AB53lhyuOly2ljDATaFPDhlQDDI1sarYid0lL5q5PbBa1pGBXe3cy3uA7WTO3R4y6ERZFMEGe0lvf4pUv0qZL6JJX+7eJ2dQdEufksN5eXkPRdWzJ X-MS-Exchange-AntiSpam-MessageData: ac/QGJl7KmYU+ofPP0aahHv+oiGZULvwnNqjmTLwPXz0qg19D6lr4PzM/9YcQVgDI6jiLG2OQi3OaZjqJkLwxk/Itb5bybdym7Yn4UAOJwP5z3qrN5GoAqRwLtqAntzwrqsoNGy5RrbrOD7754dQ/hhYrq8rgTWaSbDI7EEGWeE4t2Lp2anvBMqWfHKlyIf1aMf47RA+TwB2LZTIlPMcFw== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 12467678-01af-404a-bc48-08d7e157d382 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2020 16:12:42.5408 (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: YBnkrC0+Q5B8vYxmxecoec5Ua1ko7ULrDI16NlIx6jM9NzIcC5fP4fLHjBbKCxwqmxI9QFz/wnfqEr9mTH7qUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1599 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@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 beacon filter with the other filters. Also avoid double negation: "disable filter" Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 10 +++++----- drivers/staging/wfx/wfx.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 8d2365a2e35b..963cac83b6a8 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -137,7 +137,7 @@ 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) { + if (!wvif->filter_beacon) { hif_set_beacon_filter_table(wvif, 0, NULL); hif_beacon_filter_control(wvif, 0, 1); } else { @@ -215,9 +215,9 @@ 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->disable_beacon_filter = true; + wvif->filter_beacon = false; else - wvif->disable_beacon_filter = false; + wvif->filter_beacon = true; if (*total_flags & FIF_ALLMULTI) { wvif->mcast_filter.enable = false; @@ -504,7 +504,7 @@ static void wfx_do_join(struct wfx_vif *wvif) * Disable filtering temporary to make sure the stack * receives at least one */ - wvif->disable_beacon_filter = true; + wvif->filter_beacon = false; wfx_update_filtering(wvif); } wfx_tx_unlock(wvif->wdev); @@ -706,7 +706,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->disable_beacon_filter = false; + wvif->filter_beacon = true; wfx_update_filtering(wvif); } diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index a69d9c9c37b6..53ed4c137b19 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -90,7 +90,7 @@ struct wfx_vif { bool filter_bssid; bool fwd_probe_req; - bool disable_beacon_filter; + bool filter_beacon; unsigned long uapsd_mask; struct hif_req_set_bss_params bss_params;