From patchwork Fri Apr 10 13:32:22 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: 221289 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, 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 005AFC2BA2B for ; Fri, 10 Apr 2020 13:33:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C301A20CC7 for ; Fri, 10 Apr 2020 13:33:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="VX67xLs8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726723AbgDJNdF (ORCPT ); Fri, 10 Apr 2020 09:33:05 -0400 Received: from mail-dm6nam12on2082.outbound.protection.outlook.com ([40.107.243.82]:31903 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726009AbgDJNdF (ORCPT ); Fri, 10 Apr 2020 09:33:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iVCHW1E4NZ/AHZe0s8jNTL9P1+lge74w3qBFfESKstsBAYq2kOJnmjIsXKODZXlB+qZYTiSbdAFXFK/0CovwNnQ1TSH1yZj8aKX/n0e6O0VvbvmLKENwMpwee8GqlSAP3/SDUHqgq3n3jhQATyLw+rOTw59Md2a74PU4Tei5vKQ/alDsfaRc7WJuWDV94QxzmreOFa46Z3pgLLCrOhpLkQJ47wfhfjNwFH24GzzmK1VcK9Zqtbf/wG29LQF5qcVNt+4IzOXZwhFQR6gbohe4JN/b8+xO92LH+gbzzRLoMljGatGWWhMqc/FRqqm/SWgcQnA+OFKN+zb4Jgylw7CyRw== 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=kjI0Je6vHCyxCyoGkgaW23q63NlgIf848mcwi2srrio=; b=JAAWpKFi+snyQCNgb5YQDgPqEr22r3elE262YEbXtzFmjOro/kfLC0jXLPKxsNtLsxPmLXtcJiUGtnbc7SLyWcnHgz3N5LOmY2L1FkUXSZnJkp4oMb23Af6VO7n4nhzrHkcB+Alz03n86o53xPn813YAqSq2Uq8BAgv7t563JvRj6PyoRzTjebSlOskV6xt9n3VzpH//sNBCFyAjFFn2+SHtwfzpzl0GxxwWJcOJ8tuN/JPTDgBMzp/S//8irHg/rJm3/Plt6pvk2T0RfkBBk3kV4mVWXrfOQtPE1wDLE/rHjKZ6MN/pk4UXHfzfdJLg2/1H6q6LhCaD7T40hGjCuw== 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=kjI0Je6vHCyxCyoGkgaW23q63NlgIf848mcwi2srrio=; b=VX67xLs8IW+KBUOOLDOI5++kIIp3SzNJZ7gBdutMK9tUc833tZAl4CeI7No0UyPgZ/vTbmedWE1qAIMCpp24JnkZBMsOL5xHwZSQ5tJls6OoVwgKJol5hs2tLE0j3+1iyGJh58RgGZXB0DfIOQkKttUE3hkd/Eet0+g/CzwsQNA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB4398.namprd11.prod.outlook.com (2603:10b6:208:18b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Fri, 10 Apr 2020 13:33:02 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1%6]) with mapi id 15.20.2878.021; Fri, 10 Apr 2020 13:33:02 +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/19] staging: wfx: reduce hold duration of cfg80211_bss Date: Fri, 10 Apr 2020 15:32:22 +0200 Message-Id: <20200410133239.438347-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> References: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Fri, 10 Apr 2020 13:33:00 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ef8292e6-6543-425b-5052-08d7dd53b14c X-MS-TrafficTypeDiagnostic: MN2PR11MB4398: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1091; X-Forefront-PRVS: 0369E8196C X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(366004)(346002)(396003)(136003)(39850400004)(376002)(107886003)(81156014)(54906003)(8676002)(86362001)(1076003)(4744005)(6666004)(8936002)(4326008)(52116002)(66574012)(7696005)(316002)(66556008)(66946007)(186003)(478600001)(2906002)(6486002)(2616005)(66476007)(16526019)(5660300002)(36756003); 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: HYiViTNkZGrUfBPkg5Rf9QZt9JUYs5cVihyvIL9taGXzRLq4OzierheUvyiX9Qoi4N7KvYl19ebp+Lz7llT35Cl3dD+E9UTqlqNCwW+f2WXxTav7M32IIPnm5c015g3fAxZBmb/ppivBk+Y9wvfxEfKl2sTg0cfAP4ifba4AbSbB5NlKqfD2iPW46mW9oyRgItI/X3Xy+oDRHSc17WZwYDecnlBqbVAngkAT0uT1qb3AcLbWvmt3s//BAivGpnrlN0q5e7I1GQ6A6AeWK/CRMRMIeFsbpIaA4afaz9kFMWQaPVwQ8UXQJn/xdeQtS1AL/EEmOJf1jT4++1HgwwuiecbKQ3yuKo4RuMJ+tuLm/7YyEPakciP4nrhlAHj3vx9xyHhd5ggw7h+Rkkq2yZ3wyY4vy4oUDxacEucWnrFCfTCr2ksP0DoUuV3z8z5QtOOJ X-MS-Exchange-AntiSpam-MessageData: W6i06sxqp7r9y5ociy3puoMUyrjLqDCCpy6Aw+N0N74Qu+cNMZUdCL5DoOsjQUjpBSV76g/HYz42OcLBzGnJoKVLLXmkSXKBqWlQXKB7H/LBcjT4X/CLp7rUqzJhfy4exxcSuRztOzYj5PJJhcznuLr4jDa2XNtZOwR8az9uNuSMOmROXRgNU2Z4QkF8edOW1DV2u1Q6qiwrD99Ju8WeOA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef8292e6-6543-425b-5052-08d7dd53b14c X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 13:33:02.5675 (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: Pl+s4sFudDAgNs6/t4nOjCA+0srZtx2fI/wF52H1LRQmh7J5FLFph8vcsxbImkrFPm2NIBJPsZaHUC4f8c+wPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4398 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Pointer to cfg80211_bss is held during all duration of wfx_do_join. But, it is not necessary, We can release it far earlier. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 380e5319472a..c65d464a7a9b 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -509,6 +509,7 @@ static void wfx_do_join(struct wfx_vif *wvif) hif_set_block_ack_policy(wvif, 0xFF, 0xFF); wfx_set_mfp(wvif, bss); + cfg80211_put_bss(wvif->wdev->hw->wiphy, bss); ret = hif_join(wvif, conf, wvif->channel, ssid, ssidlen); if (ret) { @@ -538,8 +539,6 @@ static void wfx_do_join(struct wfx_vif *wvif) wfx_update_filtering(wvif); mutex_unlock(&wvif->wdev->conf_mutex); - if (bss) - cfg80211_put_bss(wvif->wdev->hw->wiphy, bss); } static void wfx_unjoin_work(struct work_struct *work) From patchwork Fri Apr 10 13:32:25 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: 221288 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, 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 6A747C2BA2B for ; Fri, 10 Apr 2020 13:33:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 39C0620769 for ; Fri, 10 Apr 2020 13:33:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="V15mqtmZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726797AbgDJNdP (ORCPT ); Fri, 10 Apr 2020 09:33:15 -0400 Received: from mail-dm6nam12on2082.outbound.protection.outlook.com ([40.107.243.82]:31903 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726703AbgDJNdM (ORCPT ); Fri, 10 Apr 2020 09:33:12 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xplqye7VFTMOtvMguqt5x0LP84S1J6YT2H53F2NLe2uBdOcpKkJJZBWksMJqJ8aIFzILiAeXob1oIq7ZFNbvpjxj1OnrvxoirSavuX8EB9KD2tkUSXY+3frwkIEhXY1JW0yn+ZLzurI4Of1P6AJ0IeY/+eU9xFxD8042FK1sPXOgsMuHJqZhvSeb76aiM0oqcJvG9bWB45x9jFFOtHr0hXpB2OnlqXDZDle3IbmS3TVA/ZCelILbYnE9FvTdIxxiaR4N3tQ4EubyjvbQcP58cIRuA7PAWBlUjjy3h8zSXxbqDmdxFVY9YLHAI9dJQ7RFpv7oaCU2Be+4HTrOIrVryg== 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=9pLQq6o+gVwbcpjPZoHdr6jmvl/zD0xDyVzifFhX/kQ=; b=ImHb6PPRwCBlNI8GnvpZDQC0SvnmCs5/vP76ZGl0u2y88TX5JErXLNTKA41Zi1NYtA99V++kuv1NVKvbz3NB3oC0RZgNFmcLtWDt4ebyJ0tzKGcPkuNKvfeCP9UCGTpfQm+xezt1C9tzAx+jMrN1aAZ4kEYeVhn+jirnZfPuCPYK/WmFYKrqQkxyY1NlEsRxDIM/GsJtryrI/NExHZ8XodAHhSQVSic4K5RnMpksH6c3vYZWZPzEgJSVb7PJGwJiXW9RWidv0ZvHbmdvrd2HB88LOIkpaSibtSAcZY1dQR+JR6G4ts8d2OKFY54ufNoUGG8rPlCICGB1QKZV241X3A== 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=9pLQq6o+gVwbcpjPZoHdr6jmvl/zD0xDyVzifFhX/kQ=; b=V15mqtmZ7MEteDfIMZorpRln/6yTG/ehVGUZtgzHYIPGn4RioE/MnIPeTFczymsenQHxDi7d1BanaGNG5O7Omf9gIi9XI+qwV7pkOkULD/8YhlPX2SWN96lY9mq2w2PUvbGs3zC7KPsF86gVcP7mld9td8IX+BaMl0x/mRwlbS4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB4398.namprd11.prod.outlook.com (2603:10b6:208:18b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Fri, 10 Apr 2020 13:33:08 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1%6]) with mapi id 15.20.2878.021; Fri, 10 Apr 2020 13:33:08 +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/19] staging: wfx: set all parameters before starting AP Date: Fri, 10 Apr 2020 15:32:25 +0200 Message-Id: <20200410133239.438347-6-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> References: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Fri, 10 Apr 2020 13:33:07 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dc5f3257-0172-4815-a052-08d7dd53b4ef X-MS-TrafficTypeDiagnostic: MN2PR11MB4398: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2000; X-Forefront-PRVS: 0369E8196C X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(366004)(346002)(396003)(136003)(39850400004)(376002)(107886003)(81156014)(54906003)(8676002)(86362001)(1076003)(6666004)(8936002)(4326008)(52116002)(66574012)(7696005)(316002)(66556008)(66946007)(186003)(478600001)(2906002)(6486002)(2616005)(66476007)(16526019)(5660300002)(36756003); 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: izLELvSWaS+z+KGfLdC65nbADG9PaHKPzoWklmNzh+gWrQIGlBMoZ249hEnz26bqzNEssvp/kgRWCIqP252Ts5746yZ60fi7wczeoe4pLZ51tTlPlqjMGDOqNNkpr/6eentgLoz8ymdxWTB5FJA1T1Rn2Ga4GxVVjr4YFb9fzmfNNXvyoy8Smf4f8hhGq9Wk2fhp9snBuOhuKHedaGUrCgFtMgK4RBNOnclk22rAaJFjSC4fJ7CjEZentXH0U69GUaTp6gs42bUGq3jozL63OS6GuNkP6+6/+Zbgnx5pEQCYDzU34aj88ZSCOTu1mXTF55V22f78yojk6Y4nP7qONeAmQL8uVLhmu1z+hQKtgc6UG1ifz4SMa7WEOWDni8cLnr92B8d0BCw+psINvzqmxeFCwoWvZ80tVu4o7CEUeXf4ESEkE0E4oI7kRQMDge4O X-MS-Exchange-AntiSpam-MessageData: A/Ukp1BWA4r7UlwY0ynj4sCoqdSaod+AwdylsoAD1Bf08F3PNhbFjECoJ/RBrheEtjufyZ6uSI0h2tVPHs7v1v1O6ZjCSsTyPq8c1e4RB9ZgHaSNBgstYfgA8VhMufxPIDGws0gzLlSYWRNcoJu7BoSsd6EWkyCNV+2nENJTTVBfTbvP9FBjwdasiBWv7inH1jzne4PVtHGfB6r2AvU9bA== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc5f3257-0172-4815-a052-08d7dd53b4ef X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 13:33:08.6659 (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: Q9lFGKOm1IByjgyStqHqUI65UkMQjlHngWPRHb5lsEUffK8mnoimdB4EplfGFU66SPURvVz2VrGp0QP4LaQhhw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4398 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Current code start AP and then configure the different parameters. Since all the configuration is sent quickly after AP started, it works. However, it is not very nice. In add, last firmware releases start to disallow incorrect settings. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 92bf317b57bb..1e7ff2ba33d8 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -604,7 +604,6 @@ int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) { struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; - hif_start(wvif, &vif->bss_conf, wvif->channel); wfx_upload_keys(wvif); if (wvif_count(wvif->wdev) <= 1) hif_set_block_ack_policy(wvif, 0xFF, 0xFF); @@ -612,6 +611,7 @@ int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) wfx_update_filtering(wvif); wfx_upload_ap_templates(wvif); wfx_fwd_probe_req(wvif, false); + hif_start(wvif, &vif->bss_conf, wvif->channel); return 0; } From patchwork Fri Apr 10 13:32:26 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: 221281 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 A0F10C2BA2B for ; Fri, 10 Apr 2020 13:34:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 67492214D8 for ; Fri, 10 Apr 2020 13:34:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="f2qVbwnH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726839AbgDJNdW (ORCPT ); Fri, 10 Apr 2020 09:33:22 -0400 Received: from mail-dm6nam12on2082.outbound.protection.outlook.com ([40.107.243.82]:31903 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726767AbgDJNdQ (ORCPT ); Fri, 10 Apr 2020 09:33:16 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bduK8uy3N04M7SiuGQwTm/wM7fNphrNXlQhJlf1ruA2z4OP8Lwj+Hj8NdPe8MQPk0uwEQKoyeY/qaXGc5Oy3Renc6byVfgEUK7vO0GFQxSKd0vvnmdQqnYukNzr/KBHY6ZnKSr8u3NnA5BRwaN+guIRvi51CEcOaqwrYFodn0B0IR50xdTo9WNBWx4aSKFlwqAljK1dau1xzfX3iGKuLiDiEQI8/lq/kvp6zZXKoccM6lBGveKI6hNpgRQhp+HfT2i/hl4tLURsueTwre62Dcif0EXxrwy6I2wrr8SLfoQO6WBvyV/3GgK3sUDFX65nqOjAnQjYL2jYPB2OlfMTR4w== 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=p2izc7uyB5xdqbmiVLnM3cS7LoKZSmt7UicKL5cibTs=; b=hRJ0IuqX8hmj1n2rx/nHym4bJjCiP8UK7cPL2YEj/cUQncmxcgsjGoNmF9VSvEU87zsYTrCiYFcUVeGiz/+m7uH+UFxf5YWqyNa3ThRgGCY7qsFweZYf2k+XuPz6vcYW83mJD2AUOqF5YzvabdRlVBwPwdMeRIhwoRy3p0vzZGtTfOMTvvcC/V2jXnfh/s0YV4R6xQlnSNCC27/S/9u1TgYJE+6ZhB9dMpvASazLhWSYTmZCqysG1qEyA9DmZnOsuFiigJOhltTARGHA2E6kHGCYbf6e5PUnEg/r7XCJiTs6AGKO9sHm684rCiHy8ATxZHHgsaxojoDSLB/6d6p9cg== 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=p2izc7uyB5xdqbmiVLnM3cS7LoKZSmt7UicKL5cibTs=; b=f2qVbwnHgMfFENAXWlnAgVT2c9x7bfImmfPyukAwZimlvtjiDK5Wh0EYtQxfS9Nx2KpTCkwjcS8QA01RZ+k6ZfAn3ub9bOPfGxPBzapxshRWzIdA2XSNnAGlMl5266K+Y8G3GsHXHmPtzyzZE9Rny4/KIlgjQiCTY4XZajPcQl0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB4398.namprd11.prod.outlook.com (2603:10b6:208:18b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Fri, 10 Apr 2020 13:33:10 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1%6]) with mapi id 15.20.2878.021; Fri, 10 Apr 2020 13:33:10 +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/19] staging: wfx: change the way the station associate to an AP Date: Fri, 10 Apr 2020 15:32:26 +0200 Message-Id: <20200410133239.438347-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> References: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Fri, 10 Apr 2020 13:33:08 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1715a438-8244-456e-579f-08d7dd53b60c X-MS-TrafficTypeDiagnostic: MN2PR11MB4398: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-Forefront-PRVS: 0369E8196C X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(366004)(346002)(396003)(136003)(39850400004)(376002)(107886003)(81156014)(54906003)(8676002)(86362001)(1076003)(6666004)(8936002)(4326008)(52116002)(66574012)(7696005)(316002)(66556008)(66946007)(186003)(478600001)(2906002)(6486002)(2616005)(66476007)(16526019)(5660300002)(36756003); 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: 4IpcuRAfME5f/oY1B1+lf4jQ66ACBmKUN2cKQmnnpxRhrJvrcGUV0ZP/HGYGcLwK/3d4zHlF2NXR/5d6UyrAVodX3BDGhJ04XVcx7UTe3vGpn9meiXMO54CrCnijkJBcx7u3rnILKJptR3/DjJP9JFHtkSp1T+HRwdANhshjFWUl1wzTaJDNRXgpUujfc1FDfXvo0A71lCgJhIM7i6OpUu+uQzexSVwB/JmOJH17rjDiwyfTeqaUa3bp0aXi50sAURhZ48X1USYUd7GXqbE7CbrJKVS9S+dV9fO9i0bbVKx5RJ8mzm1JBvvDj3vpLIixKqGBcicNkkcaSYf3uP5mxJH2Lam/tTwt/A/c/ejNhug04lqag2bMwQESgdzTjvTHDZWXBTOW+J8y6VE2HcmZW8HZKyGaTp6Q2K1pUDWc9kpQ5MWbv26hOtR4ryt2GpHb X-MS-Exchange-AntiSpam-MessageData: hmE3p0LxZk++jlaLwS3aTA1o0BauyVz1gyJgC4XURkUElJCLClPgTWQroFRcr2SQ+XeKPRJMNJTK4j8gix0GbQGnOvqw36zSQJEpCUZb2bK5zHo9z9qcVauGKL7Mf/3plOAiItjsyItdnuXBugOisUnrDbYdZjoJAYNFUv/q4zaSP9nc0jSk9P08Lu0JIRk3vf6c/O2C0MDtZMzdbP/2UQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1715a438-8244-456e-579f-08d7dd53b60c X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 13:33:10.4549 (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: Tbs+oXfWTrSN+fYAq36Rx3cTr/j8YjYt55aeCVxxJRlfnTJFG6Q7f51fo7wDkWR7NsHSFtk+us51LacQn8ZRGQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4398 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Chipset need two steps to associate with an AP: 1. it start receiving beacon from the AP (done with wfx_do_join()) 2. it sent the association request (done with wfx_join_finalize()) The join request (see hif_join()) contains basic rates, beacon interval and bssid to connect, so we trig on these events for the first step. The second step is obviously associated to the event BSS_CHANGED_ASSOC. Note that conf_mutex is now easier to manage. It is held by wfx_bss_info_changed() and inner functions does not need to lock it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 62 +++++++++++---------------------------- 1 file changed, 17 insertions(+), 45 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 1e7ff2ba33d8..acbbc3a44733 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -471,16 +471,11 @@ static void wfx_do_join(struct wfx_vif *wvif) int ssidlen = 0; wfx_tx_lock_flush(wvif->wdev); - mutex_lock(&wvif->wdev->conf_mutex); - - if (wvif->state) - wfx_do_unjoin(wvif); bss = cfg80211_get_bss(wvif->wdev->hw->wiphy, wvif->channel, conf->bssid, NULL, 0, IEEE80211_BSS_TYPE_ANY, IEEE80211_PRIVACY_ANY); if (!bss && !conf->ibss_joined) { - mutex_unlock(&wvif->wdev->conf_mutex); wfx_tx_unlock(wvif->wdev); return; } @@ -530,7 +525,6 @@ static void wfx_do_join(struct wfx_vif *wvif) wfx_update_filtering(wvif); } wfx_tx_unlock(wvif->wdev); - mutex_unlock(&wvif->wdev->conf_mutex); } int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, @@ -653,6 +647,7 @@ static void wfx_join_finalize(struct wfx_vif *wvif, hif_set_association_mode(wvif, info); if (!info->ibss_joined) { + wvif->state = WFX_STATE_STA; hif_keep_alive_period(wvif, 30 /* sec */); hif_set_bss_params(wvif, &wvif->bss_params); hif_set_beacon_wakeup_period(wvif, info->dtim_period, @@ -681,7 +676,6 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, { struct wfx_dev *wdev = hw->priv; struct wfx_vif *wvif = (struct wfx_vif *) vif->drv_priv; - bool do_join = false; int i; mutex_lock(&wdev->conf_mutex); @@ -699,6 +693,14 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, } } + if (changed & BSS_CHANGED_BASIC_RATES || + changed & BSS_CHANGED_BEACON_INT || + changed & BSS_CHANGED_BSSID) { + if (vif->type == NL80211_IFTYPE_STATION || + vif->type == NL80211_IFTYPE_ADHOC) + wfx_do_join(wvif); + } + if (changed & BSS_CHANGED_AP_PROBE_RESP || changed & BSS_CHANGED_BEACON) wfx_upload_ap_templates(wvif); @@ -718,41 +720,14 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, wfx_tx_unlock(wdev); } - if (changed & BSS_CHANGED_ASSOC && !info->assoc && - (wvif->state == WFX_STATE_STA || wvif->state == WFX_STATE_IBSS)) { - wfx_do_unjoin(wvif); - } else { - if (changed & BSS_CHANGED_BEACON_INT) { - if (info->ibss_joined) - do_join = true; - } - - if (changed & BSS_CHANGED_BSSID) - do_join = true; - - if (changed & BSS_CHANGED_ASSOC || - changed & BSS_CHANGED_BSSID || - changed & BSS_CHANGED_IBSS || - changed & BSS_CHANGED_BASIC_RATES || - changed & BSS_CHANGED_HT) { - if (info->assoc) { - if (wvif->state < WFX_STATE_PRE_STA) { - ieee80211_connection_loss(vif); - mutex_unlock(&wdev->conf_mutex); - return; - } else if (wvif->state == WFX_STATE_PRE_STA) { - wvif->state = WFX_STATE_STA; - } - } else { - do_join = true; - } - - if (info->assoc || info->ibss_joined) - wfx_join_finalize(wvif, info); - else - memset(&wvif->bss_params, 0, - sizeof(wvif->bss_params)); - } + if (changed & BSS_CHANGED_ASSOC) { + if (info->assoc || info->ibss_joined) + wfx_join_finalize(wvif, info); + else if (!info->assoc && vif->type == NL80211_IFTYPE_STATION) + wfx_do_unjoin(wvif); + else + dev_warn(wdev->dev, "%s: misunderstood change: ASSOC\n", + __func__); } if (changed & BSS_CHANGED_ASSOC || @@ -783,9 +758,6 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, wfx_update_pm(wvif); mutex_unlock(&wdev->conf_mutex); - - if (do_join) - wfx_do_join(wvif); } static int wfx_update_tim(struct wfx_vif *wvif) From patchwork Fri Apr 10 13:32: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: 221282 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 3415DC2BB86 for ; Fri, 10 Apr 2020 13:34:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D2D520673 for ; Fri, 10 Apr 2020 13:34:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="NYUfbvJe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726867AbgDJNdY (ORCPT ); Fri, 10 Apr 2020 09:33:24 -0400 Received: from mail-bn8nam12on2076.outbound.protection.outlook.com ([40.107.237.76]:32790 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726817AbgDJNdW (ORCPT ); Fri, 10 Apr 2020 09:33:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e45X+I9InV3K9ZuJIfuvX/0mMTQWB+TjJvFL/IHIopXjS/zykl+/mw+7OL6Y30k2czlSNQTNOcbkw8bWNLF/BqmtTCEQ5LfcMzb2c1NNYIiQVEBHwSmgGyGCyx1DqUzAnjr9hnZBoJbNls2L18pSvDFRPnyBJyhJSPQuculWkX2g2tnKBWthN+Ato76fBecW6zB0PE6SpyAWGKmkITcN9lRyQ2rDHTrJrWON6qEIDjjTQbSgj5hvfoCae2tY+OGsYZeYTMcKprtVsIpse527uPWJ7sr63vuqt+m1v83hRjvSNwkenpvfU7G5rAy6dJdUyKjYxkl7/NxWoqKcsliblg== 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=fJTAQ/VR5u4yLmSor5pc09/mMk/uKUBfJs00iVDEZYw=; b=IKOS5hlWwc5/Yn/xEFqAQG4dcFZIwrC+P5G5tkS3Y6DSx0GcFs/+EWU0xG83DZ+gb1T+6M5VgeSdVlzf2WdgA1F0smtDN449050y0nVKR9IBKQsaPAWCWI4jZrdE7+oz/BWKcNBR6hRZVUT11fl/MuZxDhBP2y4Q4YehlhW8LqIsPBWo3Wqz6MphsgHnwfCXyzB1SSrNY7u10BC2sgEDA5UnfVv5KkqcdfNTc8T8P87f+vhsbDEY516M3FjCv59yQww5bte1e/GeEvEL35+qOFQfgC2a3mvoc6DRkO+scJLPzQMXjDCYy5xwezMzYg6B+QnsPqrXNF0uHLsWpknMCA== 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=fJTAQ/VR5u4yLmSor5pc09/mMk/uKUBfJs00iVDEZYw=; b=NYUfbvJef0Z7+J4XiTcfkWk/vXtlqXdG1VL+7azzWte3hWew+J40n7Ei7S2CExnFjsOtZFPkCreM7D8MBctrl8X59chFQg0HxKGcPy/I7NgbrC4gwBKH/Z22nnFpt7Me4Q/hojvvATyL6FaqFAYRaxMf0ZSAVTm4AqxoYIg9hTo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB4333.namprd11.prod.outlook.com (2603:10b6:208:195::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15; Fri, 10 Apr 2020 13:33:16 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1%6]) with mapi id 15.20.2878.021; Fri, 10 Apr 2020 13:33:16 +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/19] staging: wfx: disabling keep alive during unjoin is useless Date: Fri, 10 Apr 2020 15:32:29 +0200 Message-Id: <20200410133239.438347-10-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> References: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Fri, 10 Apr 2020 13:33:14 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 55584d7a-ddd4-4589-c2ab-08d7dd53b966 X-MS-TrafficTypeDiagnostic: MN2PR11MB4333: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:193; X-Forefront-PRVS: 0369E8196C X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(346002)(376002)(136003)(366004)(39850400004)(396003)(2616005)(107886003)(86362001)(316002)(4326008)(8676002)(81156014)(36756003)(52116002)(7696005)(8936002)(478600001)(6486002)(2906002)(66946007)(186003)(66556008)(16526019)(66574012)(5660300002)(1076003)(66476007)(6666004)(4744005)(54906003); 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: Ru0fzvK4rAAZVCuCbCQKxWwz55m99BoQrYzUgxNrMKurKKbQKb/R0W/XwesI0pwcyDSojprxEi5TeGj85GU+EtB2PZBTnRtvKpdOXLVPSeexVaBOfFY/HaQeVo3K9BrEugv6FkpNmx8OvjD/xzz49nvTA0MCtFIkCqgvIo/pXnsnjElF7PFPTGvhQQ6v1tdWIOz4JcqJKI7KlsJv0U9CEnHRqaF5wfpTYCNb/IOrGLQPBe0qd3J31BCAo9CyBVmSUkPGRgYpU5dgTqSMtLAeUQfANzEA3dLWtv0DD+LQKleoAVBiwUocHpHBE+cguiWHY8zLtTZtWbwJHmAmIV663NObgyKuNe2Tdg3HMLNdjWMCaiV/vYtaFnNikaVLE0023WAFy7uGGdWt8UFxm/AFk+0OjSdd0F+DF/NsTVvskPZy0ZXUp98GVwnOGHEriyN7 X-MS-Exchange-AntiSpam-MessageData: TKVmW8jLIsHP69lcPzZswanDuQ01Pzvg4O6kXtZJFdig8vPH+TVeCSEhgJF1QhH7vkCsENRz6sqpbVb4bM+2NwhZdd8iY9S+xb7KVFSq6TTZelqZWOz3BsAvvwQ8AS2At2zGXGmiyZZ1RdbcEfx7o0akvqUTAbofBPPfhw19NMN2DMXeGg3467hfrWsUoIDNhxy8+fgv6ngB3uH9t5pY0w== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 55584d7a-ddd4-4589-c2ab-08d7dd53b966 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 13:33:16.1636 (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: tVs4MvFhCBEjN9vu1XjeETFAh+VWY6Uab1RmmaeNlRWxEu8H1wC13BaP+luZiZyAOwE+YmEeQp8sB3T/U5bVbg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4333 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller After a call to hif_reset(), the parameters associated with BSS are reset. So, it useless to explicitly reset the keep alive period. 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 67e16c435848..b0557dab91fd 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -413,7 +413,6 @@ static void wfx_do_unjoin(struct wfx_vif *wvif) /* Unjoin is a reset. */ wfx_tx_lock_flush(wvif->wdev); - hif_keep_alive_period(wvif, 0); hif_reset(wvif, false); wfx_tx_policy_init(wvif); hif_set_macaddr(wvif, wvif->vif->addr); From patchwork Fri Apr 10 13:32: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: 221287 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, 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 D6227C2BA2B for ; Fri, 10 Apr 2020 13:33:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9EBE320769 for ; Fri, 10 Apr 2020 13:33:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="Gb6NmkZn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726897AbgDJNd2 (ORCPT ); Fri, 10 Apr 2020 09:33:28 -0400 Received: from mail-dm6nam12on2082.outbound.protection.outlook.com ([40.107.243.82]:31903 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726864AbgDJNdZ (ORCPT ); Fri, 10 Apr 2020 09:33:25 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ks0tzMRNSlp+K9JFj2EkLMSGAGWpQxjjyfvgkq3dNDBW5WkjAcO5/231P0BsqGmMoSEIjfwKw1QZvvZeEKm1xh3fgkdPwuynuiicFwAdvB+nRf9TWs7E7QwSQ90pWGnUELPKd8FMjBzG2n7elLMxa3GqJec01iuEQpNMohkRJogyyE20lAhx+r0IVx3Y5hC0rghby3bLYkeKEUxKSQGRzLq3ohzyisYP/Au9RWR1XPdeVHDjx8xOsxQJqu3CvfY5BnatOG74n+GSLYv9t7uFrBGkjGELbGHKxGMTVYH+YOxe7Q3G/dst87ei7/57nQIqbchsJyQCiMmH886l/kLXkg== 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=nvcvWBQXy23qgYN6qax3oOEPpAc4Ie94rn39rMo5Ljg=; b=NYQjyI1mUhYp8sqYNBERvWeKzwp12kzvrGvM3xrzWXxz7CEUi7Xuv4RBfNgA20oV8BE/pLeOJhnSHSBuRiYB0nLzLdGvpRXB2VcATQgVHU+vKKrSn/GOxUiSevxJHNjEzvrB7gXpMTe9pJ6Yd+mx1OKeDn3TFcZGni6GtGNMynegCaQ8NiuYSLgZ6AJwzpuqfQ6qsiRy47DHRU+evTrdhr7odRbI6bRpqmbzznT6Y5I6lpWxMgd9jJeasXLkpgoKgUu/sJIWiPvvCL6ZjIqfH4k+FmuCE0lJ1GCfeaLj/uzwEqdag78w2aMFKdPbK1tP+aZi0lOwNN6GXmqmE3fXNw== 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=nvcvWBQXy23qgYN6qax3oOEPpAc4Ie94rn39rMo5Ljg=; b=Gb6NmkZn2NtEzXkvhe4PBl2zu+3+zhuJ9VKYwUlZqDrbWtCR5k3W8XUo2VwDN4u/Zd8m363fhN6oce2QpAb05BbUz33h/rLNL+LB9eJEaW34ycrVBF5r4ReDzKxd0cv1PgEjFdFcqiWxGMeesuSOJ1d5I9ESmmqF3qQP+CpilWI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB4398.namprd11.prod.outlook.com (2603:10b6:208:18b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Fri, 10 Apr 2020 13:33:18 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1%6]) with mapi id 15.20.2878.021; Fri, 10 Apr 2020 13:33: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 10/19] staging: wfx: drop unnecessary condition checks in wfx_upload_ap_templates() Date: Fri, 10 Apr 2020 15:32:30 +0200 Message-Id: <20200410133239.438347-11-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> References: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Fri, 10 Apr 2020 13:33:16 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 900041d9-e2ef-4dac-68b2-08d7dd53ba82 X-MS-TrafficTypeDiagnostic: MN2PR11MB4398: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 0369E8196C X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(366004)(346002)(396003)(136003)(39850400004)(376002)(107886003)(81156014)(54906003)(8676002)(86362001)(1076003)(6666004)(8936002)(4326008)(52116002)(66574012)(7696005)(316002)(66556008)(66946007)(186003)(478600001)(2906002)(6486002)(2616005)(66476007)(16526019)(5660300002)(36756003); 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: AFYy6hQPlA3VIDCRL/GOZpCw0tOMIKwHVOLuzVMsW8oCQNQDBh0e37Zw/i0mNv/uXWHPoW9Ay6U7u8pXGMLlxlYTWcGudqKY87J0Nii5MEf4UAqKE6uDQnMoJzegtwF401TrHmRxPLP4SW5bOIUdDKXV2ov0wLHMhtLGoSYNfTSC6C8bnyK8jmEQK+evaCbNpj3GCeg8LU205ZOjhRuhM7GFmCS+mYerpxnDE7LjND+OvcEAMedx4w/Oakt+e/zVjd/Vj/CMwX7vIfBacbsDHlgxmVWtapbvp6fhjbfnpMEdm/hACcv7/w4gLMsuhBV7MMTMi7LZq4ORista8Buy8jTAjsEn/weLV1tOGjZXPOvNxYzr3kw3xDZTgB/cehJj55Cx/oiuIYDWVhNI5N3mJOMBRAs+FojQBGF6kvAOq1WQU4OrtVs4JK0+9dRsXRbs X-MS-Exchange-AntiSpam-MessageData: 48AbuPnTdC91xtTP9CDaHnfM18A1W8IYZ09GSsse3Vgto+mfH7usELVFtBttbIkKKYh43QeovXKSm2ZErdkUblqGHe8/ZcZ9bYgHTrpSONXON/cSjwX0mMvN88ueaq6veIJQMx+cWCET5rZ9My0zswl2Bm4IfPauEjlJqzrrYqCleQjksCq07BOHVT5HB5xkZSKQQcUB/b60/mEzsph3dQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 900041d9-e2ef-4dac-68b2-08d7dd53ba82 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 13:33:18.0515 (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: gCuMVRCn0dlqk9cd3Me4AVnTcc7fOimLmHU72kizjeOP56Fm3rjp0bbwkdgVstbEYYC+dpIwtBBiqJJo+KnttQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4398 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller In former code, wfx_upload_ap_templates() was called in more cases than necessary. Therefore, it tried to not update the frame templates if it was not necessary. Now, wfx_upload_ap_templates() is called only if mac80211 asked to update the templates. In add, it does not hurt to upload template if they are not used. So, remove unnecessary conditions at beginning of wfx_upload_ap_templates() Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index b0557dab91fd..7af7bfa4ac99 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -570,11 +570,6 @@ static int wfx_upload_ap_templates(struct wfx_vif *wvif) { struct sk_buff *skb; - if (wvif->vif->type == NL80211_IFTYPE_STATION || - wvif->vif->type == NL80211_IFTYPE_MONITOR || - wvif->vif->type == NL80211_IFTYPE_UNSPECIFIED) - return 0; - skb = ieee80211_beacon_get(wvif->wdev->hw, wvif->vif); if (!skb) return -ENOMEM; From patchwork Fri Apr 10 13:32: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: 221283 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 01390C2BB1D for ; Fri, 10 Apr 2020 13:34:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C64B920769 for ; Fri, 10 Apr 2020 13:34:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="nl5nd+6m" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726864AbgDJNeY (ORCPT ); Fri, 10 Apr 2020 09:34:24 -0400 Received: from mail-dm6nam12on2082.outbound.protection.outlook.com ([40.107.243.82]:31903 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726878AbgDJNdd (ORCPT ); Fri, 10 Apr 2020 09:33:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UjcVnDgT/kpUY9C443We4/V1Bh+tqS3ZJm8dGR/q3PSUXGRHQ77G3mWzuBijqOCysEkcVu1rKOfgdfJe6H773LGdxa553n0W0uu0sW8IlcyQlbh9/7qBNDk/bbx0UPjTwGLuV5ya5d9TTObDn5rWvXhzh0Bqr8Kd0jgv1ysDVD2R7i9rlWvpzTT0S/QkQoNqppM8sN6gZ+Wf47zG+s7ydhk/ZcKKfRSyRAG7lhkUzrepz/zxHXyNj3dCwjC43X+SSB7W3hNVqCM9v/Mf14g3CN3r/mZKNom2+RN0JSJbhUHxtLI56Z3cCu0H/KKX6kKdgg3Ep8eBw4beIeKyztn0og== 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=sYn8EeJqHkBzXGtW91SPJndcamQP1AoszTMhx31mvTg=; b=irggwoTcbN+1jQPy4CDk0tvMPSEWK492izA9vFAZMywsNCSRFp9lfebux9mofzobhOBRZIMA5W+B2tZSsgFpmvFmrFW1jIfWp4l+HLHolvB8zgEPPwc5yDtbXkyMJkUppsfrMgfdQqAh3oMyF3b3qZi35K9VnT6URoWiExm2eWLML7ffP/y1/F/Ez13/F7HnSHUjLa7hsSoqkGUln5im69DuK+mHsW/2CA+dQYupXN82dB9LccXlbtzyEyBIItCUDzE7mTZKuVUm9xo5Eq9LCL8pDfi1gZdf1xyAaPE/xpE7lBjFvNehnMWCg3vvKyU5YriedfF0LSp+BNRkpZBJeg== 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=sYn8EeJqHkBzXGtW91SPJndcamQP1AoszTMhx31mvTg=; b=nl5nd+6morrG06AXrNaIGSlGnHdi7E7AswbZ+w7LDDdMjnlw4mQiG1q8NYD3TFtghw4O9+86z7pfO9vh+M0BKx1sgwc289EVbCbX1Mzfoe7yVNf3C32F7cp9iLC4pRY9LmaN2gM1D7ycvRKViohX3EZI5TN/Z7BVCpvcGvqjzE4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB4398.namprd11.prod.outlook.com (2603:10b6:208:18b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Fri, 10 Apr 2020 13:33:22 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1%6]) with mapi id 15.20.2878.021; Fri, 10 Apr 2020 13:33:22 +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/19] staging: wfx: remove unnecessary conditions in wfx_bss_info_changed() Date: Fri, 10 Apr 2020 15:32:32 +0200 Message-Id: <20200410133239.438347-13-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> References: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Fri, 10 Apr 2020 13:33:20 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: df234838-656e-487a-9dbc-08d7dd53bccc X-MS-TrafficTypeDiagnostic: MN2PR11MB4398: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-Forefront-PRVS: 0369E8196C X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(366004)(346002)(396003)(136003)(39850400004)(376002)(107886003)(81156014)(54906003)(8676002)(86362001)(1076003)(6666004)(8936002)(4326008)(52116002)(66574012)(7696005)(316002)(66556008)(66946007)(186003)(478600001)(2906002)(6486002)(2616005)(66476007)(16526019)(5660300002)(36756003); 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: w1exqkQ5OPIBN7mVCGzw5gZGjmiiRkrmY6sZoNLKY4qvRww6t7EocahJBsfGO7f5vgLO9xwz7MZKq4AkJ0Rb4H3LB02D1xornNi4Ng8Y6/d4t+kHmYioNFXmwoMHU1o00pqMds+34Cg4BgWvGIPndBNUhXBsLZ8htA+Q1SvfDFJJMG3i+18dYaqi+91S6SbclIzkMJmI89hdQJW6+JltMBz152dIe6K0NyEZf/QTtpdcvwNR4524h3dtPRb73aXKdlVkWkXEOmjYw5jQ8I7HKqh1ZxSeFfhvqWPLaqiIHzBUAOLbcTgbBu6uPlkEqB7A50wNDtYBSDtzwJeTdFl2bIBOvt38LzHDZFwGVEAR/VgJ9u+/v8uGcXAmv8z8apCSZfsdJSb1zHc9tfvF5xDhv/zaRrokWn1o0WBFF194H6DC6A3lD2St90xZEACAof2l X-MS-Exchange-AntiSpam-MessageData: 3wV1dZaWkdXRCil3cA/YqKtJ40rQekQTmF5FPezzyFIAuZramoHFq51wr9GuYaEbWLC7xXEdfZcUqWL9lf3R8u4pEnVcNA9zhdDxvYfZvvIY2qm+dnz6eHvFykyUjzJcem/stH48Ne7e3IEAXue3fPzP0qOdlqJMC8GuL4ko0iJJOSfbgyNAQMM6Y6ZxpZRXRrfB4Fxb5oLBq1lWeb1DBQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: df234838-656e-487a-9dbc-08d7dd53bccc X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 13:33:21.8643 (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: Cv2jPwoHeYD3ECL7LmenIamPGAmQt5fldtZOMvaLPdErDreL65GSYKKUP8QaAngmSERhMPJd+I0HW6Vs2gYk8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4398 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller wfx_bss_info_changed() update ERP and CQM related stuff. Thus, it check the flags BSS_CHANGED_ERP_* and BSS_CHANGED_CQM. It also update ERP and CQM on join and leave by checking the flag BSS_CHANGED_ASSOC. This check is useless. Mac80211 already do that job and set necessary flags as expected. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 3512e59f0968..11d62de531e7 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -725,8 +725,7 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, hif_keep_alive_period(wvif, info->max_idle_period * USEC_PER_TU / USEC_PER_MSEC); - if (changed & BSS_CHANGED_ASSOC || - changed & BSS_CHANGED_ERP_CTS_PROT || + if (changed & BSS_CHANGED_ERP_CTS_PROT || changed & BSS_CHANGED_ERP_PREAMBLE) { u8 erp_ie[3] = { WLAN_EID_ERP_INFO, 1, 0 }; @@ -739,10 +738,10 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, hif_update_ie_beacon(wvif, erp_ie, sizeof(erp_ie)); } - if (changed & BSS_CHANGED_ASSOC || changed & BSS_CHANGED_ERP_SLOT) + if (changed & BSS_CHANGED_ERP_SLOT) hif_slot_time(wvif, info->use_short_slot ? 9 : 20); - if (changed & BSS_CHANGED_ASSOC || changed & BSS_CHANGED_CQM) + if (changed & BSS_CHANGED_CQM) hif_set_rcpi_rssi_threshold(wvif, info->cqm_rssi_thold, info->cqm_rssi_hyst); From patchwork Fri Apr 10 13:32:34 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: 221284 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 89A2CC2BB1D for ; Fri, 10 Apr 2020 13:34:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 612C220673 for ; Fri, 10 Apr 2020 13:34:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="ZAtuIDnj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726980AbgDJNdi (ORCPT ); Fri, 10 Apr 2020 09:33:38 -0400 Received: from mail-dm6nam12on2082.outbound.protection.outlook.com ([40.107.243.82]:31903 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726940AbgDJNdh (ORCPT ); Fri, 10 Apr 2020 09:33:37 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KY0JBxZrsUcCvavNEYzkfZtQ5zt4IDRaV3qt/YwbEYCH172+VhiT/GCn99XrpCP5AyuKeoRxsa99hZo8cAe16S/t5kVE6XCMeHYXPezPhrv4xjG/oU2nERZ2eIbicchX7w48xLOi2sTrO7VHpqyW739cCsnaD0YgNSMLcO4DRNHYyXly+bVJwSG6IZRG/p0okzf+0ucrP6FEhxoAZWn87XLGHiYnDAUm0FNu4XQhbbkKgzSv5CRdQmqCO546NOBvSwfJW5IfwvjJSDviMojh++IpQ9N+c8PrVxdd1ewx2ormeWJv0YaXqlHvomvgiGqk4xeD1iAclC3z8vFq1U74lw== 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=7+k6i3QYl7UNlie9H8QNJ3/xlP3O6itZF1R+aGTJlHA=; b=JPFW+zeh6MbuXakWdAKRcQWJ3YF5LGrgXvLvd5Upx5oQJldiJI/EZ+vWZAmPuKR9KWwSPITu0/KxtipISN1LosWCs0r7yErASdi1ihyEhbeBkCrPJEVs/TUSLqIz3SpW7i69EA7ElY6qc2NlQwRKh6hqu02LU7adpnrzErgY0dllj9etBb0k0muyxO975BcmrQgIawBg/cdM4fELPZnV6j8cPKZzoZHcFhG5F9/QartzifDy9m50kNv+zP4SVPUm5OpYSmZ4onj0U9IB7660hXQ3eVnwtMerELijhSOK7Vq1LVIidepM9DgtdXSXMA3hQWIUCckmVqrxjJLmx694aw== 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=7+k6i3QYl7UNlie9H8QNJ3/xlP3O6itZF1R+aGTJlHA=; b=ZAtuIDnjB63BO+9h44YrraeIf4MbeSGMhVavl+4r0924Io4tdbfa5gzh8lH3e4dTStyDqNXO9aWfMXQoGnuYKDejeI7iAlPlC9b12fbKzLL0TADF8ZRRMhhQSVfFB2AANKgs6CVPGocpN7CLgkZDBwg8gvRhxycFuXhPwrucXPs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB4398.namprd11.prod.outlook.com (2603:10b6:208:18b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Fri, 10 Apr 2020 13:33:25 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1%6]) with mapi id 15.20.2878.021; Fri, 10 Apr 2020 13:33:25 +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 14/19] staging: wfx: allow to join IBSS networks Date: Fri, 10 Apr 2020 15:32:34 +0200 Message-Id: <20200410133239.438347-15-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> References: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Fri, 10 Apr 2020 13:33:23 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b2df7867-4904-4cad-2a7a-08d7dd53bf0a X-MS-TrafficTypeDiagnostic: MN2PR11MB4398: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:873; X-Forefront-PRVS: 0369E8196C X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(366004)(346002)(396003)(136003)(39850400004)(376002)(107886003)(81156014)(54906003)(8676002)(86362001)(1076003)(4744005)(6666004)(8936002)(4326008)(52116002)(66574012)(7696005)(316002)(66556008)(66946007)(186003)(478600001)(2906002)(6486002)(2616005)(66476007)(16526019)(5660300002)(36756003); 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: 3XcRfiAq24UpqNBdCgHp79U7i78XDtukphHfLc9d4rs509UNIG1faO2iKfymQ6laD3Pg/GzrCwCnuItSE+pV2w2SumWfif9ZJ6fPHgWcjVkw0ZVjD6X7bpvg7R/LYmcpK1v95U9/dTBuqe2AhSO6qTss3Jfufzyh4XO1qOLQEj04Ddy2Rim8jsPBaSxDw4DSy5IO6ohzkkTn0fb0P9Xy+GEF+qAhiNgyWZzJ9PygN6YR8wXMyJwD79uUBiOEjaCpHsN/o73VLRXuk2M8c4HBrL/vXl6IK3VsQAS42cPobk2NJKJoeG4oIr62mQnBhba1q04CCgXGVjY6UEF5HHYVRjjhVStgxIOixLzDPUlpadphlIUU37XoxtbHA3etSlVHGuWuqxeSaLDYGqljkeJqomTpNytXH5gWdTwnBEq/L3u/3Dr1Y9LvObaonfNxGfbA X-MS-Exchange-AntiSpam-MessageData: 5ziEVhuLPrApIvhgrSXs9Ss5a07cqykIfK3VKplORHvACDS7z32NS+nAApFy/DExA1W5NTsj2FAMGQf0CyNhPL0lqu+ERoYI9jL33rdbsfIwkw1r+zClxaqhbtaNbzjqDMPRyII7prGMMMO1WZhjYGC2W1AGUjxuwCG3ExVe8QE/71C1Sgj8A62XC7Ug/PFeWqRORqGZkr6ICVD6FFYJwg== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b2df7867-4904-4cad-2a7a-08d7dd53bf0a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 13:33:25.6331 (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: yep5ktm1l0/oMQKKqKZlWQTnsaXDUDTgetlyGl+lS/rcMaVt3mLYiMKT6zISvISlNt1GVhqUFgrlsnTwddtuYw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4398 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Current code does not permit to join an already existing IBSS network. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 75f1c515751b..8aa373f5deae 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -484,7 +484,7 @@ static void wfx_do_join(struct wfx_vif *wvif) wvif->beacon_int = 1; rcu_read_lock(); // protect ssidie - if (!conf->ibss_joined) + if (bss) ssidie = ieee80211_bss_get_ie(bss, WLAN_EID_SSID); if (ssidie) { ssidlen = ssidie[1]; From patchwork Fri Apr 10 13:32:37 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: 221285 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, 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 F3B48C2BB1D for ; Fri, 10 Apr 2020 13:34:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C337B20CC7 for ; Fri, 10 Apr 2020 13:34:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="HcpVaOGi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727109AbgDJNd5 (ORCPT ); Fri, 10 Apr 2020 09:33:57 -0400 Received: from mail-dm6nam12on2089.outbound.protection.outlook.com ([40.107.243.89]:6130 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726953AbgDJNdj (ORCPT ); Fri, 10 Apr 2020 09:33:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OU6rCrCKygu/5TAzGYa1CD8iqOvXC49k2UZkCETmgXqNGnI5XhEnUfZizCf4gpm2cOehFwgjAxjRGNZBi6qrsn0ZbpOsHMx+enimYCsDM17Vt+vNbTOUPaxys4QR0+F3X4FuinHFL7d4HJuHItN/L9abex1gxbma4JZVqmPD0TQzZyZiWrYFwo2DQu+tgDb8eyOSFNWHC702hb8W/xAShA0+xBUgydyxbACbAXwu1P5h1uKClUVr1XxH+YXUW1AmLke1nGq1kEuUpZe5+CpPNeBKV/lQ9wtTvHUgMDy8o+HvX7nUCgLbOTro8l9jmTz87MxD9w9ThkKuevNAYYeqfg== 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=j1WN53AH335kYeRtxLb+77TvAaP2Hkl2lY88WHoq8+M=; b=KDa/9hN2z2LXKypPNbzyYEG8qddom1mxWz7ro7Wt3HAtQFquQEwOkW4PxcviuD5Le6AFbom3hSHFDxbveHlq7kEt37vPgcScZyodXqUsDRuwPd5jWBJsC8VlQtli49iaVYZcSoMgNPo/AlKKbPR3c+pqFrjSNxkY3mBUm5znC3JptpOY9DOAdjz8nH1J6a7Nc/UJzYqFlGJ1XbFp33kRIXVd3SPr1DCDAn9nkJh+RTCE2/YkTgGDfk+ufgTe2Z83o20/i42Bsoj1a3zWEiNbFfiW/3mXe6hxgVf8Knb75nwcPHGbhiEQeGeCXeHecJ116VbBNLkh7KV/XcSKi5k/3A== 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=j1WN53AH335kYeRtxLb+77TvAaP2Hkl2lY88WHoq8+M=; b=HcpVaOGiCp/v704OE5Dn4nqj5tFub+l57pNU6UnBMFXMEAZPZz+HzxxcZma1e477uyyTVHsZ76eVQxYe+TcdAg6x5ZRWCoI9s6P1LcfIhfUd9+JWU8QIJx58lBCTDF8/D2QoyghYKl3b+2nuYHCTZLbDHNPgizRhUtSWgnIj4SE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB4398.namprd11.prod.outlook.com (2603:10b6:208:18b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Fri, 10 Apr 2020 13:33:31 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1%6]) with mapi id 15.20.2878.021; Fri, 10 Apr 2020 13:33:31 +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/19] staging: wfx: check value of beacon_int Date: Fri, 10 Apr 2020 15:32:37 +0200 Message-Id: <20200410133239.438347-18-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> References: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Fri, 10 Apr 2020 13:33:29 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b1055b76-ca35-4992-c4f8-08d7dd53c269 X-MS-TrafficTypeDiagnostic: MN2PR11MB4398: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-Forefront-PRVS: 0369E8196C X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(366004)(346002)(396003)(136003)(39850400004)(376002)(107886003)(81156014)(54906003)(8676002)(86362001)(1076003)(6666004)(8936002)(4326008)(52116002)(7696005)(316002)(66556008)(66946007)(186003)(478600001)(2906002)(6486002)(2616005)(66476007)(16526019)(5660300002)(36756003); 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: EJur2XXEvFQuxt0Yv13icWotaVeMJ1ixRpCLNvyU+ZxYgeN3AKTLYWbOHbYffy4SEtCoPSLthahBCJS9O+7jvphlA/p3s4aHFVQHfQCjzMTJpplgKUmrc5PPHFFpLMCREEO3wKba/lDndFUNvYwvdZStyXTE/SwtGmg5VDCFUZQYgSubWqT+CsEUpnyxhYJdGLTa6oNVhE8CqfEv9z4eVYhXzjrZF7MB7ubuis3vi+8+1jc5nBd68LPXd9A2wowcvStADkKqHXS6DW9+fGPyYB6Uv2WrANhRTCIQqk9buuFhzmFKpv7RyD1HF5+VqqDO/7c6W/oxwudRI/GzR1XKggoyA5DxmPBVNczZYn2ZkhM7lLAEDnYUWu/ft/BgLUZ67jqq7YzgCNqJz8Q2makFomaTrp0ni22RTNYuHkEHghFnw/f2EpC+BAnVDl7u5KnZ X-MS-Exchange-AntiSpam-MessageData: sAvH7PhvHNVpCeTTQTEDJ8ScsadwreLBWX+PE1qox2c7kM4GTTBf8i3Fmyq6YdEeCBVIBollM6mKb9dNojP9SHzAIyN5I5Zoqfmws1v2sR/dpetGz7ceW91n7MyPELy28wkXXUNArlLgzpRcyq0HmeEFx/mGt5x+fH3AMRRe1S6QAygDWJiKq10rJQslir3W3f4FbsVgE2okOhz7E4f4lQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b1055b76-ca35-4992-c4f8-08d7dd53c269 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 13:33:31.3168 (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: dZAB+ltIwXCe0PPysfEYfMRQ/n9f8Uf0o/FyogzWyXbwZmucujqYzGVW1W41b+/oYjilFD10Pd1saMrxY7hiIQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4398 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller Firmware dislike when beacon_int value is 0. This patch add some warnings in case it would happen. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index d44e5cacbbce..f49ab67e1a6d 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -296,6 +296,7 @@ int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, struct hif_msg *hif; struct hif_req_join *body = wfx_alloc_hif(sizeof(*body), &hif); + WARN_ON(!conf->beacon_int); WARN_ON(!conf->basic_rates); WARN_ON(sizeof(body->ssid) < ssidlen); WARN(!conf->ibss_joined && !ssidlen, "joining an unknown BSS"); @@ -430,6 +431,7 @@ int hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, struct hif_msg *hif; struct hif_req_start *body = wfx_alloc_hif(sizeof(*body), &hif); + WARN_ON(!conf->beacon_int); body->dtim_period = conf->dtim_period; body->short_preamble = conf->use_short_preamble; body->channel_number = cpu_to_le16(channel->hw_value); From patchwork Fri Apr 10 13:32: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: 221286 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, 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 4EE5AC2BB86 for ; Fri, 10 Apr 2020 13:33:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1DC8020CC7 for ; Fri, 10 Apr 2020 13:33:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="KeP/RZij" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727004AbgDJNdo (ORCPT ); Fri, 10 Apr 2020 09:33:44 -0400 Received: from mail-dm6nam12on2082.outbound.protection.outlook.com ([40.107.243.82]:31903 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726940AbgDJNdl (ORCPT ); Fri, 10 Apr 2020 09:33:41 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ezix9FY4h//GDKWtH0dsirKOr1CcI6e7tlallMBeulvzktSKRF2ls47HJ+Yhwlo39bPuCHGSM9V/4Ar/MlSW9k/aGoqdDeT9FqCAMgQBIY2RXlcOoTp9t4xnddihG442POrnq0x7OkgzVm+bNEc6BfsTLK+l7EZBYy/Y5us6mHum5dnf/9WlIAQzex35Dfv+ljM81dbe9yh0TRnbqyXk0Jh+R5foCaUvmxXZk+PZZyIGIQkwsQ4WBcvAghITVtKPpqQTBBfVHYJBun8et62tmN5HGigfSTYX+OoRv3i1BzPmEBqT0trY6xYNQuxnmV+CuCOZgnqoe1UJbYUbwqF23Q== 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=FGiWzJt4w79BHNd5ktlAX8LfvZgIMAvk8eAdFHMwL7M=; b=bNDvzYgkEpt3jLIOqFLPf1ncByYW0ezPH6CQDZKs8hiKfLevi1/hTej0z66RgEQwKpM9UO0zSUzamK7OU2SvFeyVXGL4KgauT5WK8eiKaMcYkyzNpcjLr0YH+d2DzEmI00H1zRhreBXAQ7cmX6ACdLro59bkNIZSGMrDsw2Fs5uQcGJODme0JwbufDpHQ6+SasaC0NMxMRW4tY3xjHAmUsNjdAKEn/s6tbQh6yZ6obqNxL9xcGPOCiGsQQXRJlV7EdrduEm3jm+nwsKqUyG3apATzCwteL9WhWFXLhyTC712HWqf9StKBKN1uqQTS6VkPk1m0zK21q6VxkcCm11BgA== 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=FGiWzJt4w79BHNd5ktlAX8LfvZgIMAvk8eAdFHMwL7M=; b=KeP/RZijiTCwEsGnE8WwDTSJ/o0J9prFQaSPJhpvXzi4vW0ZMoPwhZZ7WdWZEo433gUf36TW8tQSEg/7ozHNjPsnpBVBsEVmT2yjrgW2bAcjwlf8d5lzf3EDqOb45rKv7NUg5ceVo0rpv5/ium+iZcGwXWlkhUptG7Uspwr3kFw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerome.Pouiller@silabs.com; Received: from MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) by MN2PR11MB4398.namprd11.prod.outlook.com (2603:10b6:208:18b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.20; Fri, 10 Apr 2020 13:33:33 +0000 Received: from MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1]) by MN2PR11MB4063.namprd11.prod.outlook.com ([fe80::3d0a:d9ac:3df4:8b1%6]) with mapi id 15.20.2878.021; Fri, 10 Apr 2020 13:33:33 +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/19] staging: wfx: drop unused attribute 'beacon_int' Date: Fri, 10 Apr 2020 15:32:38 +0200 Message-Id: <20200410133239.438347-19-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> References: <20200410133239.438347-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) To MN2PR11MB4063.namprd11.prod.outlook.com (2603:10b6:208:13f::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.silabs.com (2a01:e35:2435:66a0:1265:30ff:fefd:6e7f) by DM5PR15CA0056.namprd15.prod.outlook.com (2603:10b6:3:ae::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Fri, 10 Apr 2020 13:33:31 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [2a01:e35:2435:66a0:1265:30ff:fefd:6e7f] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5e66bc86-bed0-4727-f545-08d7dd53c38d X-MS-TrafficTypeDiagnostic: MN2PR11MB4398: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:655; X-Forefront-PRVS: 0369E8196C X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR11MB4063.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(366004)(346002)(396003)(136003)(39850400004)(376002)(107886003)(81156014)(54906003)(8676002)(86362001)(1076003)(8936002)(4326008)(52116002)(66574012)(7696005)(316002)(66556008)(66946007)(186003)(478600001)(2906002)(6486002)(2616005)(66476007)(16526019)(5660300002)(36756003); 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: N+gedMZxHR4FHThGBoS39vF8UGwWk2SzAprAW8XcWx7Duvs6cEDDkU5fw46QI5TCmW31DsASDfTCJrVwNqPkj1XMpy6xP6N8zUxuAsPd4VIPKuIkCGhWmy+rP+ULShx22qOU0sAyxs5TM7TjApd+a0ttTaCFgv33RRb4JuMmfnwr4j8a760ViC3KCTYYgxBIuc2ilNiYT/uxxQ7JWGNPr4LFbaACdvF9bFG9V/xH27h/JuqxZueG1fpdssoklaR2up3L4qFS8IZMvtp+4HHQq1DqCOEz6gb8yAk/k/MW3MY5AzsbPwPQ0iJr8FUspKhtzVmx1LJVe3p/vHjJGO3A79tkq604FRejBhXzFTDSNaaM0k9ZxsH3Yg6u7LwmDpjb67czHE/nv/nY14qVTi1nhqxtHe9qNUOMhinWPaZzTlJg/DUCxmKR4wYbgCr+VC90 X-MS-Exchange-AntiSpam-MessageData: Zt2UFH1iWOGaQinexFS/rvCWwc1QEs6c1bi7R66B146390IPDrqULigD+/velFHPCk7gI6BsSBqkVow23BqI6ZxkdDeWcUqnQbi1o88F+4sesXLlkIdp/Zm444zMeWxkw3m4xI4qDHLsKAVx9m283SF7sNb6hxbHuMTHkEEm8aD5EvgaznpWlWFhYd+i4Pdthp/Iqofcw5zUtsVb8ujimw== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e66bc86-bed0-4727-f545-08d7dd53c38d X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2020 13:33:33.1967 (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: 3n29AVaFgJKNwkKAwM5qsYYZwxE7+VmD4fBgMrjdg7+Kl6o1p2Zqd3ebJVBHL3qFBD3vU0pM15v6IxjpCwFg5A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4398 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller The field beacon_int is never read. Drop it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 5 ----- drivers/staging/wfx/wfx.h | 1 - 2 files changed, 6 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 91b4ce945598..53ab9648184a 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -478,10 +478,6 @@ static void wfx_do_join(struct wfx_vif *wvif) return; } - /* Sanity check beacon interval */ - if (!wvif->beacon_int) - wvif->beacon_int = 1; - rcu_read_lock(); // protect ssidie if (bss) ssidie = ieee80211_bss_get_ie(bss, WLAN_EID_SSID); @@ -611,7 +607,6 @@ static void wfx_join_finalize(struct wfx_vif *wvif, { struct ieee80211_sta *sta = NULL; - wvif->beacon_int = info->beacon_int; rcu_read_lock(); // protect sta if (info->bssid && !info->ibss_joined) sta = ieee80211_find_sta(wvif->vif, info->bssid); diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 619e6f5c1345..41d67dc091a6 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -88,7 +88,6 @@ struct wfx_vif { struct work_struct update_tim_work; - int beacon_int; bool filter_bssid; bool fwd_probe_req; bool disable_beacon_filter;