From patchwork Fri Feb 18 10:53:58 2022 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: 12751312 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: 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 507DAC433FE for ; Fri, 18 Feb 2022 10:54:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234172AbiBRKyr (ORCPT ); Fri, 18 Feb 2022 05:54:47 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:35922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232865AbiBRKyq (ORCPT ); Fri, 18 Feb 2022 05:54:46 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2055.outbound.protection.outlook.com [40.107.236.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E677622530; Fri, 18 Feb 2022 02:54:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oRps0eD2OIkS9RYhumcTKgKUSaMjKHxUP3kF93J+rbzExXKAX40qDFTq3xCTbYD8aoggm9+d7okFYqkACw1wtgg0fuZA2G5FF6Ssam+lD8uQxFqKF3UpcrpYlzZakm5gJ+/JSmv1hBOxo7gCI6cuCfKh9X98JHlv92xaJTnxZJL8txme4QITvmhwCd/njLocI2FNnHUY8FgvHx/FRwGL927Vym00hkurWjvs2utG8TvLy5u4RezqYNXzy51TxKKI9AtBUmejbVokd0HnXxojCgpZHYAbl2qGnHTeYKlZPiITGEpk+mX9rmFsQBbNpWbVBul2DxSkHW9bps6UH75C4A== 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=C6486Dcz5hnZIsS+NWCT8cQAaujbHa05s8lfs45okOo=; b=JQgPxdGwg7t6cR11P4F0jjSNrtl9+kTj6dvj798yftOi1L/0fQfr09Uzc6SkxH+mKX62Lbv4iBeKoGa5wYIWY+kiVCDMNAqU8z3ewvk4MW8UHsK5psL4rQptHmLZh4m7sUZ3AeLm3dJ8CxW6+UXKZU8XI+FfcR0g56qRx2eZlWuGYmbezNO+Mut3QyVObBHgOYRZ0nQtZx4Cp64Gpp0MDIAH0QRiITJdriO1abn7434g9pymThkNVjgEodpJ47kaM1wpQnjUkd9xRmrzuABtm5imMTI3AKa1BDm8JMG0UrC8fro6kO+TQGMho6DTXGVEJebhXAGAtrtZuHDuginyZw== 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=C6486Dcz5hnZIsS+NWCT8cQAaujbHa05s8lfs45okOo=; b=CrgU9djm6Je9/7ORIL+DsfwqLTHSd9EH2qnGkINUMqd6STvqxUwQAayLT5e1xeNQOdBlQh22s2RgYVCrjQTK70I+hawKn05J6xinSLYD+WsEWvjTXhHGKxGoIhdulL9w/YbVU6t+T6ucv1rmTHSF+RPwc2IFVfrg6VecVe0iOWY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by BN7PR11MB2771.namprd11.prod.outlook.com (2603:10b6:406:a9::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.14; Fri, 18 Feb 2022 10:54:26 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::1b3:e483:7396:1f98]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::1b3:e483:7396:1f98%3]) with mapi id 15.20.4995.024; Fri, 18 Feb 2022 10:54:26 +0000 From: Jerome Pouiller To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Kalle Valo Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "David S . Miller" , Riccardo Ferrazzo , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH] staging: wfx: fix scan with WFM200 and WW regulation Date: Fri, 18 Feb 2022 11:53:58 +0100 Message-Id: <20220218105358.283769-1-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: PR3P251CA0027.EURP251.PROD.OUTLOOK.COM (2603:10a6:102:b5::13) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3c254fe4-b687-444d-02e4-08d9f2cd07bb X-MS-TrafficTypeDiagnostic: BN7PR11MB2771:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2582; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6+8jboAO8WiXk2yjpbs+ZO/phECsD4N1BXEW4cPmLWAXTONqFGaorJIIlYJ3+FOAY6lmQ+uRX3NqbqjZYLQE7b4PcpsAF3haCKnNyLEwJhouEsQrq/083/bD1IE+WAoLZE1eCSxQtvED34467rblYwpGmbMrKDE/CcBRrnoT8+jAkz+BhTjQ4XNIemocmxsIh9jCRj+EMQQuRW2YamVDw/DhCgW1ymi8TxLUqKXVJ0waLKqd/hwe6ZVrbW+TaPhtBNx9qx6lmUId+nGu7okys+Q3dhfuwK/+UC30pzwX3rnJToOklWLk8ngf9sGWH8HH/5EAJmlXpeOLihqaVYRrGs01Nwg9xfC+3DELmZxYSam5VKI3w54JNpxQB4zWNwyelL7BwFFgE22KnY/8og4b4AltFdbD50Oh9eSjlzK+SxZKwFiWMNYoW9YT7ruMULaV0xOCkpWtF6ORLz85fdzsDhJ9aFLiQc8RRcHXXXJRA0qv0hWEgyBhE6bkCWUHBd6xTve6A0hShctDhNfbPDEA2dP9DVsoHu/rnT87Hreb7ABFfe9cdf3EX8Vlqq52BZTty4YSqQ7pnypZVA4ob0UQXxI5SIHobVx8PwjTZhUp32fIs7Rg6jUw85eiP6yvRMWdCiflmay4WgWjUBxlCuLUVHIIjWyTKQ/PiAZJkpm1Ii0LFeXVqaCr0ni8f2GF7OAEcH9Y4NXNoNg+47Az/5ZzDA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5657.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(316002)(186003)(52116002)(66556008)(4326008)(26005)(107886003)(83380400001)(1076003)(8676002)(5660300002)(54906003)(38100700002)(38350700002)(8936002)(36756003)(6512007)(6486002)(66946007)(6916009)(2616005)(6506007)(2906002)(66574015)(6666004)(508600001)(66476007)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?MYyO2pdVpvH65Qi7jc6q+7AnTdn3?= =?utf-8?q?ovnK3Hh/5kbcCr5Xh/NhpBGDJO/YTd76Z7b3Ol26eW8wTntazWjP+XYru+3sTtZKQ?= =?utf-8?q?/fqSjZtKNSGIHYtM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JOiNCCeGn8Vc6PIZYahvrCvO8BejGI0/E7bc7XgScNf/5?= =?utf-8?q?x6VsXhEpC4sRPLs+0S/+tI7HD/mabWOLOsy+Xr3ukdIxQKhlbBc7Z/m1lTBQ6chm0?= =?utf-8?q?YY/akxOd9JVj73Z/CpI6Ok3L9IqDflOo6fDOD9xWGu7lw5b1337oQNmXs/y5RCHZQ?= =?utf-8?q?Ihfst5l5AXgADyWAOe+VjgNr9D4PJvepjIdcjixzlCLjvLz0VgICdRpAoCrjhnZGq?= =?utf-8?q?nE0F22P2ONtX/7wyZtADmXr8tvdiJxL+3mCLO+zCwyyzP7zvVomj4UlTYvk3O8N4H?= =?utf-8?q?DJ2tJ5Or/RJdjV191qZMuo1LPi+6+zuS4wRmgw5URYtjGG47GgqNd7zWnWQVrq6w3?= =?utf-8?q?ylr6yQbU1LFCWx5A27yRU2Z/HkJpiIugw9HECmDwzDRLIVZIujeCS/PsBGuTVhNST?= =?utf-8?q?pmqUca2HSj3x6wVTMdEgLTXRQVa0Pn7Hg2xqi/inQOwYqZUvNqemwd0yBVEdLVeif?= =?utf-8?q?OT63eYEr1410j2y2BtQFCAnPNr6aGFjyqZ958Zn29euE+c6VWb6++525VvtvndM06?= =?utf-8?q?dyC54o5AIU7UOGeGNiBodRR6nKCbqLvTqnsXHJ58Y2kQTkpxEQXf0GE=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c254fe4-b687-444d-02e4-08d9f2cd07bb X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Feb 2022 10:54:26.4529 (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: COhDC81AUz/NT2PYTNaTbOSAFF/uK+gebaA+jpCzdi9pQOgV8Z+fuGvdH9piGjfhYA69BUoVmnc1KIIUzj4M1Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2771 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Riccardo Ferrazzo Some variants of the WF200 disallow active scan on channel 12 and 13. For these parts, the channels 12 and 13 are marked IEEE80211_CHAN_NO_IR. However, the beacon hint procedure was removing the flag IEEE80211_CHAN_NO_IR from channels where a BSS is discovered. This was making subsequent scans to fail because the driver was trying active scans on prohibited channels. Signed-off-by: Jérôme Pouiller Reviewed-by: Jérôme Pouiller Signed-off-by: Riccardo Ferrazzo --- drivers/staging/wfx/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index d832a22850c7..5999e81dc44d 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -381,6 +381,7 @@ int wfx_probe(struct wfx_dev *wdev) } if (wdev->hw_caps.region_sel_mode) { + wdev->hw->wiphy->regulatory_flags |= REGULATORY_DISABLE_BEACON_HINTS; wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[11].flags |= IEEE80211_CHAN_NO_IR; wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[12].flags |=