Message ID | 20230807150542.247801-10-jerome.pouiller@silabs.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Kalle Valo |
Headers | show
Return-Path: <linux-wireless-owner@vger.kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76EF6C001DB for <linux-wireless@archiver.kernel.org>; Mon, 7 Aug 2023 15:06:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229732AbjHGPGX (ORCPT <rfc822;linux-wireless@archiver.kernel.org>); Mon, 7 Aug 2023 11:06:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230091AbjHGPGR (ORCPT <rfc822;linux-wireless@vger.kernel.org>); Mon, 7 Aug 2023 11:06:17 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2081.outbound.protection.outlook.com [40.107.223.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADBDA1701; Mon, 7 Aug 2023 08:06:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vy6NHgGMLQRyzVl125bxezpjl5OSwWVFl2G5C/8HICLvHaIQCDIPqtbPitUC19nSy9kxM3HbtfKYMSX1qG/LpjGSytwy+MgiaaiKoPA0FEvgeVp8yWzngTtloDloNfJ45HpqAKunfr+GGQSHkYlBnKPBJPw7eFRffZOIAefuW6po7GxeXMSuju+nawaocLMkIn11Q6RtPs2iPcOXnj+uD7OEElSAa7sG7BHKeqE/fAk2ipOMORUmJm9mJuDqL4GsJa6UASnddiw3Ym73N7fxYTfyNApbOOpphPUnpBsYJNe6l5/dtPENqxm/qvDvIbqtE99wH9m/1I5AUYnkKXuwQQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZPRftwa/5INHUuf/U0IO6DYv07+MkuBCaxGoh+MZ00E=; b=I2ySPq75AtXbW2qYUG4G7sozx70ZIEvq2wtfCCqe55RkuHNvl6V+m3zx9B7bpsvsUieE9qi+zftXWDcDsAyqEGyGt8offvjighRiIQx/lBzZc03+7C4GKdXQUepkfb2cDkEPzLl25hWSGivQlNYgh8ECwSKUzMqARhzSLLouK53XViG4G/7FSwvc74gvYIrIbhbVXte1fSod+yTpChm1X+lbRTThdu+jpnhmuSy4jmWKiJhU/YAviQSZMLEiWQLs7NDZTDmukTO6PAR/ZZpB0XzH552yofZge6nXQ1rce7Ol2PZlt7ZG46IFX3xWPGtVsvf6bArQR3tzAOz8HsPoJg== 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=ZPRftwa/5INHUuf/U0IO6DYv07+MkuBCaxGoh+MZ00E=; b=alK9AcXWM4JWfOVcWoGfsxba6SA6KaHSgO0ESeAyzk9IA8G4zPNvkeIH5DsMfqZiLvEY8LeqB+SxTBvFXss0uLG9Wxgqdn553kequ490iap6+8sq/bnbC6ojoOJgSBqYLoox9aNg058+4xL4WxXoOiFfk6pcsQNdm7YQ5e564zU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from IA1PR11MB7773.namprd11.prod.outlook.com (2603:10b6:208:3f0::21) by SN7PR11MB7590.namprd11.prod.outlook.com (2603:10b6:806:348::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Mon, 7 Aug 2023 15:06:11 +0000 Received: from IA1PR11MB7773.namprd11.prod.outlook.com ([fe80::14b1:be6e:19a3:2eca]) by IA1PR11MB7773.namprd11.prod.outlook.com ([fe80::14b1:be6e:19a3:2eca%6]) with mapi id 15.20.6652.026; Mon, 7 Aug 2023 15:06:11 +0000 From: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= <jerome.pouiller@silabs.com> To: Kalle Valo <kvalo@kernel.org> Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= <jerome.pouiller@silabs.com> Subject: [PATCH 9/9] wifi: wfx: fix possible lock-up between scan and Rx filters Date: Mon, 7 Aug 2023 17:05:42 +0200 Message-Id: <20230807150542.247801-10-jerome.pouiller@silabs.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230807150542.247801-1-jerome.pouiller@silabs.com> References: <20230807150542.247801-1-jerome.pouiller@silabs.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-ClientProxiedBy: PR0P264CA0252.FRAP264.PROD.OUTLOOK.COM (2603:10a6:100::24) To IA1PR11MB7773.namprd11.prod.outlook.com (2603:10b6:208:3f0::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR11MB7773:EE_|SN7PR11MB7590:EE_ X-MS-Office365-Filtering-Correlation-Id: 62c679e4-8df1-4146-9af0-08db9757d62b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pYE8zqrqxp3sscWQ2ZMasbkAXC4XLpfDl01/lCigHW7nElyq3H1x2PmTiGnoHNAzIwSZ7wGmXOj7Ld3mS2DloGLg9s3Im/ykWNWIVGyKrhV3LIkrwGLMvNgtRC92Rg8iq4k8NB4cEc/XzsFzkvybz/4yapzOdI0DgnyX9koiAAtBPq8YbkGAa7L0YmM21PAFmawfBvOx+Wm/KQEsE8QV9F/COcIlruoeVDXMnok3OCE7Uj5YYeElokOxYnuc5JoYrsWB6q9M+ZVfkV8p1r/MuCGBgRw5zA3k1WM9sjd+KqTdz0LZH1JB2tRYFA5cPTg9hWazwbakP+Z6mw6iooXGmIul4JhzjkkzZFJS1CZwCBykfrqswb0DNr72Utv+uSmHVmzpCaM/UjXEYYFTiaS/yA+FrT409UaJiPU75mhnDNVGGoFWOMkQjgzYIxlrG9K+f6hB5/OEZl4lwjHV07RXACVV78JNGdpdfcL1BCxs+rtPAaPUToFJOpGp8zirreH5VcRSKE/pXxx7cXdxENQMpP+0AXMVEcm38zrSUHfIz1KA6ECQvI+pZ3303mMreKrnUnE7IuEoMisIXQrBvXOAL8dDZw+WhmGWg19bnfPeKjr1dhMXfPW+IjrbyJU3GYi7 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA1PR11MB7773.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(136003)(39850400004)(376002)(346002)(396003)(366004)(451199021)(1800799003)(186006)(2906002)(4326008)(6916009)(66556008)(66476007)(66946007)(6486002)(52116002)(6666004)(66574015)(83380400001)(5660300002)(41300700001)(8936002)(316002)(8676002)(38350700002)(38100700002)(2616005)(478600001)(36756003)(107886003)(26005)(6506007)(1076003)(86362001)(6512007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?x4zFoaH4sGglWJ+pKlDO5cdEEHix?= =?utf-8?q?g9TE1MV+qjN3P8PPegmCucBkOVA6xd/Kp2AI2czI2CShvoCEUjZvrajgYQwu9Ed81?= =?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QWzf93GM0aoHFSmJ8odBYbuYIemJWwlHAr6k8Edxow20dKuUA+KyX1+iRDSb?= =?utf-8?q?DUVn92lSOOJoXQJtruyKjVMb1avRs0oWV+46bL7i/mRBhVQ8Yxw6ApPva+mHSzgca?= =?utf-8?q?k+FM6Dk/n1pi+WRnZum4bjtEtNDapyu8TuwUeLAUuecoClPA09fr8uo+1A7DPQTWQ?= =?utf-8?q?NE97z4fXnr8BKZ1df38jBqMCU0FzybxqYFlBrcMQ2oDalGdz5qNcdCnI8B22dYWPV?= =?utf-8?q?SCDA2/fveqFqwea1/8OAKPwdRQktIBcOM6IS5aeuVdlfI4CxYsmv6vfYLMZKzxMx3?= =?utf-8?q?yCzlyQZtTmXYiUWY0jcpdm8HTGb+wqlDWdHalI50rKO37HByvHux8gyyrG0DrwQej?= =?utf-8?q?QSkVLEZV45A7T72wFQT9MaGIkxuzScZjXsk83pwvCEzpZriZLLRzdrOZBAdWXYM93?= =?utf-8?q?36I/+8TmlJz/lP+auGIRPkY9Zo8ABnwW1xgXJC/Pni99Vk2cWR/9Qqx1kEWVaVh6m?= =?utf-8?q?H1hoNFRwm+HZbxVwgnoecoRj7n+z+BLPsQE+BFJZbuoZY9eJjt6ECV/BKUpzm9mwx?= =?utf-8?q?k4baUU5BjC5j?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62c679e4-8df1-4146-9af0-08db9757d62b X-MS-Exchange-CrossTenant-AuthSource: IA1PR11MB7773.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2023 15:06:11.5201 (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: R8q+QPp6zj6S25Ii+K42rh19ALr1HObFvvzYY7Hs1TqGhom/omlrp7ncLBGpqYnfNHXqAcsTW/pz4jpAR1Tf+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB7590 Precedence: bulk List-ID: <linux-wireless.vger.kernel.org> X-Mailing-List: linux-wireless@vger.kernel.org |
Series |
wfx: implement Remain On Channel
|
expand
|
diff --git a/drivers/net/wireless/silabs/wfx/sta.c b/drivers/net/wireless/silabs/wfx/sta.c index 496b93de3ee58..1b6c158457b42 100644 --- a/drivers/net/wireless/silabs/wfx/sta.c +++ b/drivers/net/wireless/silabs/wfx/sta.c @@ -96,8 +96,11 @@ void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, *total_flags &= FIF_BCN_PRBRESP_PROMISC | FIF_ALLMULTI | FIF_OTHER_BSS | FIF_PROBE_REQ | FIF_PSPOLL; + /* Filters are ignored during the scan. No frames are filtered. */ + if (mutex_is_locked(&wdev->scan_lock)) + return; + mutex_lock(&wdev->conf_mutex); - mutex_lock(&wdev->scan_lock); while ((wvif = wvif_iterate(wdev, wvif)) != NULL) { /* Note: FIF_BCN_PRBRESP_PROMISC covers probe response and * beacons from other BSS @@ -126,7 +129,6 @@ void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, filter_prbreq = true; wfx_hif_set_rx_filter(wvif, filter_bssid, filter_prbreq); } - mutex_unlock(&wdev->scan_lock); mutex_unlock(&wdev->conf_mutex); }
The device ignore the rx filters during the scan operation. wfx_configure_filter() acquires scan_lock to reflect this restriction. However, it is not really necessary since mac80211 don't try to configure Rx filters during scan. However, the things are changing. The scan operation is also used to implement remain-on-channel. In this case, wfx_configure_filter() can be called during the scan. Currently, this scenario generate a delay that end with a timeout in the upper layers. For the final user, some scenario of the EasyConnect specification end with a failure. So, avoid acquiring the scan_lock and just return. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> --- drivers/net/wireless/silabs/wfx/sta.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)