From patchwork Mon Sep 13 13:01:32 2021 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: 510241 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, 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 CB186C433FE for ; Mon, 13 Sep 2021 13:02:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B1403610A3 for ; Mon, 13 Sep 2021 13:02:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236918AbhIMNDh (ORCPT ); Mon, 13 Sep 2021 09:03:37 -0400 Received: from mail-dm6nam12on2088.outbound.protection.outlook.com ([40.107.243.88]:14912 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236893AbhIMNDf (ORCPT ); Mon, 13 Sep 2021 09:03:35 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SEUwUVH5b8oOJgqnH7rhS5BXiYv0lhkWJYQevswXm6GgtlyMjX38N1ISwKWqNHsLp5blm4eEtePLhFuLD+93oPsYsYlJB7HQZDo4AgRjKlcvmO8hhJvxYL0vI8nY6K/2uWjM/I6n/39cFTKMF1LlretTLPyOVWQxwiIREeGcJV9IFMbH56rZhVlkq5rq301twTZvigIUc82I74epbaeVVOSYOlAZOqtHMxd1F7zVADQ+MakRSc2zC7LTip0//jCLALVGuoLGv68LTWTRhvBtzRt7+0wMzmr0ZM/QxBvIAVOZ++RkTE3pQNX8QN/kBqSY1avWLoHLWLqoGxHaNL4TqQ== 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; bh=Fib8Y8j+Fw/sN2NX69u9T+P9uNpyVHksmDfyGgxLK4M=; b=C97lMExusJSKCp9gP1nmzDJzwL/S2zWLnBp7i587Jz3HuNOQeiVjr3BCXENieqZ5h+liz8W/Ph913e/IcuaNKMGEsn2BsRexY1rwfGLKbLlRzcpqCwEl6ohMn1KQs9pNpoUzg0Y32EHvBYsqP9t/cAtPCEDXWl2tc+iivPLqpQeaxDy8iDSbWWZpDFLFUkuNsDNbaAdD4udGam4qTpfF+eKmrcj7/2yfQ2HnX06e8FYN3K0itxRMYQQCqsfYhHTnTTpbiz0GHEimDLwvXBUqWNqm2HBakBnBGzCyYVOWRHf/Pzq8xl4oXXVBqgAOUa75/YGsmHrMUYllWhyCc0RGig== 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=Fib8Y8j+Fw/sN2NX69u9T+P9uNpyVHksmDfyGgxLK4M=; b=dIKNzk7yEJ2Zx2dqAAi4U7B5fphy7OuyV/eX/DaLEeEOWBFZkBP/tkJCNHyy+0U3It1hmGi6ijd3F+9/P9Xw4kPVLIw1mkDX4YbT846v4duBX9uBin2k3nHizRI+B83zWAKEeI5qhNRyDVN1MSzN7sEQliNXY8fKN38okHQqET8= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB2894.namprd11.prod.outlook.com (2603:10b6:805:d7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.17; Mon, 13 Sep 2021 13:02:18 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02: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 v3 01/32] staging: wfx: use abbreviated message for "incorrect sequence" Date: Mon, 13 Sep 2021 15:01:32 +0200 Message-Id: <20210913130203.1903622-2-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:17 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 581b051f-27c1-45e9-1842-08d976b6b794 X-MS-TrafficTypeDiagnostic: SN6PR11MB2894: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4125; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6PUY9Vz078mPn5SaCxoDe+OaiqDgNVHo7XtaekJ7fnvikufd6ylMWQx0ONDnLXeDNawfYh/nhakjXv+cE0Q9QHfXYg03GmkdYT735AdtATheORquw1NwIA8h6VZMHhVI5Q/k8vC4dt0hLlVM3I7QG8VLGgN3NRXF0aC7GlfQG8f9RCLWJ8olT1QZ0zYCLsCfnFLS05H6hE36rNNESrBB9zPoW571IwgVi4yOiu9fnQTprsQ6yBf73TLPPnxIRyuW7C+t1JtWwcjgdzV0jwFH4cRWpHSINW9Os57fCdUcnELHAyBOnhmWKg9W4s9Vwc1tPDbbV+ecnfWHR9UlsKslPvaWG8hs2uwgXoJpl4/ZiqHpXY2ozBClbZ91BfsOaMvu6uy5Z0RmvZyFhb/eJSuV8IMpWuaJ9SVRFI13Iozk+fjDmEfQbaDXFncJnJxljBSdYUcAPAA3aVXBTZYcRvnAiFAcpBFK6xIjsG53J4vk7xStjC8onjcOkvir7E4w+dSJm8d7kmkQ72jWDvghbqXqSDojjcrPv2JJ5l1cSVvfDTfdUCpC4cDJtWld1XABxq8cRFUU70w/+UObS5AdlNcVbkgTaoGCYGxcSjv1SCTG/PKcCx14xQF/RJTlpU3lSxyReYDe3kH3z+9dCt4nCxW5j7YdiRHjgXm/3/CJQeGYVyauo06qCipJnushO9jxXQR/Jt+tIwFj6LzA5mGG2n5aeA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(366004)(136003)(39850400004)(346002)(376002)(5660300002)(26005)(8936002)(6486002)(38350700002)(38100700002)(66946007)(7696005)(186003)(316002)(1076003)(8676002)(956004)(478600001)(2616005)(2906002)(52116002)(4326008)(36756003)(6666004)(15650500001)(54906003)(83380400001)(107886003)(66476007)(66556008)(86362001)(66574015); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?N8/Zr4Tzwtfp3oybsTTexAP0D?= =?utf-8?q?juOPQYRFCd9lrfnPEjX6UxB6sZ42H1cZyA25p0GkyP0Xq66cxK2xuTeV?= =?utf-8?q?UDpCX/ToqXVhyoJfVEDaitntWKgXlmRGU22EoP6yWYVTF8QASId0Qgbh?= =?utf-8?q?/U7U7Wj401J4C6ecNMPLp/g3Yx5yVH/JaPbocazAqS6ylaZkMmlL5Vd1?= =?utf-8?q?89GzrdyH/tw2+5faI+j7PsdnbY7fOQci2Qq50R6onUgigj/wAvIasoVr?= =?utf-8?q?qcReeK4KQXwURwVsQskXjua0ZRryEaJwgcCbQ26iCl/fVge/V6OwZvjX?= =?utf-8?q?NOlTLQXaeMl/COU7Lv2nS3KIS1MVYNlzry501uZcl43e4vy0IJsLNJUF?= =?utf-8?q?bi+bgZnbJEmkO+BNFFwSYOZP6IdHs5hSU2HQ8oeG4ZDNpaW4sqiAHSap?= =?utf-8?q?HncYf0u9mA67TOmlISe73b63b68t4CNIsdSLQ63PoPACm17Z1KY0DPGJ?= =?utf-8?q?NRhUHMjqgbAq7JsPdyrJxi7nCbFDd3XDNir+4JLh/sEiYAVqDJEEdZhU?= =?utf-8?q?Kqcoyl25yyke8BJVNs6n2R4v0xfbYEvmdVzbq+fzbgFWtmCfY4kHNJ36?= =?utf-8?q?y8f08Yel/I2cNy2NMRaXR91fAZ2LRwxaXHZaDWcQb2I6v5Lzk7u8ue8D?= =?utf-8?q?ZzbVksWGUZ3PFoKYuY3sWitTBgBsqEDNrIRyq/7XPcoD+Iy6WKjapWg6?= =?utf-8?q?KtKQJhH3QmCRRoiLZADmS3fZtde2B+X1RZANpm2jbJzOWCfhsSTIvb78?= =?utf-8?q?e7s92aM2sh0ppf4+kiIh8aT6rUt+h0ymG2cqq9EtisuGer4DFt1ohS0E?= =?utf-8?q?UmTX76/fV9KGBaA8i8XHM0aB0ju1nIhsLSIq4GfiB6fK+zUTWXmgUq37?= =?utf-8?q?vi798yt+4VrC/ojlhN7QEnnyh6JcJh/TkFrRVdT8AK9puxC+nAx7JjdM?= =?utf-8?q?dVr0RxDiYuk/GWZPRv1nTbSItuoH+Aknsar/nX9qkk4pE5uDio2pi3Gk?= =?utf-8?q?pNCiqHeReoqY51QRy2XVEUsu/v7fEPBnv4OBAjwTsqjlRorJ/typxu11?= =?utf-8?q?zP2djSOpm/wI1sGXqh2NnArTv03hFY9j1cWA7t4V290Irlx6e35SqaKE?= =?utf-8?q?ktb5zinncsdLiL16pPUxU5a4ydnbXLehuyxhu/ONdPWMjRinmom2K0yQ?= =?utf-8?q?2Es+HAlqnY1vPsOe9r1cSgrNot2b+LjCPtgtrxtdNRX5hj8zaCujEhhg?= =?utf-8?q?K4etIkczxhkFumLWtJikc+LF6meU8GBKUMf6kneEMDOFWu4o+EjdQ79P?= =?utf-8?q?67cM3cqztuP0q5+WH5BOZb+YANAszARlvrBjmo74pnrDpfw9aucZg5xm?= =?utf-8?q?oLt7atBumTZ8IQDs5nQU/DHEeDQha22?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 581b051f-27c1-45e9-1842-08d976b6b794 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:18.7776 (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: +kimGIzapP8qXiru8Rs7FYQD4Qy89CHpQ2ZrsaQU0wUXslk91+WDI8An6gIOguVpnKLa5JlAtVHG7gtCPywFoA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2894 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The wfx driver checks carefully the coherency of of the DTIM notifications. We have noticed several times some small inconsistencies from the firmware on these notification. They have never been critical. However on the driver side they lead to big fat warnings. Worse, if these warning are displayed on UART console, they can be long to display (several hundreds of millisecs). Since, this warning is generated from a work queue, it can delay all the workqueue users. Especially, it can drastically slow down the frame management of the driver and then generate errors that are serious this time (eg. an overflow of the indication queue of the device). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index cb7e8abdf43c..a236e5bb6914 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -631,8 +631,9 @@ void wfx_suspend_resume_mc(struct wfx_vif *wvif, enum sta_notify_cmd notify_cmd) { if (notify_cmd != STA_NOTIFY_AWAKE) return; - WARN(!wfx_tx_queues_has_cab(wvif), "incorrect sequence"); - WARN(wvif->after_dtim_tx_allowed, "incorrect sequence"); + if (!wfx_tx_queues_has_cab(wvif) || wvif->after_dtim_tx_allowed) + dev_warn(wvif->wdev->dev, "incorrect sequence (%d CAB in queue)", + wfx_tx_queues_has_cab(wvif)); wvif->after_dtim_tx_allowed = true; wfx_bh_request_tx(wvif->wdev); } From patchwork Mon Sep 13 13:01:33 2021 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: 511493 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, 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 65904C433EF for ; Mon, 13 Sep 2021 13:03:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51AA560F9F for ; Mon, 13 Sep 2021 13:03:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238215AbhIMNDm (ORCPT ); Mon, 13 Sep 2021 09:03:42 -0400 Received: from mail-dm6nam12on2064.outbound.protection.outlook.com ([40.107.243.64]:19681 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237853AbhIMNDi (ORCPT ); Mon, 13 Sep 2021 09:03:38 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gIJ8/r6Dfopq1NexW056kxnr+fquFXRQzEoBg+286Ym4DyXPM2t2KDAUL+2HK1ZzSBvVTVV00vROXQACwWd7DMD6q5vPRcl2hCVAVbhqKuHJba/kOsQs7lFDNyLovVLf/++UhdX7TOSoXurbQaGt4YwczT5JwUjyQFPOkxbf10zvL/oazwpQfWVmwPQOnqElUUvDmKIXAAeGEI+hEWin6FQFLCqJ6ro/joBwlFa8M7PfGaIGAmjZgrG0RXfTzuMEzbNY69LXotOagHsJgrS4rcZS48c36WiNhrjTwwvCdB1n8vSGyuBbw6rymY0kcPgnJm4rTetBK1Rg0sDgTUVtUA== 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; bh=3TsJ441Hxc5w6kwdECytocZuGWRAv1M22Qp1aIMK6mk=; b=bqA54d6IiNnnKkbFlMsuczZgBXGyy6vO4f3aK92asQ1zmzzSLJRXHg2zK3fnSqoDmlbEGqS7Zg10lGT2AYFJjdeE+Mh5sn6/yaBeq7cI0ZtKUnc3/m/LMpka9eE6nloqIlxDjtSeROZfY0ARmHPwuLespJTug+fON7rf2sZls4ftB1Ff1dTStU60J8X7/cZB8n1rT3IIwmcaZqUAfC8YCIOkpgpL1qosjnx7x0ykD6m5qe0BYYV9OEXh1WuiKlnpjDAWtyK/jNBsFH7mFWHinm8Qd8kEDHiHU+ysA2qeIgBW/MyjksEC+SSGwqNtUKwblb3MrfR/9OOkS5/RVeVLCw== 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=3TsJ441Hxc5w6kwdECytocZuGWRAv1M22Qp1aIMK6mk=; b=BJQNdJOG1204LmyCD9MdvTkImXfFb5hE8gGKIht1CDf/DgywQuDxlykrLe67KjjWoHgy6kNHzekofmdITSlAaYlMN4Pj+B0ToECYOVwHVDq/DWnMDCk0I7p7CJJqdqpUHDkrq40RFe1NdLYjNFuuMjU2PHjftUsEd2j90EEC0Fs= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB2894.namprd11.prod.outlook.com (2603:10b6:805:d7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.17; Mon, 13 Sep 2021 13:02:20 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:20 +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 v3 02/32] staging: wfx: do not send CAB while scanning Date: Mon, 13 Sep 2021 15:01:33 +0200 Message-Id: <20210913130203.1903622-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:19 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 07448c20-2f45-463d-f1d2-08d976b6b8bb X-MS-TrafficTypeDiagnostic: SN6PR11MB2894: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 959H5TAnBCnDSq+dN6pEyuJRb5rdeaswWZGgaJIthrg6SK30PVF51TZvB2EphAoHOC1aJdZoIyPvSYfXXAllBV2USdAvugIfmdhALk6ONxNPnH0pWFZqx26DqLn0F8tRBg3c2idq70bh0k+8/0pslm/F+MjatuLhQPPt1U+nzMwxevpKUOUpDtnQwnjq3EECxmDTgsLexYKHNWUIKe1uSRF+Nm85XMFRSstao+PwQDEUwT6vcd7Wm2e8+LKu68uJxJQreZapqUbvdTSaVPF2ycWoPPWY7Jwv9nk5X6vStkmDWGPN8P1YfU0EOgArhSzhV+618aq6eyPZWZJWhkLNomIVaVTqe1O/pxM8bv5d6S5dl05nci6/0pSnUwCwv/Etz5OcJXXZNEyPZQrviaO/577NJXOQQxwriHCXtH5RGsPcpBfMe5as1mac7Ufx93zQicHosWCG4gQQez5b/eENV1UcVHCIOdvFyGXz9eRu0JYH+r8/Z3ZR7ytQURHZrJs29IkBHG31+IgnXITUrFXFinaTvimuFJ2QhB6DYuxenUJCk2ye9Mzi2tToqm8hS0EkUl6kYvF00HZilRuuhfKU5tSDfSKS2qaKABZnkDfOpPtlQw06EhrioBkn0ZDTEyc45JidoXkmgVC0MPZDFYNiSj9GZnqQk5nYl3GZE88zKxIA+GvgAZ5yqYMDtw1wG5p+KOvFgKGFLj3DpfdNVk3ryQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(366004)(136003)(39850400004)(346002)(376002)(5660300002)(26005)(8936002)(6486002)(38350700002)(38100700002)(66946007)(7696005)(186003)(316002)(1076003)(8676002)(956004)(478600001)(2616005)(2906002)(52116002)(4326008)(36756003)(6666004)(54906003)(83380400001)(107886003)(66476007)(66556008)(86362001)(66574015); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?PFPQRkRqoAsMtPN4jF4ma5He1?= =?utf-8?q?bfIjIwnnViw8Pr83kPCacJxhjZaMHDzWs+tYR60bigNHz5R/oYtnlh0D?= =?utf-8?q?Fc3CeZTKvQHTsh+r/ThS4GTs0n5ARzgnDkq7CYv4DvBTUo2+PvqjBILi?= =?utf-8?q?fnjf0eInPh9L0xjLatHdLZ+iYSvRqVnz9is5Fm73mGriXW7Um2BqZ54R?= =?utf-8?q?602rJvj3lSgeuWlSxZ0jB/kDCk45UXZV0P7/tSgHIUU1eKiqczTMs6aS?= =?utf-8?q?cV6aUxeKjhqB4Bwo4+Ior3TrWX9cSWaSv7cpq/qXZICENKr5IPa7AlEy?= =?utf-8?q?llf6n+naH3C37BPVgtVKuKdjCohVDob1kNZgiB2Mc+3QWoJnz940zwsX?= =?utf-8?q?xnj6ptzoQC7IIu923016eTCMjbwU4xhR7SbBM6Uq1KykqG/d6iixqTJT?= =?utf-8?q?TzeD8qQET8/cKjDPp/5wJ6nDIi/feBhOJpB8URM0hy3Z23cN40Zc2jo+?= =?utf-8?q?PvibPwABtgIhGE8si8vfV/GmuAaXwZ4fAxgOy34t5oT9dq5jiZohOddS?= =?utf-8?q?YpOPA1umFVwjkTbnijsn86gu5IGTnN/AqELofHV+7XjpoGZFOlZX1qSj?= =?utf-8?q?gLK4NI1izz7XVTuSVh6yt35txhheSINOrpGDZT06LVTFUbs/cVawgGeI?= =?utf-8?q?8x+GsQd/WXXqN2enU4QArNlTRRlVYi7TaHNLoIM6aB/7H4fvLldUPF1t?= =?utf-8?q?t+yEjfXO+/+3TB85mZibWaudFyeUZNb49pznSeqBqC7Hk6IDPUk1KQp1?= =?utf-8?q?9sAZhTUXdD07vMjOevto7+4DV+qyn1LCA+5DyX80U8Cfl4mStGTfvNDK?= =?utf-8?q?r/o/9S382Dd+cWPzf2jHq3EAhPACs0Vm7Kt/w+bO2U43Lr3Wnw3ldwPF?= =?utf-8?q?J7fjeX8sRzIiz8TA4r6bWTBM8sy+BZ/THGaYENFO5st//tq5rvAwPiqI?= =?utf-8?q?fhUQAzhuHV2Vuzf20yZ7ZaX+8bDuv0xXgY+Vti9rjCrpNolUhlaB6KwQ?= =?utf-8?q?A2BliLJ3fDwIkGaDbeOoxSdjzQXXwOpm+O7ac8at44gVadVMEywj6M99?= =?utf-8?q?5CJYPuKwBiqKHErsLGTYd2hJPkBHRcuqPxEc7evqXXhxgH1z6BFqI5/7?= =?utf-8?q?+8BFWsyCACFWMY/z2yjN+zEVeg9KAHJR8mhex2+wqm0NMNZhDeAevltT?= =?utf-8?q?VsgezNAQIuDkHDrRTpkAstJTrbRgAt2CMnLIYg3tcxmWw34JvIaogYnl?= =?utf-8?q?rzMKjgvNbZmZXF/wTdMlKcz/8fWbAXCTDy2UJhKizwOCWH9ieRq13K1s?= =?utf-8?q?zbL9bIFoXjt8yaOQxujjM98SXP4maoR/GdELopgLOnG3hMz+HAxzxeNN?= =?utf-8?q?ZUEAwnAeN1HuJrWlJeoJy0FQKko8fAp?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 07448c20-2f45-463d-f1d2-08d976b6b8bb X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:20.7025 (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: WAOhaiKqQ7P9Ua9JjOSsaBH5SmxCGBuQfqfVoiJhTIoyK82JvorGExxllEyRdU7pudQQrNlYHGQHdLYxRxQ8vw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2894 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller During the scan requests, the Tx traffic is suspended. This lock is shared by all the network interfaces. So, a scan request on one interface will block the traffic on a second interface. This causes trouble when the queued traffic contains CAB (Content After DTIM Beacon) since this traffic cannot be delayed. It could be possible to make the lock local to each interface. But It would only push the problem further. The device won't be able to send the CAB before the end of the scan. So, this patch just ignore the DTIM indication when a scan is in progress. The firmware will send another indication on the next DTIM and this time the system will be able to send the traffic just behind the beacon. The only drawback of this solution is that the stations connected to the AP will wait for traffic after the DTIM for nothing. But since the case is really rare it is not a big deal. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index a236e5bb6914..5de9ccf02285 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -629,8 +629,19 @@ int wfx_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set) void wfx_suspend_resume_mc(struct wfx_vif *wvif, enum sta_notify_cmd notify_cmd) { + struct wfx_vif *wvif_it; + if (notify_cmd != STA_NOTIFY_AWAKE) return; + + /* Device won't be able to honor CAB if a scan is in progress on any + * interface. Prefer to skip this DTIM and wait for the next one. + */ + wvif_it = NULL; + while ((wvif_it = wvif_iterate(wvif->wdev, wvif_it)) != NULL) + if (mutex_is_locked(&wvif_it->scan_lock)) + return; + if (!wfx_tx_queues_has_cab(wvif) || wvif->after_dtim_tx_allowed) dev_warn(wvif->wdev->dev, "incorrect sequence (%d CAB in queue)", wfx_tx_queues_has_cab(wvif)); From patchwork Mon Sep 13 13:01:34 2021 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: 511495 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60562C433F5 for ; Mon, 13 Sep 2021 13:02:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 45BDD6101B for ; Mon, 13 Sep 2021 13:02:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238458AbhIMNDo (ORCPT ); Mon, 13 Sep 2021 09:03:44 -0400 Received: from mail-dm6nam12on2064.outbound.protection.outlook.com ([40.107.243.64]:19681 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238050AbhIMNDj (ORCPT ); Mon, 13 Sep 2021 09:03:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MwcCbrzkwRPSABJ7/iIsx53EDBRb7UjOmfZDr8j65X1l/fkIvud7bBPn9Qf8ztOM/UbpVzmnYu8jAGMkxwwNbuvo0q8eTr7CEENQv0Oh+SxHqFcZpWAK9weOxUqUHXsFxER7sFn+GWcwbaJu1tXQiKlwwtWkFwX0fpx6J0nuj9Q91gub6iw8Q9w/0ihLAYyYd4jINlWimv6giO1xviyh1ZGeA1BzP8Jb4tdYuiMJyyrFcDfvzNrKn4RpjRQrf2cadzziDNa2E+gy0Ho+krE9v05ehsMGXaqzt8qN5lBelt3H5APDiWLp7Ml7bSxNtYbuA+cAAeIyIzu76OXVtyCwIQ== 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; bh=uUO5xCt55CNozRJ34OB+Ps7TB7KSGWz/tLv7tV6TOJ0=; b=mmff7e/76xf5zHuae86eZMyZL4MAAug6FmsXj+nuL5XRB5aqJ+uNUanCZSMHH/NrEEqnX248/N+lvYWxfP/y1UsL5sqhdRxJwRkQL2zEwBULsnwcNqwbcRuElKzVjw3uD6GBEWwpXwNHRy8hxliqctlqYIhkz9QQrcBBs4+zy5+z7wrf4vYVx1D2PCSq7ubzcW6wVZuMOU7x+QXEwU/MRCx78hxD3NcOzVnFOE3+mu8Z3GG+JV/DcAYe81b7Rz7IKS3Cj9cEGQAmekq/Uz1wLMKjTF5vPWQxL3aLDbgZoFNO5B9Xjz9wcoVZCZlDu8I21q1HsEdgsZX72DKxhC4yPg== 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=uUO5xCt55CNozRJ34OB+Ps7TB7KSGWz/tLv7tV6TOJ0=; b=decHrQgmbhuEgyOWo2bGtREPuFpGtE+5BhcDYuAaZ58Dp9ir+R6qQWKTjYec/feuAVJ0BqHSp6MA1/t6Lcz4+G0UZSBBiydXjh25f7VP+xod6nKPYeCT9d/tXr87H9ZGPwlwdvZ4rkdSPWjaOmj7SOAmAhStKsJPghvgjI6AQP4= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB2894.namprd11.prod.outlook.com (2603:10b6:805:d7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.17; Mon, 13 Sep 2021 13:02:22 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02: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 v3 03/32] staging: wfx: ignore PS when STA/AP share same channel Date: Mon, 13 Sep 2021 15:01:34 +0200 Message-Id: <20210913130203.1903622-4-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:21 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9acdfcba-781a-4158-a083-08d976b6b9dc X-MS-TrafficTypeDiagnostic: SN6PR11MB2894: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2512; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2Ao/eU0WOQhNp2B67tEn/8OQRi/Ho5ts0NUCGpU1erzswlhO+Q9/b64bcDjYRhg+cPPUD4ImlURDWkfOgYVZp3uKPfWWWbzZcGQht+CKPa8pEPi/Hr6ExjR3gkU6impIAOuSK7q9pD3cuU8m3YFAnyZSV7UTKRmN6EPB04XMZJWjT2eAlFn/waKUgABlqULTaM7FjmSKpUFFph0v2xNI+vCbWnp6PSen5kLKlSU1ezN0A5tirY45yJoAezk8i4wjcA4HfK1ToDI4qQxVWoaBvnLV2WeghCm23MeT8sw2R78WpYQUTFRm00ZqcjomBH4+PyOCSLWmex82NecIz6gA33yKrz6unHNmdNu8/RN7tAY6RDLNR1NNWiYyI9N0m/n5NfNDjDm+Rp98V8JsOE2WgFOkROAee66xakQB1MpwYlVmKcTUXHcuYyuK+LDAy9FTO4wvvTU26VW2WIyIQeNIWdq9wLyZV3LQYl+vfex+3kDeZ46hL6L3vNGv3+Slob0RXarrCo7vaqPn3JWWEGWbTDSpqQDyJFu3RWt/fSVhx+6OLzFDmu3AUbPZvYgMqf/cCRukRidE7H96SkGCxpiGk93y+XgO1tqCg1rF+ZM7AVs7798zSviXFzQm5KAu65rdbMGrYpuUrV5XEi1G3GqZwdUe0OFyhDr887vJyvL+1T2yFJfZtLezrBzWkIXAJgq5f+gcdYkwp1NakJ1Tr838lg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(366004)(136003)(39850400004)(346002)(376002)(5660300002)(26005)(8936002)(6486002)(38350700002)(38100700002)(66946007)(7696005)(186003)(316002)(1076003)(8676002)(956004)(478600001)(2616005)(2906002)(52116002)(4326008)(36756003)(6666004)(54906003)(83380400001)(107886003)(66476007)(66556008)(86362001)(66574015); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?pNtizsF9pc+jy6I3co9/HgCUO?= =?utf-8?q?NMtiuh9/dNflumB9ntxuks5+1J6Hgp82LWESAbt9aTgdi/pn0crUEp+l?= =?utf-8?q?bHa5Cpd9K7aW3I5oKA/IB4F314iNtd6E7ewcPwptOnn2eecOqrpfczmk?= =?utf-8?q?1jMhWQ/tZcjlURC7fd2fwDWG7NVKfg6uFXiFkXwJznRRZlYkBEZpGGET?= =?utf-8?q?Jt+kMpAynC45pMZvkxwRoa6Toq20en96H3WcbpsxOFE8/ckhwkdeWmwv?= =?utf-8?q?zFAGxHgSMY8Sai/gSC9y3VVosvcBr5gcZgNiuI1moHe6Q5mcUt3wGT9H?= =?utf-8?q?xu1aTAxbQgb62V0tfJk5ED1oDMRney+DRxnBXUrwm1Vo997AgTNDPkxV?= =?utf-8?q?QVW+KZv4XNldMTMhVGcKcixum9k95siFC+r7XIlBhyT+bdHOCKfvC6TL?= =?utf-8?q?UMu+HxbZEMyG4sPLwz1nwHDJOdADlorT/BH5q5ZUiK7xqcmMPX84+hrJ?= =?utf-8?q?NJ25/PzIulJs19GrTracv7Q4MUgpQp76APnjdgd9X2DPLi/bmvAggell?= =?utf-8?q?Z5Wsv4nub67hax7ZN3bCveu3WRtD1lb6ZbrpxqqvbbFB8s9ZwmAUqyev?= =?utf-8?q?AIUVtewMLH+HjfZ6pzf1fvgLkfgf7/UDR4SZMLgW8e7uFgbUJj0/6ST2?= =?utf-8?q?g5Sa0MonYa9tT9vp+otj5v7t6S1nUx16Z2RCPpSirz/dR78qA/6XQEqC?= =?utf-8?q?KmsnmErqS53fsrtJvIJ36zmJ5lfkAFOgzenOWs9W8mgPjaOUI/wJvsOi?= =?utf-8?q?uhFrptqGrZB1owtRrxvY87rtbDDDV7L1gXSm1horHiO9pg9p49uNMlU3?= =?utf-8?q?+ZS27oJOeqrA0Dx+WnYguQakLd31hU1mjRykv6dR0Y29/znVQBCtrAQG?= =?utf-8?q?C4Zr8vz45HUyH77i1h+tvqQ1RRmMd8Otj7mOE6xmWNKYQOijjpuf5o9r?= =?utf-8?q?JDRhZKb+W0hebr62G+Z4JHY/ULu531xYENbwKld2NWOvEdzUJBg2UDPg?= =?utf-8?q?dGd2TvMuhEw/hKGD736Sj0AlpLAs1J3ooPsAKTmvTwxCcUhr630xTZl9?= =?utf-8?q?dQVBogP7a8PoOmyG7THBrpPIy5VlD13jIm1XlW9BjZ//JeQWOz8odwqJ?= =?utf-8?q?FcRQV3auYH01h8tqP4v4JLK50xgwJ6AyLdOLUrDFrNiJEpqxZluMDtiM?= =?utf-8?q?ilYC1rLBn0GrTjs3HjyPxotS6GHQ6RzVF3n0PGRfos8GUkR3cC4gQPtv?= =?utf-8?q?W39JySLDFQTMblMXEZkHA4TaRB0uoiFW2RSS0UbUhfd0FX94vf43Da5/?= =?utf-8?q?mCg2HTb1jqt1SJfkZ6FMWrEnnjf8KTuMFSBQ/KxmbjVIP3kORT/hgGlx?= =?utf-8?q?CdsqLE/2/RYiOZ9K9JmMoOdWi9WrWrQ?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9acdfcba-781a-4158-a083-08d976b6b9dc X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:22.5444 (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: OcWSp74pUHEkBQmnB/Lg9+lJVUx8Yz0V6kScNU+Og06rbuvc361Q+OLBG8hCUUL0LMQIbyGs525/lso1LVYQcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2894 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller When multiple interface are in use. One is always AP while the other is always station. When the two interface use the same channel, it makes no sense to enabled Power Saving (PS) on the station. Indeed, because of the AP, the device will be kept awake on this channel anyway. In add, when multiple interface are in use, mac80211 does not update the PS information and delegate to the driver responsibility to do the right thing. Thus, in the current code, when the user enable PS in this configuration, the driver finally enable PS-Poll which is probably not what the user expected. This patch detect this case and applies a sane configuration in all cases. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 5de9ccf02285..aff0559653bf 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -154,18 +154,26 @@ static int wfx_get_ps_timeout(struct wfx_vif *wvif, bool *enable_ps) chan0 = wdev_to_wvif(wvif->wdev, 0)->vif->bss_conf.chandef.chan; if (wdev_to_wvif(wvif->wdev, 1)) chan1 = wdev_to_wvif(wvif->wdev, 1)->vif->bss_conf.chandef.chan; - if (chan0 && chan1 && chan0->hw_value != chan1->hw_value && - wvif->vif->type != NL80211_IFTYPE_AP) { - // It is necessary to enable powersave if channels - // are different. - if (enable_ps) - *enable_ps = true; - if (wvif->wdev->force_ps_timeout > -1) - return wvif->wdev->force_ps_timeout; - else if (wfx_api_older_than(wvif->wdev, 3, 2)) - return 0; - else - return 30; + if (chan0 && chan1 && wvif->vif->type != NL80211_IFTYPE_AP) { + if (chan0->hw_value == chan1->hw_value) { + // It is useless to enable PS if channels are the same. + if (enable_ps) + *enable_ps = false; + if (wvif->vif->bss_conf.assoc && wvif->vif->bss_conf.ps) + dev_info(wvif->wdev->dev, "ignoring requested PS mode"); + return -1; + } else { + // It is necessary to enable PS if channels + // are different. + if (enable_ps) + *enable_ps = true; + if (wvif->wdev->force_ps_timeout > -1) + return wvif->wdev->force_ps_timeout; + else if (wfx_api_older_than(wvif->wdev, 3, 2)) + return 0; + else + return 30; + } } if (enable_ps) *enable_ps = wvif->vif->bss_conf.ps; From patchwork Mon Sep 13 13:01:35 2021 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: 510240 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7239C433F5 for ; Mon, 13 Sep 2021 13:02:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D1D0260F9F for ; Mon, 13 Sep 2021 13:02:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238325AbhIMNDs (ORCPT ); Mon, 13 Sep 2021 09:03:48 -0400 Received: from mail-bn8nam08on2055.outbound.protection.outlook.com ([40.107.100.55]:54369 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238235AbhIMNDn (ORCPT ); Mon, 13 Sep 2021 09:03:43 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IDhIJaAIz3IGiTO0VYKvWmyMbwwYVeVkMKSsr1ReCN82B3STwjTcm8+iMdIIE02ua8ItpZA39pUsOuWZFQQBOBlr7KolO/uv+2uVi5/R6QT6tnRU9bT8gW67yvSGfCBVHER3l7W+wEUkiThfodghqbUtJB8zgvqsh3vHUVpPX9/rQZtTRJt70h+AeuGhDezTVknPDXkpeY+5q6EfFWAFKpyJnMcc6bitWZ88T0C34HcvYvOdB/l1X/eV7uyfgqZ3WVTPC/EL+GhOZcEZlsp5LEB9xahv8ixaC6gZLpAM/6wJqZZEz7rDnxLlkvYU+l8yRxR9tnG83ZlpHAc+s6M32Q== 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; bh=AmCqsbY3AiU0YiEAlz93ibGj/lSsD0m2Srcg44MoTrQ=; b=f3e9bzoPIadgok4mVpDF/az+bY5QV6M16yGGzSp/zkDZYViPfkgNGrM23kGZvXX0PdGi0HTEIeOUMS4Rn++IS9+DARvS9Fp6WSrosYU0aeU3OqvX+bz9ewK7TWh76XoBZsQDJlMupCmGmPVfIolNvDXiwzDJrd84IKBYX1pKJxdZAOCZhlU2WbyMav58IVqDmMpw6xREDulRcqg2CbNigld8x4DE1MJLhr3Drchowd6Cv1n9ID2YUfM6xb4/Y1cPw7H8WlAE7+qvKOvq7ClG6a3xP7Lb3SvmhsztAP+L/jh2lxWz8/8G8wop3gjElwxGCdsU0MDlv1xujKY2zjVcSw== 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=AmCqsbY3AiU0YiEAlz93ibGj/lSsD0m2Srcg44MoTrQ=; b=QDZ4fxs/MuJv5JFpZb85RwN5+Ux9YSHrCDnCaxNGYBH+AzNjPOd6kn2gpASqUy4tJ+cSZy30bOnTwInvjFn+XrsyD1ibe8a5KbA0rsldIcdXUoVitv3XHOO9pMUGWhAjewacN4GpcbyhMiqSQsxZuPEb1epZ66TqYdZo1tlElLQ= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:24 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:24 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v3 04/32] staging: wfx: wait for SCAN_CMPL after a SCAN_STOP Date: Mon, 13 Sep 2021 15:01:35 +0200 Message-Id: <20210913130203.1903622-5-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 16814723-fed5-469b-b454-08d976b6baea X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ggVBmqoy/QHjgqy8zapkjjJnamggkUS3drCd7NnNKe8p/OfBI97LUvJgawpof4hmVqHw3dOwjMSM8T9JfRKBkjG2cWrwvNcKkDvZQv4O6yM0OXEr6Z3KdZeXWqJw8jEK+ta4hp8npQSo4LwMnwfbv9vZEdMNXYo8Ov8pjX6k1T2LvwzHelJ1pa/PY9I8gD3O/gzXmSLssRWXN2shxstiXA6mk8bB3mMbBBkSQbDzOQY9hzb8GcElgIIekOoRPT7Jb1/R0PEaw3oa8cX1FFy1FvKZyGlaiRP0O70tjCYdySfeWXHTIyUuZU+RfNX3eL1ZuDTfur796gXXQwYTg3OvMpFwfmNpoN5CsTs1ogxjWL05fRW33li+Qz2m10286LZTgYOd16m3gwweG7PyXakkpxPWlhyXbmfaDIP/gZLRnu6RjLkDVzcKZStitl1o0AKkJXv4ngZGLAcvteCpKS+CQAyyodPTb15ZzX3+QGMnk0WRGlUVru4Zmw5iKAw0eYdtZFESZyjaIJlKxSVyq0GKKwYG3no5GKoWY61U/KhkN3ERspsaQuaK059FOdv8zfMsCmJQ/GO5mp8tIS1YyeQ+PEzjScZCFDQCWp9q/T55sKMW071MJvZmxFE81z90E6TBP21ug0l/DlajKEV4oq4DF/gPJZ9oBlrKOiqxpvIdW3yFofJ0JxFopKnciEyPXv26zXAFP93SB5JcFuvyUS4WRw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(66574015)(6666004)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?yn+4b/sRe6d+p282UsSOT/BLW?= =?utf-8?q?GEpLnXyuXQXCyXX1YjHtQdrpIOpDpGz0iDt3P+51EdZU7jBNMwHJyasb?= =?utf-8?q?l4kPLVjHYxTaTpNNbUjHbqWuRGmE1l3LL875AhXrgPfDsVLU73vXRHNn?= =?utf-8?q?Rl4pc8B6/dCkFAdUHkWKanWsgP43hJUjjStgNpYR64oErJ3KmMvpaYbo?= =?utf-8?q?NP3PHe4PkKqrJbCVpJSG003QmMcP+egGiz2+5G1MLy2Cia6xZnu9SVcZ?= =?utf-8?q?G4ZxxN+Z9vl+SMOVhbvQw51g1aVjoDOjuGaOW6nRYsXhnS72wQ7ArR2U?= =?utf-8?q?E6c2a/4/yb6kLPJPLq5HOXCRDPvs8vk3ADfse+4g5+8nkpJKKXDsJyzh?= =?utf-8?q?WbFhyLsE76ip51iOX1JmLXRMnI9SN29Gkiz3G9SAJKOPIV5+QJAmZApS?= =?utf-8?q?ZPR/Fbe6DrLqQClYIeUx+4lVn2XQKtN/Yq55cnNiHmpZiMuJM5aHdMil?= =?utf-8?q?HOPxIjzyjT8lr7U2+xeruWq50i8qqAyscrgxzE91hx30uA+xpiEo0m2Y?= =?utf-8?q?ilOZgsq/ibOxB8K6rKyUuTI/8PHTc0RLO1Ey1ZThAEVvPf3KQZ97iUDq?= =?utf-8?q?P62lJHYvQi7U9uzk8QzZjVpdD6wPgK9ZgcdsPn77p/MUwwQhit0u2ULF?= =?utf-8?q?Ju76G0At/ZQmJBo5kjdShmYk8VPrNE7+hyc5pM0qxiiHxRxTTE5CQVZQ?= =?utf-8?q?X6hpcFJDlAh0vwiTleUHSMVFp+n80s+Pd1TfyKLhzsB1ibgzLzKsfDYZ?= =?utf-8?q?KdDlTcKOdXfScBhmoHcDlU1ZVbK5qV86XeUG0RdDbNor6+kraudXO4W+?= =?utf-8?q?5uPlI27C4UJWFOlofJP8+rKEiKwd7R4lGq6bCrX+4pGoJv1M6aW7Yoaz?= =?utf-8?q?dECMmyoYq9UB1JI3c+11wdQHqIArS4chsazcxT4synE1Wh2gKr/FMKbW?= =?utf-8?q?GCN6abBfRV0Oe8Qu1Zo4JJ4K36QeGRgxRJ9v/a0rzkmQJro0pRB/HMk3?= =?utf-8?q?kU6if2w8wlZb5B7wkJWJMsrYqirlUUiJrl6U95gbBK8g9S3NlmLP7sx/?= =?utf-8?q?27WFiLmx0GQNpI1C4N01tq1iLrdFdSvLktmE7WK7jsSHpuOJ1H9Bk3e1?= =?utf-8?q?kOZhR7fQmHAz7DyZXNQdvIsp/rbWAPVLud6RTANJYCEAHpOfV8dtdCWM?= =?utf-8?q?Yni4Z/IfP9y0nG4PFkA+6axDvAJt+zL6lKNhGNIhFF0htdJmqPkRrCRZ?= =?utf-8?q?/scY6Mk0ZrcC8clGtpw1D58YkEjHIb61xqDiuEiTSGvwM5fzGmRes+pR?= =?utf-8?q?CD035qPInT59FgUCrZzmouPJ4hQUuThmNNmJ61DzRS4w/lf7ZQHQeyeJ?= =?utf-8?q?mmujTpPyzlfs3dzkyjLHYqa3ZGDXXG0?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 16814723-fed5-469b-b454-08d976b6baea X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:24.3913 (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: zQCI526Z+IOh216yzLQ73aRLCl6SeJnOJFz8UmRmwmWplI2/xTgesOQg7MF0j2/gMAdKpALmxAP05KCL2ATxPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller When the device has finished a scan request, it send a scan complete ("SCAN_COMPL") indication. It is also possible to abort a scan request with a "SCAN_STOP" message. A SCAN_COMPL is also send in this case. The driver limits the delay to make a scan request. A timeout happens almost never but is theoretically possible. Currently, if it happens the driver does not wait for the SCAN_COMPL. Then, when the driver starts the next scan request, the device may return -EBUSY (scan requests often occur back-to-back). This patch give a chance to the device to send a SCAN_COMPL after a scan timeout. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/scan.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c index fb47c7cddf2f..1e03b130049b 100644 --- a/drivers/staging/wfx/scan.c +++ b/drivers/staging/wfx/scan.c @@ -58,23 +58,31 @@ static int send_scan_req(struct wfx_vif *wvif, reinit_completion(&wvif->scan_complete); ret = hif_scan(wvif, req, start_idx, i - start_idx, &timeout); if (ret) { - wfx_tx_unlock(wvif->wdev); - return -EIO; + ret = -EIO; + goto err_scan_start; } ret = wait_for_completion_timeout(&wvif->scan_complete, timeout); - if (req->channels[start_idx]->max_power != wvif->vif->bss_conf.txpower) - hif_set_output_power(wvif, wvif->vif->bss_conf.txpower); - wfx_tx_unlock(wvif->wdev); if (!ret) { dev_notice(wvif->wdev->dev, "scan timeout\n"); hif_stop_scan(wvif); - return -ETIMEDOUT; + ret = wait_for_completion_timeout(&wvif->scan_complete, 1 * HZ); + if (!ret) + dev_err(wvif->wdev->dev, "scan didn't stop\n"); + ret = -ETIMEDOUT; + goto err_timeout; } if (wvif->scan_abort) { dev_notice(wvif->wdev->dev, "scan abort\n"); - return -ECONNABORTED; + ret = -ECONNABORTED; + goto err_timeout; } - return i - start_idx; + ret = i - start_idx; +err_timeout: + if (req->channels[start_idx]->max_power != wvif->vif->bss_conf.txpower) + hif_set_output_power(wvif, wvif->vif->bss_conf.txpower); +err_scan_start: + wfx_tx_unlock(wvif->wdev); + return ret; } /* From patchwork Mon Sep 13 13:01:36 2021 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: 511494 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 772BEC433EF for ; Mon, 13 Sep 2021 13:02:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5E00060E8B for ; Mon, 13 Sep 2021 13:02:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239401AbhIMNED (ORCPT ); Mon, 13 Sep 2021 09:04:03 -0400 Received: from mail-bn8nam08on2055.outbound.protection.outlook.com ([40.107.100.55]:54369 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238423AbhIMNDo (ORCPT ); Mon, 13 Sep 2021 09:03:44 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EBMrGXDzpIGwJ+p9WuOHXOFVZuf5ViOpHn8JPvCYvhXgeFT1Y0yL/Yn4HREUY450Pd11OxvPalNCbrVIyijOgoU46tGso2U6wfd7OaXeYsgLiEL9DN5b+hjjmjMUsYvdbPiY5PgM18HrwFkBVOzsakKN3FanMVJqUbcYHzcx+EW9ns6CgzR/4NdSCNS6zQw1tJdNd0JSboZsxmgBY3K9n4/49Sup2TbU6V2kyI57OvBwp8tSzNY36POOTWheJ3xaYZzhMMJBb6rDfYXBEuPYB6L3iuoWu6bApQBHFejHVsY8ZaRsEiW+bwHrOYpnCZSWXVX/61zYAXIM0T5X3h60ow== 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; bh=A5/7GqCAYp3vk0jpEf5Ll7VwtNGaK4Te6PdbcTGXLL8=; b=oInRN52dimKGBGUJpcgAPAUm2tTq9N0zyOh4fqfOWwwQ7E3Fe6pqTeggIk+nLecHmKwDU96Kbkio4daKeLpVkkfw1MlwL1tQCaMpQEYE8/nDhz/Z/BqrXDQ4U1A2lgGIYyV5DxnW+NlU5H4R7n+Nw+IIKHfP988+rc5+tfmFgdc92mLeH5ES4pLHPdaeW/eTVK9tT1hlFH91gTDTjQayIFo7GzY99Vx6rhQy7MmwAjX/Mlqi41DQfdNv/9hoxCCz5/+2BpMvQpoln5XwRq7k5+N9Eyc4aRC0OWsCxLS6TNBlPvgTUqPf9XYQ2gnXUzEPz3eS3qbN5ncdOScZ8e28LA== 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=A5/7GqCAYp3vk0jpEf5Ll7VwtNGaK4Te6PdbcTGXLL8=; b=SIQmwWca7IHtubbijnnf3VZlTo0katj7wFtOEoEsvDu0weDK6gpx7Hqt4AIGpIE1d+9c5B8Hgiv+Pcju+sV4zjuFzztF7NEDlNr3DtAGcqYX2ltRaoOo1gXeBD+Cp/FgJCU9xLGrpBBSvSJ7YZrdx+pSp142fHzjPODlc7I1kOY= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:26 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:26 +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 v3 05/32] staging: wfx: avoid possible lock-up during scan Date: Mon, 13 Sep 2021 15:01:36 +0200 Message-Id: <20210913130203.1903622-6-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9d458163-cbd1-4fa5-2264-08d976b6bc05 X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:765; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Vrls+GnK4zoQwfvXCnJ895h+fBDmsCDJTYn+CJ3E+KWc6X1vQbJhu7TfW3gTXPvs+h/60v8379Ct+t+cTMlfJORfO84GwTka4wn0rGS/4QcZBI+rnnTq8+6EGTyDKRBatoBi5W9wPGCGSuYhyXN7atWx4TlsDIfq6/paRsoC4MysvPDeGBECeIDTB5eJMq+I8Ln58S69CupjxnGkGiHDvpZzs2x+ligQa4+B23GaEL+rNCd/R77Hs0EK+ZRNR5JmDVrPJOOuYMPMjH/pqMONVFJ5SiWegyxDi5HkYa3YpeKoKTy5PEhWg90vTbMoRfu9i6LRrw9b38km7gUnaZoDRlwto07wgWz4FJyJ2dAYAuuIX+M8BBkWnfBVTWJlYL99G555PNhfgYT0W/AiGSVk1LFI12eXu+l8YP+q4ONKTX2WbIOnllfSxLRY3hANJiUQanareAgxqcclfksjOWLyEMdT7EbsgkBe7M6DQDTWdHScFRWsEkCWqQ0R4HdYxcC75qETHyQdve2LF0weYQ/keYNkt9RP2oVY/yJviK+X54vw/9HIK04IxtRIwdhuOpxo4h2GCgYkJa+K8haf+cJ4dLzq/+28esHpGCXE5LFT6BeHOMK1UMPHq48RXUBryiJy3AowlS/bl6Pzls015Y2XZ/OrHnLuP9lpM1uPZa7I5Rnu1j1BlxdLJXlHR71xr4BEjE/CDGOzVENvaX54A4w+OA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(66574015)(6666004)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?peAb6WbSXt4Cv5/od3u5a7t3/?= =?utf-8?q?mvw1NDGkBQl/6uZnwSosQbFtu/9x8hnnwuSlJAd0tnG/QjrRczdzhnyE?= =?utf-8?q?1RHpIqFc0A61YHo7mx6SEKGEBKv1Sevkpw0dzbJjGnME2WEGUAUhSg0b?= =?utf-8?q?QcGZ32CzTB2lmScMwTLgC3BFgzq5HzAsKFWOIRms8ERyPXzT1rmL+tDl?= =?utf-8?q?UXLNfYcCrfBfuQ3C668bAi5rGpEmOQCjv/a6QZIhuB8Anc+BnziPX67S?= =?utf-8?q?zzudu8ZZZ8nWO1htLzQFgJ8tmY2JwIsdr3sGWjVxv/+d9gitIL/AVyN7?= =?utf-8?q?XedgRPA9/6KOrPKS0LcLbqQd1OO3RXi2DLKMZ+H0963xuc8xHijNKmMj?= =?utf-8?q?5vfvlHwd195FkeNBEs8XpMp+etBpshVz+r9Kq50bKtRhjf97XgohJqHb?= =?utf-8?q?kwEGUGKXRjxOsD4dwn92oXcMNPV++A8EUpy0J0Cv814zqIFE/rguM6Hb?= =?utf-8?q?2ymkrCGGGL6Jd+l7YMPnQPKeiPz0lzGC5QIlxEqmdnn1v5KtH/a8ono0?= =?utf-8?q?+V519kYE5rGSBCn7f1H2ZeymEQTD3aUIJgf6WWw5wEVjhrj25e+Uuh4G?= =?utf-8?q?YmrZQweGuqiV/3p/KKKJjWDqec/TaXICaKgVzd5unXI4bBIvXcpdxb+u?= =?utf-8?q?LJCEf079Hm40dfMo/CgulLj2nKH3q+PAiSQ2TUbw1ptbd62t8yasvkBF?= =?utf-8?q?EF6xFUk30sueDn1Insb/usKA7VvU2WrO+3e85p/wNsgMr7faZ0/kMMpE?= =?utf-8?q?yytKefYyVAaLo1hcTG/fydX80WDbGTSxpRhTsqS82T4rZlbD5GwyaS6P?= =?utf-8?q?XOkQ0YzI/xbuDBeHwN8ppMoe7DzsOav+wH2kid+YpN9SPsx0+b0BZSF7?= =?utf-8?q?HlUbxUlS4x1efwPz4+luXZwOvwSiq96P/DcrdsqoqkD28x5lHfuM+c/7?= =?utf-8?q?urJStkqLfB/JJiwI8X4Ahtpy7mtlMOH5nqIhAPV6JfUaDjVpOG/bXCR8?= =?utf-8?q?4Az/kgC7L250m/wWZteUM3Qff+vmxz2mID2OYmbQswTwRV4/aFfEM8lX?= =?utf-8?q?KYiyGhnbbwlI3HTzb21xAbWueREcc40Oph0kb3sCPO3O2pMkByeWxWlz?= =?utf-8?q?vsvbgZ4bFBtZPK49DLTP9BwcnntaWbhBcT5AOn+D6T3cm4Lq3tWe8gyi?= =?utf-8?q?1uDgy7QaIQ9ZG6Zku/KFE3y1UuPkJ/4oOwfeLi5+5bG84hLVFqcM/V7g?= =?utf-8?q?TM6oiHVTqJhqg2PLNFjQAk2gMjv49bOvvVZSoqyOomiMjuwf/6P1bAB0?= =?utf-8?q?1g1SJk+agoPUI12ThYZsjABZZWeJdz31UTtT2Eo63SsmiuJKpVRSnbiy?= =?utf-8?q?AmKD2a2xfNecZnTGkR0ohLYbQm67VZ+?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d458163-cbd1-4fa5-2264-08d976b6bc05 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:26.1493 (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: OZnAradG7Wv1AHOpMQe2WeGQIRth7dvnJD51UTh+27OyGOAa7H3fC30vGio5RpWvP9gykOsPf1zHRN4ekFr9Kw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller If the environment is noisy, the device may take time to send scan requests. Thus, scan requests durations > 5s have already been observed. During the scan, traffic is neither received, neither sent. From the user point-of-view, the traffic is frozen for a long time. This patch reworks the scan processing. It gives to the device a smaller time budget than previously. However, it does not expect the scan to be complete and it is able to send another scan request to finish the work. A big part of the patch aims to avoid an infinite loop if the device goes crazy. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 3 ++- drivers/staging/wfx/scan.c | 48 ++++++++++++++++++++++-------------- drivers/staging/wfx/scan.h | 2 +- drivers/staging/wfx/wfx.h | 1 + 4 files changed, 33 insertions(+), 21 deletions(-) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 9fca7f26372a..a60c4a4ba935 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -175,13 +175,14 @@ static int hif_scan_complete_indication(struct wfx_dev *wdev, const void *buf) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); + const struct hif_ind_scan_cmpl *body = buf; if (!wvif) { dev_warn(wdev->dev, "%s: received event for non-existent vif\n", __func__); return -EIO; } - wfx_scan_complete(wvif); + wfx_scan_complete(wvif, body->num_channels_completed); return 0; } diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c index 1e03b130049b..695b06974194 100644 --- a/drivers/staging/wfx/scan.c +++ b/drivers/staging/wfx/scan.c @@ -41,7 +41,7 @@ static int update_probe_tmpl(struct wfx_vif *wvif, static int send_scan_req(struct wfx_vif *wvif, struct cfg80211_scan_request *req, int start_idx) { - int i, ret, timeout; + int i, ret; struct ieee80211_channel *ch_start, *ch_cur; for (i = start_idx; i < req->n_channels; i++) { @@ -56,31 +56,31 @@ static int send_scan_req(struct wfx_vif *wvif, wfx_tx_lock_flush(wvif->wdev); wvif->scan_abort = false; reinit_completion(&wvif->scan_complete); - ret = hif_scan(wvif, req, start_idx, i - start_idx, &timeout); + ret = hif_scan(wvif, req, start_idx, i - start_idx, NULL); if (ret) { - ret = -EIO; - goto err_scan_start; + wfx_tx_unlock(wvif->wdev); + return -EIO; } - ret = wait_for_completion_timeout(&wvif->scan_complete, timeout); + ret = wait_for_completion_timeout(&wvif->scan_complete, 1 * HZ); if (!ret) { - dev_notice(wvif->wdev->dev, "scan timeout\n"); hif_stop_scan(wvif); ret = wait_for_completion_timeout(&wvif->scan_complete, 1 * HZ); - if (!ret) - dev_err(wvif->wdev->dev, "scan didn't stop\n"); + dev_dbg(wvif->wdev->dev, "scan timeout (%d channels done)\n", + wvif->scan_nb_chan_done); + } + if (!ret) { + dev_err(wvif->wdev->dev, "scan didn't stop\n"); ret = -ETIMEDOUT; - goto err_timeout; - } - if (wvif->scan_abort) { + } else if (wvif->scan_abort) { dev_notice(wvif->wdev->dev, "scan abort\n"); ret = -ECONNABORTED; - goto err_timeout; + } else if (wvif->scan_nb_chan_done > i - start_idx) { + ret = -EIO; + } else { + ret = wvif->scan_nb_chan_done; } - ret = i - start_idx; -err_timeout: if (req->channels[start_idx]->max_power != wvif->vif->bss_conf.txpower) hif_set_output_power(wvif, wvif->vif->bss_conf.txpower); -err_scan_start: wfx_tx_unlock(wvif->wdev); return ret; } @@ -94,7 +94,7 @@ void wfx_hw_scan_work(struct work_struct *work) { struct wfx_vif *wvif = container_of(work, struct wfx_vif, scan_work); struct ieee80211_scan_request *hw_req = wvif->scan_req; - int chan_cur, ret; + int chan_cur, ret, err; mutex_lock(&wvif->wdev->conf_mutex); mutex_lock(&wvif->scan_lock); @@ -105,11 +105,20 @@ void wfx_hw_scan_work(struct work_struct *work) } update_probe_tmpl(wvif, &hw_req->req); chan_cur = 0; + err = 0; do { ret = send_scan_req(wvif, &hw_req->req, chan_cur); - if (ret > 0) + if (ret > 0) { chan_cur += ret; - } while (ret > 0 && chan_cur < hw_req->req.n_channels); + err = 0; + } + if (!ret) + err++; + if (err > 2) { + dev_err(wvif->wdev->dev, "scan has not been able to start\n"); + ret = -ETIMEDOUT; + } + } while (ret >= 0 && chan_cur < hw_req->req.n_channels); mutex_unlock(&wvif->scan_lock); mutex_unlock(&wvif->wdev->conf_mutex); __ieee80211_scan_completed_compat(wvif->wdev->hw, ret < 0); @@ -134,7 +143,8 @@ void wfx_cancel_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif) hif_stop_scan(wvif); } -void wfx_scan_complete(struct wfx_vif *wvif) +void wfx_scan_complete(struct wfx_vif *wvif, int nb_chan_done) { + wvif->scan_nb_chan_done = nb_chan_done; complete(&wvif->scan_complete); } diff --git a/drivers/staging/wfx/scan.h b/drivers/staging/wfx/scan.h index c7496a766478..562ca1321daf 100644 --- a/drivers/staging/wfx/scan.h +++ b/drivers/staging/wfx/scan.h @@ -17,6 +17,6 @@ void wfx_hw_scan_work(struct work_struct *work); int wfx_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_scan_request *req); void wfx_cancel_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif); -void wfx_scan_complete(struct wfx_vif *wvif); +void wfx_scan_complete(struct wfx_vif *wvif, int nb_chan_done); #endif /* WFX_SCAN_H */ diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 94898680ccde..56f1e4bb0b57 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -85,6 +85,7 @@ struct wfx_vif { struct mutex scan_lock; struct work_struct scan_work; struct completion scan_complete; + int scan_nb_chan_done; bool scan_abort; struct ieee80211_scan_request *scan_req; From patchwork Mon Sep 13 13:01:37 2021 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: 510239 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, 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 BBAEEC433EF for ; Mon, 13 Sep 2021 13:02:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A300460F9F for ; Mon, 13 Sep 2021 13:02:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238234AbhIMNEB (ORCPT ); Mon, 13 Sep 2021 09:04:01 -0400 Received: from mail-bn8nam08on2055.outbound.protection.outlook.com ([40.107.100.55]:54369 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237666AbhIMNDs (ORCPT ); Mon, 13 Sep 2021 09:03:48 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lHY8x5gInPO6wOq9L2+npDr45go6qxEarwvM/8iVc4eDxTsAwP4PqXZzIQn4/mj0knbeDlSpcBLsPE2olRARIxERdo+tet17JnjNi/GaZbfi/HiIW34HEcOqrB4Bl8qyYgQ2NY+432W6qDKkDKSg6CdIgg2udIYYJ1oKFzmcEKmJPBYIrxpfn0xR5is181M79r85ncVMk+YfKPwsU1nfqt315bagNbhKYC8I7FbAjcAwY93quHuMewdw9O6XeN7ZdDbsnPHxhEBb0r1vhpiIXjtz0mMyRwq99KNgY9GK0nTMTCWYV49ZDUEZ8Z9Y4zqkjwWqvVnZ5cnljfyw4vRQtQ== 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; bh=Ltkb34xn1l2676USN4kZ+ng0WW2jWxAd1JTkXQJO7zI=; b=ZSl2m5V7T963qYmWJoMpvNwClyLKjE4I2v+2TgvaSLJtoeuLSJ/R8Iyr19PxhssWBj9t/BAwkFb8LuKDiiJxXFLhhONA+bIYd/75oeJMVdk+NK68V7Qj/aPZV8fD2r82jXY2CiEg/Uj8kz9sb0t2L9i7WrsD9mUqSEHTFs4sbCE4LZ6CPeXZePhDtVDaTSP/3X3zCXCzxJPj4qyPQU6xMW8f6OaIz9TkTmryvXluW+XlXgcC+KAVsVD4Se2SKLRISKkMM41jpkGp69RykVvI3AZuHwuCAn8r6MKhBabe0/9sxV5o2a/9X/Sy9gmVZjiorsORQjSk3IFsRya6SrKrBg== 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=Ltkb34xn1l2676USN4kZ+ng0WW2jWxAd1JTkXQJO7zI=; b=QmPVM5qFNe7QH6b9H9xv7UplD93acVPKJMBuMxWiUb0lHQYkN9xRL3DQhmi3OsYjT987256dsCzSe3VI74AxBA8B0itnEwxcDzBiNPVS29DTLIhNuUZL8mtL++8olOK6NwHMSOY8YRpPv3iDBSEhmgCpr0SqS9+JofRHjFvaos4= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:28 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:28 +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 v3 06/32] staging: wfx: drop unused argument from hif_scan() Date: Mon, 13 Sep 2021 15:01:37 +0200 Message-Id: <20210913130203.1903622-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cb985e32-68be-4daa-2c95-08d976b6bd20 X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:854; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QED/HfA2lLp6vPsXdjR4V68I5v4W+cbqdnrfDbc38CE68Ol28+vIGkr5fAfbeTd0cFyp7xDAAIBfPR8EIgV28oW47MZvb8S9RuZIQ43iFvBkqBIjMNqcQeQjjMpB+OoehFdIP77itj5bhe65jBpxWJEqQFuRCvUiz+hBRTYuVbQjZlMgtC+ZBQ4Hm79ZfSt5UYCaC2B0+Awir0sKXN72lYNrb7HE/2OXXFd2olSIA08V6ZNJ/K3ZHUOxIGy1BAiQhs1YAnZ4fpff4nPtUcddfAWDha0H5n2P9EQH5oMceMo4G/3cUs80HZtwj0GH8aCtdi1XP4sCNbLHvGRuHg5kuv0J3goCdO5rPvYH/yTlE3YpaOhFtKEMY3kHAiUFbY34VcabVp5kvrLO8q0GP0QEe1MZjphG6MZFCJLThvZqPdg6rx0nCuwVGjoHcMgZSqbcDtr+itQ1YZyBFH22LJog5Iwh8nzKyV+fb9v3o+vmMauRuMwq+biWdaLD9IyZCaxoDWGVnbM0ndrIY1+jJFFGs91KO8Zbp5D6wUuxZUJPapINEkosZfpNSMCIPFWMGQmDM0UwDEdiBelvgestmmMys2+wTlNEi6hm+liPCU69Zelb9DWXWVJCztROAaIrSjH7eN2s8zgpBfgyNzQqqOU0QMoAqNa8AJg222dWH/7S7O4dRKX17BMeSTP/JtkPV4omfzXyHCp91h9cYrXObd3bhw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(66574015)(6666004)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?vO2NXS21a///h3EmvGtWFv23k?= =?utf-8?q?3Klj8eFSUTgDkZwSDYozQDry168CE7sZ0kgxAA7BzkIom6MeYVXvZn3o?= =?utf-8?q?XICqr2oWUIYoAjYqg9013tSn1G5xXjxg39n3g/UkVnh7OOluSSM1vH4m?= =?utf-8?q?6frk5VVUdZSdTZvTuH1fDttp3JrsnhopHjqbbLJgy7FfnBNX4CZENnKn?= =?utf-8?q?VTdno3wl8MQnUzIGjv2G8GfREtnmZx89/gpJnnpNlJyZiKBpfMUJyUv+?= =?utf-8?q?SCEKeYyl2wfeTKRYX3axzlAryr9/OIJMaJsuRS3A1fYERiTxJ+XR3xNN?= =?utf-8?q?45xAR1I1aZ8VoQCIi8+laEu8GBdX7e8bAFAY/dN2ObFFnlqIH7K7Y6+C?= =?utf-8?q?gE/bu+0hcu/jSMG5Ue72Okxkwe6/N09iCJhUQ0RUMN6I1mcqHecHT2u1?= =?utf-8?q?Mc2AlSHFzb302LEU8EtgNRwAYZh9pg2E3NVCLDN1tvdjdOS8vVvdjX/Q?= =?utf-8?q?duIr9Rpn//zctAG2tF2wCTU+mQxdJsOexakJK0SzzpvpZ14Gq6mllDTk?= =?utf-8?q?K+yMis/TQqYPFQPffIo07ceqzse4CG8jNXbJi1WBcabP1A2kWpMc4ScH?= =?utf-8?q?hLRNac9OgQ6ko7U8w1f1xPmDU+AoUR6+s2iyASHYEf8Uv+3Wg8IMgnfH?= =?utf-8?q?7iFRXfMEDgSHSom8JQrPczoqB/eDtbzBQ+mskN880/FcmRiwB+2xzXqr?= =?utf-8?q?3AKJVpkPNWxRPPOAEzHRQpTw8OMm+dhrf+zxZU/epumnEKUiA2YAL9Jz?= =?utf-8?q?tL5/6JxJoqNg1OOamvulOim7CXJMu8LUP0a9XX0xfwZtKFJKNrcOYiI4?= =?utf-8?q?KamyEGot2jEPSKhlTqOge1rR3lDO25/O2RMQ892cwy5oZJIZkac8O6Dv?= =?utf-8?q?+bGzXTMNvndliTRorLf+fBRSNp9gb8JRAA1m4aJRXsL1SMx/n7fxqekY?= =?utf-8?q?TG02VM1xojpOutJgZJ5M2KpCdH8gg2YTyg0AJrPWDfCTCA+WSDFhQ8pY?= =?utf-8?q?y/waX6bJgreNY15m7tIuU3ZvnXVs5QchaaJX/+dWJEj3DSqm/8KLWti8?= =?utf-8?q?dsC25WR1Z2jOIXJaDmDSIIW9193+szk00tdABeRULk0wSDUnPLEKMIW1?= =?utf-8?q?anRvI0/7ca0gyAWlFIo92mTGfMXIIBwKStvZ3i8JQw1z3UY4Vs7L5HZG?= =?utf-8?q?+GFVtJj8tVZX7H3n+YDFT/tvLabqHyLbkZYPBZqOgTv8HZFmVDI+UJ3z?= =?utf-8?q?nObA43pJvJnRuDOQBmafGlvYB1s0w8PB67XZUL9Dok8hyZTJrCk3Ru8Z?= =?utf-8?q?hy9MzTIb4REcUzbFv06Y4o/XPLsL4g+J0EbkhbbPy7bpdtjBpuCYRW0a?= =?utf-8?q?Oa/JnjUXArIl/3ncVoz33086dQ0dFEG?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb985e32-68be-4daa-2c95-08d976b6bd20 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:28.0282 (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: 6jTaiSfbmBBqPpPiR2jcAckSJ8aGnizkcjK3E7xLVLgO9slpvvnJwq4Xft4vzHfanltpjL4oBMG23zyFytctig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller It is no more necessary to compute the expected duration of the scan request. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 9 +-------- drivers/staging/wfx/hif_tx.h | 2 +- drivers/staging/wfx/scan.c | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 63b437261eb7..14b7e047916e 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -227,14 +227,13 @@ int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, } int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, - int chan_start_idx, int chan_num, int *timeout) + int chan_start_idx, int chan_num) { int ret, i; struct hif_msg *hif; size_t buf_len = sizeof(struct hif_req_start_scan_alt) + chan_num * sizeof(u8); struct hif_req_start_scan_alt *body = wfx_alloc_hif(buf_len, &hif); - int tmo_chan_fg, tmo_chan_bg, tmo; WARN(chan_num > HIF_API_MAX_NB_CHANNELS, "invalid params"); WARN(req->n_ssids > HIF_API_MAX_NB_SSIDS, "invalid params"); @@ -269,12 +268,6 @@ int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, body->num_of_probe_requests = 2; body->probe_delay = 100; } - tmo_chan_bg = le32_to_cpu(body->max_channel_time) * USEC_PER_TU; - tmo_chan_fg = 512 * USEC_PER_TU + body->probe_delay; - tmo_chan_fg *= body->num_of_probe_requests; - tmo = chan_num * max(tmo_chan_bg, tmo_chan_fg) + 512 * USEC_PER_TU; - if (timeout) - *timeout = usecs_to_jiffies(tmo); wfx_fill_header(hif, wvif->id, HIF_REQ_ID_START_SCAN, buf_len); ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false); diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h index 3521c545ae6b..46eed6cfa247 100644 --- a/drivers/staging/wfx/hif_tx.h +++ b/drivers/staging/wfx/hif_tx.h @@ -40,7 +40,7 @@ int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, void *buf, size_t buf_size); int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req80211, - int chan_start, int chan_num, int *timeout); + int chan_start, int chan_num); int hif_stop_scan(struct wfx_vif *wvif); int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, struct ieee80211_channel *channel, const u8 *ssid, int ssidlen); diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c index 695b06974194..9e2d08317c9e 100644 --- a/drivers/staging/wfx/scan.c +++ b/drivers/staging/wfx/scan.c @@ -56,7 +56,7 @@ static int send_scan_req(struct wfx_vif *wvif, wfx_tx_lock_flush(wvif->wdev); wvif->scan_abort = false; reinit_completion(&wvif->scan_complete); - ret = hif_scan(wvif, req, start_idx, i - start_idx, NULL); + ret = hif_scan(wvif, req, start_idx, i - start_idx); if (ret) { wfx_tx_unlock(wvif->wdev); return -EIO; From patchwork Mon Sep 13 13:01:38 2021 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: 511487 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95817C4332F for ; Mon, 13 Sep 2021 13:04:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C1CC6101B for ; Mon, 13 Sep 2021 13:04:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237853AbhIMNGI (ORCPT ); Mon, 13 Sep 2021 09:06:08 -0400 Received: from mail-mw2nam12on2088.outbound.protection.outlook.com ([40.107.244.88]:10209 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239037AbhIMND4 (ORCPT ); Mon, 13 Sep 2021 09:03:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MW/ndlIjtDKpEoNUEvvqcsVO5u17vRH7uft8BcLXz175YY9ZV3M05CCnGsxhAh+Ln/ml94quFCQWZefnH+H353crUNWHdOPaJ0T8ZeT2k5/sVyQW8m9wKb0Tv4dbzQYftE6NzatdOdCZ6EWestvu7wsYLk20MLFHOZm2k9tSe5HfmpuCVCs432vmxJgPQt7K7JSFLdygh4nRh1TyN65m939Gr1H8KIumM5Rmv2HXEzlo7iSUCULrsxXf8WnqCPzwWBr82O0Wh2TIWiecRy1YZLbRzWY8n1eKH5zyMs9xHJB/TpJtkV9n+WZk/CJ9vG3XDh7mrkaiwaNsDB9t9ae/LA== 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; bh=6X5C8iiyie5c+H0xNzgV2k5OxRmd70FdYQimieF/nBc=; b=VOCYnJe8/MO2WGmVSqGLE0Y4+W48wJTciVpbYRO9riPsELg9eYOzhZOEyk7vCt4wL3efBDpT4Ka8IbneKKAaRgLJQMryPLHaneoDCt/ciOpwUkH6uKeyi8DrUfrTV5U/qObftU+96mKZle3HiYS/IZ6oND05tV3MWdcSWk0K9l+zcrbaxaDYgQiD3N6BgGXY1b6YwusUkvs6qpb9ng4c9WkRVNyHcafs+/D0eqQYv0m7gqBhr7d6ZUPIBhtUkkLj5Dg5JMTSBs9dVgk0K8xvG/1xuqZKLVwYXkR2GgeGFGMnoPXMgVKh2zrZFToR+GGVvIe3M+0I2pdAUa8B71ckqQ== 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=6X5C8iiyie5c+H0xNzgV2k5OxRmd70FdYQimieF/nBc=; b=LA3tzN7pjwSCxr1orVpxyRo1bKx1c2zoEytGrcYbY5qmjJG29XPc0XnXPZILV2PaBuQRl5g8cRJ+WGApMvz6z/WwGBoZo4AsYZdc3W2VdW9J+zqesz4l6CqdH9nqkiPCEj6u2//DGxSz6hShZt068o6H1Kw0wgLt1EK7CD5Kvd4= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:30 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:30 +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 v3 07/32] staging: wfx: fix atomic accesses in wfx_tx_queue_empty() Date: Mon, 13 Sep 2021 15:01:38 +0200 Message-Id: <20210913130203.1903622-8-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 276b04a5-0473-4858-14e3-08d976b6be30 X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:813; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5lKbEAKEdrwmpOd5gsk3k2cvcqQwwoIVtAp4fto4PaDlEieG9su9q0lhfgR9gQDA10RseSL8+O4yT/wT2tNDw2h6S72ypJtT3jUQ2YmPVHPDL/6MLNrgGzO6WUlAXMU383vGLrEOWz6Nt3ybJespeRiSzi+z+V0OUlM36DrYcTst/3FvscWFoC2Bwwbp/ejgts5zoYkua1hf+ICZ/D2UVaSaTPBEEZSBwtscr+yN0KHokypmR9DQkpCPzYoFfKwnLZz1Wgc8Agw0/dfG3xa00wHfaZ70RDDBYqbiLbGswv4YYyHhvaqytCt76gxO2mne4bkGIfPBbPHkzMY6FINfDia346zGnQB5I1N9geNLv/E4dKwvBi8PXr6JbBEWPukQxDuJ9NOaJxzgDzgl8HIg5tZvdXCwcDsMaG4MlNBb/jmN++GkMPe2CzciHcFPfdiPngb6BBI+K9vhXjRfOT132b0Ji1tGIeAYk5o1vf0YuNzqcQ0KjMj+lzyfCD0a0lMWvjx8iwl/Gseb0uQKX+HYIAtewxZhvNv27YqT8Wrc7URXhD8Ps0AdN8PtsSBawcG7KCzOxxWf4EGBVUX90IvsnGH6724KXQV2Ev9gJMZUZm6Q8IVazo1tlAnarFwiamxoD/A/8rNZhOEqXQebfn/n3AkkWTFbNALUpr2/dxeLlxDDl0mWNwOUM9uK4cxHr7MIdSPSgQjOrD4oet5HW8/xLQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(66574015)(6666004)(4744005)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?m1cDrHsCqZMPoJe69MZ+1e0q8?= =?utf-8?q?0YacEpUsREFyL2rJ7vqShXPraqVvgiyeR2MenHAtQvjdbl33cygfNyaT?= =?utf-8?q?OTNeMHFq+t7e0snQ9pZf53tBxZqevYbCa0kZGoUyAPdhUpfHBjglJeVe?= =?utf-8?q?JAnzj8DOXv9RcqLoN+eQml4K5E6pwLTfNIGYDStmks2ClM/U4mlDIlmb?= =?utf-8?q?0dSE9SLs15i5WgwBmg0DK/PWRV1FMGO8qFeYk3IrI7F7Nly+fDkvEXiC?= =?utf-8?q?VfROwW/5J0aBRiXwa9ni/tpKpj/1q0hFZ6LGuD6DClz26fGyrj5kVfmg?= =?utf-8?q?r6aLnyr06tHG+G46Jt/bbJ+FIv4bOznZdnArNbZbq7YCA4jLjNxOsftb?= =?utf-8?q?NScKvTtzzOjSlIvI8gEnzA0nHZpGXAiyRYKEMhTTWF0SEFqrFiD12CrU?= =?utf-8?q?TU73a42h2exuyLGEDWQb2s4c22UEJtmPZhdrs1RZ2S5e9LxTsxv8yTv/?= =?utf-8?q?70YiHN7v7SwPF+dZG76CWcwim1RvT3Sm0648lzBV/55mvru1ORYi5Tao?= =?utf-8?q?jvP24L6xgYs10RP0VnUTLCtVFoz8HfaEhMmKUWTyAsCAns6geRWR3AZN?= =?utf-8?q?1rJNU/LiaCsXKm9egs5Wr92REX5znlvD/DM3+5dtxjFXRdvYFo7PAW/q?= =?utf-8?q?wj0sq1c4ESJBk5qE+wpcxkgnhXojyVNyy1SE1V5+gF3dio9f2o73TAn8?= =?utf-8?q?negwDIzi0rLC3++15rez+78uoC7pc1ai9GN4wZjn0UG9wwGIQ+0/APG/?= =?utf-8?q?kiAnqoREXUrC3TJ3leTEl5oiBUnIuPrQIyAzrNsC2VHhTzsZPaB0KHCh?= =?utf-8?q?qbLtDaSNS0iZUTmPTtTQOIt972IZ0SEDqsJSBroC1evJ6id+B1kzTGkg?= =?utf-8?q?whUHjJICMMwaK4aT/qTVgcOzXtAMzqHlGHKoOnMzSkKYi2+qtYnqBpva?= =?utf-8?q?RFOE18MMe0AHU0IPrWlz8fMKiwHeFSgJxy5AtLhfF5bw5wJaU1W4cgiA?= =?utf-8?q?SyoBuwF+lfA8n4PNB70S9ogQrV+pG7oKyYqBjf0+hAaiX0lgVZa+a+Lz?= =?utf-8?q?FfQApZfpjI9/l3fgwNg7pbTLkWZbo0EHSur58E6UDt9JMYDJpq/M10gp?= =?utf-8?q?wHoz13tIPxCxp9ouXlw5qODbgGlfovGHFDWKldvJo4UUJYoLcEUtgK9Z?= =?utf-8?q?PvldkpaIQdhnX3/MY1wRZCVBrrCF2ijlCLNfYH73RwoGW/UL8moZbVkG?= =?utf-8?q?6faptogCAWyAiMXoDMQbVY3fto5hD8UHfQJCIHyZsnLJd0DaVLDdz4c8?= =?utf-8?q?fGT8JHhTIKXLNI2GZ/dfl39u0tXocti2e8ekfMyCtwdtFvdFIqJSes2h?= =?utf-8?q?7s4yXLCcWhi3mancQakYUvHrA57t3fn?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 276b04a5-0473-4858-14e3-08d976b6be30 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:29.9571 (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: j+zh0bJpb62siKqT2swhbwlnNhtDFz5n9p6bSMuQOsqCnvfNrdvr9uJGYpaFxpWHSf7GtA7Pd7YO0R8uAQg5cg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Checking if a skb_queue is empty is not an atomic operation. We should take some precautions to do it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/queue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c index 31c37f69c295..fa272c120f1c 100644 --- a/drivers/staging/wfx/queue.c +++ b/drivers/staging/wfx/queue.c @@ -86,7 +86,8 @@ void wfx_tx_queues_check_empty(struct wfx_vif *wvif) bool wfx_tx_queue_empty(struct wfx_vif *wvif, struct wfx_queue *queue) { - return skb_queue_empty(&queue->normal) && skb_queue_empty(&queue->cab); + return skb_queue_empty_lockless(&queue->normal) && + skb_queue_empty_lockless(&queue->cab); } static void __wfx_tx_queue_drop(struct wfx_vif *wvif, From patchwork Mon Sep 13 13:01:39 2021 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: 510238 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 543C0C433F5 for ; Mon, 13 Sep 2021 13:03:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 40FBD60E8B for ; Mon, 13 Sep 2021 13:03:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239067AbhIMNE0 (ORCPT ); Mon, 13 Sep 2021 09:04:26 -0400 Received: from mail-bn8nam08on2055.outbound.protection.outlook.com ([40.107.100.55]:54369 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239080AbhIMND4 (ORCPT ); Mon, 13 Sep 2021 09:03:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bculkg5t6NFBZBPr0crWO+b7k3QcmlAYaL7rwF3s4GXfI0d668FrHh4uv431BY/h63wTMTaOg3CpRgycGmYQlRhjLkO1RYuikMNK5SkKWocluZtfC79Cub9W2fDe7GKmL7AvawF/4UQ3qqPrdcMtlG4xaWjZMHER8KqS17zz00Dwk9WiLMJgGgkkty7Bnew/bjMMvB2IlZ4a2lde82lpYzkgooMLsSFmeVW/vfN6jYsFZ1JCa9Cmr1x9IXk1f16ba9kcbXF8mCa1jVWt8qSWlpRhoibWoOdnIhsEASANnDosh8CKMQkMn+D+Dqi72bjfamY5j3vFmFQFa8L+kt53bw== 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; bh=ukiiaXuHB68lNESJa7s+KPhr2UdHv8KEhL2rJ3/GeVg=; b=Z2W/yW0AH/KjUdQ9Xb9pAZLsisTrJjtT6MePQppSAbtHn3c0t71OXhLF4PlXluwmHbnqpXzYTm2m62BKLjgSEwavRll91zLa9GoUoLEVsKT3XceUTqpusyF2shDoZq2ZxfPmeLhVY1XTRLwKfT+kCrDx3886kvY70ol/FWvLXYGY0E+gZKuCmAZdnBAd3Nu/reRk4P1tCfJzt+LwMVF9r0w02AXllmtupQRUJBaVFI0arLGK1bDZQDTiepE32R5Gw9MxvvU01N7PizFYkABvOdDjhQk6i1/iSThdXCX6aaZm8L6zH6Fqy9gTVPCNZ4GdKdJtcXZ7UQ6aGeU6suuGEw== 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=ukiiaXuHB68lNESJa7s+KPhr2UdHv8KEhL2rJ3/GeVg=; b=N2xbeV9/KkFElEa9SKsVHLCWJV96+oYAViGrCZTEdVJkzEUdOLE/QrSnQcTogibX1DI92fIiXKFdYcGKN0zTGQHSdI18LtV7voKusJCZGxp51qadRWl/1uQl6vYcXIzJeL3McqDyi6RsI4vH7cr74Wic9UR2DUz8wC1RiVo38yQ= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:31 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02: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 v3 08/32] staging: wfx: take advantage of wfx_tx_queue_empty() Date: Mon, 13 Sep 2021 15:01:39 +0200 Message-Id: <20210913130203.1903622-9-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:30 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fc0e36de-de8e-401f-c24a-08d976b6bf62 X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:549; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bUUGvWV1wbqaPvlu90FThUmw6/xngzHxEk1HRjzL492rhgnbejNDC8sejynd9B5TuIBFfjslvjX8FVZMG5sZNPw/sGt7mycn48Df8/BcWpQ3qVZFn7Ogi/XdfZQAVD/sqBUubMO2R18EofjGubBfFnaNFoU7Lri5YPPRLiyjwdqnUfqevCrqSVexezd2Uzlbiw+Crzbbam6cdfnkVvjjD6S0wJ5tVvXcN2SBynzSAczYiYdp9ur4GOGjITqPqxLWrzuU5yrXZZQ9uZR5B5AzwaNCGNXj+sVhTBccUdkVn7jrw39WOQuykJu123JtuRDtorVPtynnHwYH/WRbMH1G7g8woFCL8PTHT1jZTOK8GXi3z1V0XCgqsSXOIhTjltxI+M3j1hXZc/O7AXH5Iac09WoyKAp4vxXirq8uxjvbb7rPckRTZHj0I+A1FWFJ1W+qeaor3cOCZ6/s6Njxd3xbtjoA6jzhSRDlsqPgC4VhvH9QkzQdSzV8udk5ZuPYFpNO0iC06g+Gdhg46wCR/WzZDwDclksFuOJn7WWjms1zlJAuC/6LEJ7w49zIDLOv+rnL167NZEYdDUDu7n4WrSXRy5sePvtW9vmejacQ1xcHK4TRSugs1ImA49Wj2mIFOmVkwJ5XF3UBjDwiaFhPb9s2FNAOsdimyOV4j4HwKndVVvpf+dzcX592DwOAiMt/Vf/IMGxroonZ2AnXa1WF1cer3w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(66574015)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?R2Foee6y9nluaIUwg/1SFVfgT?= =?utf-8?q?RY4tZ7DoXc6/aOIeonIyxCgzwOEmHPjunm2mVfVFBzN7AvglxrzT30cP?= =?utf-8?q?2SLjN0Ga0E+6yARRMt86NEFWnnP4j8U2i4b8ErSEn8ZHOSeHXLg/nTda?= =?utf-8?q?HynYlWoqTqTujlbdISPfgNTlVJt66oi9g97+a5Vo35qzOl4iuqQGnfMc?= =?utf-8?q?zPi7Ty4fTyg1fxJOVPGiqPtLUZm4Zx6Wlri9Ku+TEzDpkxBU8N1OcqqT?= =?utf-8?q?HVbsphcE9A2fFDLFSGfXgf6zHkCj0a/h783Pzs2zfRs2m4wF+JlCfBG6?= =?utf-8?q?ua6rOCR6pohPpmqP9jYHOSQ4IJ+fNq+EAX10/fnOO23VHIWWQIA7aBsh?= =?utf-8?q?udZOx5xjIOpSjSWJ9XvsrGzHFzXA5v+KzBDpsyPUJNW7ZSL/RmRkv7Gv?= =?utf-8?q?HryT4SpGqzomAAzcp8lP6Lbd/dZaZi13Su99zfQte/UgcxP2b7LKikat?= =?utf-8?q?aDj4um61+NzOTmQfYhlAUlPp5l8dUeFx333MjO02miNFYf0I1qJtOJhr?= =?utf-8?q?+Vc8VFrCTWRG7z0v3Rp2+nHTaQotMH4d3hwVhCLo0B88YsMg3GH2MWal?= =?utf-8?q?CxObzsqe/vI2X2FhFJW8Dci0nBnQRL5B2zq1aXiNgCRuNwG+/ee4FHQC?= =?utf-8?q?KSC0PT6bBqJXLt2j7xAGAlWMUwweGZ3VHtFONtilwgL82HLlkn8qlGPq?= =?utf-8?q?a9Zu5DWw1oE7HVgfahH7Nlb5l04eu58A1YlwOMiTEfumUaDhXzCi/Fyl?= =?utf-8?q?WXcSy7rKpIT/+oYX004MSVz4fhvRbGRNiLyItz0O1BG+7OW733w0MzYR?= =?utf-8?q?LWomsBZ9Z5qfdKtSIz4P1y8CVCTYIkEa2mnZskYOgAyP1m7mZQJpH0ZL?= =?utf-8?q?uI7w8B74GBGm4D1DtBquedvbswuisopP2TPkes7lR6XXJbgZz2g4csKH?= =?utf-8?q?YWSZFUIPgpRKMIeJKT6CLc7QpLMP2SuztwtnzlSB3eZKJl0geT7jjScz?= =?utf-8?q?lECMMYhDEOqw5eLGsfL1LzBX5NSV9DF2Mi7p2oThcCHDZdl3idQAK8Fh?= =?utf-8?q?J5UCj9+wpNcfTTcHsU3D8qV/Ur17HxobJwzinNZw5bRe8uOruiXXLOep?= =?utf-8?q?oi2V2gb8mfCRpIAw0okAiPlg3ODSFTbYd9yhz/XIVZfr1w0Y2q+5s7ie?= =?utf-8?q?0vIKcY6BqnftzoVtpJn0nSbZQG1QTrUrHkThfuxODBLs7epk6VGCmWQU?= =?utf-8?q?51lBWZahvoY2V8P/iMgH50Yvlyalvm3XlRE4vpcOs9uWzSYRzFKL0daY?= =?utf-8?q?fC1dDB/hVDT7Qr8grRu4oEfAgEhvYyJPvTXeqNXhw0sImGbh4R1NpOkE?= =?utf-8?q?grjXnb5uZI6yXCuz9SdDsFSWO6MkZHu?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: fc0e36de-de8e-401f-c24a-08d976b6bf62 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:31.7651 (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: 7tGysRla1abGaPdGJM17r/1Y3pzxrLcLhN/WEGfMKmQm1WOfuiy5b120MPyPsq8/wyrxz7MXmHgXeSfMaQG8TQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller wfx_tx_queues_check_empty() can be slightly simplified by calling wfx_tx_queue_empty(). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/queue.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c index fa272c120f1c..0ab207237d9f 100644 --- a/drivers/staging/wfx/queue.c +++ b/drivers/staging/wfx/queue.c @@ -73,23 +73,22 @@ void wfx_tx_queues_init(struct wfx_vif *wvif) } } -void wfx_tx_queues_check_empty(struct wfx_vif *wvif) -{ - int i; - - for (i = 0; i < IEEE80211_NUM_ACS; ++i) { - WARN_ON(atomic_read(&wvif->tx_queue[i].pending_frames)); - WARN_ON(!skb_queue_empty_lockless(&wvif->tx_queue[i].normal)); - WARN_ON(!skb_queue_empty_lockless(&wvif->tx_queue[i].cab)); - } -} - bool wfx_tx_queue_empty(struct wfx_vif *wvif, struct wfx_queue *queue) { return skb_queue_empty_lockless(&queue->normal) && skb_queue_empty_lockless(&queue->cab); } +void wfx_tx_queues_check_empty(struct wfx_vif *wvif) +{ + int i; + + for (i = 0; i < IEEE80211_NUM_ACS; ++i) { + WARN_ON(atomic_read(&wvif->tx_queue[i].pending_frames)); + WARN_ON(!wfx_tx_queue_empty(wvif, &wvif->tx_queue[i])); + } +} + static void __wfx_tx_queue_drop(struct wfx_vif *wvif, struct sk_buff_head *skb_queue, struct sk_buff_head *dropped) From patchwork Mon Sep 13 13:01:40 2021 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: 511486 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36910C433EF for ; Mon, 13 Sep 2021 13:05:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1971A610A6 for ; Mon, 13 Sep 2021 13:05:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239551AbhIMNGQ (ORCPT ); Mon, 13 Sep 2021 09:06:16 -0400 Received: from mail-mw2nam12on2088.outbound.protection.outlook.com ([40.107.244.88]:10209 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239552AbhIMNEG (ORCPT ); Mon, 13 Sep 2021 09:04:06 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V0ChSjLs0T/ngQUAoC68jz2XhNORl9rRr5F0wYlEx/c4ndeA086Lg58Ahq1yyha91UmZr2Z8+nwnNxmfwDdsLjI8DO+tRxTQ+u7WMckXyo/L5E7mUA4WEidpbbPoFEYUFi+QStLwy3KMspvxiRdxDgulBMTHtQzYSJZQrVsPzzMhDOrMsEyaL4gUYp1tb+Sd/TKpu42Nj2gFb/Lq7PDtQgOcEQMhxrNRYrJUh5viLUbzpYV8IRwBclDxX6YUoQCuWn1q+UiwgNV7wMsXLzgnodMN3Ucm8cnyGm27iH96hmsmvj9ossP2y8KKNYUxPpJLTgooiif8FUoBz3xvRKVanw== 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; bh=Jgm7gufk4MiTW/E5bnLdLTFb9rL4DssoymnMgDzNeZw=; b=G14tYnDwz9VkMDPCOkQ3pR5gsKjcrrZoxhGUpr/pFAg2NXlMqSS34dbeY0s8xfea64qVR50SCRzzJ3+DzovWfBou2ajGiiktxjm+HBkNgcaWqqzQXdCNxHD4VfIf4+ctDQZwSsJHVqR24QoUGM7eFR7EyFEYhKaw05Rz9sDx2WEkom9X7laZdxpWzF9gB3b2lpsxMJ4eNJrmzPST6bZQUTJt6brqz7ie1f0qUnVPEUzqaiYtBIf/sT7GXOb8gFmQ7RtT/8ipl6XAFIM4YtHcaNrUytu44T7i6DQauxfqjIs88m37hgq/v0l8U0Z22Od6Q7uloN1l2eTZ4rjGiM6yWQ== 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=Jgm7gufk4MiTW/E5bnLdLTFb9rL4DssoymnMgDzNeZw=; b=ZtFbSeZfL2sR2FULv3bdxnWyKogTjUzLJzLvtVhsvVhBnMjJ2BChBC9MJW15CAMRLNtc40O26y+lDp4SzJWXZFhQMGCv+JM7YCplXiGUGkhSWd0uDCr4y3n0XJaK9wS9gD0mqHqMcmi1426ItIwHuAhwhCTawnxL9CxtvDcQ7HM= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:33 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02: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 v3 09/32] staging: wfx: declare support for TDLS Date: Mon, 13 Sep 2021 15:01:40 +0200 Message-Id: <20210913130203.1903622-10-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:32 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 78756b84-2275-4793-5384-08d976b6c076 X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1360; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DfZmINL0bOEBvVaDUHt6535l9jYBJ3qADcCQQ5i3Fq49xpUH4fV+1e1x3JDJliALvxVVU5Qw7VWZrfMnZ9bGUUR8M1dv1143DYj/U/KyYsIJvBLbyDrr3WmH+T9GnCgeyHQimzwvRB2ZoDKTeFrQ5xa40na+IOIwikj8pG52CxsGwLY0MCAIk9r/kh9IupAmOA13nhp3bxbnao7bhjU7vw1eGKkB1A8Nvma3IkTiGIHkIhLyMXp1eAfas92boPL+Y52irViSvfARXP0hb9UNC09cpjqpEJuNM5D77cfF4XQ6Lp0R23M2DsIzx+01A/EelVXH3wKEDlhVQpo3fyPIoU5OhDNibikU7Zqo/0lLbz48QdqPx7zIqH5uo9WmN3jdSOfLZBa9821911CQ6fYaSIuZtTxdH47CX/11oRoVT9sPvRRCTCiXt4fqGeFnku/1UXZj12a8Vw/GzjlqiW+6JJghwKX0/iY2sIl2nY+klmsMi9Ih8Vt40Gi89fP5rg69yes99KpZyRopCkOTj4LbsGuxS2eoTYB1E/KTifJAVryEixc1FEjdA7nwTKJObt5aqmXDFPlU+GrOg3OwkZG96UthiySsYEPhZMmewIQ1oU6t5hWNi46m7UOM8payg/tHKZiniy5QX+Kertk+FhRuCJA0HYRjMqB2pW3UkNB5NfcCUHcM6we4x4kDMORYnXX+2qmOZ5+OQehlDPZ4bmUvXQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(6666004)(4744005)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?HH6xSalZgb3H64wUkIE/AUolI?= =?utf-8?q?Vt/pImxj0vqux66qUlUD6ngvXVraRJTI5l9rk8beSk4uHMi6SWkpE+ay?= =?utf-8?q?njEMeen73NrYMSaHEi/aIavvl8PKBtfNkXL9ZMtcQpZaeJWTWZ8LiUpJ?= =?utf-8?q?7jxk6n2OTzfgST8ybrQbntAS19tfSHg6wmiPKFhqKpUXbpz8xxRmDJSg?= =?utf-8?q?3yFP2ZuVDWKd06LXblosS2+3F25ElHsDxY72BLFSsdZFnE6UNBcPNevR?= =?utf-8?q?25QCE+fiQEka/+zurPt0HGUcROleUwIgX+tlu8UWrYrSQIcZXMfLY6MZ?= =?utf-8?q?WW/N+CiHcM45LKxZG3RSPsFcM0YOAII0X5rYvom4A2vX8aFnRXF4SZwO?= =?utf-8?q?zAoIx1RCjWg90KbDOPQ/fIQUINoQseuLsaelvSlymQna0JOJzdTYObuo?= =?utf-8?q?JEXKe4CQx5bzvzegmxnUC0OdAJIzXHdjuyq9cYzGy9HnU+J6g4x2lmAP?= =?utf-8?q?SEdvM5qPubNPrvnWULwkm+Ds1VxugD1/4q3qTMyjtmc+yl9rkJxbZhpo?= =?utf-8?q?BMOh0wHBOMBxbAGdaa8PaFZ94N1gsH5pjnLYw0nU65hQ5ZowVm5feGKv?= =?utf-8?q?1s3M8/Ytqcqrh2aV3svZy/27Ee5zlUgU8VDGgZopcA7MzXNDm8/HXMDh?= =?utf-8?q?Jr7KObXg+0zIUBHBomL+GfRX4cnbYFay9cRIeBOm0ac1n/qS2oiRg4bu?= =?utf-8?q?y/xRjpkDm3+oaWrrVogUbbY03Jfa9jTDjhC2j6uMxVSbynNh0OgGB0Cc?= =?utf-8?q?eWlfWBvjeHdosv/PE1jOHXgWCbmqPh/fsp+J/OZBZN/nePZr8yFOVTcF?= =?utf-8?q?kpjpQH1aa+wt8JTOCD3RecxRDZdL3Us5ANaxqcr4KHi4T2wyG/ugI/VK?= =?utf-8?q?DHKHC/Kisf78leDp34Eo4qnVIcKIv/NBL/JyDDybIsAKckdv6o+PMcPK?= =?utf-8?q?FXWkzMxvgn+AZYS8i9EqmBc6Dd46YQquiy9k5MLe/QzPLUqGN9qAU3o8?= =?utf-8?q?zi2ZzFwbzBcFr0Pw6+BnNcH2A6ASODvrVb6+f2oiytcI0/Ka6oDVMpC8?= =?utf-8?q?C6Zbz72yiZICbtKwivt5oE2vqmJEJpnUUa5e91vRdhs1ae3hPFrG6VPw?= =?utf-8?q?KfRr+FvdB48sRnrxHLpZfGc0gut7t9DY6MUiTPfmr8nYxmkmMJTlK3xd?= =?utf-8?q?rR5oezMDTuA52k90bDI/wb/kJ+q/L2c6p+2qHAJxeUT84tim2Khd4ev9?= =?utf-8?q?5eDBt9TGI7fpqY854UOiiFFnQmelhjhPndTj/hChCWlzYD9Fzptjm6A+?= =?utf-8?q?wGj9NaMs+73u/trQoRekVJJLgZZlSfh/ZjZKLTHqRyBF6i7kq1Rq1lNo?= =?utf-8?q?1+x+tEzz/zmopxYQ9mblypHZIx3aydz?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78756b84-2275-4793-5384-08d976b6c076 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:33.8389 (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: x5pQ0+nq/kzbK0eMMWT+/pbmWp6JNYGKuyXLgRjdufmyqm8n424IpQdN+71Dqbw5HFSxHGLvpB10IzKHHJ/oFg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Since the firmware API 3.8, the device is able to support TDLS. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 4b9fdf99981b..0a9d02d1af2f 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -440,6 +440,9 @@ int wfx_probe(struct wfx_dev *wdev) wdev->hw->wiphy->n_addresses = ARRAY_SIZE(wdev->addresses); wdev->hw->wiphy->addresses = wdev->addresses; + if (!wfx_api_older_than(wdev, 3, 8)) + wdev->hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS; + err = ieee80211_register_hw(wdev->hw); if (err) goto err1; From patchwork Mon Sep 13 13:01:41 2021 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: 510232 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBB36C433F5 for ; Mon, 13 Sep 2021 13:05:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C62996101B for ; Mon, 13 Sep 2021 13:05:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238571AbhIMNGL (ORCPT ); Mon, 13 Sep 2021 09:06:11 -0400 Received: from mail-bn8nam08on2055.outbound.protection.outlook.com ([40.107.100.55]:54369 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239557AbhIMNEH (ORCPT ); Mon, 13 Sep 2021 09:04:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hB4Rku8ttKmt5cIq2azaMadASayULCA+eZNrnEIfSp/ujbaqivWDu53pH2vJcA4i/n7lNHETMJmkyjrflXrCD26ShD/X6DWdaAX7c1lzp60pjYYnYh+TEBP2Fv+eLOKLASLJ94D8a+wWwbcHWXEQMxLRSeMaHdcByMkjYjFRe3Xy6e19A3g9wkSFdd+ZPqSYKYFXfnsIZwbWTdqoRytobdAniZ/EGlDe+0lAOibp+ygc+JmBrjpncjnZgUqvoeky3cF+VYDOUJpv1E/WO2LNxu+ACceK5kD23Z+DGsFkHwdBmTI+3+6CWO+856HcKA3GoXUkmBmROJy2d+OsH1j01Q== 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; bh=C31iDdiNELeUy/7hAICgB5wTgF2daKvEZIoAcBSDHBI=; b=Yazew4RVeaZHA9jHlPJKZFbz1o8DBmcGe5L1jlHCUVv3UsxwkC9IINohCbsYb0jws1crsY3RB11IxiKAYHs6I5VPJTmkq4X5qfGCzkMKVVceTFlKByv0ev/ymiXDT6Ltbh/AIfYlR36SPGHhJWhcwMr8w14XAIaw2bMveo0pvXlYIDMly/2MMya8Q+1ODag6d9mBxlEXkDXsMOpxmyv4RPG1y7xGWojPXS/qXmZ/5cJLTIoLYEEK4lZm1PjERXjo4YppsIr9GGFY4KaM4A++bCcSLbniGLdXAk0mDZvrE9o2uvSbi8PXkJHBPYo9QR2IlnC0bcN+J6Il5imU36dgdA== 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=C31iDdiNELeUy/7hAICgB5wTgF2daKvEZIoAcBSDHBI=; b=fApnPK9KplgC4ZJ3rQprZgwMo6ReM6op5RRTfM1SCKzCUDjyGTelK13ubw9H0DEixdGM/jCSJ1K9n7EkqTkHOzVPOJcGV9j+K7axu1ys6UmxBSo8LYzduca2O0936SDl/b1W0dvCt4FUgsvtTOhTU63xaGVF4uVaWCFIdBhKQJI= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:36 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:36 +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 v3 10/32] staging: wfx: fix support for CSA Date: Mon, 13 Sep 2021 15:01:41 +0200 Message-Id: <20210913130203.1903622-11-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fff0c955-08a7-4630-504a-08d976b6c1d4 X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4+hY7j507rbjwH8W0MxCj4LAWT2alfaltCqWIFXv2xXY6oN6csYiwTiUVr+9GtVGYRtkIqe9a3Wqg8Q3XS61KRjB66/3WeLB4CxST9ba34gf56L7K4bXVjpGQHtDbNqIbB51WJGP/QPSoAOfuP/CnEiyhFxtvNQgSfejRIWao2G24P28BNpwXZk1RCMEQUywG036+Fkt/jhqPL10VaWxFU0tBfS7dDT2ArnTHq/HI0sPAc845Tuj4ydFPPxr1mpPWBZeMPnW6x/D3w6XVCmhFZp27eHCmGIcvP750sf9F3hQCQe4GvV4OJSpuGGZVOLghpnTkuttOO9N/6EtaElz3WQzw/RFrELYEk8TvZ9hp6il0owcPHjPdRzmLH0/Mv2V+KVGjRa08mgSBlqvlMBOspb407T/WetZZ/1a0140gC/1mh1TDdS2MzD0ELz/woCYIpKIBKgaHWwBIDToECMAtdxXu1jT3RI89Wh7DhxhQONOjyfQJUVAacLInygpG5sCnt5WT9Sla23i6Y6Rz4JZVWoM/6lb3SF603p4VAhCI1+qrO+03mbyVSP839PF5rn0HYHJJgKs0DkzJm7DE/D6vXyVb5I0AfvuVP0VWFLo+o3jxCPowPAbtiiCeymu44AHhDC0I/zxuTe0aL8zS77Q5yXoJnHCHYIJ7ig4F5p04KxrhnG8rmzgyjal1r5DALgM+cNcL6DEwRU823rsyK9zIQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(66574015)(6666004)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Csl6bIlqkDB4mK+0G/Nn9xT77?= =?utf-8?q?DL8KrLOG3SEy9ZKSdhdzCC3+6grAj7OXQz2hUP+NkzpIzRHRoV1ZVESW?= =?utf-8?q?6nL0czy9rzn4lBsOK7eXY4YEG1rlwScanX6avp9ARbCiA2lrQSF/Wqtg?= =?utf-8?q?QfLH5EI+HjSXBC/Mg8YQ8LABgRzrRoeOPEt4VoW4USfrRke5V6vlnfJt?= =?utf-8?q?OEfC/Qj2wJDjNNcU6bm8h7jwE/qVCu8JoXLBMVaE9OpJF6tZjfmrKxL0?= =?utf-8?q?WB0pvPk/emhFCq4EKDOG62v3QTZ7ZfQ7K8ewpzOd+6J/vpjbA9aD24W7?= =?utf-8?q?RWSXUvh1ps/UDOvMwezO29qHJqS4KpE90vZH2rP+JU65w1dbyYOhf/yz?= =?utf-8?q?K9ZaTF5fFgxNx4C+lx2KccFsaw5NAyzhO7zd3ro14HF45yBAPQuWVwzj?= =?utf-8?q?pggK6BTqacvGRHVI3wDmyxKlra+tlKvPiFT6BfmtuNAS+VzkY3N/8Lk+?= =?utf-8?q?NyzpW5M3qICIlnvQ5dZKXihtjCDdM3Bw9yCPf7JzvyY5E/4BYJoAE9/Y?= =?utf-8?q?JNqkej7kB9Zk6pDMO+Yl9/FKQ4OrKTtXgVEvGOFLFWtFl+mu4OZ683pM?= =?utf-8?q?xWghl3/BO3GDcA6/1cGsaBH0BjZq1z3xQNWYRkchHBRPCChJ2DB/YX2Z?= =?utf-8?q?ruGI9g/8w6qO1weaGj2CQ2b9mK7tSnB2hgMDHKbQvMkFwbVobI0wIsyK?= =?utf-8?q?D39Xnfawzi9Br+ViPw3J7cOOo/W4n9SLI394SggR38uLoe4KbFgLRoCl?= =?utf-8?q?Ey8L2oa3K4cZIgVKgPcyeeoYNPxzFc+oaJ2DfxNNnpxbzGEx5WhXPUIQ?= =?utf-8?q?e9yAFheqaEUdVPMAnuuzhednp7BUkWBUoe/ZIGCm6FPBpkH1lUL1/003?= =?utf-8?q?MEMX8abnc67xHRRCFSBROc5WOYrfGD46Ssk2OOJj4eXO69s9R7trdvm/?= =?utf-8?q?3JoQaoz2Z3AyaIKrDaP5/+IFQxy2QW5g7jnY21vsD6xnTD6QKMPxHmr4?= =?utf-8?q?E/4gKyL+u9Y0nRzgakePQ2eGL0tVJAP6oLeMDhAO1NWBy6XSgmTg2Iu1?= =?utf-8?q?q2NhtjLW0gHWYPxC9erXPBFAaUfpGftf26QiKbKxFSh4w4mI1Z1P+Ilm?= =?utf-8?q?qaEbG7D9S9abTqMf9IYGi3XOumC6prbc5wz7J1EV/OXzGYwJs3oz2Xii?= =?utf-8?q?3LB8ZAsjQ/UMIe6Ej9S5DhLbNLx008goMQViYVAKy7Y3ktMSRTIT+hhg?= =?utf-8?q?y+VpzMliN98XeNlCgYTciPDkyhCv11tODgnnh2qsas+7izHGKilw9WiM?= =?utf-8?q?NTTutBTAtxeOmSLt0LB3XnEm1tui+i1k1nhPQsW8Luj08kk3ToUjySLU?= =?utf-8?q?X81nzP3UWLBcMf1uAPbnkkHUPwW+xv+?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: fff0c955-08a7-4630-504a-08d976b6c1d4 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:36.0516 (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: kLqsA8AC72ZUod6OB5Yk+9LTeTzcArweroJvKHtaQY/bbrVebC89m4+rpF61Ms4afPACQ+H7uqN2ilkxPZ1JUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The WF200 is able to filter beacons. However, it uses a positive filter: any change to an IE not listed won't be reported. In current code, the changes in Channel Switch Announcement (CSA) are not reported to the host. Thus, it fixes the support for CSA in station mode. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index aff0559653bf..5f2f8900ce99 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -80,13 +80,18 @@ static void wfx_filter_beacon(struct wfx_vif *wvif, bool filter_beacon) .has_changed = 1, .no_longer = 1, .has_appeared = 1, + }, { + .ie_id = WLAN_EID_CHANNEL_SWITCH, + .has_changed = 1, + .no_longer = 1, + .has_appeared = 1, } }; if (!filter_beacon) { hif_beacon_filter_control(wvif, 0, 1); } else { - hif_set_beacon_filter_table(wvif, 3, filter_ies); + hif_set_beacon_filter_table(wvif, ARRAY_SIZE(filter_ies), filter_ies); hif_beacon_filter_control(wvif, HIF_BEACON_FILTER_ENABLE, 0); } } From patchwork Mon Sep 13 13:01:42 2021 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: 510236 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, 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 17449C433EF for ; Mon, 13 Sep 2021 13:03:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 01CD86101B for ; Mon, 13 Sep 2021 13:03:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240078AbhIMNEr (ORCPT ); Mon, 13 Sep 2021 09:04:47 -0400 Received: from mail-mw2nam12on2088.outbound.protection.outlook.com ([40.107.244.88]:10209 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240063AbhIMNEU (ORCPT ); Mon, 13 Sep 2021 09:04:20 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WKoPPU2D7lNsKjZ6sFcDqZ2ljt6n3wkz7ka0t78zFEA78d8TQMothGUnIES2ePNuvFvHsvskCf2L3e0hFNu+skLF9VjpAz0NxEJHRiucl7jI0M87xjAborsmJ3KxdeyZYDxCHzK1TXThdoV5SvjCX6AVUOyzNDi/wu3TqvudQgNfDYhhxhKGVgdYiYUzCv9IVU21V/F/m/6HeMU+gFgzw6ss4a8IHf8eC4axoEtItT4DlQn5DXi9Q/zAVi44FjRcSY+hRUh24R/NqeYvHZgIPoWkzthjz0+qCFyfUd/BlHoWqmZR1Qq1Bq5p0f9JjUvgMtBpqNP3tS0bj7d4/3wHPg== 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; bh=sKQTsgOm6zR+8zh/irGIoz0XeG7P1LWn4tiUm/Vkbw4=; b=OEMGBSMeuKh2CTGBqat30mOy28NVzLkPlkMPu0Z2z5RBkmApD3d6SJLXuuaYk7vZn1JU+tQGMZ0Ql4KETmN2LclV9SfRcHfdeHff5kEoh2klX8QSP+TzgYDnngu9lIgS1ZL/NLI/zYUtq0Jzppixta53fxrb4JjbBaH9m8I7fz2/GoiD/izyHhpzaId1oZ4vjXdbJNGZp1blQRi6jmgWTP+7q4lPSEUOtp1el+gDaRV+wyVLsGRLqPcd1Fln8jJSL97rI6OJG/uAYtErGLPvBlpRsjPrd/bXLnGCMKeWuoHObDDlwQeLQWmGpe4GGXTjYw5wn7qH9n6Kt5mgNial1A== 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=sKQTsgOm6zR+8zh/irGIoz0XeG7P1LWn4tiUm/Vkbw4=; b=EByOyinXQ2HDhjA2dsEOWNo2toKFl0oLWNp7qNw9FlPmwN37RfZhIsxqF0rTn8EkiwRKSZykizlnCoIYT3TWUVaCJqAXD60eEzVcGnhKR2fZqz0W9z+6BaXugxQNZFZbRjt2Mhlh8/8W3mzHjKiRArac42xoi68XSoCIQaHdG3Y= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:38 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:38 +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 v3 11/32] staging: wfx: relax the PDS existence constraint Date: Mon, 13 Sep 2021 15:01:42 +0200 Message-Id: <20210913130203.1903622-12-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:36 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a083e9e2-e4c4-430f-3b1c-08d976b6c2fd X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2150; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B2vXlpBWiEi7LrNboItKNu87ptkqV/7bW2lF083XlhPHmzypiDDzaMyGBQLzc1f6S6+47WyWSkGvztS5DxTspwd51nY6dm0QRTvFpIfKSbmj/1kXhrncvO0pVbnrhTw3oh7nit1aeqobC1H8zAmwXmVw5OPhLVmIfE41+I+4ZXk3WJD3ooDF33icF0Z8Tu/5fhyAz2a8ADRrQjHe3XDZXXNo9IXjNUAzZnQuNwMlpkwEqk3HMkvnto7Ov/bAPUZd1S9VaTNJsDCsPShA/Yk+W3kwVs3GGXm50Abl/6iPc8tKP915HRfbGgCzgwucbjn11Bo9DZi8IZVeVy28M1HKL+Ki/x2qJ8Pii6YFUDHI1m5gXxM0K9lq9H811M74AL5IpZ6r/506WPUqfNrmSi7yXdrEaHXQDXaRjK2Dv6rnBoy1Hmo/YhpGfQR2+0Cb2lI+OI6IGsDJiaJvm1He8q1g2qKeej6CmAF1JuKlM0FAwGFanGXuRF6JdLXhZ7hYlXGUFDYU9kUQbxCs26qZLYkR9do0FMn7/36g4Of5PNrBb3lzSJ8Q6sb8yBa93Yl9u4lmniMBmwd8vKYez9J3KLOCuAxhrlij/81ydn4bzxQSA0GhSo055XBuy28H+0UO1ios0vzW8ZVlQuMSWlQavgKMb8VzPHFmFVkhyy8hLXS8yDN89Hcam0n17eraG/ip0/43s6oQhoKubGVp3bfKLvTqxw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(66574015)(6666004)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?1ZzZX2aBYqICFx8uh4brp6uIb?= =?utf-8?q?kmNnJAKitH18bpybCsY7fX+PnD4Q/hjmWO6oeyStsniNmO2E7VV7GWJo?= =?utf-8?q?ymm1H+NUzcZ4pHbvDhu+QkrUeYW0/Gfx6SbIbhsO0K2PQMYBXblspo1L?= =?utf-8?q?JMAzh2GXVg50Lo+FbYfNJBUnDXrY8+3Xas1jxkpNek0pOofgFjTCpzUz?= =?utf-8?q?cCgBSYqMsHgPqtCSlIoho6LQVGFoikBcU+KAXjJLBulz6txY4VRQaQ6X?= =?utf-8?q?FKCcCfzgaLJEoG8Z9+PalFlu6oUBcY3pTpdiMSmhGN1aKZ5u5vKGjcct?= =?utf-8?q?VSdj+mgXEIbQ5Smqgtu3UALNiTiUbO+R68dOcmNdJM2O1BTWS1rVmUFI?= =?utf-8?q?E2SVke66CVli5IppOkzqwqUb+ZuwDG2Rgcmfi+VQOQC8SGDbGPf+vBID?= =?utf-8?q?2qO/EvHlYctId0HpAXq/QC4e950WvTAD3WH9vMKQsI/wLlIKMhtsJm24?= =?utf-8?q?rNAuijH7Mx8UhBsrP6WpYt2q5zdXGC6jxvb4veuqAeFmPgThGTljzTMu?= =?utf-8?q?L5A/ZU6mW0i5xU8jOECTdqGP0hOnLo9rqQytWx6b83xtUiYO2NYR033G?= =?utf-8?q?p/U1mnxQ9771h5KjrjpC/zXd8Ddyjeg6fn8H82YKwzA3pl3T+bVaEen1?= =?utf-8?q?G82XD66MDWY8UqvkVMPplFQISxgTH6GTAPe3KUnFoEXczqSELO+sd5y2?= =?utf-8?q?iaLMuSlCwU8YlGcycYuxV7cVzDciHUApIagbeaUKzGXN+UiPt1tmf8Sm?= =?utf-8?q?CltM+owXCAJ/WwG+TRhYel/R73d4sLj2Z0OC8nUFG5gT/H2+oWz7TsRL?= =?utf-8?q?Zl7HHoMk7HYCXUSnF0+SAo6p2WhePMCBZnz5WqY6mDs88J/p0gHqaI1k?= =?utf-8?q?DEMEUW0/Zxc1Y2BJXeii4Zw77Tacnxa9nIOMnXKukaZvFhWHyH4/D9JL?= =?utf-8?q?sN3rC901BS1YkI2UoFa/7fXZOijx5GrgfmI7I5xK2lP3BNC1MVCrLt8+?= =?utf-8?q?a6wVLgHWAmTAuvssW7vw0+zXH8f5vIz4qS9Ol6tq59tbdj8+pWge3bgT?= =?utf-8?q?qD5UE201DGQ5byg82Sq5xp6C2juyBtnFC2oP4kuYJx3xPneOa3EUUCTn?= =?utf-8?q?sOvepWBQf9Z0+SmOhR8onhmAj45TZjLT0zLPNBgoDxyHTUhl1hZrbXvg?= =?utf-8?q?lRNPcRlVWZ6F+hLB1qJkRmJyQROrZLB0HiDjD3ES9E0+gN1J5JFvIB0p?= =?utf-8?q?9LoPjG5mQvyexyXbzvJKkKtXrKavuaajfaolEfERD9mJuPdnVUBayaBo?= =?utf-8?q?ddG2HBdMvlgN/N/qlS5wAKsNOFOkX0xTvrUStlR1KdFOT/nAslTWPYJu?= =?utf-8?q?n4LCY81h2KCCiaqVDpBUB+GjKgvUmUk?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a083e9e2-e4c4-430f-3b1c-08d976b6c2fd X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:37.8256 (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: 4p4TpeOf3DWVkt/v7wkTtTSxl6fA09XB5RoGSyQ+8jj48bYL0Feo2pByAx+YOFwbAl/fi1nWqrOO7hnV3ZN3Fw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The PDS file contains antenna parameters. The file is specific to each hardware design. Normally, the board designer should add a line in the of_device_id table with his own antenna parameters. Until, now the absence of PDS file is a hard fatal error. However, during the development, in most of the cases, an empty PDS file is sufficient to start WiFi communication. This patch keep an error, but allow the user to play with the device. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 0a9d02d1af2f..2a759f3554c9 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -220,7 +220,7 @@ static int wfx_send_pdata_pds(struct wfx_dev *wdev) ret = request_firmware(&pds, wdev->pdata.file_pds, wdev->dev); if (ret) { - dev_err(wdev->dev, "can't load PDS file %s\n", + dev_err(wdev->dev, "can't load antenna parameters (PDS file %s). The device may be unstable.\n", wdev->pdata.file_pds); goto err1; } @@ -396,7 +396,7 @@ int wfx_probe(struct wfx_dev *wdev) dev_dbg(wdev->dev, "sending configuration file %s\n", wdev->pdata.file_pds); err = wfx_send_pdata_pds(wdev); - if (err < 0) + if (err < 0 && err != -ENOENT) goto err0; wdev->poll_irq = false; From patchwork Mon Sep 13 13:01:43 2021 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: 510237 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, 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 D291DC433F5 for ; Mon, 13 Sep 2021 13:03:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BE2E960E8B for ; Mon, 13 Sep 2021 13:03:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240140AbhIMNEu (ORCPT ); Mon, 13 Sep 2021 09:04:50 -0400 Received: from mail-bn8nam08on2055.outbound.protection.outlook.com ([40.107.100.55]:54369 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240067AbhIMNEV (ORCPT ); Mon, 13 Sep 2021 09:04:21 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a7HISlX22YxMZU18Zp6QE3BWUptiWo8oCmicrXS8QGpA6EqW2WJG9J9+gY2EyQanuIZbC0QJxC8eCcn906+wRNb5vepLGMHTLeWISm5Ri7RNrBWjz1TX6yIFbyufGttSWCFdptivjObYR259zFmNU5zZQqQkBOh9jDsQClIQfZRhjNFD5QDztcf1TUOeVVg2bMv/x0rkL2sZaOA4PKYM+6+zB3FlimNxbOUHs3nxiO1otttjkozTcaieqcnM/4T+sIn985qASah1Z3+G9D0F+0U8ILnbEymgs8mWwXmFdRVn95fsFBoB2X4y0II/8BDdPfxwWQsACRYNU2unGec5Rw== 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; bh=WhyYy1P7KsKUgLuM2glALRDRuLVP6X8mHvwirJcSluQ=; b=KVsCJek+lwXSQIunXEQdCqUF2OgmNQWqpyR/bdgCa/+JQRGdktHd4rrbZEnDD2O22zvsQ1jZ/NHTySYYdEP6G7NYSEiI6AdY24bC8utymQgJtrhK83Qu6dKL+bqRIIWTiAq754YvRM9H/cdd+Qs+7xVR3/Zws/IX6GAIK1THhrRl6kj1zaNR+i3qvuQ8XIAPOlY/DObi7U56SqI1F/yChGYqDrMO8jTo+GYmlD5icyPTX+B2cFhxLRVCJZFitStN/xiYtWrvPSGMlabpjaR0mxbHzrdAlaeCPnqo3/aKrqJgB22hXffafvcUKGzLnUX/mys7KLzjIN+lmbY1HgfUnw== 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=WhyYy1P7KsKUgLuM2glALRDRuLVP6X8mHvwirJcSluQ=; b=AN8KwaDDkgddg10s8IlarCJA0OJQo4+8Rpb4zqD8jQjgmluvIwUDnSQJaZ93CqeFp4v6YmDb02wkAvHjEu1S/e12oa+4Xro2ao688iI4MkN5fi62Of/nW1yZx6V81zdm0h6FJ1J4d45fEaJGA8+mYvHzXxFFYEGfVK2YiSeVO5s= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:39 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:39 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v3 12/32] staging: wfx: simplify API coherency check Date: Mon, 13 Sep 2021 15:01:43 +0200 Message-Id: <20210913130203.1903622-13-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fcb17302-af69-4ea4-8bbe-08d976b6c40a X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: h2rygBA5DJaX3wB+qdIjIOv24nuplhL6f0FDrXiVD5jnvYw9nC+G5XYe1ddVOqmnup+TXV9t+Fzaqi6FSxKn4+w416ku37qXrZke6jhwcBfys9zYYCjUQDDe+6R9PYCwxwsEsNjnepD8ccSRG8GAMbG2FIaBop9da8RphZyIvpBVkZLZ5caDNlv5IT900hmpCq6eO/uIdNud39bMEnrPKM09D0vweBfjDytIjVPxGNR/2nj9OC+/Gt433+RFdNquIUDlxdQjPhxnnVZ5xuaRFMT4hDIInQEtgMekk02ViX0Z2W5wH9R5MMg4pTx6kKFFXuMi8c//hfXHATandik781wltOLH3JI9SnvJXu8T3T0OS+YWYfeBAT56zbfhthbIL4aBCbUMkSlC0V4XiYi4h/n7N7vwLHoVMRCSy7fVu420UnPjcgVWiYAagL/H3eVTKMcjomMJMfuexijP9CestqJGZ2/0a5vxM0sbSU8lvWEIjSjUY/1Zwht7UwBahg/eKCdHVcH8XQeLHxDyjJBhsHVjh29TnPgtQvYV2K0g5pZtSPAObw8vRqvyHsPnSv/dyBjq1ndlb3M6rtoZHPtW8pplJfquLY8Ki4ik6P7Orly+SeQ6ZZ5GEzN/KTCWhV0v0Elcg+pDYP2LcwLA7TSY3ijFO8+82v0BweyqwuOTLFOJp0fGPSo99Kcv0j9Hru/lrRmvAlvPkEMat2JZ6xsyJA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(66574015)(6666004)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?U1wo5VDK5oyicty+e1nJGyRh6?= =?utf-8?q?9ZMbtNLnS5Ua/EDJP+PTl3xnCGEKC4WmRYFJH5cvB0+hJwrxm3ZfOB2G?= =?utf-8?q?XWY7/6VicQtAS0vhu7ujWOwrvIvRWstmpabDyoqSsPRWPyR7LSdEioLb?= =?utf-8?q?8ItXosXUEoeVmrBC8kJxsSZ11DHmAwRE2F9yM0O44IRAkuAhjGT2Sk05?= =?utf-8?q?xFGnTG9VOIhCiNmG6pnsd6WEKZSGtjqQ8JItIl6qaqgqztUJVeZK4E4B?= =?utf-8?q?FB7WcgMq3lzKrXN8wQbzT0HmEX9Ob7OiRlGByNPGjj9izdoloOHlJy4k?= =?utf-8?q?4Ct+nA2zXSHjZQmWBI9KZqKubzWx1UuBGxX7Sq+kOtgv8SaVqbq6V/Es?= =?utf-8?q?S0czblat43XQ+Su5WI9lbqMRSujXyU/0Xjdpy9lMqpOre3YuwQ4U5U2M?= =?utf-8?q?CXExMrmEG0jo+0c1exGprU4xpYH9nilGf8nkoMTgRxzQMeWIOLvYdKDI?= =?utf-8?q?mNKQkbDXOOKUlFZql9IGZcGRDx7GOjDVuZIg8+P76rUfSFECKwIjAi0f?= =?utf-8?q?UhUvEsJHVzBs8VCoR8a3ZU5KZR5xd67N8aKwiscTm8GzT0/gua4qxD/6?= =?utf-8?q?jpXEiPLhXl0rxkAFaWAyTF5pOabkZJd6asR4tykkbut8KkW/xl5BP2A6?= =?utf-8?q?zx9s1rEmxZ551ECFc/D+xwjjm5l8Lk/TGEvEKgRyUpOSELz0Ctx4XgZf?= =?utf-8?q?XJo24o3r9y/sO3arVWDqw/P+hhL5hXsAaKGp2DeAvRDHSc0dMLKPLTua?= =?utf-8?q?/OSvBOMRoj0PTsD0qWEm/S2z8fh7KbUUC/3NChSjzAppHZNWWVG460K2?= =?utf-8?q?pWoj2iGhwduFJjvnjZHj91BKf1mRRw4uCrXBw7l3VK0at55U3FVKcOjs?= =?utf-8?q?xLJthuKDgekmvFJhlU8fRmxmawC3Euzd3B5YM7thhRKsPeTHudZBKJwU?= =?utf-8?q?4/q477THZKq74IF9sL+KjSrYaMaaovNR30WtUdTnGVwdlor6pLqrsssR?= =?utf-8?q?sHKXCvBnVIpIVWa+G1VEkhk5jJs2RnzuuPoUB5Iv5hnnZgHESfa1esMB?= =?utf-8?q?048IhS7x71bXpZD/7aLldGnfRk/p1jfOYrQx3k4Hr2fTFO1drmaCpJvq?= =?utf-8?q?Ymrrw5iJyYuYAec0h0OAjoakU9bkmzeSJ8tuvDDvqRloLMChXqQ+EhVM?= =?utf-8?q?vIpQcko3UBhBNgs3vVExEgA8gG238NhLJ/ymuqwF0o3KH2EZX/Nd+op+?= =?utf-8?q?Mtg9XyDbEefpFp0Kc+AMmL5ENSAnlN0gxSd/KZNPQn+Kg2DVQR23Okq6?= =?utf-8?q?71A6CqtI7nYew6AQFJbik9FYxa0Zh9aMkOhiuh7eapgaVjL8Tl9Tw814?= =?utf-8?q?u4JHpOAnHUNOmL0ObBPtdmoNZUC4IFY?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: fcb17302-af69-4ea4-8bbe-08d976b6c40a X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:39.6705 (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: 9K0bN7KGEDVdHc8QXvmyWYQZKwJYTRQ9TrsaBi6r262lABR2QEp/ta6afZ0jIX+ArUX/AVPnNbP5xd5qd8SWZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The 'channel' argument of hif_join() should never be NULL. hif_join() does not have the responsibility to recover bug of caller. In current code, if the argument channel is NULL, memory leaks. The new code just emit a warning and does not give the illusion that it is supported (and indeed a Oops will probably raise a few lines below). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 14b7e047916e..fcce78bb3005 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -301,8 +301,6 @@ int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, WARN_ON(!conf->basic_rates); WARN_ON(sizeof(body->ssid) < ssidlen); WARN(!conf->ibss_joined && !ssidlen, "joining an unknown BSS"); - if (WARN_ON(!channel)) - return -EINVAL; if (!hif) return -ENOMEM; body->infrastructure_bss_mode = !conf->ibss_joined; From patchwork Mon Sep 13 13:01:44 2021 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: 510234 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, 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 ABCD4C433FE for ; Mon, 13 Sep 2021 13:04:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9299760FA0 for ; Mon, 13 Sep 2021 13:04:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240201AbhIMNFb (ORCPT ); Mon, 13 Sep 2021 09:05:31 -0400 Received: from mail-mw2nam12on2088.outbound.protection.outlook.com ([40.107.244.88]:10209 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240045AbhIMNEp (ORCPT ); Mon, 13 Sep 2021 09:04:45 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KsWwEGa2yAZbVvTgQAzgZMnBboqTGTxlMgGfJgD3ByMilKaHBhSOM4oOUDNflRaM5SGAlEnLqFwjXgxvMct3kGjUqksQk25gvSYcvpQplYTx8PHfslUat8PpPRYvrAhRxCTI0mJLdvCSwpcUxiXHomMPIcwYUH6FhbAdDTSz2tx2un24N5RbbtN/cgTTd9lIO93HnxdyKXUvbHYE/UkjR9cQ2snU0XjiIfDCpD8yp2bXhR2tgOUzNduOqZZy7UWQMG25/ZbYh2BOrP8+iOD7rLbb0OfFvROEQF/xnMPoB9S8wiMNjYNWr60SqW/o5UHvk9KV6tX2uSKYiu4D5Gx6kw== 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; bh=qM0FMGZRJjSUIUB43bIkjZdDBC6mBZNDVgLC0UqdvoM=; b=XTo8OSQwj6n/DruJZe41UBVoTFawL99/n+dc14yUl+tfE46hSilbSZa+CjH2PV60JI2xuVi5sCCk9F3WEhzqHpfHNUuXQhomTWOWK58Ze4KdcMVzGRUtcPCCJ+JuaxaPdXk5nBRn/fVHLrCzi6xuDYNJS4KXTWn+mZs7M2inuSHR7mulWYNeAOxQoEA1YnFL6FcyS+WANUuhVPtFDGMySjAzVZfOy6dR8l+w8rvSWI8PUj+Rhji0yLBoMJc2Xju4j0csyNBR7gNlq6DPaiedcyZAGSiXiPtXbgSsfydgHePx7qw5clVePAooRg9x4SEQSpkLZRMGxUCi7fTGz9JULA== 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=qM0FMGZRJjSUIUB43bIkjZdDBC6mBZNDVgLC0UqdvoM=; b=J9AL14lRduBJJTeR/viMY2qJjZbpYaRN6PeB06jGi8q43KGuCTPIZ0bZTaeV56AoOCuPgGmZz+7UoMQcbTTdXBpirTiW5l/bsH3PU7cIbj5LGBdLASe9KfVtoAf+DITP/+uP+xtrs2/xkJtvDjQDhItztcZnuKJ2pGfqhzbY/34= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:41 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:41 +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 v3 13/32] staging: wfx: update with the firmware API 3.8 Date: Mon, 13 Sep 2021 15:01:44 +0200 Message-Id: <20210913130203.1903622-14-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 28f23c10-085b-4ef0-9ee4-08d976b6c521 X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:288; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 65WuPnQc6gUS/XdD9+EGkznW/ChxzsvqFUcIZq+RQU3fSuJKm1M727iqmktGefl88Y7RHKcdmU8c2rDIF3AzWTeK5pJjGXwDCqbRet8YtT6KkJ2FE1IVwMMU8HQnSvGiOm9mz+ChtCzcAmy05qKFxGUCw1UScc24KmPHXpAkpeWomK4Hcwwqa1EpTtQyOzLeZE+gCLzXQpHUpU+8XGkD5cnpjcGC6NRa+yzC+gyNHEsyTitzpcfbdFiSMSVQvbvMJa52n1mOSE+u8WE45IZ5EF3K3V02NZT2L4TkyNuFFuLHFlemNpYF/ZmADbO9drPSvkEyjHBGz0LxnuZy4MtqreGldeCe+iweTrEhE9sK5PYiipvM+l1dUjX0wmAW1drxg6sxHgb+rhdX9CYqWbFn5D+W+E3daDBMSKkkM8E9mp6VMB8kyeXJOu+jbR8O7AdTs0jIa1kGTxqq3+OZJCiUoFi1HfYF4dMHc/lldovRezhzPxWOPSd1RmXYn6e1sAGPXuxNGHzAPKVC7HESgvlIEJ0TrDdwUIENPwMfmCQMI8WHXJJ3h2ZDmTDqkYNmQj6c+v9PcUyGLQFZe1Mdlyb9FdsHkxDx2mAv0AZm6A6xcbExDT4e346T2oFxxnUP4dxWRXMTryvKj5GMtktTrVuU62rhb/479P+MOtvsCXE5ih8ozpuYhxX0EmasW0457C6q573E5hiWeSOnIwzD+cWQfw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(66574015)(6666004)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?aL1h2KYi+AK4NwV6VOHz57r7x?= =?utf-8?q?KF44gPfN/o3l4DKPVzb/CDUHUn6hzb+d2+D/+Wb9XN7XrpX2+qPCybzz?= =?utf-8?q?3IZ3KJe5gegv0z6BGHAYsF9bA/zAITDIdcuEEnUsQBDXGZO+eEsFL8+X?= =?utf-8?q?Vh6pfAi0HpCVLSrIEJYA13Xi4WdXWimEQANaREcJ5nBLbMff1qSbkVpQ?= =?utf-8?q?tbAsRecrSXOMtP2EQZY1v2iqbbwRWB1HBL2V5ot5wErQ0CgQ+fMO11EQ?= =?utf-8?q?KrCKy7hJ6Dtn7sH/G3p0QY/MIw8dZ4I6NpR5DPkdfsqpgoto4OFAeVRy?= =?utf-8?q?mQmpa67jz8gP7iS8IZSSZfFKoIj0vPx7s9OUCymmZ+Qj4Pj+1PmPi340?= =?utf-8?q?Eh7sJ/JLB9e1boXqcn9UqX5VAWACBqOgFyrQ4EKEOJi4shroq0JPsiaG?= =?utf-8?q?x7ShHsx+jXevYg9KFihdZPOqlYh6sA3CazK1CmPQy2YUwHxuWzk9C71q?= =?utf-8?q?GVaAEIeyzpKZa5UY5JIHpEgLTNDkNBvB8x0jsa3//jsh+izwQ3prONDe?= =?utf-8?q?axcttkJ6qIt+LnEFvJloAnb/nKm6yW/EEK8X251LryChJuTN85CWiCBL?= =?utf-8?q?sifN6T4v+18MJJewSip758KcZvWrlmyPXnErYsPAgYBWLNrZDCVNmucs?= =?utf-8?q?7KHnh3h23KcTRuar4vRJlKnVji5lx60RtG5qr4/Tfr+Q9D3VKoxA1iA/?= =?utf-8?q?iecgsGfkk/Ya7O+i4lkuxYnLFZNsacAiORt6lB4nSlY24Zul0cVX64Iw?= =?utf-8?q?D1/VlbRbfk5A0k/F1OxgJ23AHz1PVRRKDtptavWQpzX7bTcqwg2qasZ+?= =?utf-8?q?XKaMOqCtsHHcRqNS8Ccbvpjj8W2KuRj/E0lnd8TpILf1E71YokGzmSNY?= =?utf-8?q?S8OqbHq9fTu1tZbGVSVGnw5F27HSU8nfT9dHHPaqOvwIot0mDoevBRHy?= =?utf-8?q?Jne9tteZfbm1iBDsrnbZPd5b1zuZcsnnACEcMBffqYL8mWoU5Vxwa7MF?= =?utf-8?q?c7GLOcYttOKoAhd4Y/Ahgu3jdXq0s91x2Kg8XLnaSUSjRgCS2ZXEkCz/?= =?utf-8?q?rjxiGUUcsYkHaNk1Z+lmYvb2Qb+ehHYsfJZm0Jqn06g368cFodaPaKPL?= =?utf-8?q?qO7xzudkh+U8EyukI6bko6cnrLI2wRn4vwX5OaAgU+cIz2IbtgoCzpZL?= =?utf-8?q?z/2ceC66lhYc3oOEdakLBeIS8U0inaGPRDOZa1WouydnInQ1NzIK7T+g?= =?utf-8?q?imRMDx6xwVinIF7bu3vFbN21rnqtd9DfWjyJbGH18HC6qhdk2I0psA0s?= =?utf-8?q?JTs1/1aWOl3P9Pa5zo2iYWUhmbksXMKbX3h+RCi0aTZOEYBSvD5oqGng?= =?utf-8?q?Qsb0+OHznFEy1zojYTENx+noK5ym7tb?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 28f23c10-085b-4ef0-9ee4-08d976b6c521 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:41.4445 (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: vCxurMfJrx9OL8rflIRneND73/5J8LUDBiaZKWwfZTKWcJAvl8rvBAPK60C727WtrSvD5dVP+UNyTKLD2DSmug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The firmware API 3.8 introduces new statistic counters. These changes are backward compatible. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 3 +++ drivers/staging/wfx/hif_api_mib.h | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c index eedada78c25f..e67ca0d818ba 100644 --- a/drivers/staging/wfx/debug.c +++ b/drivers/staging/wfx/debug.c @@ -109,6 +109,9 @@ static int wfx_counters_show(struct seq_file *seq, void *v) PUT_COUNTER(rx_beacon); PUT_COUNTER(miss_beacon); + PUT_COUNTER(rx_dtim); + PUT_COUNTER(rx_dtim_aid0_clr); + PUT_COUNTER(rx_dtim_aid0_set); #undef PUT_COUNTER diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index ace924720ce6..b2dc47c314cc 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -158,7 +158,10 @@ struct hif_mib_extended_count_table { __le32 count_rx_bipmic_errors; __le32 count_rx_beacon; __le32 count_miss_beacon; - __le32 reserved[15]; + __le32 count_rx_dtim; + __le32 count_rx_dtim_aid0_clr; + __le32 count_rx_dtim_aid0_set; + __le32 reserved[12]; } __packed; struct hif_mib_count_table { From patchwork Mon Sep 13 13:01:45 2021 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: 511489 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC637C433EF for ; Mon, 13 Sep 2021 13:04:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 98AFC60FA0 for ; Mon, 13 Sep 2021 13:04:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240046AbhIMNF2 (ORCPT ); Mon, 13 Sep 2021 09:05:28 -0400 Received: from mail-bn8nam08on2055.outbound.protection.outlook.com ([40.107.100.55]:54369 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240050AbhIMNEq (ORCPT ); Mon, 13 Sep 2021 09:04:46 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a1GaEn8OIQr0+exMK5Cl847ZpBfIWrJdQ1vO+WRc6evUHPP9x6SdQecmef+Jm2OrSxxyUx2btuUY5ZaCxgpiOUTCO62pq1bzN4n533R16/+nEq15WqehWTE8j5e9BGmGD04eyOl9fER41T+wqS7/59UWmSL9PSPkStLBFbQ/K0dpy9jaOhg6nGaoocXzLDmdpABjKD4NLYVqj3XtHKlksBsni+pNuTftTfjaP/vJMc3HVok9d7akIf8f8cpFHbMonR3KYW3M7YQl5ca4Yy6gQxtMtD7kIiwL5+SPvOpK7l6uiMedwbcx0PKl/44NiF4i59r3vbiDRpSq1r9UO+te7A== 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; bh=ASE4rAagVGXa5deMw5+RxN7XsAlkN46v5/lzPTuDMuc=; b=lJwEZlXvGUUvx8O4bjb/jpC2ekwXVti223DgKj0Dfaq1e8Md2ezFBpr3T6IINKm1rEB+GnY2jKO7u49eAm3xm/ooQDhDbYMtB7HaUGhNc717gKc11TXFg3lG44GyQw5+UYONtFsHtIUiXJzGVQ5Fuq8TCfoBfIrJgnnDzLfIJMryVYar8t+SzvdCxvdT7bHTWm337YCQaHi/V5T3PrUU0orIoIXpuvPHsJBfPC2AUNKtS/VEdddC7MhDR6LAwN+PZb4v3qsGOKu/j6dBfvtF5ewpQnxe5Iw+3Jsq6hyTgb/Ff2GNArw6szXqDtaGRQwCuhMXvt0sfhLdNDphldFirQ== 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=ASE4rAagVGXa5deMw5+RxN7XsAlkN46v5/lzPTuDMuc=; b=IeNb/vZYEXSwoe1jQpHQr1ZG/JCoq6wElkl8uWq93qOu067jEWWg67nv83zzgXqv3YvvXm5vkvJFYbDKgSt1NnikipxmBo8b4/t8oNzvcV9QvdVS682jRiJ2+LMM7SAlzzYh4qBW4tygGLQKRlIhn3Uc3wze9RqQShObcfzqRt0= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:43 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:43 +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 v3 14/32] staging: wfx: uniformize counter names Date: Mon, 13 Sep 2021 15:01:45 +0200 Message-Id: <20210913130203.1903622-15-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:41 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 32b03780-05d8-42b8-7165-08d976b6c632 X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1923; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6JBDPapyxcdNDrnC4VHtwDfbZwQiKjH732XZLyTB9R49Ta5i0IqVfp3Vd989ypHxJRq+g9WUTqn59S6AqCAm9LNOq0yaHQM6ZhkhX9TnSkLP2gIiUjTit8mIMj9T51i0FT/RX45J+wubW2sbvJFBI5yQkCw90vSk72EjLvIVtTEhwCipfJ1IwBYxZPUj0O47ysfKUYI3CJrjr/MYZFhJ1sbKnaRAQkoRQ6JFdFPt98RzhEtkpgzUbM/AT33dBdcmLf5h7NYVLtP1g2G/0JPMTrllQvdiCMhSEpA8/TGaXHqca+E1/G0qgMC+M//U42iXUapgHvoTIWEPJnBkZYsH2VSVNrmVFLd5sqEltT7AHlIoQFp9GA4RWUGIdP+cziKs/M1/E6GH/a5NGWJ04qdIMyxhrKXKPB7Iz9XH+y/akaRtw/7twptX9VzydEY/rx/PS+PHJCQUvZymSrn8D9rz8O1CRugjmVgYuNx3RrF6AZ44KiFOzHmL29WJO8S9JDC4Imcb6SZZMGx08eiUxYMPTq4HnFORmLmjkF9K6CGhyKoNkgtH+96POaPGNz3HRQHZpC1gSM8yKznk/otsdDncGZSPvG1xAxM0suYcvIyz9fmOHMIiAVlpdJDffGFUpV/c7By1UgyY/DhNqeXS180CzUV/iGTcVHz72fIWVQTPHVEK4R4WPRVomI1vaehFqu6uKDYzO+OAKjxuNh3uyFHxwQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?dsWqief72Lrlfez2+GTAfPDyz?= =?utf-8?q?t7usIOO1ibODit2Z1GKEgrGtawd9m1pGg8nCdB/aVwxB1BOKMDvVEvGn?= =?utf-8?q?fVOsKuAMuobdd4p8IVpODHla2a/vKW5jYQ5mTTJJL3dH4mfdUiN2W876?= =?utf-8?q?nT80wZm4wGCyLSh3MVUn/Dp8BcEukVB4MdQJlXgbEs2WeHsoWhRTMHRs?= =?utf-8?q?ZtMDgW9/6I21EURu3XbgHKq4L1DJA0pzCoHDrULP1M9VHIMuerrI/xB8?= =?utf-8?q?TzPmFduHoLYZXifuA+eIlrWjgB9tIyxyZa9DEgUL6kmokE7s6ltRMALN?= =?utf-8?q?zHFOLEZJOGjOeCyByP13c2U5KzZWeQzARYwFh70srMlj3JHjlEp66R1g?= =?utf-8?q?v2KqlVId88NUAivvvlqXFo+XkmtvzOtH/cUsy8V/DHQDlcHRu5OmBRcc?= =?utf-8?q?jWFPh2P1VnSrZOCIF+lgvFcI5tR3lD71URMPCEbde4OjoWp4ZvPaZ7qn?= =?utf-8?q?ehcDQqS0+A6N0b3DvMa6kkXhGSVX5KYkw5nNvmozYmZkw3rdo2zEZ0Ff?= =?utf-8?q?E3aIPSNa/I7895jskM8t8xBV/lvSueKSGj5LCr6ifnVgrOy6Imrl/kmH?= =?utf-8?q?eLGvAwgjSfkfZlXB5aDsJiD91Wrq3EJXvk1Kl00qB0OiYg8KQhb6g9eW?= =?utf-8?q?1Bu7r0c2thEaHE3p4/ISeGO32HSTJ1Q5PYYglJ9JLf1aT4YqSEgRXBYy?= =?utf-8?q?ok1OyC9+NL6en3XmcSWWDYkRFuD/+GviDE9c+JgzR3Ul3wEzNza1/U0Y?= =?utf-8?q?YAuL7dHlzhEKZdEW/ACjclj8tcsWauXaegrQdZnsyaoADt6tQjXE6ciF?= =?utf-8?q?ZrsoyUukGYghUb9mKxi/OvSOqMBc2pqJnbKq3lCunY9bsElb4zDm08WP?= =?utf-8?q?QbwszbOAaql5T2AK0CfnhwDQRGjmjfO0fy7+5pgq2E0Bg6MpFLEbqXX+?= =?utf-8?q?MElHN4dicyWwX3n9wC6uDxQaRwLQBtjQZtE0j1LHTUG6GUlJhmWLct10?= =?utf-8?q?ns2M3Wz0rM60LK6Ey/urC1ZhCYLekoLYC6FWlVZlloXolCZglWPbH4Ry?= =?utf-8?q?U5KodGPOHl4y926+c4mfXCCC/KUyWRWXugCT8jEoUlbqrrDc43yHkTxJ?= =?utf-8?q?pfzg0OD54fiwd/RPift9nlhb+zFfII83zyF4ee9MKkM4DbxBtJWfnkmv?= =?utf-8?q?HJzCTMQnBsxPCUdxIi41QxEUe+i/L7MnoZ6pbtFyp1Ak3/Xq2DfnupAA?= =?utf-8?q?WWAzie7m+NIeG2qHeEjVS49Lyc6ep8p3M5GoPaDWua4Xjbl8iMec0qRO?= =?utf-8?q?AWm5y3n5ciypAOWW55qPpyu/TTNjQjdKcP1V1IlLT4mqXhE96EruWMW/?= =?utf-8?q?UDjxUGxFUb0gMvRTLfn6zEkvnjpLzaN?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 32b03780-05d8-42b8-7165-08d976b6c632 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:43.2195 (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: KQvMqAonKDEcgKx5ETFiLNgt7sFngJu+CaROoIvAePljjTfVEZkaGtHgnGHyDqe0wbXgr1KuFFYzH3eyGsehoA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The device provide some internal statistic counters. However, the names of counter were not very meaningful. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 45 ++++++++--------- drivers/staging/wfx/hif_api_mib.h | 82 +++++++++++++++---------------- 2 files changed, 64 insertions(+), 63 deletions(-) diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c index e67ca0d818ba..16c3f55f1a3d 100644 --- a/drivers/staging/wfx/debug.c +++ b/drivers/staging/wfx/debug.c @@ -82,36 +82,37 @@ static int wfx_counters_show(struct seq_file *seq, void *v) le32_to_cpu(counters[0].count_##name), \ le32_to_cpu(counters[1].count_##name)) - PUT_COUNTER(tx_packets); - PUT_COUNTER(tx_multicast_frames); + PUT_COUNTER(tx_frames); + PUT_COUNTER(tx_frames_multicast); PUT_COUNTER(tx_frames_success); - PUT_COUNTER(tx_frame_failures); PUT_COUNTER(tx_frames_retried); PUT_COUNTER(tx_frames_multi_retried); + PUT_COUNTER(tx_frames_failed); + PUT_COUNTER(ack_failed); PUT_COUNTER(rts_success); - PUT_COUNTER(rts_failures); - PUT_COUNTER(ack_failures); + PUT_COUNTER(rts_failed); - PUT_COUNTER(rx_packets); + PUT_COUNTER(rx_frames); + PUT_COUNTER(rx_frames_multicast); PUT_COUNTER(rx_frames_success); - PUT_COUNTER(rx_packet_errors); - PUT_COUNTER(plcp_errors); - PUT_COUNTER(fcs_errors); - PUT_COUNTER(rx_decryption_failures); - PUT_COUNTER(rx_mic_failures); - PUT_COUNTER(rx_no_key_failures); - PUT_COUNTER(rx_frame_duplicates); - PUT_COUNTER(rx_multicast_frames); - PUT_COUNTER(rx_cmacicv_errors); - PUT_COUNTER(rx_cmac_replays); - PUT_COUNTER(rx_mgmt_ccmp_replays); + PUT_COUNTER(rx_frames_failed); + PUT_COUNTER(drop_plcp); + PUT_COUNTER(drop_fcs); + PUT_COUNTER(drop_no_key); + PUT_COUNTER(drop_decryption); + PUT_COUNTER(drop_tkip_mic); + PUT_COUNTER(drop_bip_mic); + PUT_COUNTER(drop_cmac_icv); + PUT_COUNTER(drop_cmac_replay); + PUT_COUNTER(drop_ccmp_replay); + PUT_COUNTER(drop_duplicate); - PUT_COUNTER(rx_beacon); - PUT_COUNTER(miss_beacon); - PUT_COUNTER(rx_dtim); - PUT_COUNTER(rx_dtim_aid0_clr); - PUT_COUNTER(rx_dtim_aid0_set); + PUT_COUNTER(rx_bcn_miss); + PUT_COUNTER(rx_bcn_success); + PUT_COUNTER(rx_bcn_dtim); + PUT_COUNTER(rx_bcn_dtim_aid0_clr); + PUT_COUNTER(rx_bcn_dtim_aid0_set); #undef PUT_COUNTER diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index b2dc47c314cc..2a741a37a90c 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -133,61 +133,61 @@ struct hif_mib_bcn_filter_enable { } __packed; struct hif_mib_extended_count_table { - __le32 count_plcp_errors; - __le32 count_fcs_errors; - __le32 count_tx_packets; - __le32 count_rx_packets; - __le32 count_rx_packet_errors; - __le32 count_rx_decryption_failures; - __le32 count_rx_mic_failures; - __le32 count_rx_no_key_failures; - __le32 count_tx_multicast_frames; + __le32 count_drop_plcp; + __le32 count_drop_fcs; + __le32 count_tx_frames; + __le32 count_rx_frames; + __le32 count_rx_frames_failed; + __le32 count_drop_decryption; + __le32 count_drop_tkip_mic; + __le32 count_drop_no_key; + __le32 count_tx_frames_multicast; __le32 count_tx_frames_success; - __le32 count_tx_frame_failures; + __le32 count_tx_frames_failed; __le32 count_tx_frames_retried; __le32 count_tx_frames_multi_retried; - __le32 count_rx_frame_duplicates; + __le32 count_drop_duplicate; __le32 count_rts_success; - __le32 count_rts_failures; - __le32 count_ack_failures; - __le32 count_rx_multicast_frames; + __le32 count_rts_failed; + __le32 count_ack_failed; + __le32 count_rx_frames_multicast; __le32 count_rx_frames_success; - __le32 count_rx_cmacicv_errors; - __le32 count_rx_cmac_replays; - __le32 count_rx_mgmt_ccmp_replays; - __le32 count_rx_bipmic_errors; - __le32 count_rx_beacon; - __le32 count_miss_beacon; - __le32 count_rx_dtim; - __le32 count_rx_dtim_aid0_clr; - __le32 count_rx_dtim_aid0_set; + __le32 count_drop_cmac_icv; + __le32 count_drop_cmac_replay; + __le32 count_drop_ccmp_replay; + __le32 count_drop_bip_mic; + __le32 count_rx_bcn_success; + __le32 count_rx_bcn_miss; + __le32 count_rx_bcn_dtim; + __le32 count_rx_bcn_dtim_aid0_clr; + __le32 count_rx_bcn_dtim_aid0_set; __le32 reserved[12]; } __packed; struct hif_mib_count_table { - __le32 count_plcp_errors; - __le32 count_fcs_errors; - __le32 count_tx_packets; - __le32 count_rx_packets; - __le32 count_rx_packet_errors; - __le32 count_rx_decryption_failures; - __le32 count_rx_mic_failures; - __le32 count_rx_no_key_failures; - __le32 count_tx_multicast_frames; + __le32 count_drop_plcp; + __le32 count_drop_fcs; + __le32 count_tx_frames; + __le32 count_rx_frames; + __le32 count_rx_frames_failed; + __le32 count_drop_decryption; + __le32 count_drop_tkip_mic; + __le32 count_drop_no_key; + __le32 count_tx_frames_multicast; __le32 count_tx_frames_success; - __le32 count_tx_frame_failures; + __le32 count_tx_frames_failed; __le32 count_tx_frames_retried; __le32 count_tx_frames_multi_retried; - __le32 count_rx_frame_duplicates; + __le32 count_drop_duplicate; __le32 count_rts_success; - __le32 count_rts_failures; - __le32 count_ack_failures; - __le32 count_rx_multicast_frames; + __le32 count_rts_failed; + __le32 count_ack_failed; + __le32 count_rx_frames_multicast; __le32 count_rx_frames_success; - __le32 count_rx_cmacicv_errors; - __le32 count_rx_cmac_replays; - __le32 count_rx_mgmt_ccmp_replays; - __le32 count_rx_bipmic_errors; + __le32 count_drop_cmac_icv; + __le32 count_drop_cmac_replay; + __le32 count_drop_ccmp_replay; + __le32 count_drop_bip_mic; } __packed; struct hif_mib_mac_address { From patchwork Mon Sep 13 13:01:46 2021 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: 511481 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, 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 7AB6FC433EF for ; Mon, 13 Sep 2021 13:06:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 63A086101B for ; Mon, 13 Sep 2021 13:06:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239312AbhIMNIF (ORCPT ); Mon, 13 Sep 2021 09:08:05 -0400 Received: from mail-mw2nam12on2056.outbound.protection.outlook.com ([40.107.244.56]:27422 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239584AbhIMNFV (ORCPT ); Mon, 13 Sep 2021 09:05:21 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VwYuzr1zmhvN7IdWRD4ShyJ0dk+EjwT55EnLrmsrM9uoGcC173JtA9T0NFvtloWe3/B//YCzYfW1AAdZ9c+ozRo9KS1eHp98Az7aSbeXGUx3IX7daPGh8PwSAjEqN27slx8/KucNRe+/PtHS0RHngcGO9QEpiwTzJlUy36naCEHlHtchEGaa6NQK3N2gx8gNaW3poS4AH4/PKqGOr47eqZoZ+WeDNvdUsQ8PByHnC5YMR0CI1jVtPFZJ1VJXl/9EZU8Jn8EzBYmSemP9cFM/IRp09LFlbEnLCpa70z0sdwaUgBmifBE/GY5NWBqsEKnI7acD/aiDItRkcQfw3ywRwQ== 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; bh=RWqshuUJt4MwYDZxaRfz3PfeusUa7v9Ig5zzMvV5bCw=; b=OCKhJFCiMFYPBjASNMbn0N0Jp8eT+mDuf4LqZCK2J2bSv3cvLMcSn0uZmDm5kyDnmJY60wpuP4L2KuhSK21qVd8erK2sC/JHbQRIuUfy5jdLnD8vSfQ2PLTP4hPGOlh3/BycnTtz42307LaqF07n+/Ua8+1Ttt5SrDvL3iSuWWCqKS1jm8OFp9OxXvLBhvEbXvaefAHk+Bqw5/yc/06A/fNfbKQElnFvTSplpquLjm78ZS/rnQU/+1IsH4RP91DPP9DlfAVIn3BaYGZodelyiMtiftjMgarmTrFVTnxw/lngtfV5EkqPNjkatD8bGbKQS4Wv26/Lxc89Soi5JGh8TQ== 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=RWqshuUJt4MwYDZxaRfz3PfeusUa7v9Ig5zzMvV5bCw=; b=K8m1NKXEZAyqqXDOGn6VGIMljRDIYqJoM+yp1KJ+PPLHc5X+zZ4LJYT8UUArs1MRKwrsJrFt/rn7+mcq31KB2Bqta9OAfvw56DdExYuUzU3tQ3s8M7DXsZbJLmLwnEDJJSQ0R0DMvPoUStOdjyF1cu5tB8xkOToC8/nA/0Xu0Eg= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:45 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:45 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v3 15/32] staging: wfx: fix misleading 'rate_id' usage Date: Mon, 13 Sep 2021 15:01:46 +0200 Message-Id: <20210913130203.1903622-16-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 97a2113f-a959-4011-a7ca-08d976b6c742 X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3044; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gdMPTenJ7ROZ6DxZtfrlZqwMK6JMU6rBRUQvegAmMzgMV+1yT8JCT0O7NXAUk3linGL3VRL/yeiA+uTjeT7Dhg9RE+cEEg+OZlUElfhAZxdXL8Ogy2QhPcyIHNd3tGRke8sHu1eifzOxdIXBY6T1vSyUEWsH5JoDmCtRfrx33k9VSYuWa4n0vQhdTg3O+CiOO4AWz1MfQpiuxcyfhpwWWCKY0dBtfRDTtwzelQnVwytvQjPwkH+6q7aEq/uDIFDw2LAMYMaRgpQwQTuK6hIQFJnBga7vCkstnWNKV9eTTdrUZydhy4r8BwGM462mMf0ISqE7Pc58LsUWHG/tCHOQHdjp05u8+MdBgYiWy7FqdKxIjvaVc3ozImbgMs1rQMJVGmkVUB7C7KDlEwKVc+arCr21CW2Kgy8RTNQKx4I+MyALmX5mDCEltCHlgXouu4twThs2KVpteYb5Asg3zwqRPqX3JYWPW9xhFnOchxQMb5FGbpEud7Yydfuh0LMTULssI18hmDdf2fRSunuXYQ9iDfI0jyH5yoRFgTNeXFaWk68RQ5oTgI4ULp+H6Eh3GnYQ5RFatXTx02eViV3UaFBWuPoOKagVRBxGeP3RjYXZjViQIXko0FJrv7OzN27EfX7xFDEPM2e2R9RhLKV6sBvqkpex2xrE7TAiQDVRuRtF8+t0Z0kXiwSMrv/gr5ezzxXFL4tSEEeea+s3uikUe2MsQg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(66574015)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?4Hbre91rzbirOQuNy7OJ5pekE?= =?utf-8?q?8my+InH941hZdWlYLPDAyy+5tGOPvw1VvC3ViO8AlzXqbh6gHLM9pXSy?= =?utf-8?q?f6G0s+9tA2DGz81EexRybeGXGgg//9UdTfsoJMIRGSqGOUbOiZl0YEm2?= =?utf-8?q?PV70i99RIbm640Jci94+LxoI/DPiTUGlusqQUfosxbL8rb4nvOdEfT9Y?= =?utf-8?q?LZkR/VEMQxb7xDLtEu2IfLF205dq5ka2FFH1DYk0h2FOwCNIpWpi9OTA?= =?utf-8?q?Kqce8gFklpcB3cAPdPTno1mKiEX/ncHzvx4moaK0JbsY5D5fDufChmU2?= =?utf-8?q?fo2VwcXz4fx3RtqwOznnSHjGYtCe9d+Dh5Zj/7c4Fu4BwZqNf6DuAlgf?= =?utf-8?q?C4b2AhhBD+OGHTP7mO7knkeTDu9aL9ZfHq6kmLjPiB+RhigDA9pkGHKx?= =?utf-8?q?CHL7pK8wh7tCdGgniOKrpqKwGVcy2/Mb6b5ajVT5zRttEyHRkFtmSu0N?= =?utf-8?q?QdqkAV79+KAY1vPqn2SLBec/g6+sVY1CsJzzPsoQUIDyv8ly1HONa3y1?= =?utf-8?q?Ie/0scH0l7VwYIqp7efWgTdAU+GBLFpCE4HDEccUOjTW2SiDjbZCQmSk?= =?utf-8?q?Jwfh/Qv5UttNx1TDP3RFLQv5Cs85KEqr71rg9klCotdkRVlB6QowGpPq?= =?utf-8?q?+xUu/P2e4wwTKc5lpsVR4EoelVMJtvU/e0XGbxsdXruLAwbrHIAsJ7a+?= =?utf-8?q?wgPt/bMXoPOi9A+T/frv3OhNCAs2N2ukn3YMoaU2Fjk0OPq4GJeACfQT?= =?utf-8?q?d4CvvRzfyQXq/CMEpQC42+Fj9CjXSkk2jk6i4p8ALXVQc/W45GjIbGpP?= =?utf-8?q?0RapnbK4lZAvh5Tq2sHKy0r6Ld7sdkDaRWNKpX+qoNydiZnbHREJdEJv?= =?utf-8?q?BqLi68AtnfRd2Qfpc7WCK/vVXyrI5U1W6fjbsSPM1+RLoKWAuAybCX2k?= =?utf-8?q?JLoy23khQdDNVHP761WZM/u2GChU0lG1gbc5BYCxx80BSyMmzQ+HYX3C?= =?utf-8?q?EwcgYeB5FcD3n90kpwlB6oZx1Rgue6J8m+QxjG+Xa4Wuo2+UG/StmRf5?= =?utf-8?q?oNTb7XarLLK4hehta1qIgTDI8DMAnNtpHZMjjEuwVnjLMYiJka4ho5Ez?= =?utf-8?q?EbA0USfnli8VunDWmY4zUk7c4P95/hi9ftW/f1QIMU4izGT4/7CRqGyS?= =?utf-8?q?XUQLNJ/yRlzOF4f0xXF25hmAVMouN/aK4KWigTA2vKXNxEZiZctjFrL7?= =?utf-8?q?ujkgI93f9Yt9xlefwo3/eI5BUIu0zazOe0uPG2rN4rFuF8WPr2kxOm1e?= =?utf-8?q?6nJ+rMe92E/pzh3xI2998HK3DsM/srKzSAwqoniLNuiA9N1j6PNgn0Yn?= =?utf-8?q?fqGsmISPnJztinHZYQG33pZzKFq+UdY?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 97a2113f-a959-4011-a7ca-08d976b6c742 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:45.0414 (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: mafIeMLxNHRO4gI62cQW9EViLLxjLUKbDwZ0T84QI1sOGkZ2+g66eJiJNy6rwk4jyUnBVSIkvkB8PWA6TrZZ7A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The driver sometime use the term 'rate_id' to identify a retry policy (which is in fact a series of rate IDs). This is misleading. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 77fb104efdec..caeaf836147f 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -285,15 +285,14 @@ static void wfx_tx_fixup_rates(struct ieee80211_tx_rate *rates) rates[i].flags &= ~IEEE80211_TX_RC_SHORT_GI; } -static u8 wfx_tx_get_rate_id(struct wfx_vif *wvif, - struct ieee80211_tx_info *tx_info) +static u8 wfx_tx_get_retry_policy_id(struct wfx_vif *wvif, + struct ieee80211_tx_info *tx_info) { bool tx_policy_renew = false; - u8 rate_id; + u8 ret; - rate_id = wfx_tx_policy_get(wvif, - tx_info->driver_rates, &tx_policy_renew); - if (rate_id == HIF_TX_RETRY_POLICY_INVALID) + ret = wfx_tx_policy_get(wvif, tx_info->driver_rates, &tx_policy_renew); + if (ret == HIF_TX_RETRY_POLICY_INVALID) dev_warn(wvif->wdev->dev, "unable to get a valid Tx policy"); if (tx_policy_renew) { @@ -301,7 +300,7 @@ static u8 wfx_tx_get_rate_id(struct wfx_vif *wvif, if (!schedule_work(&wvif->tx_policy_upload_work)) wfx_tx_unlock(wvif->wdev); } - return rate_id; + return ret; } static int wfx_tx_get_frame_format(struct ieee80211_tx_info *tx_info) @@ -382,7 +381,7 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, req->peer_sta_id = wfx_tx_get_link_id(wvif, sta, hdr); // Queue index are inverted between firmware and Linux req->queue_id = 3 - queue_id; - req->retry_policy_index = wfx_tx_get_rate_id(wvif, tx_info); + req->retry_policy_index = wfx_tx_get_retry_policy_id(wvif, tx_info); req->frame_format = wfx_tx_get_frame_format(tx_info); if (tx_info->driver_rates[0].flags & IEEE80211_TX_RC_SHORT_GI) req->short_gi = 1; From patchwork Mon Sep 13 13:01:47 2021 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: 510227 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B05FC433F5 for ; Mon, 13 Sep 2021 13:06:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15ED460E9B for ; Mon, 13 Sep 2021 13:06:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240204AbhIMNHx (ORCPT ); Mon, 13 Sep 2021 09:07:53 -0400 Received: from mail-mw2nam12on2088.outbound.protection.outlook.com ([40.107.244.88]:10209 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239312AbhIMNFZ (ORCPT ); Mon, 13 Sep 2021 09:05:25 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YRgG63c4iowjpuW3/KzFK6NxYP1uWrKHTVUrwvKv55uYq9CPZchwuBcF6Op2SqWvMcmGy01KMNVULjBKYKYZVPK6Ykm43Z67g0yt1DYFgu20oRisVReBM6zxNNmjrVQrm8Xp3nbPZNSwCSr2Q9A8kvNS/8+RKfpDb6d/mjWH47OTNUgPRsDW0xU/T5cmfhS9+GUGeP283nhxdXcKzwQb9fkLtztenSWTmuYkkng/KJtL4YKEMjR179HESMq3RF3Uu5aFso6UYfu5awsDD1ZKZuBZ0K+Ha9TfaoesZOaH1ECAW01JPCwUBXZhw0Rv4kO+GnM2SN01/eTczMPiyk3qzQ== 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; bh=dzwEfQZKRI3oV247NU8V2xMOFhCemH5anBJ8Bdc6bfM=; b=av5L6wwirrnktUofTSQT1xvOUCikxDKCWDIz/TObtEPACtF6H7v9cIR+PeQm2OU/KU8vui17Qmutng0W6gA7GpQlcpOJ47wnLM+zJs/IJBHhaBsCPV4nPS1nAQ0UlMNbm+Iyj0C8HaO76UVaDuGLeYUmxJpZpXMhfcM7kgNDfTQ8WkMIuzfI9CQ0hsR8fKb/xsoXlaPZl+vh+/pr4VCM6PDo3uBV03DP/IcGOOWUej0084Z2IJhBSfuazhaigissTz9RtT77O/pCAJtAtMlyTKVuYPL6nx+pxvQ+uJ5tBUSflz5NCPZeTxnR13BSxLPh+LEuo+o19c41r/sAvWwyqg== 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=dzwEfQZKRI3oV247NU8V2xMOFhCemH5anBJ8Bdc6bfM=; b=HPd1nMwgkSIuWFbg6cmi/JlLxohbBM2dR+ma5GRx32u5nIh3OXbx7bRzipIndBl/QUHgDG6GeZZ86TbrpHzokfyDkVkirs1KhC3ZV8crwDCiJD3m2pUjsgSsOul0hQUmr8unW+khdHc3xtmOaKsXhdkZy5AcoRBmhRuzJBrXIX0= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:47 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:47 +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 v3 16/32] staging: wfx: declare variables at beginning of functions Date: Mon, 13 Sep 2021 15:01:47 +0200 Message-Id: <20210913130203.1903622-17-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8bc80ad9-17d1-488b-a9ac-08d976b6c858 X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Vr6dfzs8y+LxmxbbULt0S3j73It0G8MOJW8qHC751shYzO5YONksOs5R5yHr6lPXS0wo5S2mg025OQnX1DTseA0vUpIzec1c/NQ6MHgMW2/YGdNfZ9wURVYkggUY/7Oez9wtSkJsMA4NCSjkfn/88vwzDOdh3pWb67fwU3M42wV2C6W1CfuM2Q/hI7LfpRsbDdrmv4PBDmP8LPfZVZ/MfXfANyNaaE3zsiymuhGfkCRi0pc15VjoEo0Cixtkqt0F0l0SS2MivGk4cYfG74hGBUcFw6Fl0syUMTuuQ7K3WL/JIdpc7G0qZsFmuGbwMP+jcP6PwE0OR90h5MSGpv4NnZ2LDo3xmIS9pKS/zK8aIGAJ6ZYM0XR6hX8dlm5cFrpqpCzR493h8mGJpEJc3Eqh6qDUg835Q4FrDRMueXbYV8UR5rKiK9pjSat/NzJLjAg46m7ug51mqYpoNS2bx6aoYacq2q89i1XQUaiRNPjUuV720JOvVpQ8+BHdyYrgHgVYexauibgiR+2OkMJuvkfgcdUSj7ao8LxzFFBAs6Vmjp2MnBq2OHTYjQ8tFUVVyIuPhz6FbgGkPlHV8VJ/6/tyWyeiAY+JgPrkxOtLm9o+YeumjTP0U4z72OSPGMDE1S3kBOVg2E2aFoOE55ziKya1Kd2B3gOc6CJu2M4H5quyMUo3uT6UBvBJ1Vo9gkZ0e17PKqcugvbKIrUB1j2G8nubig== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?2i/mL46LnkUAncLp1G2oDjKTB?= =?utf-8?q?nWd96pKim3rS/d0+nCGKBsFHJwIU9d0cWLIkqHm+zZ7nxx1Dce79Tw6u?= =?utf-8?q?t58TnH1b3AU1qw54IBKA4qfXoqep3TvwLQ1g8lmEDifXd3LzB7zJGXyW?= =?utf-8?q?IMwqmrNhSFtOKoanTDOR5E9MWTUtnZE28/nEi0MHI0mzxeoghkghW7NP?= =?utf-8?q?xmt6uhOOTPzr4I9UBA8cKEZLfN/fqtl/tnKaSPK7Cua+7AmtUJPiDA7p?= =?utf-8?q?OTK4vBjVJYMlbNopACiNdU9peAUXttbS29TqyWfHbkprwIfqQjqO09uI?= =?utf-8?q?IedGPvC49ye80rNQREKNJCOwqlcJp82Lu8A66Vi+wUpxiF0pi6Wm8atH?= =?utf-8?q?fjedz+GnFLzxhtLhj6170/FLAsjubJ5FsCAt3mAv3JjNcVATS/i9/RSS?= =?utf-8?q?VwbJkNYTN9Wgj1mAQstzRgozMHTbihwjQKotvVswthmyxJw7gUtCEvTi?= =?utf-8?q?T4nyovd68u8QUm4btO/Wz3imrhIVSB1Qy3nIEcp8mityAy1qgWyXrP9i?= =?utf-8?q?mi7LYs44XMKY46VRDaKzbBozJbmYOUjhBPqOHTjZ7FvCpeHzsQlgpKO9?= =?utf-8?q?Rg+gxZpcvNZg9YznHfw7YQstj+iwgfsbme0OiT3ZrVpt+dq6WWCUjVzY?= =?utf-8?q?DToPuE3Fa20AObrxHcnj/YQbteD9ZREFnNfT83KVl4k/pDRJeGMJ0tOO?= =?utf-8?q?rVFR51KqUl5UN9zsISqGd3YVH7lehxU5qqkxJWRnvRNqDIWIrrnGIJ06?= =?utf-8?q?6evCdtV/mYrIC85eeX8/y8Q0iOm/zykXxGqjENsRPpSZ8MxXf3OvBGqR?= =?utf-8?q?VRCsAGc0Klk9oObe7mfxACNxiFkqB528J94TCKEkrQdxMDg4VevCbbFt?= =?utf-8?q?HBE5Blvb6Tt6QqZl8ImyKyxZH3l4+IOF6l3ahEM8H0AkT1CpTQDZ51rW?= =?utf-8?q?CD756JMsaLxu44n5GQSGYrYbXh/NtZYx5zvciXwcuMFDzMF5c6eUNvJk?= =?utf-8?q?Ja81FIZmvVNj+8CBkKh1P7XBthFdNnJlPTp5aAZVm5ZzbYGDRptAXqCh?= =?utf-8?q?e2c1vFMxD/afYeg8cfleXlX254AOWyesBON9fL3vVmjzzP4poeuU7OgW?= =?utf-8?q?bqGnmuBfxloYRzQiLkpP/NcxBmVEJJL8m2lCzKN+LmxQDQwlyKc4lHjm?= =?utf-8?q?Yjfq4J3r1HCCZjK4m1o6MbzwPy9RxiYbtf3l/dHKDYQ3Zj0YCZU5mh62?= =?utf-8?q?oeT2NClmmGzkXGz0s1EG56gtzvfoyhy8Wbi0IFR7HjTLAlOy0zPYZawJ?= =?utf-8?q?GgiptvpU9uqjAhZYyXZjkzkwvdt2mkge5qtMEdFa1VjA/CvEpiq9o7FN?= =?utf-8?q?49IcQd8wKSnscis5jwn9FsBjzjj9uwO?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8bc80ad9-17d1-488b-a9ac-08d976b6c858 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:46.8424 (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: IY+0GqnpkmfzLF+NxEvNB/Ssyn/49hpwQAR1BuQ/F9LcnE0kxf/ILvKYfpYlC8quY9Yxa3I87ktURH/acn1DjA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller For better code, we prefer to declare all the local variables at beginning of the functions. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index caeaf836147f..00c305f192bb 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -108,6 +108,7 @@ static int wfx_tx_policy_get(struct wfx_vif *wvif, int idx; struct tx_policy_cache *cache = &wvif->tx_policy_cache; struct tx_policy wanted; + struct tx_policy *entry; wfx_tx_policy_build(wvif, &wanted, rates); @@ -121,11 +122,10 @@ static int wfx_tx_policy_get(struct wfx_vif *wvif, if (idx >= 0) { *renew = false; } else { - struct tx_policy *entry; - *renew = true; - /* If policy is not found create a new one - * using the oldest entry in "free" list + /* If policy is not found create a new one using the oldest + * entry in "free" list */ + *renew = true; entry = list_entry(cache->free.prev, struct tx_policy, link); memcpy(entry->rates, wanted.rates, sizeof(entry->rates)); entry->uploaded = false; From patchwork Mon Sep 13 13:01:48 2021 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: 511483 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E9E1C433F5 for ; Mon, 13 Sep 2021 13:06:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ED1E960E8B for ; Mon, 13 Sep 2021 13:06:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240224AbhIMNHT (ORCPT ); Mon, 13 Sep 2021 09:07:19 -0400 Received: from mail-bn8nam08on2055.outbound.protection.outlook.com ([40.107.100.55]:54369 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240214AbhIMNF1 (ORCPT ); Mon, 13 Sep 2021 09:05:27 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nddEfKx6wxTYP3fTe5m7mV5BI7LJnNvAafe3xxKj5mnh18BuXBe2E+DPTYkcERy83C/3eBd9m84yH7vFCetctMQn7sdacwgjWuQ+ATRZtpO3fiZw/aU5ReRhzeZL1hcaxEMpjhl8RQiTh4+C+2nwZYn1M0MXWNnc1hb+3M6oTfpgzSmS5ML2k1fKV3JvJfFbKimkvkBqV1cg7NV1G3zdGtQbDf1/2Q8GYLPHSNXRqANmo717LXckjYHDnVKUq/lw9b8tCvSOYW6ZJl7rsnZF08mVIl0AgtnMmdxbL0sGGy++C8uCf8AbddIFDVExWlCaBhdB087X5zLx4lXuopQp3Q== 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; bh=NVQa1Hl+G/9t4WPq9A8FoAFRyiuHTVPsPDclPMhrcNY=; b=ldOpjwK9JAnij9f3NaDKGVBYDtLpyCRS7mRJj1TbD9aoj2M6zfaDZnPxxpaWdEOySh8JGH+PVVcoHzqz9Q0dkibxAibKWYh8UXbeuzeyKFxyxoj35+fivogT3MMSuVTL12051LTHFJ17SFVG79m7Tkfi6ITB9b/8loYbURNvFCXhL7DYDf4A7WM8xrshh3gGz7+SqZYNWK36JWSVi8HC2D4U4M1zPiHCyvNv0fGFgYvT5jCK7Em+X/d/tjG7mmXeq54SoTN3DM7khhwZEzaZ41qwRgEXOlbl+bN6W+gXukfVSo2Be8az8Dh21h9m43ZqgGX33kM05IPA8MLNALMCvQ== 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=NVQa1Hl+G/9t4WPq9A8FoAFRyiuHTVPsPDclPMhrcNY=; b=ad3yuMhsaj9JSnKim0V/rFUCHeOmwwedM0H04cT9NRD0iC1JtaTHdTvIOMGktoJFMvLxWN1mAzFlWLKoFRICuPVKWiRKE0An31YRkVUP7b1WxBqYlyUweln1OIWkBFAqZk9Zy22DNw0o14y0CkpKd0kbTTFHd23ghHqVoHuILe4= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:49 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:49 +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 v3 17/32] staging: wfx: simplify hif_join() Date: Mon, 13 Sep 2021 15:01:48 +0200 Message-Id: <20210913130203.1903622-18-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:47 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 31d99350-ba92-41a0-8d78-08d976b6c96a X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2512; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gsRKnF0pb0cIQiHjjI/hdnwzII4TGfPCOx9pumC8p6PpIffAn96foX1Vr3lbKr9FW46QubQHtvOpMK/zdgYseo8qsVbBFghB5H89NylSlONuzuRErprHi1K5s//OfJ/D/ZcZ+1jGD5EKHbIp13EqGZgXxP5TxKG5sy30P4ZdBLozgaqZguvA58cNj3P/2E7y4nm7ccqgbBjTDmi8P87FZqomD4Hu5OIYtpzoIv3F9gsE1xe9hxg6ftQqRPgr5w8z5466e9gK7ngPyNYxPbvW8tLG1dA/2RWARKQTqJD4bEN8Q0xpw02z5db5TUyqiW7T6uWkQxlgzIUssHIe1xKVoq/yx2G7WagE+JV71UwsEf4MBGn0gX9Sl9DwHNB+EI2FXNmiSI/xmy5YaaUQNPA+QtUkao72Zz3oRhJfygFXJOcUmsa1+1vocpOOfYbTMbW2HimAR0TF4+uTD9V9DBDrvgJi2kFAEZsD2VeUv+gHti3nSd7Qis01lM4d9PHnXGcrD6LgU1HHitDe6ss2XRJ3vVHzBM0SGHUZKPzsF6pu1JdGNZW53C/KHEb/YrgivN9tUKV3tTETSkYYsBqHLFTBzRWRGiOSQmdDCbXcrAfgzYtGgosvde6U8g+2saNGPYFYmrgYaGadvPEuhIYOfZ8t+jF3OYKxGoxtZopdBCOplM9xoKWCGBlKOKzY0rvkz3vM9LVa0MWFIP35dNCi4/IJKw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(4744005)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?dtDj8Z2ddEMFxwFRCNO46TOFc?= =?utf-8?q?HetDjUlnFHhz9jmxSth3Ynm53HmEqDRM5BBnqvCxHdATvyiqGL+gpsCB?= =?utf-8?q?a59RAeTysPYswzZfSz7E4l6XHmP8nPc/3sWyEV/A7lFebTgvOuBxTV0y?= =?utf-8?q?f2PcXx7iJn3VYVYW8PoP7CbyQesGU8QODuR5zBnfEjSmV3X5nD7J3aFt?= =?utf-8?q?FICLUdnDhMViv4nHInnkT12woXKDvzlcZZhn/g4xCiOuAyw4OEiuexNb?= =?utf-8?q?FueqZP7nL+od5+PGcmapf6IUymu0vBOA+ppdvFOyEMUjdnmCIZtmeHxy?= =?utf-8?q?4Tsdfa1lgACRQQq2sROcaiHBSJvMAzRtTu+j5dTOmUixpqEKulXNh3lp?= =?utf-8?q?ptA7trk0Hr0nwjw7YdzLd2d0DUk46wPix8wIJGGGcaOGwGeQbw2lDRW2?= =?utf-8?q?VUOkZZG8vfMTS8uaHan8+VNXqDO94RZJNKVu23xkVTF5mM27grSvld+S?= =?utf-8?q?ByWflowKS5rZD4W8Xj2f7nMXCT0g6AH+ywvUDnMpQpWG6L4uH7DVGldn?= =?utf-8?q?uioVeK0oURqXpXHGY2J4TG9QgTi+fhRvXOgdK1W5tPr1Q2IGW6cEk9GA?= =?utf-8?q?2UbB6mi1CXdhKvjgNHyVFq7r/meAO2uxaQQzOp0fbktKaIs+3CO/L0nI?= =?utf-8?q?UuJkOrHenw/ZBLSdXJHWbebFmmqYQ67yisDAyvffYYLpp0Wp9G493vyf?= =?utf-8?q?hu2y6lnzU6JtD0QpZhvFVEVF57etv2ZIaOv/+UgVZeJYnJxi1+cbuvJ/?= =?utf-8?q?Zj8hftyaIHmrgnsZAL622rHkANjvYGluVY/66jmEgG8e/OFyMA0WI55d?= =?utf-8?q?X5hjQljUxpbYS7sPHRmp/orxuWG5hXR25ysV/yZcsr3AxC4BlgHwJgo0?= =?utf-8?q?UsuErKehk/Zn9UQ0gxcfrG4FIxuHMUOwsaj5NAOKI/PIp8I4iOGgk1FO?= =?utf-8?q?JjJ3UDICEQqLihbRT4OUpax52VyRFwxOWVVtgoz53iwBo74dvc6rNnTZ?= =?utf-8?q?FAaIDNyqdmj88JhvikpxxlqEo0xGK646/Uu+84A41CW0y4jYrtFiPWhY?= =?utf-8?q?EcVBSKlaIbRCMl21Hsw06sdDez/sNhIhLbqIMUCnJEnvcIpXuckmkcnc?= =?utf-8?q?g7+rxXpBlDEJyOFSvcOOTYLy3BFgGVwKHJ5+3k5+K/xo0dykSmwg4sJy?= =?utf-8?q?IZSCaOEW9j55bn7+0dCBfQNLD+w2rxNNeXbopWNIVu6WBhfHzEhDb+36?= =?utf-8?q?yovdT99i1x1+djg36IFwJc332Q8N1coHCCV6Cprl0ombdrkpJ9Isujyd?= =?utf-8?q?rvFaxcTbavPfaTmExXzLVhQ7pso/LtEXIxpSWuZBOeprGxCamncnoRqF?= =?utf-8?q?D5ZuRc3L4hyAPBPA92APupfd/hdl/Im?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31d99350-ba92-41a0-8d78-08d976b6c96a X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:48.9292 (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: ZGV7SD0RApLDhyI8UlSsMvRDThTGpJvlW/V8QJOXyOj3XCMn+XdmQDyB0/2KzXv7X7dYMZi841UeH4e5r3TjIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The new code is smaller. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index fcce78bb3005..c5ab1c2e1e07 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -305,10 +305,7 @@ int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, return -ENOMEM; body->infrastructure_bss_mode = !conf->ibss_joined; body->short_preamble = conf->use_short_preamble; - if (channel->flags & IEEE80211_CHAN_NO_IR) - body->probe_for_join = 0; - else - body->probe_for_join = 1; + body->probe_for_join = !(channel->flags & IEEE80211_CHAN_NO_IR); body->channel_number = channel->hw_value; body->beacon_interval = cpu_to_le32(conf->beacon_int); body->basic_rate_set = From patchwork Mon Sep 13 13:01:49 2021 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: 510228 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAC87C433EF for ; Mon, 13 Sep 2021 13:06:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C17366101B for ; Mon, 13 Sep 2021 13:06:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239364AbhIMNHf (ORCPT ); Mon, 13 Sep 2021 09:07:35 -0400 Received: from mail-mw2nam12on2045.outbound.protection.outlook.com ([40.107.244.45]:7936 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239855AbhIMNGB (ORCPT ); Mon, 13 Sep 2021 09:06:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QBFY77E3PTHGZOrwOItHHlhc5Y9UjVIPIxKQp3L7ZAaA7+yGnxuH0y6GiPCQm2vmvZpFPHv/nOsQHANbgZTI2CdK4c5uCL4x2widT8+QjAgpbEESIqarM79ICA8dm5eHVkPdp5EDA/htZ8GU6zOzdAkNLzFL13GP+smqRHUjJfBL/sLIGXAvebQvPZDwre9rcg30gGPuWmbRrrNHXgdGQ4Apbz/PjJvla9OhCIJ7gAFDR+2vlB9X0cx91nXCuirJw5WAZbB0sh8BblbRuzc39G0FsVuYCUtu9EQ152atoDCDOnf0YQmZHwsx9TmmxPKT+AqtMm5cgDH4Oi9Pi9eQSA== 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; bh=D2RF/Y6vM+Lj63470xCmRdZGPoY4c0kiDfF+JTD4zDA=; b=dXVHTZ/0ZvO8ySZ+1RZq0yHU/NxRdAI7w7MfAxNiaLTxkDkWCINpk99FbGJmhD7PGqPv3D+vUlHLGIgD8ID6cwxfIErf+uxkmfWBMDaGKXBLbjWEeRyuslHgyVUf3B2yvrkiBLz1VbsFom5ewAgQEgbWAlin4la3JuYD/00mrkF8cwJzFWTawLCDtOg46jaZPMz4OAR5GYjGzhJiFJE5MCL3+aEVHQRsI5dbnjB/abOHmfgT3Tkk/gn9ivpISVsiSEcNRfzS8+Qh/31rFgalh1s2TzVWqnb2ktoVzeMQXaI5iY4/31QaNSm7HGePHNSL++BkM4Yf/4boSkq5FzrMxw== 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=D2RF/Y6vM+Lj63470xCmRdZGPoY4c0kiDfF+JTD4zDA=; b=XwfVVd/I9pCJllhxQI1CEiQy09Zs84aDDfpcqhXx8Bife2UNyxLplUDCOJwGfDQtK2l40BavfUMDAShbY2LD0EzBm+vK/Hna+j+pkb5lsYK+RjQPAM2SpqKMbuHDNYH9wmyGZtOwAhfYDAa+hrGcoheEQrqcehhh1HA1a/EeOjU= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:50 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:50 +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 v3 18/32] staging: wfx: reorder function for slightly better eye candy Date: Mon, 13 Sep 2021 15:01:49 +0200 Message-Id: <20210913130203.1903622-19-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7ec4e442-4351-4801-5ccb-08d976b6caa8 X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:483; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: R0ghX04hdSNcbVuHVzoBC/p994LQc1dN7Z8++WYx+UOoMmWEXeFK1zPWfvJXndJ/SWlFMicxgCsZEs7I6UrE+blcC+n7n2pakNwLqEJxpKPZN8y1P5+zXSNlipFspjQufcJ7afJ7QAXRRlDuZ0isqz5naMnTXfPOu6POPweBHogsN5vF7FssmQUK6dDEP33Ibkcf9HvWhdDaY81KlSLnz1yDkdH1xYduOBiWztrefbcDRgOdA0mNIYskvkEfwIoJWyB6R7MnEnWB1SiqPspVIG6rsy9LizcFMHzsoyX3eTLZq0OjgpMBpS4BtX+eu3AWIgG/J0Cho7i6iRmbD5pGwUCJlvpkmMqnBbH7HEIxtsHvHbyTczH73ah5+pGfRBinpaTwSw1Pf7GiQ4GvXMINj5vNjRaqE6zAI0rQ3dbj9JAsP2GLV48rrTTGQn2T2kg/slTqo5yZc5yZOejRvCGYpuXfAON5z4m8RY/mapVy330Ug/uBs+l0pCVI/XSZHN8AP9LSHBG2eZJ2Z3yVPITP+60Q5ev9dDADjWAf520YaGcLyFkYfkUDq+7oIK9h60Wq4yCEOmbxvwNwggUjaFIhhRL3F/euyKEVJT9nNjFSIblUCyDjex0GIr+GHGIN0R0hDidMukCQQKW9UgkDHF+zo+2E1QbbTJJN0vR06FYF6Km/f6wHeD4X1JdCAmh5vQH1b5fcWaTET7qwt7kBsOQSYA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?QZu6NqyoW09BrUKKdQi/6F0L9?= =?utf-8?q?sIvO39KtQZ1+txy2/LPqddZ5ka6DIbb6SVUzVnyDqfdCaGT58dDxvaaC?= =?utf-8?q?Q6Pvf+IBRNakE4P90seFDK+ws+F3lWMH13tEV8oy/QzXTJVuOMd6hJcJ?= =?utf-8?q?1bDNIaq6IAb9RSumjUklOHeK9WQaUjo7YdvDXeGq3UpJmbiWGUXTmOiO?= =?utf-8?q?W+SxL+JIJv8iXIxXroGLf1DSeYK6+synQxqhmUK806s/ko30cnSlmysa?= =?utf-8?q?yliFjd4ikD/l9LVq/L1gN/8XSdEH9rz+hXhvflAMqHXh1Cov8jcuBRD8?= =?utf-8?q?JfFce4fwpnGRjQuEfGOreVVjNFWJfyZPqmfN/mt3SI4iLL/KAwhbD1CZ?= =?utf-8?q?9vDb18K/rg89SiPitiZJpcrUyjCoGgWFbTvhI9BwNCdfpPeBx3iPcckV?= =?utf-8?q?M9HX2NSNrJAfGpg5QL7+B12aybakWy4ZMDa+al2pNsylMHVqaGjn3BRA?= =?utf-8?q?NG+6a+CacaLlYOIUTBBTGDJ4djiRl6e5GqZmqlDZuAgQIBNpVOEZgGys?= =?utf-8?q?8+xfQt+X5hHEVhqCA9293h4fjA7ES2n58q0W0BSRt9HjdgYXPbQXYyUE?= =?utf-8?q?tJJMyV2Z/QwF0nOer0h+u5NWLboOK8q+zo/O+isB1LZgTtIku/IF5kpo?= =?utf-8?q?B/bav5FrjJTKErjusoEddBAOlHtB69EGLxDytiuqVrtFp0k1aqiVvCHo?= =?utf-8?q?wWR9TCfANgxf/6kYF4sMZ9WUukM8KaC5usgX88XqciM3heIfEzq3cbMT?= =?utf-8?q?o2kLxTLbU16GxxbIKqadsCaCqXJQbuWNhoYKJcs00XDFGIKx9FDfySsE?= =?utf-8?q?bOwd1vKfElDsM4S/IakhVFGAH66nB3x6C1za3w26lgO5CjIi3bKMrr5C?= =?utf-8?q?7vNdxOivZFMGPWedoRWiHBeDKYzADItu2kHbuce8eQYgRat70FcAQ6VB?= =?utf-8?q?W7yZkb/g40ovx5/6f4W6pTJqDt8kF8y6k6Wytog07BnjbFSXE5DK2JkL?= =?utf-8?q?gW0YkSzIJ0Iayaxn6ourRNq/eVXNa9cu9wHPKrWcvkEL1T/CHgiSfPrt?= =?utf-8?q?pvltYnUOya8C9QybVoy/wwOLdo70qmQCj89pbZG91GxqJ9xjCvAS0BhG?= =?utf-8?q?9QZ2IwwrkLAw7cILR0d78eP/66i5JLlB2ja4k+o04HQw1gZu5/zpmcjr?= =?utf-8?q?lcDx7n7f4c/sGGHkheAptW1s6u50mhtx8mY3Tn9J/R6B5HiHsdMJQSrp?= =?utf-8?q?Is9lqPMpzxX2+qkR65eX95m6rYf79U3DL4Lp9XqqJfCXZCHUfILUNM8a?= =?utf-8?q?T488UgHsKOJ7GLC74h7Sov1Vp26SeFdJ7u4a/qtxZQAtuNm1yxWAUrj6?= =?utf-8?q?dfVTZZq8Cnuu3duI6Stfv2YSL4Gyh2J?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ec4e442-4351-4801-5ccb-08d976b6caa8 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:50.7071 (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: r3sds/xBb3D8DWpImO4sz8aiBCfYQTqUhNz7l/+mHeE4Lxf3b3P56Gn7O+q4mu1uCUmy8zeY/PxPD60T2plqlA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller For a code more eye candy, group all the unconditional assignments together. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 00c305f192bb..77d69ed73e28 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -376,15 +376,15 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, req->packet_id |= queue_id << 28; req->fc_offset = offset; - if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) - req->after_dtim = 1; - req->peer_sta_id = wfx_tx_get_link_id(wvif, sta, hdr); // Queue index are inverted between firmware and Linux req->queue_id = 3 - queue_id; + req->peer_sta_id = wfx_tx_get_link_id(wvif, sta, hdr); req->retry_policy_index = wfx_tx_get_retry_policy_id(wvif, tx_info); req->frame_format = wfx_tx_get_frame_format(tx_info); if (tx_info->driver_rates[0].flags & IEEE80211_TX_RC_SHORT_GI) req->short_gi = 1; + if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) + req->after_dtim = 1; // Auxiliary operations wfx_tx_queues_put(wvif, skb); From patchwork Mon Sep 13 13:01:50 2021 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: 510226 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A33FAC433EF for ; Mon, 13 Sep 2021 13:07:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8D36360E9B for ; Mon, 13 Sep 2021 13:07:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240510AbhIMNIP (ORCPT ); Mon, 13 Sep 2021 09:08:15 -0400 Received: from mail-mw2nam12on2056.outbound.protection.outlook.com ([40.107.244.56]:27422 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239037AbhIMNGR (ORCPT ); Mon, 13 Sep 2021 09:06:17 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PAoxs17gunVKoXVVQNScYbBmksyC17a89wkOnjL5BJ0GtBSsLl5HLz9pEYhOU4MtfnGVaGO50VDznP6mKx9dbyPFEy/hmPzKfqR6uV7+2E/juho1DEN+5IZQEo127fW5ov6wfMhVqntkZLGs8u67E0xLLJcd2lxrHg9XY9maG2XDyyXVEQGvV/gkXTu0pvt5Tf56p3y8tPtlfJDz40yD1fh6jp8sAn5T9Wy5RbuXtAVNIkkkwkbXdqMe3122+L+Z3Lg2tgsRGkKORorpdA4gtgRqzpnH3J0BrqXqcT3hMkN2StNcaqxGB9XOWAXvHjTqr3xaYqJJpzosRvFHNHdiRQ== 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; bh=NeuP4ZGKysxm7prZcyq2SedkVKYixC5BJTpVRPC2uYI=; b=FY8i55wlIcGfFhjO6eDWD0WdqFarX1IFTaS3mbfG7j8xa5n/40csbQ13aDRpU6GJC/UahBLjS597RMVHuySYxeKj9rJ8lFefweiG+mQy3nWZ/oYujL9rGV6yCj28B7TdiTkgsDc0u1e5MO2S7Nn2itzU2xXaU21lgeR7BzbFzl8X90Y69Rj0Qc+QUckofJ1byh6KudUay4Q5tnO8Tk7aDvsD4su2JkY5layfgR7FDYRGnN34Equn8IzVjc2tIgyY1Oa6lU0unPgnYs29ohYglCPUChdVfdBCAwy3XZ8qNGy7Xocypj+5X7wRVzeHnEAICsbwuyxNP3cC1Vsmq4UEBg== 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=NeuP4ZGKysxm7prZcyq2SedkVKYixC5BJTpVRPC2uYI=; b=HTowKYxINM0jjdJoNUgY+eGkKgJbiTZ6nD9NUq0AHbDX2yGJ6HMKS5n6nDdhDk1uiMBN5dR0d3Ndz84Xe9H5P7TyRq/GaeQVn5wqUdmnQpY924rDdfxqGZWmj4otMy8wWvzRfZKLroIbrGDPP5mLWY145yMbWWOUPtd96WeVTL4= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA2PR11MB4860.namprd11.prod.outlook.com (2603:10b6:806:11b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:52 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:52 +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 v3 19/32] staging: wfx: fix error names Date: Mon, 13 Sep 2021 15:01:50 +0200 Message-Id: <20210913130203.1903622-20-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: feaf2996-5cd3-4909-7d70-08d976b6cbb9 X-MS-TrafficTypeDiagnostic: SA2PR11MB4860: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2657; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NWGjbdcTGN/izWcL6iRem3+zV5kozhHwfVhvWREs7aKCkaSiAAsVONnL6rmlg1W0kZfHAFXvqQTfEqtPK2vF37NfsAXodhV6MN7fbHhIi711D4K2mSDGeqr0PUkyB5Pu4JvFmegOR/AtZCZB7Xsmi7vlx5lbM/f+JVqwA9m+aBxWlRWMva160rB71W1Kkidwkm1nYzwTqp5yw9KihIq5cB6VRu1bb2qtkKc3AD7Ca2cXDj0CgqRyB61jGbiha5qDJRMkKDroo874jNusnYn1CE9FaCYjcd5bP7n619BZOgkZv112nxyEfML9nrEt9npic26ePaVHt4C3rRgm1T8iCMLkBQgvjsfda6upbAeXO+9gSvvmETdHL9R1kjKb2TpYIZ0QHEzMVzRlR1Pkn/rLC42w+ztEbkWQF+Jv8gtPZijZDHbk+vwANbDCafskQ34gT8sRsCpdKuclnVu61Lo3JvFAxeJmDP6mzxMXVLLOUHAob/uJXAiqiPUY3N+mhZgpxjjMEygHbSiA1BF4VzsHbNI/jrBlhajoxBLMuEKGpCHqyP34Tsx3mgTNeF5k24bR+csUUyonjRQi5sUqVBAnHQyxLYfEtOK5gxV1wg6nGH3dgYi1ui88rewzBUf8YcEBykhbvvrCjNQfuh6VwpyeoWPTTNxxred4jBpI/i/Ii30zHU5O1YzapxD4TIcQgLNdr260S1EqXE80Q0Vlbzvxlw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(956004)(66574015)(4744005)(66946007)(2616005)(26005)(36756003)(38100700002)(38350700002)(316002)(4326008)(107886003)(7696005)(54906003)(5660300002)(52116002)(66556008)(1076003)(66476007)(6486002)(508600001)(8936002)(83380400001)(86362001)(2906002)(8676002)(186003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?9/r6tcYvKcp7b7GCz8VDSjoqz?= =?utf-8?q?nF3t2Pjo2AXRHIsspCg8/PA558DFZZqllVkd8XNk5v21gat86AAx5f5R?= =?utf-8?q?ewFNa0y5DjGRcw3sdML4nva06/f7dZXKAjzYTbKm+WMRfWnhSqHnJrSW?= =?utf-8?q?7iQ9c1wES8Yxp8xWujAvO5QHySopVqem2D9xQP6rigPANn4VFuQMFdL5?= =?utf-8?q?K6vwb/NZcIzaYhprKDtMSCCHcn9r8fYb/sRVc+cnvnI1bmlwWwHqvCOI?= =?utf-8?q?cdvDFLtJqJzqP4mYTHUCLzIcScH6euDsxWEs0RlncEyPz+9uYNBzxRYn?= =?utf-8?q?9sZTmvc9eUa1zQo9/oWXsC/q52lA4CfNPz56vos0/Lu+oP0B4BqqrwzZ?= =?utf-8?q?iCAu0W2+MiWxYQBfd6xtRIl6MFQamZ4o/iA7FpCJ3taHntDIjTjsDcfK?= =?utf-8?q?xcd/SP/c1eyfz7MLRfqEYq3h5LjMA7+MjCp3+nkvicFs9kFyuclndpEV?= =?utf-8?q?zLnTdMvUEhktWUAPr0JKDEFR8K0HzVrcIDWD5QxeCuL2C3fAZETA45iY?= =?utf-8?q?7ssDfmpdweWOD2NgaBt7CzdyjIKDLNSKU6bArv7LiqOMNXz0RWzGCeQl?= =?utf-8?q?aFct7+pLxdIT+0kAAIPBZ9shRzAIM2JvK20LbnGlA4clHsauK+wBWASn?= =?utf-8?q?XGnmS+mrZNh0GKZQgphIf6KtuBoy7EShjdS3rJYbFI0YLbVzzwrEcPgt?= =?utf-8?q?aZucA4bzx3V/6HO7HIqxV4o1Qz3su6FhhW5QFhO/ZCSz6T3wHd3X5ll+?= =?utf-8?q?MXHJk1pvxq1pbEDjorVOjb5ygmHHbSCrR6jKyryfsH9/fru6NK76/pnG?= =?utf-8?q?8NoCTiMIyUfsbXnSztnaUDP7rjHRQlvXkRc2Hyll4sCRn4g2qwHjct2b?= =?utf-8?q?4trV+9y3NdMF3wLuCPlLqY1sa+boxlGekFfNrhRnSGWQ2a6VqM+6uvzh?= =?utf-8?q?Vr/3X7L3yV0+BLLVdkwSLRuDHk8GqfyW8xAe+smzw2e55CGZ0wh5mroX?= =?utf-8?q?v+RIFKYbXbFKvNQ9XPzEPyjgFCjJZiMfVBRpTAYnTjDe8JbtN4SG2wfE?= =?utf-8?q?x95cc304wbdEozX7TXVai0214/kJfL736OyRxnSS/M9b8wSAKUKU1iiy?= =?utf-8?q?Epf3PDV80kq2m5sW21l+EbIjgv3DOUnmSM0DhIZ+3CpRVO6xfXXrE4aK?= =?utf-8?q?gxjjsaZW/vQJgblTYgvOu8mY7UPt2iG9v4blKiQsct4n7GBsJdV9E+03?= =?utf-8?q?wsfmVLWDDwsmnoHW6Xt40yWV7Mf0mVMN/HhQKtEw3vmIyqm/58jw3BQH?= =?utf-8?q?FR5keLFsyU6ryNWQX4jQCk1epUX/+RR3wi0SU/Dan1dMUKcuq91mspYg?= =?utf-8?q?hOGGKM6p5eE4YUx9JKdFZHyKhQuqamS?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: feaf2996-5cd3-4909-7d70-08d976b6cbb9 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:52.7340 (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: hWpGax/p36NnSayINwEgJ4nLMD6DhR77SWYj8vmNYuVLgS+8ntq7J5OeoX41Xar2NUjNVBI6Zbnsv4TdxAWGUQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4860 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller ENOTSUP is an alias of EOPNOTSUPP. However, EOPNOTSUPP is preferred. 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 5f2f8900ce99..1e8d05c4f2da 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -674,7 +674,7 @@ int wfx_ampdu_action(struct ieee80211_hw *hw, return 0; default: // Leave the firmware doing its business for tx aggregation - return -ENOTSUPP; + return -EOPNOTSUPP; } } From patchwork Mon Sep 13 13:01:51 2021 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: 511492 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1F0CC433EF for ; Mon, 13 Sep 2021 13:03:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B9CFB60F9F for ; Mon, 13 Sep 2021 13:03:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239718AbhIMNEc (ORCPT ); Mon, 13 Sep 2021 09:04:32 -0400 Received: from mail-dm6nam10on2042.outbound.protection.outlook.com ([40.107.93.42]:9633 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238540AbhIMNEN (ORCPT ); Mon, 13 Sep 2021 09:04:13 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HgvUbHrK5/J2ONvgjVIVgA8H0xOaT0JOtZ2tZjCr7R1W+sBd+3KdAKN+8zVHOv/PXHJ1I+vmK+p5pXptLJZen40nix2UhM4wcyt5YuxY0tAV6e3julb/VYX2rGZ0tqCbKFtbfBd2DuaA2uek2nMHGA9WwEqT8z1s3hsWxfebxH637eZ+dTLyxSibqKqnnZwPxs77OFPGTQhD9bPhz69zg6q/vlch5GE2QTtMBNkYWmK1vJN2Ne8himUW2HT1eLLcfUFPPiZ6SHxKEDxFz19AL7PgNH1zOLoZ4n+EfwhlD3A6FFTgu7Go1BIZI/FIlblrFpjNIgMIVISm2Qc7hRsbJQ== 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; bh=zepjhr/9IN2TlKMACudigtOtb0JfVXPJtJXaDzy1Q/o=; b=Hy8DkU3HtsxC4yITYA1exB/xfZvzO/HghjZ97+dmr8OZThgxYSseGiBXsO281MyohsSGDPv9OI1L1VNaeU5HYpgJ1XdminiI83u7IDvoT0QvKwCCL+sPN+kDBlEgtK62lSQ3OD0HUalB7bsxdwLOZxx9rvoyOzWP8FRVQ8sxx9IGA3ZDtlUux+trI57AEF23n3TvhTBdWEH7VaycJ8e+eB4KOK/EnRS9UVQCjvEoDBd0j+HPbY24WyMPm8i/3tUvbam3AjUs+YdffvKbvnrG7vCliZ4+UnQi3G7MxDnHjK5YJ/Fg1HMY/doeNXDMYFWo+1eHrYjRQ3NgcQyIkOBq7w== 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=zepjhr/9IN2TlKMACudigtOtb0JfVXPJtJXaDzy1Q/o=; b=iA5dfYgCcu1Ie/+3003OxgQ6eyaRjLmKHHSKyL51z8J+2M7IEkdwZ3X9psGOPh8LnmCVfLUtYZKT0xIzWyrZdAu/Ioj7hF4A60j9BSkSek3vSKMocoet5QBjjahLIxp9Ihu0ODSA7/SytOlKgHAl77a9Eto2nz3etN6DkEfXzhI= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB3502.namprd11.prod.outlook.com (2603:10b6:805:da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:54 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:54 +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 v3 20/32] staging: wfx: apply naming rules in hif_tx_mib.c Date: Mon, 13 Sep 2021 15:01:51 +0200 Message-Id: <20210913130203.1903622-21-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b3cf8750-7a61-41a0-e511-08d976b6ccf0 X-MS-TrafficTypeDiagnostic: SN6PR11MB3502: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2803; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ug3x70gRVgneeNIIPiKQkGBrj9NsHy5rCF51M73tTiwEiUy12ewjkCArNQiWcA95uPtY6ovFOt7q/TtlVhnu0S8SWW8Mkeu3H16l/FCFD4qoMcLtajHz3e4ZMZwPE9Pyfi//8fhFqYjfmSlY8htLFlVKTzo7gazGVLUGhFkUIRlPHIPSh0wR6U6ul9L8LcdwEnvNL8vfBHolIBd75Hbar3SVJij1xdg3m86HKZFoAgNeoC+BrY9ZszIm8I7k//ooHWZAfdQhtHCGM+2eu1KxARZ58uqN474zhZ/B54GIA5CdMKLgLWBZ7r+gH1Q/+mDKwtyyZhQaicHstEGcDaK2LjNAdLcVYI7xvN97zxqQZxCMCymTzis2QYI8k8qpNgGGV7+LI1hDY4BCFG3us7pbQWEy6BpJlaD7+YCrTgSDd14zfKYEpG0gI8TTmmyZ8C5QM9OuI/WZm+DkLSpqBc+uIOhXb4iugkUr6UFSdcl3oIcFayUEyA8SRrj9C+E8DdOk8YPoSfMfRhwoFv0SOdODP77NbIvvGA51kxTeJrNqrnFG4J5+ZbdqA2fm9FxubR2VxAS5iOCnLkmvN/PxclzzZnpeWjlP5wdhuo0xP1ntfdRxglhUK54tua6JJHqoeNm54FG1Bdy4wcLIyQLgsqmXIN8tn0CyDkl/0VE2Opwrt87wWzmLOTSyddRz4Ruwe5l4sAJeSD5W6mUhshcczda+Dw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39850400004)(136003)(396003)(376002)(346002)(366004)(316002)(66476007)(8676002)(186003)(7696005)(52116002)(66946007)(26005)(4326008)(66556008)(2906002)(54906003)(107886003)(6486002)(2616005)(478600001)(1076003)(36756003)(5660300002)(956004)(8936002)(86362001)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?LwCK64isjr1IHq6p8sp2Y707c?= =?utf-8?q?C7oaj9y7d4uDBnZSnyuIupFlC13dFVM5idfryYsjbmZb49cK9mUmwpZj?= =?utf-8?q?kLbSSK3WgZZEn3G86ojd6KqPtT51aOZEX0Mj7Rx1WgyzDyWjNJmoRq+V?= =?utf-8?q?CL8T6ZyqiwDs1XrOrG2i+TK8Fcb7lESYMrNKVh1ue0FACEA95+5rc/MQ?= =?utf-8?q?RQ1WCXhC51h3K8k3sm8YcaMZh8A/P/ocDG4R+oBymjs58U/TWy6zSY0V?= =?utf-8?q?ImCpIw/jB3ZQsw+3e7JMaVEFd/+TVNvjaJ4YE2kbvwYgxqX0fnFW/Ifl?= =?utf-8?q?x4yLFMgkxXJm60Q2X9Oi8NT5VQol4RJEuJp6Pb0Rk4fWjsFE+se2ve0V?= =?utf-8?q?bGT/R5+K9nMpcdaphfcvLyoRPSKuBcjC8au2ve0kAbTMZwegKN40iA0J?= =?utf-8?q?o9WjAzKXMLVtFMiev7NVSq/R1B0c9ZsVL/wKF+hqVu6rBQNCXeT3ZqR/?= =?utf-8?q?LlIhYlNUbaTz14I0DLoyT8OqVbGvqCaYCb33sAOkytdTKjDGxiOxAN8Y?= =?utf-8?q?V+dTYlVNWraOyiGbgkoCVD4iBEmeCeUIqTGNow835kjBhp3I8NU7Wm/2?= =?utf-8?q?wYHXaCSqvQ2AyXo7ecCR7ZvCrZPRP4k0cbbNHVud5pcB9hl36LDQKrhZ?= =?utf-8?q?bjWV0zYckX1cgXR3FtlGyWywHtMYBgrcgI0lS9CtW5HaSuCFV2ZD9B+Z?= =?utf-8?q?78h/OkmN4jHmLcujQZIWFr0IzzZOzg/hE5tRgm0Rrix3vUgJmrNrAgot?= =?utf-8?q?j4NfGRsPxFetInIIr3bAa8FBZdO0zj6A8PEDA3jF5H7xZrQWiSBQVz+4?= =?utf-8?q?5p86wn8tr6DrDMqMtLbNa560bZefVMw2ylwSRS2c0xoWLhIJRL0t5Oph?= =?utf-8?q?5uP4UMj+/QOjBUOr1kfqP23c+ziBWHP5vJq2qf8G7h32nEXQzoi09zrJ?= =?utf-8?q?hLEZ1598cB5yV+skDpr0+rG3u79NQkitcpQkF1CBoUkk1llOtEkrXhTG?= =?utf-8?q?xxnxn4hEczTqZHBIa+T1v0uXhNNgxtOsYHBBG92W0OAyZHL/BxEGkt0Y?= =?utf-8?q?R+7XQj8DvoUkxm3hTTSJAgeeSc2B17Az57EFZ2i4Y4bKkniKdDovDHVE?= =?utf-8?q?sYqa2WilQOHFIuqqzo4wnrz/XZ1prsmVWflwMmilzeVpWuwXDBlEDJv+?= =?utf-8?q?BpBzVFKzoI/T6PFsxC8d+ru/jz4joSqD4RXfVez/Wz3vBY6O/+5/EBwK?= =?utf-8?q?uwnCKOCWbvrctv1i3xSmENn9I7i7W/b2n/ZAmdEeiL9QlDVeNzu0gQB9?= =?utf-8?q?WDWk8UgIJThB5dhdZJyh8QuD1rCdBqek0iYFtfo8TjETGmCDavWSXwvB?= =?utf-8?q?YFmWN1rJ51O77rV1WWwF1AxjOvuG6zN?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b3cf8750-7a61-41a0-e511-08d976b6ccf0 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:54.5199 (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: fwLMis47clHoasLdVRUD49uBjxbBUmvdeA4wJmpGAjSgNe25zEcfGutjCqc1Ded9MZu0DJECe+2Tj9xUxKvlpw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3502 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller All the functions of hif_tx_mib.c format data to be sent to the hardware. In this file, the struct to be sent is always named 'arg'. Also applies this rule to hif_set_macaddr(). Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx_mib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index 1926cf1b62be..1900b7fafd9e 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -81,12 +81,12 @@ int hif_get_counters_table(struct wfx_dev *wdev, int vif_id, int hif_set_macaddr(struct wfx_vif *wvif, u8 *mac) { - struct hif_mib_mac_address msg = { }; + struct hif_mib_mac_address arg = { }; if (mac) - ether_addr_copy(msg.mac_addr, mac); + ether_addr_copy(arg.mac_addr, mac); return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_DOT11_MAC_ADDRESS, - &msg, sizeof(msg)); + &arg, sizeof(arg)); } int hif_set_rx_filter(struct wfx_vif *wvif, From patchwork Mon Sep 13 13:01:52 2021 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: 511491 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1282FC433F5 for ; Mon, 13 Sep 2021 13:03:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F293260E8B for ; Mon, 13 Sep 2021 13:03:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236140AbhIMNEx (ORCPT ); Mon, 13 Sep 2021 09:04:53 -0400 Received: from mail-dm6nam10on2082.outbound.protection.outlook.com ([40.107.93.82]:64256 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240083AbhIMNEW (ORCPT ); Mon, 13 Sep 2021 09:04:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FEDi9iAsTAg6iiuT7HF6ZTdplmemLKiab/7FftOv1D5poURlbXEypGeRJh1p+Pc/K+jLQoo8JPzXpBi0HSuCcrmTJ0u/BsCrJzbuDcCBq/xrL6XvcunoExq+Z7K9WzdamRoI3lsTc2rsjU8RimSJUiRoXYa4cRFFQ7fDWUheOz9MaiTTgppj8rh6ImM11sZBFRv6jpU0Ikvb8XiozgN4W32ZlsaKd+epKVIxS6zt0Skj4E7vHZgsmX2R+ICuIRQK3z3qOGRh7fwiFsE47uFJwxtH5ON7GU7+eSc1HqVlMx0r9N8J1xElgiugqXu6dBmmW5e7aAIjN1hh72R8jP5Qag== 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; bh=HcjC0x4GRAxwfKkA5UMWXqZtFAOXbrjpXeRYZIftO60=; b=nojD7O46q7EoeKVjENFzJMGAuilxsrQrAhLk/G6VLVJu5IxpGEQ2sHyi3H+bbqMiye+rOQl+UbQZ0nY4TqagvpwJMS1vukmzxzHMF82W+pQyy/jWC3XcSFMII4ztcfOQqHgfwP3ujg43SsIOt1EgDuYuMrrRLXJ3hYWok3Mn5j5bhCUaU+Lu7pKl+L7vwstV9QkJquOb2LkZ2QJS4trs8U9Daac9jX2Srb+djjsCOBi6mUb2WH0IjVNGOS4wqWfvWTxD2fDQCb8aHbzQQvlZjHPqo4OAI88ht/byWHHDPyXLo1vKcpMQSjSNvUiL5NA5P1PoxUSgEzc+KQeO3AhoHA== 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=HcjC0x4GRAxwfKkA5UMWXqZtFAOXbrjpXeRYZIftO60=; b=Y3y5GfdkBBjS10yJCW2NsIUDAeTijUNgNy9XkZZY8C10J3kP/HhrKfDqVzWpc+DCN5zA4f25sfDtdRUHzDxLsMYxZzzNTIU77Wm7EXIU+OvN1EjKxpXMVoP687CJ+wVqPker4Dl78ZlK4it4p9I2LO3GzSaAAcy03555mSqkXjY= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB3502.namprd11.prod.outlook.com (2603:10b6:805:da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:56 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:56 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v3 21/32] staging: wfx: remove unused definition Date: Mon, 13 Sep 2021 15:01:52 +0200 Message-Id: <20210913130203.1903622-22-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:54 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bd254e6a-f94a-43c5-e31a-08d976b6cdff X-MS-TrafficTypeDiagnostic: SN6PR11MB3502: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ugDxRRQS7rKFL4X5wNZo391l93rQB+QynM30gdIG9RmQRezMjWBzZMomzHxcIECFyDt6daL5B+ZqoEi1cM4CHhUtL0Ox+VxWA+HbaH1bSK1zKtGoiAhyA69PUgjclJvSgPtjWNNB9877Bsqg3Vb0/va17wSb3UMGAKxi5dIOqCfqOwUIdOTh0Ct0O9L2UtROleggrPIpSdqOxlDZCskd+W2Y2GS6VMRLJFKea2qvUyHCDE1fmSz+I/gU17HM3x2++49Y9u6xY0ehECv1Crbfz8DGer/eZm2OuivKvgfkoHYM147YR+9zM8cBTfxWTuUnGTLFZ9o2f5T8pGI8/RJuDNVV74PjnSycRU4ck+YqxmlpHhOy6YATTo45yRDBfvjTSGEVJUwgSwtp+hW1tfDDfhN/RPcaeFWMYpvDUGqmgu77z6GtRMLn/8hOxHR/BBsHmvvFBz0c3J6fjxK2jwMPiSiVMfmXh2RQT05c2MO7kP+Ztx3bRm+lrapksim70np2gGkmxEHbwRAJxDbobxIzc6KIq+Trhl4nD5i7Un74IubXNroG6fJhMlHlSFz9cAGcab4c9Sbb06DryIOjYvZW3HMoUVU4QdEmuXHfdDb8bl+NK4mbLtuR2JgbBxbEbLSfDwDMwjKSJmR+oBnON6d/MHEhM0RopeJlGEux1mo87AJwrWhWmHKRfefT0lyxJep6 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39850400004)(136003)(396003)(376002)(346002)(366004)(316002)(66476007)(8676002)(186003)(4744005)(7696005)(52116002)(66946007)(26005)(4326008)(66556008)(2906002)(54906003)(107886003)(6486002)(2616005)(478600001)(1076003)(36756003)(5660300002)(956004)(8936002)(86362001)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?03S/bMT58IAgldWajRMOe5sWF?= =?utf-8?q?uxMq8RvCe4G1IA9/xWt29J9ZYvmkNEpPdwG3quzZLIdk1eWY4OZKPn/8?= =?utf-8?q?K+jJHICNU3GW7Bg1EpaJ7fzkKAdo0Wflabsr5Lvp+B2SrMtDmpQeA+0a?= =?utf-8?q?GyZ0ANM6bpHurjYfeVsyDQ5lE3h2n5smYF/YldbTrErTTHCxPVFIouB2?= =?utf-8?q?/H9Zi+GJPwpH1fcIutG/FN+72Exkb6CBROzSwlUfzmiaJAM2KgFXEeMF?= =?utf-8?q?RYFaq/Mv9mLUguGvh+lzLFmYfwUDjJZyKUYZ/3abILnoqLJvVFl3KeUO?= =?utf-8?q?A1cHfgnsiFr/iWyQJamnJWVTOt6GRJdQ12sPf178A1+maTQ+GKGjlnwh?= =?utf-8?q?hLwGngnekae9/XjhXGRI2yMwy56A4vEcHDGIvONi4/7b+5RqWFqXQ12p?= =?utf-8?q?S/FB0AUiThv2c/ffr/C8lM2OF49reNh/chyNoCMd/v5UBYAnZqDb0Igb?= =?utf-8?q?e0eDz8NL0k8RcTWrXY/fUqR/qxuLdr8ht9dZTdF1ZbowW9FFnOOIQVTg?= =?utf-8?q?UTSaZEAKH1MA6GS2HGZaUxftumSIZLZgdr4h02X5sIts7fHMUFWT7b9u?= =?utf-8?q?QiMKDkN3me1yrJFP9mxNqwZmqXl/gQ4nYCt9twFeSVYTItZuJkgaaOMy?= =?utf-8?q?2Sanv3jeT7aX8ifaOOd+mqzzEnblKK5gOmkq3Yrzyr6bkitpLYghYiBs?= =?utf-8?q?T5iwzDlLhFtmc946jSYnWWzAPct47sTXI1oGzmeUAsoE2lB8h++hNEQc?= =?utf-8?q?jZPrm837afJeCQQOtuzDRO4+TjhVKPLjITsf0PTeIcQmyMkgiFUzE18H?= =?utf-8?q?Bzbgy+jeDgGUVzIUno3I0v3+W8Jpj2RoumhbFCRv/gQEo3ZDtsae0jNP?= =?utf-8?q?3g0DJRtEx8bm9tSGURRpX3M7HdyNFVbwpCsgFUQbe6D+PEdvhZWiNDNw?= =?utf-8?q?oPS5spi2NvLyNdJgTTPYFnoemtRFCyZhHSH63nq1/ssoWU89y7nPLKYL?= =?utf-8?q?Tsg9iLvE9kEVqeo5FJd0yVCTNdsmGh0yUfqdQkE7MRbKiGNGh7bI1oeS?= =?utf-8?q?CRLdUlBtp67/anwGyW+vW0k6bkxnNpjpeiFTi/UiSg/LOE/q4SJOfXKt?= =?utf-8?q?ZgLuSXStcN0K5NT3GRwTB1vnWyi0yxiD4TV1E1OorFrxDBL/sid96LFN?= =?utf-8?q?v2K9YDA5JX8AXxo1xm8iBktze7VmoPtWhaAoFxLNwFNKQYD6qkkIlKfT?= =?utf-8?q?t5Zoi95WRldcwZAc71llGaPowhrDbHMBUYsXBlM291AKGRLTh+uMhUNu?= =?utf-8?q?BSRqP54UtmqocdbxrHYLG41WTBZiPLHyqe2PBdeERhSaOWfDuI4Lwy1k?= =?utf-8?q?Z4ZQXVwS16h2vbxF/3uDRPTnUeo8Hhl?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd254e6a-f94a-43c5-e31a-08d976b6cdff X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:56.5278 (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: pOgjbnvutghzH9BQTAKn85Ph1iadGkSO2bsPxBrp7nRhCyZlbOli4Ya9gVTIt1a8w4QHjh2cOszpVKotzhQhYw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3502 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The enum hif_fw_type is never used in the driver. Drop it. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_general.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index 24188945718d..77030cecf134 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -113,12 +113,6 @@ enum hif_api_rate_index { API_RATE_NUM_ENTRIES = 22 }; -enum hif_fw_type { - HIF_FW_TYPE_ETF = 0x0, - HIF_FW_TYPE_WFM = 0x1, - HIF_FW_TYPE_WSM = 0x2 -}; - struct hif_ind_startup { // As the others, this struct is interpreted as little endian by the // device. However, this struct is also used by the driver. We prefer to From patchwork Mon Sep 13 13:01:53 2021 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: 510235 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86A0BC433F5 for ; Mon, 13 Sep 2021 13:04:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 710D060FA0 for ; Mon, 13 Sep 2021 13:04:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239048AbhIMNFV (ORCPT ); Mon, 13 Sep 2021 09:05:21 -0400 Received: from mail-dm6nam10on2042.outbound.protection.outlook.com ([40.107.93.42]:9633 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240091AbhIMNEZ (ORCPT ); Mon, 13 Sep 2021 09:04:25 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JtC7cSyeohkk9CAMmRxr55np665xY3G1fj/LRxEXiz125BPsw8IAox9XhnoQ+u2U89YEwcEcIxlIiu1lsQWPDMF9MEIpJVzKB1YIgHlmuo0OoJEUNKUS7oPYp0bn2VoPvurYH0mmmDU++nrPZq+Bo+LBaUcdXSLsoNILj0V9CIxJyijV66zGeUbjNZBOXOM0GuKYLrlQGtJ59wBL07PwmVgPUceUJepeE4XPuadqHB3HX5j9GyfE6b6/RaCgfKlhW6EucZjpUt35SBU+SdaqrxLkhLq98tdKxqUXzxwOA0j42wk5f2LvwQFjdCHgiEjLWUGnR19Ed97vjHw+OtUnUg== 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; bh=bDkjZof4E6J1md+k828W5KwU9LtaDDRXypasdbyr1bo=; b=LeP/tj+sfDkPiHVqrJJH3mJn/XhuCh5TdIE0XgitP92YwxSjrdOUz+Qchj8WG//EgVihnB1ifwWVUA+VkvbhRFQnvWQpdC+bWfIMbES9EyE6822A6FoWAqlyF7gBe4PtaLyl3DbB91KYkxdOBj0Wh+fOOl11re90KCpkZxpRUzzPSyOzhugATUlSWqHZNQUOSpstU5U9KhhsdVMudfwU/6gPLSmtUpgA4rfCeL0L0Lu6uO/rByVwFeUm1N393tBcD8eL2ITVSGzzgS/nMA7ZEbkIq6jKhTaXWNGZ300pK5W83rae0G+ubE2ITC7rnTAWaDP/1VBEwbwgHtnizQQUuQ== 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=bDkjZof4E6J1md+k828W5KwU9LtaDDRXypasdbyr1bo=; b=f2o0DLIuFmcWUmA5lvZTCzX1BDOwj4TMx2l1AgL59KZbL3h6CnKx+uwb7U0uGm0IU2PNbF1QaRSm8BQbnGs8r539GsOOsiJRsDXxX1OP/mQt/NWHruMCW0NXsq/oMo/pn5oBKx14MOFXnGbhuoaa1/aMfRcKMNgAlRQExlSv2As= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB3502.namprd11.prod.outlook.com (2603:10b6:805:da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:02:58 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:02:58 +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 v3 22/32] staging: wfx: remove useless debug statement Date: Mon, 13 Sep 2021 15:01:53 +0200 Message-Id: <20210913130203.1903622-23-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f5a1f103-3945-41d7-d64b-08d976b6cf2d X-MS-TrafficTypeDiagnostic: SN6PR11MB3502: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2803; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rvkk0pPXt1qIjKel8MJjeRsoqzn9sm6/PcV78jrDrtdaNmCTPpeepG5dnA86fvZ0Qu54H5IW2tOAIdMuQCmLQhEv2aUMLOvQXQ3X4PjTdtAdWfnCaARbfuDamWSyFjpCiLskuG8jH8mcoQLIaSSvEada7S9Jpz9Z5+4Dq7wuDkptZiUezWV8Vdr7894bwFxvTcqj5Qis6hQrC9DZrfJreFS8xmP0NPXnBlx/Udu72KR/vL/gcNRrmo/ATuNCdhSEpRYlh57Fu6QfM8x8HbudkaBQJiTvb4H1XbUAVP6xUywqlPL2btOVR6fdCBnn5wU/HIOx+Q52tmcdssR2cgy2HeS+fSVigEzvYL3LvZshNXpct5JdZfsbQY2Kd8e6K6KPwgQIFvB+g+I4RvWvZfNhRSaL/OnSxukipqZ+rP7cPcsrfMNpri+JCa4HB5YriLktDesc/a4jvQLI+H5CuLoWh9iD8NNWf7MWTjmSH6XMaTIaF8Xabr9AoF/nOWil5iHDnkdGPVMfT3i8XfanWiMlEAbrTZDeuFFY206LDHFS7FhqEMX0nbQ1ZOVVnBqn2RTzzAqkq7lCzQwUBuSaIeqV+XOAagCBKm8yADhD6O6FQ673GQAprBIDPCTS36nS5pGKn1zJmM65166XYiEcxhuzCldI23Bujx2YYYYxxz4izZvGmOw1F6LqA79/uv9JslV8b7BhzLyt1zat+XRN0AHpfQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39850400004)(136003)(396003)(376002)(346002)(366004)(6666004)(316002)(66476007)(8676002)(186003)(4744005)(7696005)(52116002)(66946007)(26005)(4326008)(66556008)(2906002)(54906003)(107886003)(6486002)(2616005)(478600001)(1076003)(36756003)(5660300002)(66574015)(956004)(8936002)(86362001)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?wZ2lQ97tt9XNyuytgI7AkheUM?= =?utf-8?q?pfJSQNyJDdaXBrW/nEdVPxWDHTQwr3AXI4MqtGTnxvAZ3FosKfcBzuBU?= =?utf-8?q?wqnB+ms+sQZ74rauu32iQivCA/3N56H43VCb1jzVVWXj9G6i1c6ugEJQ?= =?utf-8?q?pQ900UKVnNbzUOICCr0N3kzlMzLPIrYoHgeNl3Sbitxa0BtkIaFWvs1D?= =?utf-8?q?ka3CetoFxxOvAM6wFW4NnlrgjdDzHiBL6h++G6riNFwC37GzHyTiTkIn?= =?utf-8?q?M4M/AfOMH6g5WiRcYyOD7GY+KtOd/uVLcW84BEC92b7XXB7p7fgXjgcY?= =?utf-8?q?WJ7bOf0GypHBahCWwQ+3kN6g3726/T3I/R67AKDjntcYhYBtdjq2T3Z1?= =?utf-8?q?76SrylGQ05Rkf9mVV30zuX9Vx91vULB41FHqztsJjG47hxJWXFlZuHh8?= =?utf-8?q?ytkHFtxMn7O4xY71TRblSLKstd5PxbEELz2Id/6tSWwscX0xi5YgPFqb?= =?utf-8?q?0ZKOUQYoDW0Rdf7MuqIepd+pYdsEw5mqRIc6956NOVeqwByzyCyYQVMj?= =?utf-8?q?joi98/SWmoNNy1AQqx/oO2FUBMos4Moiinf6BeUNTnImaYTBP3985Xyu?= =?utf-8?q?P0q9UqD0HCqfhwileHuE8965ysM20tO3jT2HuOU5hcZ/V9YkvqZBjXHH?= =?utf-8?q?Fwxr/z/LEde13Fu5hd7MsGmjNzVIlzbjpKHYKNZuRVVMKNn4W2JbrRbF?= =?utf-8?q?fPY0BZcUvF5fPIDQtfpnz+xR6TAwW72UrIxAJy1r1BN7c2ngAsNO88Ud?= =?utf-8?q?8I6TcCsK8du0A6etQWKl5XbOrH8Xj9+MZpJjavIo9CWEb6jUrXnrUftg?= =?utf-8?q?deNzk9RI2xWz43EpVutvHQeCeN/8lhiyMKeZeAHZXdW0bakiYuIm4B0G?= =?utf-8?q?N9v1U+itPWD1a6UdgiG2rt0+xq0tMNjwaOYVlLreuw+JhTsLF+80JoGX?= =?utf-8?q?0ekdjwbBKuLeZiX2A4j6naBcNTBLVQarkLZyiib9VtVH776+hLJgCwBW?= =?utf-8?q?wI1TW0Ud1pmM5kbquSUoEjWu3OQQNLzBKODMdx6VZP//qz4mD6H4zvd9?= =?utf-8?q?iFo2FgqyBCK8ggg4Tw+EeST9azyqsus9MVTAWX0oEA+/8j8IwFgG9Q7d?= =?utf-8?q?XamC/4wbhU4q+PBFLsY+lrgHVMl41enpW49FpiMhyCstwZx6evajK1lx?= =?utf-8?q?p00VmDsdOcYzt07RtF5J5xIqS9Euc+6vVxmR+exPfa3I0n3BruiDBDc3?= =?utf-8?q?xX/J5esU6UXqv6lkS1Xi0s3stqkY6n5l6ny3qn0e2vAG0bhBx6S5qmPz?= =?utf-8?q?AIyQgUnH17ZY0h2nZNIJ8FEJSr6TElSTGavTxhjLPI1DUmfSD9AEh5+u?= =?utf-8?q?imgUR4VSs4yHmJBvzBzQn8epavNAkG2?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5a1f103-3945-41d7-d64b-08d976b6cf2d X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:02:58.4297 (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: s2eawy0tq3JHj2AtFtEsGzNJPAjI3ov/2t3wHjI5f/YXRadN5FYAp71qoxm9RztKi/KlnjNWNwU4YdpRaTZqdA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3502 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller In the early age, it was unexpected to access a VIF that did not exist. With current code, this happens frequently. Having a trace associated on this event brings absolutely no informations. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/wfx.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 56f1e4bb0b57..a8efa25a38ac 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -99,11 +99,8 @@ static inline struct wfx_vif *wdev_to_wvif(struct wfx_dev *wdev, int vif_id) return NULL; } vif_id = array_index_nospec(vif_id, ARRAY_SIZE(wdev->vif)); - if (!wdev->vif[vif_id]) { - dev_dbg(wdev->dev, "requesting non-allocated vif: %d\n", - vif_id); + if (!wdev->vif[vif_id]) return NULL; - } return (struct wfx_vif *) wdev->vif[vif_id]->drv_priv; } From patchwork Mon Sep 13 13:01:54 2021 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: 511490 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3D98C433F5 for ; Mon, 13 Sep 2021 13:04:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A8ECB60E8B for ; Mon, 13 Sep 2021 13:04:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240071AbhIMNFK (ORCPT ); Mon, 13 Sep 2021 09:05:10 -0400 Received: from mail-dm6nam10on2073.outbound.protection.outlook.com ([40.107.93.73]:38187 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240108AbhIMNEh (ORCPT ); Mon, 13 Sep 2021 09:04:37 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K0Si6+4a6mM7Yd3zzLyJI/2uu4vv3lYHxF2MVjsq/2gURgCimejvzTI96jl/aF1LqXAt2qSfcxvI2lyuKfthxj7stZLGB24yuQ3aGw3Mm58V3pg24tilKvHOeiy8yjbDFszd5sf59f/2ZmFQrEFJN0bUvxyZ/gxs9B8JgeUpkMHz7+UjMzvrPepna+3vKaFxdzKwlrwU3TTSeAATOp6Rex79cb7idOS6Yg1Nai7KKXWDAv0zMhE93lBTHRWkbK/ewAYiYD9ev9n0RZtieMlSfKnAVuFtt2LeSMH7VxseHrR8kMbHB6YWwaVKxZ4Ehn6PopGRJzjBcL2svK2J0bfftw== 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; bh=rtRjvSlyXDToLuWg9t+Q5N9m2nkpKJd5T4sJtezrxTw=; b=VkxZwqTyjpKxHt5JmHRhMDewk2DHGQ36RUpU8B/tUyt7vd6SnA/dVKTvSnhJ5iwUc+vsZzMNO7R2+Bls6pSawBGiZDpv4DXMg4Y9UZ1lhGDY4d/2Sv6k+x2y/4ZZF54dqbyH9uHy6G85pQvK4ZGPwb/bd5ScV02T3ARIj0Yf9418jB+Ss/6a/k0Ue/H4oUSCjCiYPgz0TnodjYTYcEoiu34K7qDRrHPWE4ebGXSliJJry5xkXVBJcQzJ7okoyOZ/TjEWNylZdJRhorhWddqbTysVaYpSpo3lAM+E4enJ7AY73h/enbF0ETSI4+MaP/0lm6gpU07Q562W2Bhag0wvzg== 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=rtRjvSlyXDToLuWg9t+Q5N9m2nkpKJd5T4sJtezrxTw=; b=nIfIRXXlE1YYFMGifHGGBypENxnqwFhHaNe01iNq6E7KtKaleiF+iFk4OwD9DVm27rO/qjKKQqdnhsa+Yk/bZurPGPPifHChvo5akfs99OJXtHqaX98dug2o6wJc8kAvHxa7A8utF5fD80FP7aj00Gwz9wI/5HM6lRBbBzRiwz4= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB3502.namprd11.prod.outlook.com (2603:10b6:805:da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:03:01 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:03:01 +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 v3 23/32] staging: wfx: fix space after cast operator Date: Mon, 13 Sep 2021 15:01:54 +0200 Message-Id: <20210913130203.1903622-24-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:02:58 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ba01d1eb-d0eb-41e8-9c9d-08d976b6d0ac X-MS-TrafficTypeDiagnostic: SN6PR11MB3502: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1284; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QqAEuXNXZ22scLiIX72B5cChYNCNx8rJHIUQWYhfBmsToL4tMSejhWtAHilFeiaNRXDDPz98NzVmHkFYyd+xdDdOKMUSzua4BxszgoMg4fIsRMjzKE71KSCCzHA12K9RtaXL7LVK235z/Q25NfV1rRQIInLRBRHn58WQWd/lI3b3qa7S0LhVyPNJ3jfWqnz6mshYep0DRBpZD/4MFi9mXU2VGVttt4I9RjSbaKleBY+D2CGvlijqeMMrulMnO/8y1pMVuccKP+J+rAH4cT2RkWOJqy3lTYCHSoeqYC4uevm9VYJuiOQTAUaby5nIetZWz2BHu7RU9ieK3vfu4ziHSy7/auw0WHJAj7GyGxPyn1YIA6Wrwmu22wWRHWWCSpMsTaihJvlgDENSHQvamyhVai70I8ypRXkD5dDkqBKhf/JtiH4TXmu6zlGseHg+Y9DTH7rfnXhR0B20oQo5F088jk73HQ/Up6tJsNsspr70e8APJaRhLvYkFF+d3CqIsVQUmzzzlRl29LZIYoqIaMku8OGWM1KUm2YUCev7En1L3KdOy8BYItKZ0yNOqxJY0B3svSUisBIOo4oZKOg8fstshU2+OLA3+CE7zTC4B37wIQ4igXa2z/wa1votVo/mMNcZvRSw0CdT3dYq7p6PPnDRS306zQGiVB01a1iwqCmzUorUvJsouht+03S68w0hl1I/IHt42t7Clf8Ws3cmnnHENQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39850400004)(136003)(396003)(376002)(346002)(366004)(6666004)(316002)(66476007)(8676002)(186003)(4744005)(7696005)(52116002)(66946007)(26005)(4326008)(66556008)(2906002)(54906003)(107886003)(6486002)(2616005)(478600001)(1076003)(36756003)(5660300002)(66574015)(956004)(8936002)(86362001)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?4MWxA46CwFDbYJYrUHoTW+pfx?= =?utf-8?q?pUaaDMZVHrOcvbYcSzQLijSKHra0iCiDNGscf+4tbnIO3SjUHRn1K64/?= =?utf-8?q?sZJOSDug6wz//8uSBUI4LkcrvuP3QQBMljMX4J6EclAM3ub+7S541JWs?= =?utf-8?q?ZE4IdzNW5Vb2M6i9USUikr/AeSyNJiYfL4Sc9adzosggOxwki1mOqItP?= =?utf-8?q?OHkEiRuZ6da6De+EVRC1pTK8sBBcXcKRAjAwa9X7O+9RqVZH2K48zkcC?= =?utf-8?q?Z6FfXi/QVwkrobL6m0Bv2EHMhHHZzojcAB31oZHcNOdUH7ivPqdj7m4O?= =?utf-8?q?n49kyeQ9BYNXwpziJ/vuJeSJkwrPX3qnScQn7DNLOT41b7BvJ31e7nd0?= =?utf-8?q?2ojPfudkI5DfZ4oFB1c19Cb+Ayqe9aEBlHlBlfgQ/yyhYAimpRw7BVB3?= =?utf-8?q?JVg8K1nKEB3T7Po09TFhTN95k00YSWbPX5UzxI8+TWI5xQmTPeQbqbr3?= =?utf-8?q?jcFfP2ZHHuIcan2aYY/6MEhMr7DFug2rySkiQmHwZ8gZgOxxKW3JzLJJ?= =?utf-8?q?XTvbOmMeii5AbEntdBBpxmwW+3FPlWE3Yrd70TVc+EJmJvan4eiNzOy4?= =?utf-8?q?VT7nOED8hNylsB0XCPVzPFbRsIwYSDtK8fszbSdnhj3IR5shtYw+JQF/?= =?utf-8?q?5w+DFwybh/YurUdZRMw6RMon+Y1tk4pj3jbldR+Bqoz4kbboyLl0WQIZ?= =?utf-8?q?6VKKZGEshoC6VSnLMeVvL9QGm3/8hSyRB6I8Aae8HEIDa++T4JQQmvCg?= =?utf-8?q?ICikQwdnEwrBQ3A3iKbOZNhozVni/DYn1IWxOjoZjV1uRQYB+pH61tST?= =?utf-8?q?GTsr3EhkTbtQKXvOB3DD/6u0ddoPeu/4Kkb/DjVt5eXSDCWktVKafrE0?= =?utf-8?q?a1qRTySh209F6sFghjA7+E/NVOdyqOP8QDXGed1PaTJZtmF8hL1bZmpp?= =?utf-8?q?XBG/YnDSSBlXFKWAN5HJtq9GCOPCccUTlysIxzn2zkk5PweZ4CqQSBkJ?= =?utf-8?q?AjlxlaxsFZlVhNgZuiXS2pMetPv8s6B/249aKxPnggBHTbKK5vk1CpkX?= =?utf-8?q?zzrjoey2KcvLqlp8Wbj1wnG86K7zCqplcF3GqUZrmr4KloJESIKkYDZD?= =?utf-8?q?EYyryh+h5xvxK8/nCRsKZHYV94zpZ3NsGek7VWudo8/1NIJsGwJ7DDb0?= =?utf-8?q?lq+oCHVekEvO4j7HrWbfQolMGyoDufRPXxzS1V5GWjBru8Hj3EXknlDp?= =?utf-8?q?99/HYKzXC6ClLyTzFxAa0C5SbApXhV06kAiEla3Kunl7H6jq1llil/Md?= =?utf-8?q?EZma0LrxqIa6sJkyzbCaGzs2lgj/zrtdNtJUApCZCmMZPDKmImgBQac+?= =?utf-8?q?mroOSVIFftfEpY8iiYgoglwGwj/jtfG?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba01d1eb-d0eb-41e8-9c9d-08d976b6d0ac X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:03:00.9802 (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: jfFZryMMUkucnRWmP4RF9coKNsEO94mVj5PeWrFkBEO5fkhQQa6cZpA2eoWeWZfMD149jIK2uCLSHjH3DuY+WA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3502 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller checkpatch.pl reports that cast operators should not been followed by a space. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/wfx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index a8efa25a38ac..9749602f6cdc 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -101,7 +101,7 @@ static inline struct wfx_vif *wdev_to_wvif(struct wfx_dev *wdev, int vif_id) vif_id = array_index_nospec(vif_id, ARRAY_SIZE(wdev->vif)); if (!wdev->vif[vif_id]) return NULL; - return (struct wfx_vif *) wdev->vif[vif_id]->drv_priv; + return (struct wfx_vif *)wdev->vif[vif_id]->drv_priv; } static inline struct wfx_vif *wvif_iterate(struct wfx_dev *wdev, From patchwork Mon Sep 13 13:01:55 2021 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: 511488 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 661E5C433F5 for ; Mon, 13 Sep 2021 13:04:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4FBFD60E8B for ; Mon, 13 Sep 2021 13:04:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240249AbhIMNFe (ORCPT ); Mon, 13 Sep 2021 09:05:34 -0400 Received: from mail-dm6nam10on2082.outbound.protection.outlook.com ([40.107.93.82]:64256 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240056AbhIMNEq (ORCPT ); Mon, 13 Sep 2021 09:04:46 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jylXzKLLvKfrj4cAwDnHXFMO+963SB9KLa3fbN/NxWM/ReniSQi8p3knppgl6mq5sApwSURII6y3OzJY10oCrk1TV9y/m16/ABPWWW1Ye4vBIHUjcdHDSrjLlxLfYmxXlMDU7I5NocdJUwtJYpKeTlNKc9lQnyOeTtpHZ+GHiGiDS9+a9Y7+L42Hq4mramhztf9kqcwASzisV8bDMCycb993FTqXrRZyk8N+eqCV5ZxU4gQ492fjCmEu1hHRvipiSeLYcDuxNYzDjedGMCkD0gC3mybP/w4Uientu5jI9dHW6hcxCvxkjWZ19s8UHRQT0uf7UTcSffmkrB6tnyP6gA== 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; bh=h4gFsja4+jJI7sjoTYcLY2a3J4ayXpCUWNk/C6lnwUw=; b=W5HxcE7tpksRyxxMlHyH2ePAYMCQx1AvnU2pHFS63CeHPTMLzIjBFQoMnUVguSsMMwWaBdT1BDy93pNE0eE2ilGwCwDNh4kqUXftLEILr2WoEA3JIshF9LN6hX0IpjPNaAtfiv3cBvz8vGUJib7qxEYZmcCCEwtSwmON1PuYe6rUhHu2rUsL2CtN/Mba3ZB+APaGD9/cpvwic8348nsufbkfG0pqtqIyDlTYa6BuULYYtNTuY4Osq4EoqlXRfhiyMAobTy/Y2h1VYSrDI69vj7g7H1rfoz2Xm1AaFJCzNJAAFh/dq1hHYM63C/ytzn0hyJKztSgHPA/0I8OArF9qrg== 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=h4gFsja4+jJI7sjoTYcLY2a3J4ayXpCUWNk/C6lnwUw=; b=kbfg9CSyIzbJasmTKAfuYzpJIN/MLzZzKFCTayjKx10jLRcRlzA0jNKFKPpwer6RpeaoXbwMcRLjxULIFZ5LtdncdQtQa261NB2dk0yJ9EyvUuz6PvcAB/K19UAf1kOmlcIHuvlpFdfzNSvfLlsKOmheEloIC4WgbSm5oCxPSfY= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB3502.namprd11.prod.outlook.com (2603:10b6:805:da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:03:03 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:03:03 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v3 24/32] staging: wfx: remove references to WFxxx in comments Date: Mon, 13 Sep 2021 15:01:55 +0200 Message-Id: <20210913130203.1903622-25-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:03:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 611b6a58-ac36-43bc-a591-08d976b6d1d9 X-MS-TrafficTypeDiagnostic: SN6PR11MB3502: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 299lcnW53emT5CP5trlCwBQWvSY32LBHp0rNflRqqLE5z1GOqt08vJNSN5Y4F4fWaZMBiK4XhqdMeVzdraX5aDtdGkOUkOGSwwkXSOL49H2E0kZoGkreQDyyfv/P8Vqw7I/XpUhRNj8uw+FWCQO5YuXT3YQM8dfT4FvIRB1T7D19Oi6/pSzGmwcOu9k0R6Sad7/C1f+HWeNbAX1wFACLwHc8fp2kK3s5acrR4ba3XqvAYCLFnRua2a3NQF5Up0Uabg9/l6T5ECaajNjDdO7u+0/s183kbue1kQQNugsgl5gDyAvgFrXJmdoPL1dB359rmT3QAbbXbPdBDmv4MwliPajmkfg0hC2ba0vAjx7DgSLqti/mi8pZkMvX9Z0VhAMGtl/GgkAX2zvbHhgW1a0O6/6iB8ACuCdpnHPY0SuopZX52lqSkG6MKLOvlwHR/jy8XIKRH30cn1L3jyAEXGzyCiwSUEnYIXStcsIPEyQs68/i5Hnn+aeXV6ZCQWCOA36N+1pTr1aOwGMeNrbEyDPGYf1HWdrDZrogbUICADzLAhpR+hvm+BrVRDvKiDWN9uSs83EtZTTETOWjbNyftk9YsR9pHkNWGu+AnQbIxLxBv3Qjt5myLugWztV3qem6Ns9fxUbiSIJi9+ZvXq0nyqarQauxTZbE7RilX7SUnj6Tn29Yg+JqZkGxs0w8LG7ZXunKVZtsLVAeJWe3gaw3QGeAjQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39850400004)(136003)(396003)(376002)(346002)(366004)(6666004)(316002)(66476007)(8676002)(186003)(7696005)(52116002)(30864003)(66946007)(26005)(4326008)(66556008)(2906002)(54906003)(107886003)(6486002)(2616005)(478600001)(1076003)(36756003)(5660300002)(66574015)(956004)(8936002)(86362001)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?GqI7JQ8dW78giLnNZk3LkCbRa?= =?utf-8?q?wkGFZfU5D3wxw/Y8eItpP+2j2ox8aIIBNOgdIt5/3T+Ahg01imqHDWcY?= =?utf-8?q?ruqTbhQ2IpsKxCClm/ilKfdDYNbDpAm3ugzTSOyV/8877S0x6nW3+Wm4?= =?utf-8?q?5MhAs9TcPsg3GsGFwb8YsK2GcEOWgSlgR+PGH9ui6cbU+bWtKTj2Arvq?= =?utf-8?q?3ad9GqXpKjrzGwRHGojNxnmQi0S9D9rQ7/ReBVaYZe5UA6xJpF5MGok9?= =?utf-8?q?fBn835pBs+TZd6ImjiGNmbGZfjYncz8qJ4UNcWcJ0YkSb7UfS7VGltcG?= =?utf-8?q?EfIFtfbZqZOc/uPuZEtjKhy9/h7DFaZvbtEv3/Hkg8wstNRakPX0c+ph?= =?utf-8?q?pkUKu1MmmF4pCMa2QMbI38URDVt9trrCmcsJtPnko9pP8l6XUGcA3nXE?= =?utf-8?q?7x4q/zpAQ44ZK22IsaSQ1TaovQ2jHoD2SzsHvbCHJPcV8UhZ+p+zSE49?= =?utf-8?q?B1SS55uKuXvCIJK2lZZ43jRB2gsMOhtxy4ije97OgUk5sB28cvHE9eAd?= =?utf-8?q?fFga10QhQe3KUoCvDw22exJ2Jdh49OrggzKrr6SF47ICo8q2crOF2n2E?= =?utf-8?q?47ZaTYqSBY1ksldiKVQon6kcu73rNuXdixUknOEpk7fC3AFbmIrjMtpu?= =?utf-8?q?D1jQXLYZ0AZMuEpxvfBK3lv6CRfpSpF/oPOsAErpGsSSd2boSTqrzotY?= =?utf-8?q?ffpAFjA/VY8YC67he4ckYqg5NbQjEOypFohMeE3Cc5hGvCLDVlzfpaiX?= =?utf-8?q?lk0tyZZrb/IFmnsW5ARs0C7hglh7HUTpmNcd6CLsohWyKMPfllAe9e43?= =?utf-8?q?H2m/zufNlMHjtUACiES8lw2sBfBAVQIREu/gh52UpB85IZtlst1nww95?= =?utf-8?q?cWBcne/LA1mImGAqivvvpd4FMXY7vAwLU31+lWbr2n7rIfmDTJbCYUFI?= =?utf-8?q?QHY8acOdMgkHqcrxyh9tm1vAadmW964xaRjwoysVDfO6e4SftFFRNPe/?= =?utf-8?q?fm7imr3tXlnGssASsYDCr8Ucj/vC2nQuUbnVaOhfPU3fIojYPnCDVxts?= =?utf-8?q?raMWC6cSVfMuVQhfpK6/4Y/EIypHyoxVEZykZ83trQAO2m6hjvpHMPtg?= =?utf-8?q?ANj0TDcE6GoU+dBt83MP+ONn7oG5zcdFkxWdygrVrhPM88yxJ1nJ74RR?= =?utf-8?q?M40MYf0YdmOlghP3tT6SJkTp7x/DAUBMfzNOBRBy/XVTW833+sIrdhPY?= =?utf-8?q?xBnV22CG+CgMeaR7LJbqESWM+A5k74ku8UOUh6J6zbDwyl3dTpr7hf9W?= =?utf-8?q?dMjKrkX+DkOhItPppx7sFNHRt+V1CTZgPI9/945FsqMRXjDa0fkPvdCK?= =?utf-8?q?tvgernuSCDJYkC+xqYknRf0FxPVMOJn?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 611b6a58-ac36-43bc-a591-08d976b6d1d9 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:03:02.8761 (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: GxLtf+My3Ep7X7XBajZymR4eMCvBT2lXjrYbUd/Xqaf88ZGdANswg2GfCzyGohwJ/zN7RdRCZNBO+QKrFcGeRQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3502 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The WF200 is the only representative of the WFxxx series and the development of any successor is not expected. So, for clarity, replace occurrences of "WFxxx" with "WF200". Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 4 ++-- drivers/staging/wfx/bus_spi.c | 6 +++--- drivers/staging/wfx/data_tx.c | 4 ++-- drivers/staging/wfx/fwio.c | 4 ++-- drivers/staging/wfx/hif_api_cmd.h | 2 +- drivers/staging/wfx/hif_api_general.h | 2 +- drivers/staging/wfx/hif_api_mib.h | 2 +- drivers/staging/wfx/hif_rx.c | 3 +-- drivers/staging/wfx/hif_rx.h | 3 +-- drivers/staging/wfx/hif_tx.c | 12 +++++------- drivers/staging/wfx/hif_tx.h | 4 ++-- drivers/staging/wfx/hif_tx_mib.c | 2 +- drivers/staging/wfx/hif_tx_mib.h | 2 +- drivers/staging/wfx/main.c | 2 +- drivers/staging/wfx/sta.c | 4 +--- drivers/staging/wfx/sta.h | 2 +- drivers/staging/wfx/wfx.h | 2 +- 17 files changed, 27 insertions(+), 33 deletions(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index ed53d0b45592..78fa81d82517 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -72,7 +72,7 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) int piggyback = 0; WARN(read_len > round_down(0xFFF, 2) * sizeof(u16), - "%s: request exceed WFx capability", __func__); + "%s: request exceed the chip capability", __func__); // Add 2 to take into account piggyback size alloc_len = wdev->hwbus_ops->align_size(wdev->hwbus_priv, read_len + 2); @@ -181,7 +181,7 @@ static void tx_helper(struct wfx_dev *wdev, struct hif_msg *hif) data = hif; WARN(len > wdev->hw_caps.size_inp_ch_buf, - "%s: request exceed WFx capability: %zu > %d\n", __func__, + "%s: request exceed the chip capability: %zu > %d\n", __func__, len, wdev->hw_caps.size_inp_ch_buf); len = wdev->hwbus_ops->align_size(wdev->hwbus_priv, len); ret = wfx_data_write(wdev, data, len); diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index a99125d1a30d..759e085048c3 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -39,9 +39,9 @@ struct wfx_spi_priv { }; /* - * WFx chip read data 16bits at time and place them directly into (little - * endian) CPU register. So, chip expect byte order like "B1 B0 B3 B2" (while - * LE is "B0 B1 B2 B3" and BE is "B3 B2 B1 B0") + * The chip reads 16bits of data at time and place them directly into (little + * endian) CPU register. So, the chip expects bytes order to be "B1 B0 B3 B2" + * (while LE is "B0 B1 B2 B3" and BE is "B3 B2 B1 B0") * * A little endian host with bits_per_word == 16 should do the right job * natively. The code below to support big endian host and commonly used SPI diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 77d69ed73e28..f141ab50f4fd 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -31,8 +31,8 @@ static int wfx_get_hw_rate(struct wfx_dev *wdev, } return rate->idx + 14; } - // WFx only support 2GHz, else band information should be retrieved - // from ieee80211_tx_info + // The device only support 2GHz, else band information should be + // retrieved from ieee80211_tx_info band = wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]; if (rate->idx >= band->n_bitrates) { WARN(1, "wrong rate->idx value: %d", rate->idx); diff --git a/drivers/staging/wfx/fwio.c b/drivers/staging/wfx/fwio.c index 1b8aec02d169..7b91ac615f4a 100644 --- a/drivers/staging/wfx/fwio.c +++ b/drivers/staging/wfx/fwio.c @@ -207,8 +207,8 @@ static int upload_firmware(struct wfx_dev *wdev, const u8 *data, size_t len) if (ret < 0) return ret; - // WFx seems to not support writing 0 in this register during - // first loop + // The device seems to not support writing 0 in this register + // during first loop offs += DNLD_BLOCK_SIZE; ret = sram_reg_write(wdev, WFX_DCA_PUT, offs); if (ret < 0) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 58c9bb036011..553dc45142f2 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* - * WFx hardware interface definitions + * WF200 hardware interface definitions * * Copyright (c) 2018-2020, Silicon Laboratories Inc. */ diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index 77030cecf134..714e1dd808e6 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* - * WFx hardware interface definitions + * WF200 hardware interface definitions * * Copyright (c) 2018-2020, Silicon Laboratories Inc. */ diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index 2a741a37a90c..b76f19224b5a 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: Apache-2.0 */ /* - * WFx hardware interface definitions + * WF200 hardware interface definitions * * Copyright (c) 2018-2020, Silicon Laboratories Inc. */ diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index a60c4a4ba935..fcfd5ccc9f01 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Implementation of chip-to-host event (aka indications) of WFxxx Split Mac - * (WSM) API. + * Handling of the chip-to-host events (aka indications) of the hardware API. * * Copyright (c) 2017-2020, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson diff --git a/drivers/staging/wfx/hif_rx.h b/drivers/staging/wfx/hif_rx.h index f07c10c8c6bd..96543b81fa77 100644 --- a/drivers/staging/wfx/hif_rx.h +++ b/drivers/staging/wfx/hif_rx.h @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Implementation of chip-to-host event (aka indications) of WFxxx Split Mac - * (WSM) API. + * Handling of the chip-to-host events (aka indications) of the hardware API. * * Copyright (c) 2017-2019, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index c5ab1c2e1e07..c1c97945317e 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Implementation of host-to-chip commands (aka request/confirmation) of WFxxx - * Split Mac (WSM) API. + * Implementation of the host-to-chip commands (aka request/confirmation) of the + * hardware API. * * Copyright (c) 2017-2020, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson @@ -28,7 +28,7 @@ static void wfx_fill_header(struct hif_msg *hif, int if_id, if (if_id == -1) if_id = 2; - WARN(cmd > 0x3f, "invalid WSM command %#.2x", cmd); + WARN(cmd > 0x3f, "invalid hardware command %#.2x", cmd); WARN(size > 0xFFF, "requested buffer is too large: %zu bytes", size); WARN(if_id > 0x3, "invalid interface ID %d", if_id); @@ -108,12 +108,10 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, mib_sep = "/"; } if (ret < 0) - dev_err(wdev->dev, - "WSM request %s%s%s (%#.2x) on vif %d returned error %d\n", + dev_err(wdev->dev, "hardware request %s%s%s (%#.2x) on vif %d returned error %d\n", get_hif_name(cmd), mib_sep, mib_name, cmd, vif, ret); if (ret > 0) - dev_warn(wdev->dev, - "WSM request %s%s%s (%#.2x) on vif %d returned status %d\n", + dev_warn(wdev->dev, "hardware request %s%s%s (%#.2x) on vif %d returned status %d\n", get_hif_name(cmd), mib_sep, mib_name, cmd, vif, ret); return ret; diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h index 46eed6cfa247..e57eabdcfa77 100644 --- a/drivers/staging/wfx/hif_tx.h +++ b/drivers/staging/wfx/hif_tx.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Implementation of host-to-chip commands (aka request/confirmation) of WFxxx - * Split Mac (WSM) API. + * Implementation of the host-to-chip commands (aka request/confirmation) of the + * hardware API. * * Copyright (c) 2017-2020, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index 1900b7fafd9e..c745271944e9 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Implementation of host-to-chip MIBs of WFxxx Split Mac (WSM) API. + * Implementation of the host-to-chip MIBs of the hardware API. * * Copyright (c) 2017-2020, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h index 812b3ba0f00e..2a3b84868ee4 100644 --- a/drivers/staging/wfx/hif_tx_mib.h +++ b/drivers/staging/wfx/hif_tx_mib.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Implementation of host-to-chip MIBs of WFxxx Split Mac (WSM) API. + * Implementation of the host-to-chip MIBs of the hardware API. * * Copyright (c) 2017-2020, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 2a759f3554c9..02b2e1c4ee12 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -35,7 +35,7 @@ #define WFX_PDS_MAX_SIZE 1500 -MODULE_DESCRIPTION("Silicon Labs 802.11 Wireless LAN driver for WFx"); +MODULE_DESCRIPTION("Silicon Labs 802.11 Wireless LAN driver for WF200"); MODULE_AUTHOR("Jérôme Pouiller "); MODULE_LICENSE("GPL"); diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 1e8d05c4f2da..1e21beeed438 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -24,7 +24,7 @@ u32 wfx_rate_mask_to_hw(struct wfx_dev *wdev, u32 rates) { int i; u32 ret = 0; - // WFx only support 2GHz + // The device only supports 2GHz struct ieee80211_supported_band *sband = wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]; for (i = 0; i < sband->n_bitrates; i++) { @@ -242,8 +242,6 @@ int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value) return 0; } -/* WSM callbacks */ - void wfx_event_report_rssi(struct wfx_vif *wvif, u8 raw_rcpi_rssi) { /* RSSI: signed Q8.0, RCPI: unsigned Q7.1 diff --git a/drivers/staging/wfx/sta.h b/drivers/staging/wfx/sta.h index d7b5df5ea4e6..056ed5267aba 100644 --- a/drivers/staging/wfx/sta.h +++ b/drivers/staging/wfx/sta.h @@ -59,7 +59,7 @@ void wfx_unassign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_chanctx_conf *conf); -// WSM Callbacks +// Hardware API Callbacks void wfx_cooling_timeout_work(struct work_struct *work); void wfx_suspend_hot_dev(struct wfx_dev *wdev, enum sta_notify_cmd cmd); void wfx_suspend_resume_mc(struct wfx_vif *wvif, enum sta_notify_cmd cmd); diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 9749602f6cdc..5637f9af79c0 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Common private data for Silicon Labs WFx chips. + * Common private data. * * Copyright (c) 2017-2020, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson From patchwork Mon Sep 13 13:01:56 2021 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: 510231 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCDD9C433F5 for ; Mon, 13 Sep 2021 13:05:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B93386101B for ; Mon, 13 Sep 2021 13:05:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240142AbhIMNGT (ORCPT ); Mon, 13 Sep 2021 09:06:19 -0400 Received: from mail-dm6nam10on2042.outbound.protection.outlook.com ([40.107.93.42]:9633 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240085AbhIMNEs (ORCPT ); Mon, 13 Sep 2021 09:04:48 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mxDPpLE1k/VMZRD+fxHWJlUolIKuyCi2+QdwqRjkL+VxRF1sHoCisxSWipe4snLymIdULq+QgHLYNVfMJJnFof+Xq2QOuYTD1Tk8PiA1ZvEsXMOa1VbUhaWmRnv08I6tdHtLBoUJGiESYb/QC3osYymJXRYKJB8e69n0xx5gPU2fxA3Yy8sYX0AQxPGoKr1oMAkGvvG6cHvnYVBrVZEn7sfWPALTigrzg019+f4NyH0GidWZLiMESmeXpYeFyXV2fWFs71sZVCXwnh2xR4V6X1k8iogOuqX41yvtq8ASNtV4YyViXKOB16ztIZ20brHHM601mH2kkhEQ4IVRfbfBzg== 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; bh=ji/Ro3T4EFvudESNOp7gumDhL+e49DGbfmq68yR81Dw=; b=f88O7fLEm7kJAGqqBhsCO8D9bh6O53NOXniyUh0/IWbjgghz1MitXB6aU3K4vHx5z+5WWvqiCc0WPH4rB6LIXs6471Jf2+0j/NAlMZGn0DVdK6ASHcY6+4mkgF/8Dr1x5B2E7clvQmf1Ujaw4rLgGjy9iwDgQsPMK1N61GHMlu1TWX7nt5PbR/xrhDLRTSLli2IPhbXHQgT7TSTty/iv64hN2GtR9H27cQpNPY2lCkWPKE8aV72S7aJwNrdALZgZUIzCdpeDQUinfUJz/nrN1jLVVejgOtwf35KH88NN6QOrOWjzKi6CdE4vMc6A5ECIq2z2ReyprPCos6CrsWW+qQ== 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=ji/Ro3T4EFvudESNOp7gumDhL+e49DGbfmq68yR81Dw=; b=qVYJcEY+VL3UT3kgOWDhTP29Xgif9ftl5EV+OJs4Og9ylClXlW2tHb37CMasTMhqoqO7k02boY9ZozTaliKmvvdTjsaZpOcVizIHhNJo2ZsJAxN6lgz1hemv6AKi7LxNoi1LWFT4gPMgagcMOc6s5Udyy7qOJTPS1YNj0ub/Y+E= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB3502.namprd11.prod.outlook.com (2603:10b6:805:da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:03:04 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:03:04 +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 v3 25/32] staging: wfx: update files descriptions Date: Mon, 13 Sep 2021 15:01:56 +0200 Message-Id: <20210913130203.1903622-26-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:03:03 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 817a923c-c256-4b70-e391-08d976b6d2f7 X-MS-TrafficTypeDiagnostic: SN6PR11MB3502: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: k3f9GhBH037V1f67r4z0NgUrgzts2lLTsTAUiaITM8wvFGwMkIAfC32GgkzSD2qM1JQUf6mnpMfZVf31RYmcMmB4fZXmzJcH9rkCBM13iI4SuWsRMGD3Qw+Dr8r213OVIPPn7CKDCBQnI6s3nrYRkZUuupVNPOhVOb7BXTprKzvSNNZ5XUUxPPmg0E0dbqN+yxA7s+3ryi0k3McwtZmWLta7KOtlsOAJbTAkiANgWcKkBbQ8/XcOXy4RGGPFWTqiB1PjwzrWj35C1DF9NVQpTROC6Mh9KNS4Pc50Be2qiuYTuP2NEVilmVNdUQk6/GP+kp5HP6UylX6+U5TCwNXpRkdSgu8bWLmATCSTZ/AfZun1txznUh9hBWf+2jwwbJILYSXOvSGnr8dkmzdvZdj9CMiemy5IuStia540uc6v7IkkUmFtq+n54kouyjkmECEb5vZqKc2PX3QLPdKX/ZpP5UDlx0Hl6xgKnXVh+vhX62TmVdAtGJqx7ewsyaPYMGfmCeLNUxGnn3Dk7KBqrT0psBwWJNKJGvKNQilVb8sRvvAqvtDE5rs/BJeHFApi2LrMY1vR4AUbjoXlHy/Xrh0uNBp3O6PNCo76VQeSCpETYx7WdIjcsXeASvHwVNUA3KjfkmSh3iVQNxhJYotJmUCAcC8dNVf3fpwB6OybIuLA1d75suV+GCYga0uWDhe7+sWBtVQUjfckBKj79Xmy7ZtVOQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39850400004)(136003)(396003)(376002)(346002)(366004)(6666004)(316002)(66476007)(8676002)(186003)(7696005)(52116002)(66946007)(26005)(4326008)(66556008)(2906002)(54906003)(107886003)(6486002)(2616005)(478600001)(1076003)(36756003)(5660300002)(956004)(8936002)(86362001)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?oOcm40nK/YxBFSG9UzDhBmn8q?= =?utf-8?q?ty7kF7VvnbC7SEdUowQQetXnLEz5Xz+IQv2YOvotbPcLz6m2VwyNKZqW?= =?utf-8?q?OFSVvG4yz6BSQASeXgMN5owhmS6ARpRDovfJ6pgQpPma5643jSVHwpnQ?= =?utf-8?q?UhEoXrlCpgT56yf95V00zfJAEaPq1rP2xMaWPIK6b38cMZKAkjU1WkmL?= =?utf-8?q?/7IMfzkKUeXKQewLMmH4O3J7wNcKoLHhEX1w90ohfqEQUzaE3MzC9uf6?= =?utf-8?q?vzeDKp3Jr8Fmp0UaUtpTMPQVIDLm1MV408HQQWf6pulRTdq01bu/4X1k?= =?utf-8?q?QqSfQ5mJFm+JrSvmqpbhnynn8FLP+jfT4quqgvkY3zyR/cydQTwij9wU?= =?utf-8?q?UPuxWyJ5/ubqQtwwwR/KOrQbFGbRpc8QGbcWufCcA3CAopL6d+KMVzP9?= =?utf-8?q?LDLGMs3IclEZ/5h/W45dc4dzI7ySA6Dxe/x5m7cVAgkJcUqlQjM9Jt/U?= =?utf-8?q?g5eYtNjswjafwHFUasA6Vym4+u0vwkeSsFMoaXAkwVVQDRs4qWAwAewZ?= =?utf-8?q?8c7EyMZfHXWWs/bkN6X7yHDVFK4CCQKgX01NBkjlR4pSoy4Km1Nq5D9z?= =?utf-8?q?1rqxhcJb5rCR16n0ArD2CXb6MM0MoqZqZXE0/mb3dZWZfiq4n6zRjZ/D?= =?utf-8?q?tPUiVhIzCtDeEQZSkhnwZ6+QWaEhjaVLn+JtOxwhSE5qkEGfzNarFl9S?= =?utf-8?q?CVSyiVew/Ka/ymrprQ9vUsUKRnF9MJDSYqVu067WuWXletpqmNvxG3r6?= =?utf-8?q?6xytlJXjw0/2Q8DL0iUf3dfK4gkBVzr1QREGUda+SBJJ0Tvg1Cxf3Xgq?= =?utf-8?q?qvPJQd9+juUvbizNgGCI3Ln9RW6uVOtHBG2iAGUsG8KOhq3BY5XLrlNm?= =?utf-8?q?9CED6fRtJMtdQ9GyRLILwlCoMAd3LPx10ZBJzfbTTtKZkaetElSjSQKh?= =?utf-8?q?QK3hU7+BfWqdPQD6JMz1rQGAdDUSWM0iRvs3DRBlt2pd5vg/7BTmIAd2?= =?utf-8?q?4pP+WKk9SUFXs5rKGtrTf/uzVScxU37PlEvgq1ssl2EjzFAO8NEVccSe?= =?utf-8?q?SVabg6v1WFvyyoRQ6crWyRx2Z6FhkUmrDkmvtCvylN2gxecqg7RHl/Bu?= =?utf-8?q?LBgpIlLr21nur7pnW++AHL2I3nPBHYsUuC1YQEBZria1yQt7tnk+7QuO?= =?utf-8?q?pqque2NkcdJqAvr8uC9/b99cGqFLBbU/kVetecxb5Yhf9Q4HQfTfXuw9?= =?utf-8?q?99HAipywMvsbI1RikNeoEFbzcy2td10aU2u2aX8sD35pGkEivWF8UynI?= =?utf-8?q?tya3NNKRZoUteghNGvDaBdlD0EnhpnGlCosTqgyFUl3qz+iHcX1+u8HO?= =?utf-8?q?WShYTfiQ5omGSvgMI0CuimS6o6tW5iX?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 817a923c-c256-4b70-e391-08d976b6d2f7 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:03:04.7051 (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: te28mB00VIqrrAJ6an4dus9A3WEb+jFcUWFMJBzfJXj71NA/avt6C464hAyN9s/CqBchsR/ionbAc9ysM4U/CA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3502 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Each file of the driver contains a short description of its purpose. These description were a bit outdated. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.h | 2 +- drivers/staging/wfx/data_rx.c | 2 +- drivers/staging/wfx/data_rx.h | 2 +- drivers/staging/wfx/data_tx.c | 2 +- drivers/staging/wfx/data_tx.h | 2 +- drivers/staging/wfx/hwio.h | 2 +- drivers/staging/wfx/key.h | 2 +- drivers/staging/wfx/queue.c | 2 +- drivers/staging/wfx/queue.h | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/wfx/bh.h b/drivers/staging/wfx/bh.h index 78c49329e22a..f08c62ed039c 100644 --- a/drivers/staging/wfx/bh.h +++ b/drivers/staging/wfx/bh.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Interrupt bottom half. + * Interrupt bottom half (BH). * * Copyright (c) 2017-2020, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c index 385f2d42a0e2..509f45cdbab9 100644 --- a/drivers/staging/wfx/data_rx.c +++ b/drivers/staging/wfx/data_rx.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Datapath implementation. + * Data receiving implementation. * * Copyright (c) 2017-2020, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson diff --git a/drivers/staging/wfx/data_rx.h b/drivers/staging/wfx/data_rx.h index 4c0da37f2084..f79545c06130 100644 --- a/drivers/staging/wfx/data_rx.h +++ b/drivers/staging/wfx/data_rx.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Datapath implementation. + * Data receiving implementation. * * Copyright (c) 2017-2020, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index f141ab50f4fd..04241422edc8 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Datapath implementation. + * Data transmitting implementation. * * Copyright (c) 2017-2020, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson diff --git a/drivers/staging/wfx/data_tx.h b/drivers/staging/wfx/data_tx.h index 401363d6b563..7dcc9132d7cd 100644 --- a/drivers/staging/wfx/data_tx.h +++ b/drivers/staging/wfx/data_tx.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Datapath implementation. + * Data transmitting implementation. * * Copyright (c) 2017-2020, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson diff --git a/drivers/staging/wfx/hwio.h b/drivers/staging/wfx/hwio.h index 0b8e4f7157df..5e43993b14d8 100644 --- a/drivers/staging/wfx/hwio.h +++ b/drivers/staging/wfx/hwio.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Low-level API. + * Low-level I/O functions. * * Copyright (c) 2017-2020, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson diff --git a/drivers/staging/wfx/key.h b/drivers/staging/wfx/key.h index 70a44d0ca35e..dd189788acf1 100644 --- a/drivers/staging/wfx/key.h +++ b/drivers/staging/wfx/key.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Implementation of mac80211 API. + * Key management related functions. * * Copyright (c) 2017-2020, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c index 0ab207237d9f..e5e7595565ee 100644 --- a/drivers/staging/wfx/queue.c +++ b/drivers/staging/wfx/queue.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * O(1) TX queue with built-in allocator. + * Queue between the tx operation and the bh workqueue. * * Copyright (c) 2017-2020, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson diff --git a/drivers/staging/wfx/queue.h b/drivers/staging/wfx/queue.h index 80ba19455ef3..24b60833864b 100644 --- a/drivers/staging/wfx/queue.h +++ b/drivers/staging/wfx/queue.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * O(1) TX queue with built-in allocator. + * Queue between the tx operation and the bh workqueue. * * Copyright (c) 2017-2020, Silicon Laboratories, Inc. * Copyright (c) 2010, ST-Ericsson From patchwork Mon Sep 13 13:01:57 2021 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: 510233 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EF6AC433F5 for ; Mon, 13 Sep 2021 13:04:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 16D8160E8B for ; Mon, 13 Sep 2021 13:04:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239630AbhIMNF7 (ORCPT ); Mon, 13 Sep 2021 09:05:59 -0400 Received: from mail-dm6nam10on2073.outbound.protection.outlook.com ([40.107.93.73]:38187 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240160AbhIMNEx (ORCPT ); Mon, 13 Sep 2021 09:04:53 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PzjlHkhDiDAw+nYGKWJpwrY+ip4fjh/N8GWXLlrhUeK8F46oTFlrnugCc4bVZIve7+oTeqPRGafHSr0N810cjktHWZzmdP9qIUahm+tVSF3bXoC9P4S47U/H3XzJ3dj+joAMTpB7lphfoq6Rz5hURklzhtcOLK4QC3lbx/lNViBAwh6rKDpsdDgxGjC0kxHHoiXB2Rtgt7lvPZWRVX0lno6c5tRd1AUDLQ25GwKMaGkP+pn2vkLQZBFh05qHPCaM3nwXU0gIdpax/QG7WdIRBJGfKnBJa6sAlJcZ2cjpJvqrX+EaA81FETZ2cToYYfdHjv6k4nvWxMmd3i471r579g== 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; bh=Dpb4kGMGvfj35Vbk2VtBmz6gj03sg9/7HG89Z6uGabo=; b=GIt30LGUUCIa62Gs9VVRy1l2a1HJaVcK6cOWP0F11jUWPdB46b7UwYp9DhD4pvuxB1EhUvfWcJHq4skuJ0TkmjZpsNK3FVWNWbZaiQieh7mtRdCAdIX+xE8BVJbMvh5Ur/KG2AZAfjPoPj4dtDuTXhUnqYNronAMk24Rw+0ABbOCLR1U2mz6EPcEpy9xgUAK2k7OCrNDXtsjUOaLn/qQo5yLQsr+ACVNnDr+fhn17Mn4BMmyYGTVBoAJjqchInByJbSOxE2jA5iv2P1cmpJ/Bon3Fr6iYd3Rcc4buMIHi8Km0vxZIHqUJ0wqoW15wtc1hJDPQe1SSVwfcGUG2dWkTw== 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=Dpb4kGMGvfj35Vbk2VtBmz6gj03sg9/7HG89Z6uGabo=; b=P+W3bBjxqjwF4foRT0/l6rBTSTY0TL3hyl0Cpw2GSBGfwoENwmqwVyo0mUbOl/OmQ4HXtzYksi2lac7V9jSGCPwmNTicqp3aNKkis1+33LZlUY+eBU6HBTeS5OPv5AAsOjVXlX7xgUafCuZkGsEi+lbyv+G/KAt8B4BjH2Blnk0= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB3502.namprd11.prod.outlook.com (2603:10b6:805:da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:03:06 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:03:06 +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 v3 26/32] staging: wfx: reformat comment Date: Mon, 13 Sep 2021 15:01:57 +0200 Message-Id: <20210913130203.1903622-27-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:03:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 99e7a8ab-7417-4282-fa9b-08d976b6d415 X-MS-TrafficTypeDiagnostic: SN6PR11MB3502: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:551; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FF6Z6kBTdmXge1jQItEFp5d2PKmGuNkybjZND8Mmxse/3Zf1GU4RYQdI6kd8sDviIaN29dHkGckD1Xc4zRMzY1jZqUMuYuY+8bpDwuwmZaIQTsh4fg/1jauhMq17/wUcRFiXFHoXpJoYdSPS9XViZRk4b9/aGHr+jbYMm4RHOu60TosbA3GyeSszekh1b1iIcK3rnzuIPRYA8cu5xElx/0K+FYm71kQwZ7S8f09UI9UoztNJboWQu1C+e8efUs9EA15OGGTMHMmiNDqXK6hLdar0S4dK2LbOJK1QB+GqUCnO5IZthXwdGM9nJAXvAkok3o52TTTnkkVFBfDvE4KicTWw1UqfTzFsQ0M6X+EJpmorRCGWk8lrJJe2t/LyQldY7Ip8TJ7uNAbBGHHQUOyi5T9IKdCNGYHxrKxnQFJqEODgXdhc+5wsPmw38AqtZH8dxt4MT3mORLBsq/n7cVWZL7hq9SP+F14jMO+3x5h1f80EdFobFiE9usocfj4YhUcasB8XL7XI7eS5WoZG00+V17g6889C77LEdGud5fYTIzQuwm/qQagLJ/dUFtizX3/GKeCpD25a1OaA6E1fajId+AkHNJ5x//vp5ab+vm/snQdYLfYg6ibUAfIq+2DSSYz4nZD3B5HZl+HGm2bSpolxJG6zlEh71vfyHjBU502+uDNMXUPnkZAuPJXojRBeJx4bsv0I78xMSuFc4JeLY7gGIA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39850400004)(136003)(396003)(376002)(346002)(366004)(6666004)(316002)(66476007)(8676002)(186003)(4744005)(7696005)(52116002)(66946007)(26005)(4326008)(66556008)(2906002)(54906003)(107886003)(6486002)(2616005)(478600001)(1076003)(36756003)(5660300002)(66574015)(956004)(8936002)(86362001)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Re+yXZRpCywZNW/UTq2PlxKns?= =?utf-8?q?gmsVLgG27XnV4Zh45hMpTnQ3ZGpvEUrJhJ1eyrmVmcn0kYqIXHO3Z/N4?= =?utf-8?q?mY2naQQ6Wtj6D4ERLD+mU+r2o+bYSHgpi+LHnKvM7yxIQQrHpCgVFODU?= =?utf-8?q?r3aaWwHh5LPpOfo81cw/AKqb74ZjW362XrOgtzPu9ZfgP5BRfyO7Bk2b?= =?utf-8?q?WviXIm1cBv5z4M2sm37m2nwsqmh+bM2Qc8QOTAIFGIjQJ9ISB3m2UW3+?= =?utf-8?q?dn26t9kIOZVAXj2pAQTluDWzYSkvLkwC9EHwHEQqdMdRR0NoiMlS4qHI?= =?utf-8?q?DzgmoF5MyVEvr8T6Qqa6v2/7JEk2MuHJneWSSe03HrbebNTSo4xFR+gX?= =?utf-8?q?SqM926dRcDm27yT4Bazp+2djwZVKgH9IiS6d/reSe07hPGY1tC6sXDxb?= =?utf-8?q?gRWF+0MJE6FYNlLXseiopkGcXLis3UMhsqyy/nbOrYiHtQHTVutyG5P5?= =?utf-8?q?ar0pw6Li9Agjui3Umpg1KLKZwg9CIaxiI1IXg6fjlpEbEUak0I3KJtQ5?= =?utf-8?q?iL0OYLLkMUWFC0cgECpLLvCEV1MYTooSfoNtvGhUouOTIE8jT80xi8Ka?= =?utf-8?q?8MSiEADSPPqP2zloQGn9YOjWt2HwQ3S6N8WClSdayza8Jc7VQP1xEK+K?= =?utf-8?q?hlaBg04xt/fPp5mG4huM3C74KdI8GM224I6SAaE+o5CdyUwmL4CNlmUL?= =?utf-8?q?TtutiPy+k3Z/REHv9x2IIQzWNYH8aYxh6HjMOi1ZE/YNznYc3f0U9nLY?= =?utf-8?q?b4X+vugLIY7rnZiK1+bQFqWMvqEtUB0r1t6uH+Ks9hrxXJOFb/4OdBpO?= =?utf-8?q?c+WLmNVaslgRoUur/AbALZnEBwoi/GqGXxeMhwUnb3uvLGengJRQge/q?= =?utf-8?q?1CcxNP8h2VKEUgambp0g92tzWFfVTJgcWe5op0KzcYQ7RBNIjEg7UIaq?= =?utf-8?q?76+HqUSh9aTqADWiAVuLLwHZRVizd8hM7CLki8gsGo8dthABdvpOp7PY?= =?utf-8?q?c8Tzw8AHVV4jn9++JlAKmaAh0A6WlVEc0yyic7/cxDzLMs6sHPdG20Vy?= =?utf-8?q?saIxtrrSMJxCmODExkgoayDxEJT1gtOC40XfqzrCj8sc85NveQiIfJ5z?= =?utf-8?q?PdNIeLt7YVM+vnJPAuawTLStc2SxR5+UkEWLTPK14C9YTJ9xzuhMqQ0h?= =?utf-8?q?sFi/iGGai6Brt33eDJ9rvjggu6kS2JArq7P0jIy6KXrbitwKbFL7VEUV?= =?utf-8?q?6H4vy+bd93P819yGkzWSW0ibihcsik1NqL6Bsh6jd3RgMK4ZkYKeInsK?= =?utf-8?q?3GifgwkqeFQmQEN5POQjjBHO5M9DKzo62lwQFpsMsWZ0L6bskpoEigjc?= =?utf-8?q?6Uc6suWb/akpCeuT1+TsT6Fw7SwG315?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99e7a8ab-7417-4282-fa9b-08d976b6d415 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:03:06.7279 (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: DHXNzFNVgKTSw8A3PzU5PWZBZBXKLW5EMiR/UdeaMmbbpV3RGPSMH9ccn6T3u0+U45RUoydEZ5PdnFRmtcTmpw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3502 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The new comment takes only one line instead of three. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/sta.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 1e21beeed438..70e1c4d8ae2e 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -599,9 +599,7 @@ static int wfx_update_tim(struct wfx_vif *wvif) tim_ptr = skb->data + tim_offset; if (tim_offset && tim_length >= 6) { - /* Ignore DTIM count from mac80211: - * firmware handles DTIM internally. - */ + /* Firmware handles DTIM counter internally */ tim_ptr[2] = 0; /* Set/reset aid0 bit */ From patchwork Mon Sep 13 13:01:58 2021 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: 511484 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38F70C433FE for ; Mon, 13 Sep 2021 13:05:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08D93610E7 for ; Mon, 13 Sep 2021 13:05:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240349AbhIMNHB (ORCPT ); Mon, 13 Sep 2021 09:07:01 -0400 Received: from mail-dm6nam10on2076.outbound.protection.outlook.com ([40.107.93.76]:58976 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240223AbhIMNF2 (ORCPT ); Mon, 13 Sep 2021 09:05:28 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XI3lUrAXg2rVz7VfyfkAiWEZ2oWE3LMnciO0/LGCpRF27fpBJ4yZU9h20X3qB1B1Zv1umfUIT+WA0q3VimEOFNw3G2E0Jspstk0Iwng+Qbu5Xc9feLSvy83YcU1W1p5I0brte5zzooVwm/UVcevsenHmrl8dYuI3hJL+1UoiUUJkKyQRkJLrb8eVJErAm95R9UoUDKSmBLVYHcfFs/l41VIuBRmeysPdlHO7zjWR8iZwWv7emp2RsMnhyeuropGozSxVVF6SJyDByjgvRHDYvnT+GiVqDyc/5O4Q+fm1sgXpRByH3okmjPC+j8outt5A5dexd7GVbXQe0AHcnLJVkg== 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; bh=u6Rorers3D6dgY4lxn1PyN50HsY0fbavt5tZLBkvzmw=; b=LpZ8uexkr1rkt/Cr0DxJBa325FnQC2b+zXIkVtIsrsk6dydMwF89B1V1v4Ir+GJLUooMYPza+QNfcLXf3q/NcwdRm1kZpdXAxkPKipaGGPNG1Vw7hmWgMpzsboDJAiwJKmMjAPOM3GtjwobgGOzhE8e9wddl99BqEpYKuRy+VjEzVMA6epUX9HDodWqV04r3f0W9bGdBOcEcqztf4XzbZX590s1ZNs6NDY7TThyP0bof5N1K7vOaf/9a6p8pqk/+tqntMTErqAhCZfGCdkXyYjnUA1xuivIKNN6bUj4sMqV8IZjdkR+Bb62BMGA9kzfMHy9WwiMWKtn15PPsrQ5G6A== 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=u6Rorers3D6dgY4lxn1PyN50HsY0fbavt5tZLBkvzmw=; b=dUbKUH2JvDyqJvvtPMRIX46wj1//Z30lGANuo2bTh941RVhSJoNd37wjK6XUww5oxVmp8r/TWjoFH3vQPWwgkgnusz66hibR6E8koO/0QppFAiCyiIZ9eSv9nRB/Vn8cmnD8ni3jvo8G/Tgj835A27Y+reb5Tx/znFtUFg1rxcI= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB3502.namprd11.prod.outlook.com (2603:10b6:805:da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:03:08 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:03: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 v3 27/32] staging: wfx: avoid c99 comments Date: Mon, 13 Sep 2021 15:01:58 +0200 Message-Id: <20210913130203.1903622-28-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:03:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 940d76f4-2b72-48f1-6bd7-08d976b6d540 X-MS-TrafficTypeDiagnostic: SN6PR11MB3502: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JUYFjhl3lb8YogXY7/p/E+sicMhoMXALRecXHShaqFOKSxa7F0xfNEUAtgih7zDTLPKkvQ1LRERwaiYGTEBHZ0yBIKdnrRU5h7EarWBuxdDp5cwlC1uX9PqhgDq/Tk1NO+VT2JYOQa/nQEx3GRVhxI6E9ZtxVOAK8Ho+L8HXVOkohxOcjhcf8uVLrwuQNfNwZieQCIYYV80xJkxGOOJ+2GqDMmmlz+BZVj10CCAbjHIjcR4KtnLvTQwFSuhl3gDuQaa+qwsOVc4Y0BswiQMrsjk5McO5dyMs77w9rI16PyM8q10YpqvOxNKc93v+wfm+XMRWe4Se/G4D2bdHsVetY1IgdL1HmvhcXqV7rDfMx2GdG35VjXY1CBuYymmmPXvoDcsVlbhcLW9w1uFKYtLRz2cpDFbm0NIc3o/C5aCpgyz6BVsnK1eTPm8KCJrPI6HRcHkM6L+dCNAmEDyO0hyIdM4I9S13EbTongvRIvujrv7U2y32npE4Bvi0rFcDcEaUJJjRGv9uRzaSX4+rVdaBCVEDtkiQ6a8bavUgU/MhftVuB3LekQhiaU0Q/AKNAypIZpJv310y3Chl3GCTIkGQKrR3WZmDcLTN0SmzisBGNltbeienyE32JEHzKMBtHb3zY05DagKpkJ+rxiA/IvCFtCXcOkTfBOyhUH7k6lBiTd1IoEmmTLGxtm68KHK/1ygIGzrULKaV7S8R28Hh6CVVFw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39850400004)(136003)(396003)(376002)(346002)(366004)(6666004)(316002)(66476007)(8676002)(186003)(7696005)(52116002)(30864003)(66946007)(26005)(4326008)(66556008)(2906002)(54906003)(107886003)(6486002)(2616005)(478600001)(1076003)(36756003)(5660300002)(66574015)(956004)(8936002)(86362001)(38100700002)(38350700002)(83380400001)(559001)(579004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?G2GfQEdMOMwjt47Ak/fnhuzXM?= =?utf-8?q?zwj0RKSy5Lqr2/Nk7LkVXpl/6D6NuX3+ihdPssWfXTffNBX6s7zVVtUL?= =?utf-8?q?28Zdc+kduEKfsVXlc14lRerrrwc8qGhg+5brj7aMKldvDpkIXjpSyd23?= =?utf-8?q?7GJK8fnL425681qCBjsi6IqMv1KV2hyOoqvblUHtv6Qqsa9Z+VzPLEos?= =?utf-8?q?zs7RdYmLE/JSYIbqVsi0TQfJ8tTLsdV1bHmQTYlBB15biWiWcmswQt7z?= =?utf-8?q?fGeReRAp+3c0YpJnwMPDM+6gJa/FJoCgeLyv7EDhuGU05hW28m6zgWR8?= =?utf-8?q?h7WYGPiiQdZs/kCOol8f6QkWKdPmA1kI11taYZPJ0PMjrgfY8RC5RpgG?= =?utf-8?q?mfGZxmcQjRU7ZdMm/VjqO7Qze33Al7gjz+VSzsnM/JbZPybOlo1/icWj?= =?utf-8?q?7kOU9y5geb3grlDiG+LS9hy1LY//LLHLf9/i6sn8J1KUSixlJP0jIAwF?= =?utf-8?q?pWdThzwESd+aL1XI8qZBtiUuu24fdbDiApyJluQnyDwGMXj5oK86zRwC?= =?utf-8?q?DpMP5WYWm2A4KD2r0KV6RzKGmnJhx98Y4US4Oli+ONC8hpth5JLEUpFZ?= =?utf-8?q?QWwdJPmDk0q4cygcC9EYb8CAr3+2rIHqvRPnA49aVCl5PdskTJ/KILiI?= =?utf-8?q?zb9iXXPgdnp0paScmJ+fYUz3xqzcTqSs6UJMfh65jpKP9Uh0D6kThGB+?= =?utf-8?q?VtdP2l/T6KqtayXuEXqSRnZepk5xcQwINAy8mbx0IjRfGv6XsmEB9nXk?= =?utf-8?q?Sp6dikXFO2PaWx2LvboB2/2MhcwDCbZdpGThznyPDsrxl1S8gZEprsyB?= =?utf-8?q?3OBhmfnyYso61+5Dev7R1uCbfrBa6FW3MwXzCbSjhqU8fmDfQW3nRrac?= =?utf-8?q?fihRmX62rLPQl9s2bJhZ8oiDEF88jXh6NTY68lejm+FH5gSobgIs1CKE?= =?utf-8?q?Lq70VpVE2TcZyJKPdxggtrw+c1XCUqRVAeBXPzzgZ90IF4N1dyHFUdvs?= =?utf-8?q?ouFrbUEjh29Qect2Gc+JuML/JIXEM/LAhSa1cxocaGiZ57hK7N4ZNJse?= =?utf-8?q?8MmYcjr9Cv+UcJg+9EM2emzbsI9SjevI8ir0gsXi1UgluLsJXO1TPFAs?= =?utf-8?q?8K70meS+Moj9eANfmKhEF7SV8Jrhxe2VzTdgHHxpUk4uZdRU4ifAul+u?= =?utf-8?q?haqh2bBaCF3chRF+Yd/VJUxjn42y1zvpxGct4Nn8ecL7xlgW1JXk/GYn?= =?utf-8?q?eUXyUUutpE8ajUFHZbX6ZLR8wePS87XAr+BPYdgP3k9R1iyCFnBFqsu7?= =?utf-8?q?cK2kedC8HgJq3XpEAXU1piDolQvQQnAnPD92S19sWHiAs9CXgCnauEkT?= =?utf-8?q?wLY0JOLMos33MyeW4PMZ3UpBbJRbqM/?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 940d76f4-2b72-48f1-6bd7-08d976b6d540 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:03:08.5179 (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: ldzHSDzMziRUoWPdWCM1Iqs0V0Jx6zc92P80E01yrFcCtJvAvhXawhbIsKtCl8/akgenEmGMm2zOD/mAOX+49g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3502 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The wfx driver is a network driver. C99 comments are prohibited in this part of the kernel. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 22 ++++---- drivers/staging/wfx/bus_sdio.c | 8 +-- drivers/staging/wfx/bus_spi.c | 12 +++-- drivers/staging/wfx/data_rx.c | 5 +- drivers/staging/wfx/data_tx.c | 56 ++++++++++--------- drivers/staging/wfx/data_tx.h | 2 +- drivers/staging/wfx/debug.c | 12 +++-- drivers/staging/wfx/fwio.c | 23 ++++---- drivers/staging/wfx/hif_api_cmd.h | 12 +++-- drivers/staging/wfx/hif_api_general.h | 17 +++--- drivers/staging/wfx/hif_api_mib.h | 2 +- drivers/staging/wfx/hif_rx.c | 17 +++--- drivers/staging/wfx/hif_tx.c | 32 ++++++----- drivers/staging/wfx/hif_tx_mib.c | 4 +- drivers/staging/wfx/hwio.c | 6 +-- drivers/staging/wfx/hwio.h | 16 +++--- drivers/staging/wfx/key.c | 4 +- drivers/staging/wfx/main.c | 13 ++--- drivers/staging/wfx/queue.c | 27 +++++----- drivers/staging/wfx/queue.h | 2 +- drivers/staging/wfx/sta.c | 78 ++++++++++++++------------- drivers/staging/wfx/sta.h | 6 +-- drivers/staging/wfx/traces.h | 2 +- drivers/staging/wfx/wfx.h | 2 +- 24 files changed, 205 insertions(+), 175 deletions(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index 78fa81d82517..e956b5a5ccac 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -32,18 +32,20 @@ static void device_wakeup(struct wfx_dev *wdev) } for (;;) { gpiod_set_value_cansleep(wdev->pdata.gpio_wakeup, 1); - // completion.h does not provide any function to wait - // completion without consume it (a kind of - // wait_for_completion_done_timeout()). So we have to emulate - // it. + /* completion.h does not provide any function to wait + * completion without consume it (a kind of + * wait_for_completion_done_timeout()). So we have to emulate + * it. + */ if (wait_for_completion_timeout(&wdev->hif.ctrl_ready, msecs_to_jiffies(2))) { complete(&wdev->hif.ctrl_ready); return; } else if (max_retry-- > 0) { - // Older firmwares have a race in sleep/wake-up process. - // Redo the process is sufficient to unfreeze the - // chip. + /* Older firmwares have a race in sleep/wake-up process. + * Redo the process is sufficient to unfreeze the + * chip. + */ dev_err(wdev->dev, "timeout while wake up chip\n"); gpiod_set_value_cansleep(wdev->pdata.gpio_wakeup, 0); usleep_range(2000, 2500); @@ -74,7 +76,7 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) WARN(read_len > round_down(0xFFF, 2) * sizeof(u16), "%s: request exceed the chip capability", __func__); - // Add 2 to take into account piggyback size + /* Add 2 to take into account piggyback size */ alloc_len = wdev->hwbus_ops->align_size(wdev->hwbus_priv, read_len + 2); skb = dev_alloc_skb(alloc_len); if (!skb) @@ -119,7 +121,7 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) } skb_put(skb, le16_to_cpu(hif->len)); - // wfx_handle_rx takes care on SKB livetime + /* wfx_handle_rx takes care on SKB livetime */ wfx_handle_rx(wdev, skb); if (!wdev->hif.tx_buffers_used) wake_up(&wdev->hif.tx_buffers_empty); @@ -148,7 +150,7 @@ static int bh_work_rx(struct wfx_dev *wdev, int max_msg, int *num_cnf) ctrl_reg = 0; if (!(ctrl_reg & CTRL_NEXT_LEN_MASK)) return i; - // ctrl_reg units are 16bits words + /* ctrl_reg units are 16bits words */ len = (ctrl_reg & CTRL_NEXT_LEN_MASK) * 2; piggyback = rx_helper(wdev, len, num_cnf); if (piggyback < 0) diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index e06d7e1ebe9c..eb70bef6bd6e 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -67,7 +67,7 @@ static int wfx_sdio_copy_to_io(void *priv, unsigned int reg_id, /* Use queue mode buffers */ if (reg_id == WFX_REG_IN_OUT_QUEUE) sdio_addr |= bus->buf_id_tx << 7; - // FIXME: discards 'const' qualifier for src + /* FIXME: discards 'const' qualifier for src */ ret = sdio_memcpy_toio(bus->func, sdio_addr, (void *)src, count); if (!ret && reg_id == WFX_REG_IN_OUT_QUEUE) bus->buf_id_tx = (bus->buf_id_tx + 1) % 32; @@ -198,7 +198,7 @@ static int wfx_sdio_probe(struct sdio_func *func, } else { dev_warn(&func->dev, "device is not declared in DT, features will be limited\n"); - // FIXME: ignore VID/PID and only rely on device tree + /* FIXME: ignore VID/PID and only rely on device tree */ // return -ENODEV; } @@ -210,7 +210,7 @@ static int wfx_sdio_probe(struct sdio_func *func, sdio_claim_host(func); ret = sdio_enable_func(func); - // Block of 64 bytes is more efficient than 512B for frame sizes < 4k + /* Block of 64 bytes is more efficient than 512B for frame sizes < 4k */ sdio_set_block_size(func, 64); sdio_release_host(func); if (ret) @@ -251,7 +251,7 @@ static void wfx_sdio_remove(struct sdio_func *func) #define SDIO_DEVICE_ID_SILABS_WF200 0x1000 static const struct sdio_device_id wfx_sdio_ids[] = { { SDIO_DEVICE(SDIO_VENDOR_ID_SILABS, SDIO_DEVICE_ID_SILABS_WF200) }, - // FIXME: ignore VID/PID and only rely on device tree + /* FIXME: ignore VID/PID and only rely on device tree */ // { SDIO_DEVICE(SDIO_ANY_ID, SDIO_ANY_ID) }, { }, }; diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index 759e085048c3..61f73b3ebc80 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -86,7 +86,7 @@ static int wfx_spi_copy_to_io(void *priv, unsigned int addr, { struct wfx_spi_priv *bus = priv; u16 regaddr = (addr << 12) | (count / 2); - // FIXME: use a bounce buffer + /* FIXME: use a bounce buffer */ u16 *src16 = (void *)src; int ret, i; struct spi_message m; @@ -104,8 +104,9 @@ static int wfx_spi_copy_to_io(void *priv, unsigned int addr, cpu_to_le16s(®addr); - // Register address and CONFIG content always use 16bit big endian - // ("BADC" order) + /* Register address and CONFIG content always use 16bit big endian + * ("BADC" order) + */ if (bus->need_swab) swab16s(®addr); if (bus->need_swab && addr == WFX_REG_CONFIG) @@ -163,7 +164,8 @@ static int wfx_spi_irq_unsubscribe(void *priv) static size_t wfx_spi_align_size(void *priv, size_t size) { - // Most of SPI controllers avoid DMA if buffer size is not 32bit aligned + /* Most of SPI controllers avoid DMA if buffer size is not 32bit aligned + */ return ALIGN(size, 4); } @@ -187,7 +189,7 @@ static int wfx_spi_probe(struct spi_device *func) ret = spi_setup(func); if (ret) return ret; - // Trace below is also displayed by spi_setup() if compiled with DEBUG + /* Trace below is also displayed by spi_setup() if compiled with DEBUG */ dev_dbg(&func->dev, "SPI params: CS=%d, mode=%d bits/word=%d speed=%d\n", func->chip_select, func->mode, func->bits_per_word, func->max_speed_hz); diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c index 509f45cdbab9..bfc3961b7b89 100644 --- a/drivers/staging/wfx/data_rx.c +++ b/drivers/staging/wfx/data_rx.c @@ -76,8 +76,9 @@ void wfx_rx_cb(struct wfx_vif *wvif, if (arg->encryp) hdr->flag |= RX_FLAG_DECRYPTED; - // Block ack negotiation is offloaded by the firmware. However, - // re-ordering must be done by the mac80211. + /* Block ack negotiation is offloaded by the firmware. However, + * re-ordering must be done by the mac80211. + */ if (ieee80211_is_action(frame->frame_control) && mgmt->u.action.category == WLAN_CATEGORY_BACK && skb->len > IEEE80211_MIN_ACTION_SIZE) { diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 04241422edc8..052a19161dc5 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -31,8 +31,9 @@ static int wfx_get_hw_rate(struct wfx_dev *wdev, } return rate->idx + 14; } - // The device only support 2GHz, else band information should be - // retrieved from ieee80211_tx_info + /* The device only support 2GHz, else band information should be + * retrieved from ieee80211_tx_info + */ band = wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]; if (rate->idx >= band->n_bitrates) { WARN(1, "wrong rate->idx value: %d", rate->idx); @@ -57,7 +58,7 @@ static void wfx_tx_policy_build(struct wfx_vif *wvif, struct tx_policy *policy, break; WARN_ON(rates[i].count > 15); rateid = wfx_get_hw_rate(wdev, &rates[i]); - // Pack two values in each byte of policy->rates + /* Pack two values in each byte of policy->rates */ count = rates[i].count; if (rateid % 2) count <<= 4; @@ -238,7 +239,7 @@ static void wfx_tx_fixup_rates(struct ieee80211_tx_rate *rates) int i; bool finished; - // Firmware is not able to mix rates with different flags + /* Firmware is not able to mix rates with different flags */ for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { if (rates[0].flags & IEEE80211_TX_RC_SHORT_GI) rates[i].flags |= IEEE80211_TX_RC_SHORT_GI; @@ -248,7 +249,7 @@ static void wfx_tx_fixup_rates(struct ieee80211_tx_rate *rates) rates[i].flags &= ~IEEE80211_TX_RC_USE_RTS_CTS; } - // Sort rates and remove duplicates + /* Sort rates and remove duplicates */ do { finished = true; for (i = 0; i < IEEE80211_TX_MAX_RATES - 1; i++) { @@ -268,19 +269,19 @@ static void wfx_tx_fixup_rates(struct ieee80211_tx_rate *rates) } } } while (!finished); - // Ensure that MCS0 or 1Mbps is present at the end of the retry list + /* Ensure that MCS0 or 1Mbps is present at the end of the retry list */ for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { if (rates[i].idx == 0) break; if (rates[i].idx == -1) { rates[i].idx = 0; - rates[i].count = 8; // == hw->max_rate_tries + rates[i].count = 8; /* == hw->max_rate_tries */ rates[i].flags = rates[i - 1].flags & IEEE80211_TX_RC_MCS; break; } } - // All retries use long GI + /* All retries use long GI */ for (i = 1; i < IEEE80211_TX_MAX_RATES; i++) rates[i].flags &= ~IEEE80211_TX_RC_SHORT_GI; } @@ -342,13 +343,13 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, WARN(queue_id >= IEEE80211_NUM_ACS, "unsupported queue_id"); wfx_tx_fixup_rates(tx_info->driver_rates); - // From now tx_info->control is unusable + /* From now tx_info->control is unusable */ memset(tx_info->rate_driver_data, 0, sizeof(struct wfx_tx_priv)); - // Fill tx_priv + /* Fill tx_priv */ tx_priv = (struct wfx_tx_priv *)tx_info->rate_driver_data; tx_priv->icv_size = wfx_tx_get_icv_len(hw_key); - // Fill hif_msg + /* Fill hif_msg */ WARN(skb_headroom(skb) < wmsg_len, "not enough space in skb"); WARN(offset & 1, "attempt to transmit an unaligned frame"); skb_put(skb, tx_priv->icv_size); @@ -366,17 +367,18 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, return -EIO; } - // Fill tx request + /* Fill tx request */ req = (struct hif_req_tx *)hif_msg->body; - // packet_id just need to be unique on device. 32bits are more than - // necessary for that task, so we tae advantage of it to add some extra - // data for debug. + /* packet_id just need to be unique on device. 32bits are more than + * necessary for that task, so we tae advantage of it to add some extra + * data for debug. + */ req->packet_id = atomic_add_return(1, &wvif->wdev->packet_id) & 0xFFFF; req->packet_id |= IEEE80211_SEQ_TO_SN(le16_to_cpu(hdr->seq_ctrl)) << 16; req->packet_id |= queue_id << 28; req->fc_offset = offset; - // Queue index are inverted between firmware and Linux + /* Queue index are inverted between firmware and Linux */ req->queue_id = 3 - queue_id; req->peer_sta_id = wfx_tx_get_link_id(wvif, sta, hdr); req->retry_policy_index = wfx_tx_get_retry_policy_id(wvif, tx_info); @@ -386,7 +388,7 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) req->after_dtim = 1; - // Auxiliary operations + /* Auxiliary operations */ wfx_tx_queues_put(wvif, skb); if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) schedule_work(&wvif->update_tim_work); @@ -408,15 +410,16 @@ void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, compiletime_assert(sizeof(struct wfx_tx_priv) <= driver_data_room, "struct tx_priv is too large"); WARN(skb->next || skb->prev, "skb is already member of a list"); - // control.vif can be NULL for injected frames + /* control.vif can be NULL for injected frames */ if (tx_info->control.vif) wvif = (struct wfx_vif *)tx_info->control.vif->drv_priv; else wvif = wvif_iterate(wdev, NULL); if (WARN_ON(!wvif)) goto drop; - // Because of TX_AMPDU_SETUP_IN_HW, mac80211 does not try to send any - // BlockAck session management frame. The check below exist just in case. + /* Because of TX_AMPDU_SETUP_IN_HW, mac80211 does not try to send any + * BlockAck session management frame. The check below exist just in case. + */ if (ieee80211_is_action_back(hdr)) { dev_info(wdev->dev, "drop BA action\n"); goto drop; @@ -457,7 +460,7 @@ static void wfx_tx_fill_rates(struct wfx_dev *wdev, tx_count = arg->ack_failures; if (!arg->status || arg->ack_failures) - tx_count += 1; // Also report success + tx_count += 1; /* Also report success */ for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { rate = &tx_info->status.rates[i]; if (rate->idx < 0) @@ -505,14 +508,15 @@ void wfx_tx_confirm_cb(struct wfx_dev *wdev, const struct hif_cnf_tx *arg) if (!wvif) return; - // Note that wfx_pending_get_pkt_us_delay() get data from tx_info + /* Note that wfx_pending_get_pkt_us_delay() get data from tx_info */ _trace_tx_stats(arg, skb, wfx_pending_get_pkt_us_delay(wdev, skb)); wfx_tx_fill_rates(wdev, tx_info, arg); skb_trim(skb, skb->len - tx_priv->icv_size); - // From now, you can touch to tx_info->status, but do not touch to - // tx_priv anymore - // FIXME: use ieee80211_tx_info_clear_status() + /* From now, you can touch to tx_info->status, but do not touch to + * tx_priv anymore + */ + /* FIXME: use ieee80211_tx_info_clear_status() */ memset(tx_info->rate_driver_data, 0, sizeof(tx_info->rate_driver_data)); memset(tx_info->pad, 0, sizeof(tx_info->pad)); @@ -527,7 +531,7 @@ void wfx_tx_confirm_cb(struct wfx_dev *wdev, const struct hif_cnf_tx *arg) } else if (arg->status == HIF_STATUS_TX_FAIL_REQUEUE) { WARN(!arg->requeue, "incoherent status and result_flags"); if (tx_info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM) { - wvif->after_dtim_tx_allowed = false; // DTIM period elapsed + wvif->after_dtim_tx_allowed = false; /* DTIM period elapsed */ schedule_work(&wvif->update_tim_work); } tx_info->flags |= IEEE80211_TX_STAT_TX_FILTERED; diff --git a/drivers/staging/wfx/data_tx.h b/drivers/staging/wfx/data_tx.h index 7dcc9132d7cd..dafd8fef44cf 100644 --- a/drivers/staging/wfx/data_tx.h +++ b/drivers/staging/wfx/data_tx.h @@ -27,7 +27,7 @@ struct tx_policy { struct tx_policy_cache { struct tx_policy cache[HIF_TX_RETRY_POLICY_MAX]; - // FIXME: use a trees and drop hash from tx_policy + /* FIXME: use a trees and drop hash from tx_policy */ struct list_head used; struct list_head free; spinlock_t lock; diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c index 16c3f55f1a3d..9f93268a3202 100644 --- a/drivers/staging/wfx/debug.c +++ b/drivers/staging/wfx/debug.c @@ -256,9 +256,10 @@ static ssize_t wfx_send_hif_msg_write(struct file *file, if (count < sizeof(struct hif_msg)) return -EINVAL; - // wfx_cmd_send() checks that reply buffer is wide enough, but does not - // return precise length read. User have to know how many bytes should - // be read. Filling reply buffer with a memory pattern may help user. + /* wfx_cmd_send() checks that reply buffer is wide enough, but does not + * return precise length read. User have to know how many bytes should + * be read. Filling reply buffer with a memory pattern may help user. + */ memset(context->reply, 0xFF, sizeof(context->reply)); request = memdup_user(user_buf, count); if (IS_ERR(request)) @@ -288,8 +289,9 @@ static ssize_t wfx_send_hif_msg_read(struct file *file, char __user *user_buf, return ret; if (context->ret < 0) return context->ret; - // Be careful, write() is waiting for a full message while read() - // only returns a payload + /* Be careful, write() is waiting for a full message while read() + * only returns a payload + */ if (copy_to_user(user_buf, context->reply, count)) return -EFAULT; diff --git a/drivers/staging/wfx/fwio.c b/drivers/staging/wfx/fwio.c index 7b91ac615f4a..c5ba0a50b474 100644 --- a/drivers/staging/wfx/fwio.c +++ b/drivers/staging/wfx/fwio.c @@ -14,11 +14,11 @@ #include "wfx.h" #include "hwio.h" -// Addresses below are in SRAM area +/* Addresses below are in SRAM area */ #define WFX_DNLD_FIFO 0x09004000 #define DNLD_BLOCK_SIZE 0x0400 -#define DNLD_FIFO_SIZE 0x8000 // (32 * DNLD_BLOCK_SIZE) -// Download Control Area (DCA) +#define DNLD_FIFO_SIZE 0x8000 /* (32 * DNLD_BLOCK_SIZE) */ +/* Download Control Area (DCA) */ #define WFX_DCA_IMAGE_SIZE 0x0900C000 #define WFX_DCA_PUT 0x0900C004 #define WFX_DCA_GET 0x0900C008 @@ -58,8 +58,8 @@ #define ERR_ECC_PUB_KEY 0x11 #define ERR_MAC_KEY 0x18 -#define DCA_TIMEOUT 50 // milliseconds -#define WAKEUP_TIMEOUT 200 // milliseconds +#define DCA_TIMEOUT 50 /* milliseconds */ +#define WAKEUP_TIMEOUT 200 /* milliseconds */ static const char * const fwio_errors[] = { [ERR_INVALID_SEC_TYPE] = "Invalid section type or wrong encryption", @@ -125,7 +125,7 @@ static int get_firmware(struct wfx_dev *wdev, u32 keyset_chip, data = (*fw)->data; if (memcmp(data, "KEYSET", 6) != 0) { - // Legacy firmware format + /* Legacy firmware format */ *file_offset = 0; keyset_file = 0x90; } else { @@ -207,8 +207,9 @@ static int upload_firmware(struct wfx_dev *wdev, const u8 *data, size_t len) if (ret < 0) return ret; - // The device seems to not support writing 0 in this register - // during first loop + /* The device seems to not support writing 0 in this register + * during first loop + */ offs += DNLD_BLOCK_SIZE; ret = sram_reg_write(wdev, WFX_DCA_PUT, offs); if (ret < 0) @@ -265,7 +266,7 @@ static int load_firmware_secure(struct wfx_dev *wdev) if (ret) goto error; - sram_reg_write(wdev, WFX_DNLD_FIFO, 0xFFFFFFFF); // Fifo init + sram_reg_write(wdev, WFX_DNLD_FIFO, 0xFFFFFFFF); /* Fifo init */ sram_write_dma_safe(wdev, WFX_DCA_FW_VERSION, "\x01\x00\x00\x00", FW_VERSION_SIZE); sram_write_dma_safe(wdev, WFX_DCA_FW_SIGNATURE, fw->data + fw_offset, @@ -289,7 +290,7 @@ static int load_firmware_secure(struct wfx_dev *wdev) sram_reg_write(wdev, WFX_DCA_HOST_STATUS, HOST_UPLOAD_COMPLETE); ret = wait_ncp_status(wdev, NCP_AUTH_OK); - // Legacy ROM support + /* Legacy ROM support */ if (ret < 0) ret = wait_ncp_status(wdev, NCP_PUB_KEY_RDY); if (ret < 0) @@ -334,7 +335,7 @@ int wfx_init_device(struct wfx_dev *wdev) { int ret; int hw_revision, hw_type; - int wakeup_timeout = 50; // ms + int wakeup_timeout = 50; /* ms */ ktime_t now, start; u32 reg; diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 553dc45142f2..b0aa13b23a51 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -134,7 +134,7 @@ struct hif_req_start_scan_alt { u8 num_of_channels; __le32 min_channel_time; __le32 max_channel_time; - __le32 tx_power_level; // signed value + __le32 tx_power_level; /* signed value */ struct hif_ssid_def ssid_def[HIF_API_MAX_NB_SSIDS]; u8 channel_list[]; } __packed; @@ -174,8 +174,9 @@ enum hif_frame_format { }; struct hif_req_tx { - // packet_id is not interpreted by the device, so it is not necessary to - // declare it little endian + /* packet_id is not interpreted by the device, so it is not necessary to + * declare it little endian + */ u32 packet_id; u8 max_tx_rate; u8 queue_id:2; @@ -211,8 +212,9 @@ enum hif_qos_ackplcy { struct hif_cnf_tx { __le32 status; - // packet_id is copied from struct hif_req_tx without been interpreted - // by the device, so it is not necessary to declare it little endian + /* packet_id is copied from struct hif_req_tx without been interpreted + * by the device, so it is not necessary to declare it little endian + */ u32 packet_id; u8 txed_rate; u8 ack_failures; diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index 714e1dd808e6..5f74f829b7df 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -114,9 +114,10 @@ enum hif_api_rate_index { }; struct hif_ind_startup { - // As the others, this struct is interpreted as little endian by the - // device. However, this struct is also used by the driver. We prefer to - // declare it in native order and doing byte swap on reception. + /* As the others, this struct is interpreted as little endian by the + * device. However, this struct is also used by the driver. We prefer to + * declare it in native order and doing byte swap on reception. + */ __le32 status; u16 hardware_id; u8 opn[14]; @@ -193,9 +194,9 @@ struct hif_rx_stats { __le32 throughput; __le32 nb_rx_by_rate[API_RATE_NUM_ENTRIES]; __le16 per[API_RATE_NUM_ENTRIES]; - __le16 snr[API_RATE_NUM_ENTRIES]; // signed value - __le16 rssi[API_RATE_NUM_ENTRIES]; // signed value - __le16 cfo[API_RATE_NUM_ENTRIES]; // signed value + __le16 snr[API_RATE_NUM_ENTRIES]; /* signed value */ + __le16 rssi[API_RATE_NUM_ENTRIES]; /* signed value */ + __le16 cfo[API_RATE_NUM_ENTRIES]; /* signed value */ __le32 date; __le32 pwr_clk_freq; u8 is_ext_pwr_clk; @@ -205,8 +206,8 @@ struct hif_rx_stats { struct hif_tx_power_loop_info { __le16 tx_gain_dig; __le16 tx_gain_pa; - __le16 target_pout; // signed value - __le16 p_estimation; // signed value + __le16 target_pout; /* signed value */ + __le16 p_estimation; /* signed value */ __le16 vpdet; u8 measurement_index; u8 reserved; diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index b76f19224b5a..da534f244757 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -209,7 +209,7 @@ struct hif_mib_slot_time { } __packed; struct hif_mib_current_tx_power_level { - __le32 power_level; // signed value + __le32 power_level; /* signed value */ } __packed; struct hif_mib_non_erp_protection { diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index fcfd5ccc9f01..6963b54d5593 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -19,10 +19,10 @@ static int hif_generic_confirm(struct wfx_dev *wdev, const struct hif_msg *hif, const void *buf) { - // All confirm messages start with status + /* All confirm messages start with status */ int status = le32_to_cpup((__le32 *)buf); int cmd = hif->id; - int len = le16_to_cpu(hif->len) - 4; // drop header + int len = le16_to_cpu(hif->len) - 4; /* drop header */ WARN(!mutex_is_locked(&wdev->hif_cmd.lock), "data locking error"); @@ -244,7 +244,7 @@ static int hif_generic_indication(struct wfx_dev *wdev, return 0; case HIF_GENERIC_INDICATION_TYPE_RX_STATS: mutex_lock(&wdev->rx_stats_lock); - // Older firmware send a generic indication beside RxStats + /* Older firmware send a generic indication beside RxStats */ if (!wfx_api_older_than(wdev, 1, 4)) dev_info(wdev->dev, "Rx test ongoing. Temperature: %d degrees C\n", body->data.rx_stats.current_temp); @@ -297,7 +297,7 @@ static const struct { "bus clock is too slow (<1kHz)" }, { HIF_ERROR_HIF_RX_DATA_TOO_LARGE, "HIF message too large" }, - // Following errors only exists in old firmware versions: + /* Following errors only exists in old firmware versions: */ { HIF_ERROR_HIF_TX_QUEUE_FULL, "HIF messages queue is full" }, { HIF_ERROR_HIF_BUS, @@ -374,7 +374,7 @@ static const struct { { HIF_IND_ID_GENERIC, hif_generic_indication }, { HIF_IND_ID_ERROR, hif_error_indication }, { HIF_IND_ID_EXCEPTION, hif_exception_indication }, - // FIXME: allocate skb_p from hif_receive_indication and make it generic + /* FIXME: allocate skb_p from hif_receive_indication and make it generic */ //{ HIF_IND_ID_RX, hif_receive_indication }, }; @@ -385,12 +385,13 @@ void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb) int hif_id = hif->id; if (hif_id == HIF_IND_ID_RX) { - // hif_receive_indication take care of skb lifetime + /* hif_receive_indication take care of skb lifetime */ hif_receive_indication(wdev, hif, hif->body, skb); return; } - // Note: mutex_is_lock cause an implicit memory barrier that protect - // buf_send + /* Note: mutex_is_lock cause an implicit memory barrier that protect + * buf_send + */ if (mutex_is_locked(&wdev->hif_cmd.lock) && wdev->hif_cmd.buf_send && wdev->hif_cmd.buf_send->id == hif_id) { diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index c1c97945317e..2fd8bbd36e25 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -55,15 +55,16 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, int vif = request->interface; int ret; - // Do not wait for any reply if chip is frozen + /* Do not wait for any reply if chip is frozen */ if (wdev->chip_frozen) return -ETIMEDOUT; mutex_lock(&wdev->hif_cmd.lock); WARN(wdev->hif_cmd.buf_send, "data locking error"); - // Note: call to complete() below has an implicit memory barrier that - // hopefully protect buf_send + /* Note: call to complete() below has an implicit memory barrier that + * hopefully protect buf_send + */ wdev->hif_cmd.buf_send = request; wdev->hif_cmd.buf_recv = reply; wdev->hif_cmd.len_recv = reply_len; @@ -72,8 +73,9 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, wfx_bh_request_tx(wdev); if (no_reply) { - // Chip won't reply. Give enough time to the wq to send the - // buffer. + /* Chip won't reply. Give enough time to the wq to send the + * buffer. + */ msleep(100); wdev->hif_cmd.buf_send = NULL; mutex_unlock(&wdev->hif_cmd.lock); @@ -117,8 +119,9 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, return ret; } -// This function is special. After HIF_REQ_ID_SHUT_DOWN, chip won't reply to any -// request anymore. Obviously, only call this function during device unregister. +/* This function is special. After HIF_REQ_ID_SHUT_DOWN, chip won't reply to any + * request anymore. Obviously, only call this function during device unregister. + */ int hif_shutdown(struct wfx_dev *wdev) { int ret; @@ -277,7 +280,7 @@ int hif_stop_scan(struct wfx_vif *wvif) { int ret; struct hif_msg *hif; - // body associated to HIF_REQ_ID_STOP_SCAN is empty + /* body associated to HIF_REQ_ID_STOP_SCAN is empty */ wfx_alloc_hif(0, &hif); if (!hif) @@ -341,16 +344,17 @@ int hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg) { int ret; struct hif_msg *hif; - // FIXME: only send necessary bits + /* FIXME: only send necessary bits */ struct hif_req_add_key *body = wfx_alloc_hif(sizeof(*body), &hif); if (!hif) return -ENOMEM; - // FIXME: swap bytes as necessary in body + /* FIXME: swap bytes as necessary in body */ memcpy(body, arg, sizeof(*body)); if (wfx_api_older_than(wdev, 1, 5)) - // Legacy firmwares expect that add_key to be sent on right - // interface. + /* Legacy firmwares expect that add_key to be sent on right + * interface. + */ wfx_fill_header(hif, arg->int_id, HIF_REQ_ID_ADD_KEY, sizeof(*body)); else @@ -394,7 +398,7 @@ int hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, body->cw_max = cpu_to_le16(arg->cw_max); body->tx_op_limit = cpu_to_le16(arg->txop * USEC_PER_TXOP); body->queue_id = 3 - queue; - // API 2.0 has changed queue IDs values + /* API 2.0 has changed queue IDs values */ if (wfx_api_older_than(wvif->wdev, 2, 0) && queue == IEEE80211_AC_BE) body->queue_id = HIF_QUEUE_ID_BACKGROUND; if (wfx_api_older_than(wvif->wdev, 2, 0) && queue == IEEE80211_AC_BK) @@ -419,7 +423,7 @@ int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout) return -ENOMEM; if (ps) { body->enter_psm = 1; - // Firmware does not support more than 128ms + /* Firmware does not support more than 128ms */ body->fast_psm_idle_period = min(dynamic_ps_timeout * 2, 255); if (body->fast_psm_idle_period) body->fast_psm = 1; diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index c745271944e9..45e531d996bd 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -68,7 +68,7 @@ int hif_get_counters_table(struct wfx_dev *wdev, int vif_id, struct hif_mib_extended_count_table *arg) { if (wfx_api_older_than(wdev, 1, 3)) { - // extended_count_table is wider than count_table + /* extended_count_table is wider than count_table */ memset(arg, 0xFF, sizeof(*arg)); return hif_read_mib(wdev, vif_id, HIF_MIB_ID_COUNTERS_TABLE, arg, sizeof(struct hif_mib_count_table)); @@ -246,7 +246,7 @@ int hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr) }; if (addr) { - // Caution: type of addr is __be32 + /* Caution: type of addr is __be32 */ memcpy(arg.ipv4_address, addr, sizeof(arg.ipv4_address)); arg.arp_enable = HIF_ARP_NS_FILTERING_ENABLE; } diff --git a/drivers/staging/wfx/hwio.c b/drivers/staging/wfx/hwio.c index 36fbc5b5d64c..30eb888830d2 100644 --- a/drivers/staging/wfx/hwio.c +++ b/drivers/staging/wfx/hwio.c @@ -31,7 +31,7 @@ static int read32(struct wfx_dev *wdev, int reg, u32 *val) int ret; __le32 *tmp = kmalloc(sizeof(u32), GFP_KERNEL); - *val = ~0; // Never return undefined value + *val = ~0; /* Never return undefined value */ if (!tmp) return -ENOMEM; ret = wdev->hwbus_ops->copy_from_io(wdev->hwbus_priv, reg, tmp, @@ -153,7 +153,7 @@ static int indirect_read(struct wfx_dev *wdev, int reg, u32 addr, err: if (ret < 0) - memset(buf, 0xFF, len); // Never return undefined value + memset(buf, 0xFF, len); /* Never return undefined value */ return ret; } @@ -335,7 +335,7 @@ int igpr_reg_read(struct wfx_dev *wdev, int index, u32 *val) { int ret; - *val = ~0; // Never return undefined value + *val = ~0; /* Never return undefined value */ ret = write32_locked(wdev, WFX_REG_SET_GEN_R_W, IGPR_RW | index << 24); if (ret) return ret; diff --git a/drivers/staging/wfx/hwio.h b/drivers/staging/wfx/hwio.h index 5e43993b14d8..9a361ed95ecb 100644 --- a/drivers/staging/wfx/hwio.h +++ b/drivers/staging/wfx/hwio.h @@ -27,30 +27,30 @@ int sram_reg_write(struct wfx_dev *wdev, u32 addr, u32 val); int ahb_reg_read(struct wfx_dev *wdev, u32 addr, u32 *val); int ahb_reg_write(struct wfx_dev *wdev, u32 addr, u32 val); -#define CFG_ERR_SPI_FRAME 0x00000001 // only with SPI -#define CFG_ERR_SDIO_BUF_MISMATCH 0x00000001 // only with SDIO +#define CFG_ERR_SPI_FRAME 0x00000001 /* only with SPI */ +#define CFG_ERR_SDIO_BUF_MISMATCH 0x00000001 /* only with SDIO */ #define CFG_ERR_BUF_UNDERRUN 0x00000002 #define CFG_ERR_DATA_IN_TOO_LARGE 0x00000004 #define CFG_ERR_HOST_NO_OUT_QUEUE 0x00000008 #define CFG_ERR_BUF_OVERRUN 0x00000010 #define CFG_ERR_DATA_OUT_TOO_LARGE 0x00000020 #define CFG_ERR_HOST_NO_IN_QUEUE 0x00000040 -#define CFG_ERR_HOST_CRC_MISS 0x00000080 // only with SDIO -#define CFG_SPI_IGNORE_CS 0x00000080 // only with SPI -#define CFG_BYTE_ORDER_MASK 0x00000300 // only writable with SPI +#define CFG_ERR_HOST_CRC_MISS 0x00000080 /* only with SDIO */ +#define CFG_SPI_IGNORE_CS 0x00000080 /* only with SPI */ +#define CFG_BYTE_ORDER_MASK 0x00000300 /* only writable with SPI */ #define CFG_BYTE_ORDER_BADC 0x00000000 #define CFG_BYTE_ORDER_DCBA 0x00000100 -#define CFG_BYTE_ORDER_ABCD 0x00000200 // SDIO always use this value +#define CFG_BYTE_ORDER_ABCD 0x00000200 /* SDIO always use this value */ #define CFG_DIRECT_ACCESS_MODE 0x00000400 #define CFG_PREFETCH_AHB 0x00000800 #define CFG_DISABLE_CPU_CLK 0x00001000 #define CFG_PREFETCH_SRAM 0x00002000 #define CFG_CPU_RESET 0x00004000 -#define CFG_SDIO_DISABLE_IRQ 0x00008000 // only with SDIO +#define CFG_SDIO_DISABLE_IRQ 0x00008000 /* only with SDIO */ #define CFG_IRQ_ENABLE_DATA 0x00010000 #define CFG_IRQ_ENABLE_WRDY 0x00020000 #define CFG_CLK_RISE_EDGE 0x00040000 -#define CFG_SDIO_DISABLE_CRC_CHK 0x00080000 // only with SDIO +#define CFG_SDIO_DISABLE_CRC_CHK 0x00080000 /* only with SDIO */ #define CFG_RESERVED 0x00F00000 #define CFG_DEVICE_ID_MAJOR 0x07000000 #define CFG_DEVICE_ID_RESERVED 0x78000000 diff --git a/drivers/staging/wfx/key.c b/drivers/staging/wfx/key.c index 2ab82bed4c1b..51a528102016 100644 --- a/drivers/staging/wfx/key.c +++ b/drivers/staging/wfx/key.c @@ -84,10 +84,10 @@ static u8 fill_tkip_group(struct hif_tkip_group_key *msg, memcpy(msg->tkip_key_data, keybuf, sizeof(msg->tkip_key_data)); keybuf += sizeof(msg->tkip_key_data); if (iftype == NL80211_IFTYPE_AP) - // Use Tx MIC Key + /* Use Tx MIC Key */ memcpy(msg->rx_mic_key, keybuf + 0, sizeof(msg->rx_mic_key)); else - // Use Rx MIC Key + /* Use Rx MIC Key */ memcpy(msg->rx_mic_key, keybuf + 8, sizeof(msg->rx_mic_key)); return HIF_KEY_TYPE_TKIP_GROUP; } diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 02b2e1c4ee12..e5e852ddf9c3 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -92,7 +92,7 @@ static const struct ieee80211_supported_band wfx_band_2ghz = { .bitrates = wfx_rates, .n_bitrates = ARRAY_SIZE(wfx_rates), .ht_cap = { - // Receive caps + /* Receive caps */ .cap = IEEE80211_HT_CAP_GRN_FLD | IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_MAX_AMSDU | (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT), @@ -100,7 +100,7 @@ static const struct ieee80211_supported_band wfx_band_2ghz = { .ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K, .ampdu_density = IEEE80211_HT_MPDU_DENSITY_NONE, .mcs = { - .rx_mask = { 0xFF }, // MCS0 to MCS7 + .rx_mask = { 0xFF }, /* MCS0 to MCS7 */ .rx_highest = cpu_to_le16(72), .tx_params = IEEE80211_HT_MCS_TX_DEFINED, }, @@ -294,7 +294,7 @@ struct wfx_dev *wfx_init_common(struct device *dev, hw->wiphy->n_iface_combinations = ARRAY_SIZE(wfx_iface_combinations); hw->wiphy->iface_combinations = wfx_iface_combinations; hw->wiphy->bands[NL80211_BAND_2GHZ] = devm_kmalloc(dev, sizeof(wfx_band_2ghz), GFP_KERNEL); - // FIXME: also copy wfx_rates and wfx_2ghz_chantable + /* FIXME: also copy wfx_rates and wfx_2ghz_chantable */ memcpy(hw->wiphy->bands[NL80211_BAND_2GHZ], &wfx_band_2ghz, sizeof(wfx_band_2ghz)); @@ -336,8 +336,9 @@ int wfx_probe(struct wfx_dev *wdev) int err; struct gpio_desc *gpio_saved; - // During first part of boot, gpio_wakeup cannot yet been used. So - // prevent bh() to touch it. + /* During first part of boot, gpio_wakeup cannot yet been used. So + * prevent bh() to touch it. + */ gpio_saved = wdev->pdata.gpio_wakeup; wdev->pdata.gpio_wakeup = NULL; wdev->poll_irq = true; @@ -360,7 +361,7 @@ int wfx_probe(struct wfx_dev *wdev) goto err0; } - // FIXME: fill wiphy::hw_version + /* FIXME: fill wiphy::hw_version */ dev_info(wdev->dev, "started firmware %d.%d.%d \"%s\" (API: %d.%d, keyset: %02X, caps: 0x%.8X)\n", wdev->hw_caps.firmware_major, wdev->hw_caps.firmware_minor, wdev->hw_caps.firmware_build, wdev->hw_caps.firmware_label, diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c index e5e7595565ee..7a3ba3c38925 100644 --- a/drivers/staging/wfx/queue.c +++ b/drivers/staging/wfx/queue.c @@ -32,7 +32,7 @@ void wfx_tx_flush(struct wfx_dev *wdev) { int ret; - // Do not wait for any reply if chip is frozen + /* Do not wait for any reply if chip is frozen */ if (wdev->chip_frozen) return; @@ -45,7 +45,7 @@ void wfx_tx_flush(struct wfx_dev *wdev) dev_warn(wdev->dev, "cannot flush tx buffers (%d still busy)\n", wdev->hif.tx_buffers_used); wfx_pending_dump_old_frames(wdev, 3000); - // FIXME: drop pending frames here + /* FIXME: drop pending frames here */ wdev->chip_frozen = true; } mutex_unlock(&wdev->hif_cmd.lock); @@ -60,9 +60,10 @@ void wfx_tx_lock_flush(struct wfx_dev *wdev) void wfx_tx_queues_init(struct wfx_vif *wvif) { - // The device is in charge to respect the details of the QoS parameters. - // The driver just ensure that it roughtly respect the priorities to - // avoid any shortage. + /* The device is in charge to respect the details of the QoS parameters. + * The driver just ensure that it roughtly respect the priorities to + * avoid any shortage. + */ const int priorities[IEEE80211_NUM_ACS] = { 1, 2, 64, 128 }; int i; @@ -217,8 +218,9 @@ bool wfx_tx_queues_has_cab(struct wfx_vif *wvif) if (wvif->vif->type != NL80211_IFTYPE_AP) return false; for (i = 0; i < IEEE80211_NUM_ACS; ++i) - // Note: since only AP can have mcast frames in queue and only - // one vif can be AP, all queued frames has same interface id + /* Note: since only AP can have mcast frames in queue and only + * one vif can be AP, all queued frames has same interface id + */ if (!skb_queue_empty_lockless(&wvif->tx_queue[i].cab)) return true; return false; @@ -237,7 +239,7 @@ static struct sk_buff *wfx_tx_queues_get_skb(struct wfx_dev *wdev) struct hif_msg *hif; struct sk_buff *skb; - // sort the queues + /* sort the queues */ wvif = NULL; while ((wvif = wvif_iterate(wdev, wvif)) != NULL) { for (i = 0; i < IEEE80211_NUM_ACS; i++) { @@ -259,9 +261,10 @@ static struct sk_buff *wfx_tx_queues_get_skb(struct wfx_dev *wdev) skb = skb_dequeue(&queues[i]->cab); if (!skb) continue; - // Note: since only AP can have mcast frames in queue - // and only one vif can be AP, all queued frames has - // same interface id + /* Note: since only AP can have mcast frames in queue + * and only one vif can be AP, all queued frames has + * same interface id + */ hif = (struct hif_msg *)skb->data; WARN_ON(hif->interface != wvif->id); WARN_ON(queues[i] != @@ -270,7 +273,7 @@ static struct sk_buff *wfx_tx_queues_get_skb(struct wfx_dev *wdev) trace_queues_stats(wdev, queues[i]); return skb; } - // No more multicast to sent + /* No more multicast to sent */ wvif->after_dtim_tx_allowed = false; schedule_work(&wvif->update_tim_work); } diff --git a/drivers/staging/wfx/queue.h b/drivers/staging/wfx/queue.h index 24b60833864b..54b5def2e24c 100644 --- a/drivers/staging/wfx/queue.h +++ b/drivers/staging/wfx/queue.h @@ -16,7 +16,7 @@ struct wfx_vif; struct wfx_queue { struct sk_buff_head normal; - struct sk_buff_head cab; // Content After (DTIM) Beacon + struct sk_buff_head cab; /* Content After (DTIM) Beacon */ atomic_t pending_frames; int priority; }; diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 70e1c4d8ae2e..aceb18a1f54b 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -24,7 +24,7 @@ u32 wfx_rate_mask_to_hw(struct wfx_dev *wdev, u32 rates) { int i; u32 ret = 0; - // The device only supports 2GHz + /* The device only supports 2GHz */ struct ieee80211_supported_band *sband = wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]; for (i = 0; i < sband->n_bitrates; i++) { @@ -51,11 +51,11 @@ void wfx_cooling_timeout_work(struct work_struct *work) void wfx_suspend_hot_dev(struct wfx_dev *wdev, enum sta_notify_cmd cmd) { if (cmd == STA_NOTIFY_AWAKE) { - // Device recover normal temperature + /* Device recover normal temperature */ if (cancel_delayed_work(&wdev->cooling_timeout_work)) wfx_tx_unlock(wdev); } else { - // Device is too hot + /* Device is too hot */ schedule_delayed_work(&wdev->cooling_timeout_work, 10 * HZ); wfx_tx_lock(wdev); } @@ -103,13 +103,14 @@ void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, struct wfx_dev *wdev = hw->priv; bool filter_bssid, filter_prbreq, filter_beacon; - // Notes: - // - Probe responses (FIF_BCN_PRBRESP_PROMISC) are never filtered - // - PS-Poll (FIF_PSPOLL) are never filtered - // - RTS, CTS and Ack (FIF_CONTROL) are always filtered - // - Broken frames (FIF_FCSFAIL and FIF_PLCPFAIL) are always filtered - // - Firmware does (yet) allow to forward unicast traffic sent to - // other stations (aka. promiscuous mode) + /* Notes: + * - Probe responses (FIF_BCN_PRBRESP_PROMISC) are never filtered + * - PS-Poll (FIF_PSPOLL) are never filtered + * - RTS, CTS and Ack (FIF_CONTROL) are always filtered + * - Broken frames (FIF_FCSFAIL and FIF_PLCPFAIL) are always filtered + * - Firmware does (yet) allow to forward unicast traffic sent to + * other stations (aka. promiscuous mode) + */ *total_flags &= FIF_BCN_PRBRESP_PROMISC | FIF_ALLMULTI | FIF_OTHER_BSS | FIF_PROBE_REQ | FIF_PSPOLL; @@ -117,8 +118,9 @@ void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, while ((wvif = wvif_iterate(wdev, wvif)) != NULL) { mutex_lock(&wvif->scan_lock); - // Note: FIF_BCN_PRBRESP_PROMISC covers probe response and - // beacons from other BSS + /* Note: FIF_BCN_PRBRESP_PROMISC covers probe response and + * beacons from other BSS + */ if (*total_flags & FIF_BCN_PRBRESP_PROMISC) filter_beacon = false; else @@ -130,7 +132,7 @@ void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, else filter_bssid = true; - // In AP mode, chip can reply to probe request itself + /* In AP mode, chip can reply to probe request itself */ if (*total_flags & FIF_PROBE_REQ && wvif->vif->type == NL80211_IFTYPE_AP) { dev_dbg(wdev->dev, "do not forward probe request in AP mode\n"); @@ -161,15 +163,16 @@ static int wfx_get_ps_timeout(struct wfx_vif *wvif, bool *enable_ps) chan1 = wdev_to_wvif(wvif->wdev, 1)->vif->bss_conf.chandef.chan; if (chan0 && chan1 && wvif->vif->type != NL80211_IFTYPE_AP) { if (chan0->hw_value == chan1->hw_value) { - // It is useless to enable PS if channels are the same. + /* It is useless to enable PS if channels are the same. */ if (enable_ps) *enable_ps = false; if (wvif->vif->bss_conf.assoc && wvif->vif->bss_conf.ps) dev_info(wvif->wdev->dev, "ignoring requested PS mode"); return -1; } else { - // It is necessary to enable PS if channels - // are different. + /* It is necessary to enable PS if channels + * are different. + */ if (enable_ps) *enable_ps = true; if (wvif->wdev->force_ps_timeout > -1) @@ -305,7 +308,7 @@ int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (vif->type == NL80211_IFTYPE_STATION) hif_set_mfp(wvif, sta->mfp, sta->mfp); - // In station mode, the firmware interprets new link-id as a TDLS peer. + /* In station mode, the firmware interprets new link-id as a TDLS peer */ if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) return 0; sta_priv->link_id = ffz(wvif->link_id_map); @@ -323,10 +326,10 @@ int wfx_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; struct wfx_sta_priv *sta_priv = (struct wfx_sta_priv *)&sta->drv_priv; - // See note in wfx_sta_add() + /* See note in wfx_sta_add() */ if (!sta_priv->link_id) return 0; - // FIXME add a mutex? + /* FIXME add a mutex? */ hif_map_link(wvif, true, sta->addr, sta_priv->link_id, false); wvif->link_id_map &= ~BIT(sta_priv->link_id); return 0; @@ -421,7 +424,7 @@ static void wfx_join(struct wfx_vif *wvif) return; } - rcu_read_lock(); // protect ssidie + rcu_read_lock(); /* protect ssidie */ if (bss) ssidie = ieee80211_bss_get_ie(bss, WLAN_EID_SSID); if (ssidie) { @@ -457,7 +460,7 @@ static void wfx_join_finalize(struct wfx_vif *wvif, int ampdu_density = 0; bool greenfield = false; - rcu_read_lock(); // protect sta + rcu_read_lock(); /* protect sta */ if (info->bssid && !info->ibss_joined) sta = ieee80211_find_sta(wvif->vif, info->bssid); if (sta && sta->ht_cap.ht_supported) @@ -471,8 +474,9 @@ static void wfx_join_finalize(struct wfx_vif *wvif, hif_set_association_mode(wvif, ampdu_density, greenfield, info->use_short_preamble); hif_keep_alive_period(wvif, 0); - // beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use - // the same value. + /* beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use + * the same value. + */ hif_set_bss_params(wvif, info->aid, 7); hif_set_beacon_wakeup_period(wvif, 1, 1); wfx_update_pm(wvif); @@ -496,10 +500,11 @@ void wfx_leave_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif) static void wfx_enable_beacon(struct wfx_vif *wvif, bool enable) { - // Driver has Content After DTIM Beacon in queue. Driver is waiting for - // a signal from the firmware. Since we are going to stop to send - // beacons, this signal will never happens. See also - // wfx_suspend_resume_mc() + /* Driver has Content After DTIM Beacon in queue. Driver is waiting for + * a signal from the firmware. Since we are going to stop to send + * beacons, this signal will never happens. See also + * wfx_suspend_resume_mc() + */ if (!enable && wfx_tx_queues_has_cab(wvif)) { wvif->after_dtim_tx_allowed = true; wfx_bh_request_tx(wvif->wdev); @@ -539,8 +544,9 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, __func__); hif_set_beacon_wakeup_period(wvif, info->dtim_period, info->dtim_period); - // We temporary forwarded beacon for join process. It is now no - // more necessary. + /* We temporary forwarded beacon for join process. It is now no + * more necessary. + */ wfx_filter_beacon(wvif, true); } @@ -662,14 +668,14 @@ int wfx_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_ampdu_params *params) { - // Aggregation is implemented fully in firmware + /* Aggregation is implemented fully in firmware */ switch (params->action) { case IEEE80211_AMPDU_RX_START: case IEEE80211_AMPDU_RX_STOP: - // Just acknowledge it to enable frame re-ordering + /* Just acknowledge it to enable frame re-ordering */ return 0; default: - // Leave the firmware doing its business for tx aggregation + /* Leave the firmware doing its business for tx aggregation */ return -EOPNOTSUPP; } } @@ -741,11 +747,11 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) return -EOPNOTSUPP; } - // FIXME: prefer use of container_of() to get vif + /* FIXME: prefer use of container_of() to get vif */ wvif->vif = vif; wvif->wdev = wdev; - wvif->link_id_map = 1; // link-id 0 is reserved for multicast + wvif->link_id_map = 1; /* link-id 0 is reserved for multicast */ INIT_WORK(&wvif->update_tim_work, wfx_update_tim_work); INIT_DELAYED_WORK(&wvif->beacon_loss_work, wfx_beacon_loss_work); @@ -775,7 +781,7 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) wvif = NULL; while ((wvif = wvif_iterate(wdev, wvif)) != NULL) { - // Combo mode does not support Block Acks. We can re-enable them + /* Combo mode does not support Block Acks. We can re-enable them */ if (wvif_count(wdev) == 1) hif_set_block_ack_policy(wvif, 0xFF, 0xFF); else @@ -807,7 +813,7 @@ void wfx_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) wvif = NULL; while ((wvif = wvif_iterate(wdev, wvif)) != NULL) { - // Combo mode does not support Block Acks. We can re-enable them + /* Combo mode does not support Block Acks. We can re-enable them */ if (wvif_count(wdev) == 1) hif_set_block_ack_policy(wvif, 0xFF, 0xFF); else diff --git a/drivers/staging/wfx/sta.h b/drivers/staging/wfx/sta.h index 056ed5267aba..f359f375cc56 100644 --- a/drivers/staging/wfx/sta.h +++ b/drivers/staging/wfx/sta.h @@ -18,7 +18,7 @@ struct wfx_sta_priv { int vif_id; }; -// mac80211 interface +/* mac80211 interface */ int wfx_start(struct ieee80211_hw *hw); void wfx_stop(struct ieee80211_hw *hw); int wfx_config(struct ieee80211_hw *hw, u32 changed); @@ -59,14 +59,14 @@ void wfx_unassign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_chanctx_conf *conf); -// Hardware API Callbacks +/* Hardware API Callbacks */ void wfx_cooling_timeout_work(struct work_struct *work); void wfx_suspend_hot_dev(struct wfx_dev *wdev, enum sta_notify_cmd cmd); void wfx_suspend_resume_mc(struct wfx_vif *wvif, enum sta_notify_cmd cmd); void wfx_event_report_rssi(struct wfx_vif *wvif, u8 raw_rcpi_rssi); int wfx_update_pm(struct wfx_vif *wvif); -// Other Helpers +/* Other Helpers */ void wfx_reset(struct wfx_vif *wvif); u32 wfx_rate_mask_to_hw(struct wfx_dev *wdev, u32 rates); diff --git a/drivers/staging/wfx/traces.h b/drivers/staging/wfx/traces.h index e34c7a538c65..e90dc73c4b01 100644 --- a/drivers/staging/wfx/traces.h +++ b/drivers/staging/wfx/traces.h @@ -378,7 +378,7 @@ TRACE_EVENT(tx_stats, __array(int, tx_count, 4) ), TP_fast_assign( - // Keep sync with wfx_rates definition in main.c + /* Keep sync with wfx_rates definition in main.c */ static const int hw_rate[] = { 0, 1, 2, 3, 6, 7, 8, 9, 10, 11, 12, 13 }; const struct ieee80211_tx_info *tx_info = diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 5637f9af79c0..a4770f59f7d2 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -22,7 +22,7 @@ #include "queue.h" #include "hif_tx.h" -#define USEC_PER_TXOP 32 // see struct ieee80211_tx_queue_params +#define USEC_PER_TXOP 32 /* see struct ieee80211_tx_queue_params */ #define USEC_PER_TU 1024 struct hwbus_ops; From patchwork Mon Sep 13 13:01:59 2021 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: 510229 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B8EBDC433FE for ; Mon, 13 Sep 2021 13:06:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0E546103B for ; Mon, 13 Sep 2021 13:06:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240391AbhIMNHM (ORCPT ); Mon, 13 Sep 2021 09:07:12 -0400 Received: from mail-dm6nam10on2082.outbound.protection.outlook.com ([40.107.93.82]:64256 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240226AbhIMNF2 (ORCPT ); Mon, 13 Sep 2021 09:05:28 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JOgB/WT6RiWKWRI/68IKKsLeachQcfJ+dpQ7QkBxudU1vbaZKTUVJ7R3md2pNGgRJ2O9jR2C6mHf6V97/EtTmr/BY/6MXHbtI36lgQlYQYc5+qqXtNLYjzbhXjr7h3kpsjJhazT5Vw/7wMrFyU6lG1ZSQiS6Q1owmSeqLlCudp4KpGIjn6rozznPPZHe1batLXZc9WD9gF8hJGHBiDLQK/+RtQTsuPsKWadoFSsohjHousuRszrswzoQL1DYHH/ImiOWpnyXDbhYuxeYOr392S62tl2wcxGzFl7ynF5eyzF+D3FQCOLACt+uTiQ0Xs2/qLdzRnm8jn5u6a8/y3aNqg== 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; bh=6exHReMQZVm3Rqfp26e85943fuLvP90YScIDvmR1Gxs=; b=n2GlFvfGxDrk6CPHlp8FppPPsjYY7fAN3cCk6unJAqRIZZ4l+JdG3yoj9aJC1NONLK8N8c8kC3SOmDLEoobGqUhuKJxPRb38GIAKf5SsJfwJnKsYa4ZJYI7Y468t+y7ZNlL0TfjGL93pm9mMy9crZ+2wUG0ZsNp5zExSt1iX+BGXGfK8xxLYUVgdzD7CTQPoUla87s1374O1QupGnxmx1UoZ7n4UmhkUcqhJnMeLkpbNV7/qb4CA6U6FeQH9CuUNLcZL97P7CwR3ydxsw3FNEzjFfIgT0iJ1stAZxDPcdtYBkGnaY/rEgRcX6yWrukDEKiG7ARHst0PA3RMnqRaqMA== 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=6exHReMQZVm3Rqfp26e85943fuLvP90YScIDvmR1Gxs=; b=nRe2B8LPakd5mz0pemlJkEb5ZvXVpbk7cNyHqeloOaThpEyKeNgjEtgUL7yQcQZTLKY8yqyN9CCDQlYUfi2L3v4HTJrq/klGN4BhzsBd0Y86Hm7twbp7h/WBRkafeC5tDBl/RoSkUKqtycfCCjwNq8x5Zq3xMtYf2CB8tJxV7Wo= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB3502.namprd11.prod.outlook.com (2603:10b6:805:da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:03:10 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:03: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 v3 28/32] staging: wfx: fix comments styles Date: Mon, 13 Sep 2021 15:01:59 +0200 Message-Id: <20210913130203.1903622-29-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:03:08 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dc298e08-ec54-486b-4fa8-08d976b6d652 X-MS-TrafficTypeDiagnostic: SN6PR11MB3502: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a+N2tt/OlauzLxD/yOF0ozI4MmHgdxEeSnjuld/U0ZocjGU3oeCN108dIGempSfNDuxMxBY45eBxSwP12BUKxXhiVFcLBMd2unfL2xMsk+lW54sAvEkBKMakatmgb2Cuiyp3MtKovUSiBXlUH8uIePgvC2awVANtZFrIVOtmUdel/iZgVp0EMzZX1wDNzKRQVge9SpUBRC5zbakaWiGziYfKMn4XcM9g+llY2TxGrOtYwbRVF8YSx006a0JSElIT1qoT/utI4EX6cGMsbwQMp5Lqpc2GWmkoHsAdypCBvjKKj3IKcQXucyksphHs9KHNfy/Hy/4S1uWXzHp71rN/hwJG9ZvKPD/yRF8Nmtk26l+Sd8oeqS36jVy7gXGTbYYmbLKGsuoab8/BT5s9wIVgch/KWvGUNJFIgiIhaGgiB3HY7TNyewsiG3V9qs6gMdHO1z34v/jlz5H+n/Id+8wsTu/qjCCATMGdE+0kOr9Rd1FaJTfgytH7ymfr/Kdn9vqiTpB1YrNH2qtGDmaR33duJEqEmgAkJ/tQ8CZrPn4V/7yWQAXkaiqp043Zq1Mt3W0wdSTPhDoEiZQcok6kymtVV9gaqwIpdILt3G9AWXR2uOFJTWIMzUGsJXhTHBPw8/CyzwPLK+2f/YzhhXvCkcZxB2I6yLwyKzZtFmfVURe46L3JMIoViFCBV5zsLAziPo8EzQ+6cFG/n8NkV5mOeJ7pHw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39850400004)(136003)(396003)(376002)(346002)(366004)(6666004)(316002)(66476007)(8676002)(186003)(7696005)(52116002)(66946007)(26005)(4326008)(66556008)(2906002)(54906003)(107886003)(6486002)(2616005)(478600001)(1076003)(36756003)(5660300002)(66574015)(956004)(8936002)(86362001)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?X9xXrD79dQwaDFqVX8eEOSLff?= =?utf-8?q?td+nmJCch1/hxo6e4A5TgtwriWVvLY7qCxNDj0oNw3KIpnfSAwxzedvI?= =?utf-8?q?daeT+D3PJSwyLtg+2EIQdhRwvrIlNBiTAsJF4OgdMluyT/LIXSFf6+dU?= =?utf-8?q?XurcI381H54CAO198Yx3x+dK0waAdMurM2SQxTwTZt9W8P7SzY+roPu6?= =?utf-8?q?vBGV3n9HqKtkihUFiN+7mBZMU+W72XJH27Wx1OccC7jNAFFGtcVK2lrU?= =?utf-8?q?NEOe34E/BMz1jtxkIGDoX/eKDCdjVLNlPAXVYxg9188a6VzxbLCdU7nm?= =?utf-8?q?6Hs+L6NQ2Is5CNzqtFni90PmQ+ckpF6nBpVqsL5J6VJiwHdb0lKwlanh?= =?utf-8?q?lJYcIB7xHkwSRIBrrmuVTTztjkaWFMlChl8jYelK1OOROuN1tSagPjKW?= =?utf-8?q?/IeEOmxK+Qkcl3CxL8gRolRGDrHeY/rkXPisoO/GUXhhrWw1IhQfw3fw?= =?utf-8?q?U4DFCLY5IJ5FImwKNDPoAVr1GAANsCNnaKLn9yr609n/RKd4bQwVvjqg?= =?utf-8?q?5iy9uqJlJkWNL580LfRqpKf7ergG284bJrIRbFxvaag5n5EZMgsV7+74?= =?utf-8?q?OEX/fzQJiysbU1vSvmxBC8Ae+bp5DwNIk1v7xeJYczmZ1jfTSPkDSB7t?= =?utf-8?q?qiM5JeeBEbdXTfLJZYBYUUWPu9YR5cBAeEizHyOAf/tUdYEXR7CZFDph?= =?utf-8?q?hEnw7hvTmzHJkWChAOlWNr3OUUH2OzRzWiX3FH2HPChC/W12VyZhfEX/?= =?utf-8?q?OB+PrgME0WTvmwNaXArb3UxH6UHNLPUOadNeecxA7gc+4lQAR5uhC/S5?= =?utf-8?q?wuCmWZmoa4YyYhFSz0t0gEqJlfexI3pjI+WcP9c46Nj24WsY3GpmGrb/?= =?utf-8?q?6Nymdhm65tnmLKvGwKjwuCLkztEaFrysxJxSBLu3cA7CquShnZYAwWOM?= =?utf-8?q?t9t2Ag0Bg4vdXFjVs5bH6lqpNscaIcGGXFx/0MGOhOAjlHRI8KEhypg8?= =?utf-8?q?EzPk8ZQgb+I1OL6oefixdfzAsSNK9mT7akCvb7VmHZeTFUGMkz6ttvCj?= =?utf-8?q?eoLovqyBuDATmDLMZDX8c1DqZjUH16P511BAOWevDEZYAkamQMAnOGul?= =?utf-8?q?dfJ4x5+Qg3zRSpNm37YYhu1WK8+C64i8myhMTCow4P6TMNMSJgGc0aUg?= =?utf-8?q?NjYKnr8EHrU+7nWAcE2xrmBxGagc2Ii1jEQx6+Kzy0q+bStC+dmkosRB?= =?utf-8?q?PqtStQnSlCtYhfLDwMdIbe6M9ksvTTj/kLhjb3t5wUY+wkXGkh7rzjXl?= =?utf-8?q?UmGaiFBp3Zt6VaGGj57b6RMjWeSCLIcHRJEm4E25fl2QQJBQPw+2CEaE?= =?utf-8?q?z43vou4Dy70FYos3iA/oB1FRGVvkqlZ?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc298e08-ec54-486b-4fa8-08d976b6d652 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:03:10.2829 (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: UriL9I+oka6o2IzyqWKRFzsfpCYI3VAmpz0nFHT3aySlkS2lVOw2T7jH5nOOEZsmfw62hCA+W6Us2dguihNrbA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3502 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Unify all comments of the wfx driver to use the same comment style. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 11 +++-------- drivers/staging/wfx/bus_spi.c | 6 ++---- drivers/staging/wfx/fwio.c | 3 +-- drivers/staging/wfx/main.h | 3 +-- drivers/staging/wfx/scan.c | 3 +-- 5 files changed, 8 insertions(+), 18 deletions(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index e956b5a5ccac..a0f9d1b53019 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -265,9 +265,7 @@ static void bh_work(struct work_struct *work) wdev->hif.tx_buffers_used, release_chip); } -/* - * An IRQ from chip did occur - */ +/* An IRQ from chip did occur */ void wfx_bh_request_rx(struct wfx_dev *wdev) { u32 cur, prev; @@ -285,16 +283,13 @@ void wfx_bh_request_rx(struct wfx_dev *wdev) prev, cur); } -/* - * Driver want to send data - */ +/* Driver want to send data */ void wfx_bh_request_tx(struct wfx_dev *wdev) { queue_work(system_highpri_wq, &wdev->hif.bh); } -/* - * If IRQ is not available, this function allow to manually poll the control +/* If IRQ is not available, this function allow to manually poll the control * register and simulate an IRQ ahen an event happened. * * Note that the device has a bug: If an IRQ raise while host read control diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index 61f73b3ebc80..55ffcd7c42e2 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -38,8 +38,7 @@ struct wfx_spi_priv { bool need_swab; }; -/* - * The chip reads 16bits of data at time and place them directly into (little +/* The chip reads 16bits of data at time and place them directly into (little * endian) CPU register. So, the chip expects bytes order to be "B1 B0 B3 B2" * (while LE is "B0 B1 B2 B3" and BE is "B3 B2 B1 B0") * @@ -241,8 +240,7 @@ static int wfx_spi_remove(struct spi_device *func) return 0; } -/* - * For dynamic driver binding, kernel does not use OF to match driver. It only +/* For dynamic driver binding, kernel does not use OF to match driver. It only * use modalias and modalias is a copy of 'compatible' DT node with vendor * stripped. */ diff --git a/drivers/staging/wfx/fwio.c b/drivers/staging/wfx/fwio.c index c5ba0a50b474..98a9391b2bee 100644 --- a/drivers/staging/wfx/fwio.c +++ b/drivers/staging/wfx/fwio.c @@ -69,8 +69,7 @@ static const char * const fwio_errors[] = { [ERR_MAC_KEY] = "MAC key not initialized", }; -/* - * request_firmware() allocate data using vmalloc(). It is not compatible with +/* request_firmware() allocate data using vmalloc(). It is not compatible with * underlying hardware that use DMA. Function below detect this case and * allocate a bounce buffer if necessary. * diff --git a/drivers/staging/wfx/main.h b/drivers/staging/wfx/main.h index a0db322383a3..115abd2d4378 100644 --- a/drivers/staging/wfx/main.h +++ b/drivers/staging/wfx/main.h @@ -23,8 +23,7 @@ struct wfx_platform_data { const char *file_fw; const char *file_pds; struct gpio_desc *gpio_wakeup; - /* - * if true HIF D_out is sampled on the rising edge of the clock + /* if true HIF D_out is sampled on the rising edge of the clock * (intended to be used in 50Mhz SDIO) */ bool use_rising_clk; diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c index 9e2d08317c9e..668ef2c60837 100644 --- a/drivers/staging/wfx/scan.c +++ b/drivers/staging/wfx/scan.c @@ -85,8 +85,7 @@ static int send_scan_req(struct wfx_vif *wvif, return ret; } -/* - * It is not really necessary to run scan request asynchronously. However, +/* It is not really necessary to run scan request asynchronously. However, * there is a bug in "iw scan" when ieee80211_scan_completed() is called before * wfx_hw_scan() return */ From patchwork Mon Sep 13 13:02:00 2021 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: 510230 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62F9FC433F5 for ; Mon, 13 Sep 2021 13:05:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4AD4F60FA0 for ; Mon, 13 Sep 2021 13:05:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239905AbhIMNG4 (ORCPT ); Mon, 13 Sep 2021 09:06:56 -0400 Received: from mail-dm6nam10on2042.outbound.protection.outlook.com ([40.107.93.42]:9633 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S240008AbhIMNFb (ORCPT ); Mon, 13 Sep 2021 09:05:31 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MjGT9TSCdR28qrGrEOuQJ1CHyzbGL6EwK8qz8arl07MBgkElZJsNlR24NVzamV40MDVZZVqOy4Iocdrd3VdvalEIOon26VSpvx9b1YlR4EGtptPF0bPvLVtGCkNWuIm0ma5i1q6c03RCnMoLp0jsj4ydUb6/baGG5co+isClGDWIIT4NFOFoZZAJvCCYDbqT48s4YXFhK4AE7AhbkaXkt13EdjcXJPzYCNqka23Vevpcsg/jqHIPYggW+3dNgtF827OqCK2xmS2v1ARJUnfQlGHY9RqatiJC/Vx+bqhPG+CmLpayQ3TYpuj9p3WZ7ZLSrf+42q4hWsA8tMG4S9ZWyg== 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; bh=cfofvTSkHjYDsU3jyU6ThliW4B7lrnRRP6krW+vV/8o=; b=oD7BUreyrakiIKjxkGGAD3nNAcE3ie/xFvszm5zf/3/vmPLo5zqmQPvYCQxL/2eAZHT7wsXnIIYFydE9j1+WxgGR1bQA0EpsTfP5vrjQ8y/++aT/sq8NAffdUP+nsjADRkA7xpAHoVIdJjhPV5UyigyaHOKXZBBx4IoXj3e/E7jsaPhsNEM8VLuUmVEMYkQkjaiBiXJiSICHS/X6yiyi44FTpGM/ha+yR+GrQMd1NkPgfqfOtX6l1t3yyChytQYKHAUIs28VSRGaYM7HziZao0chB/X39OGBuQ325CS3kdq4SWuhWA4L8ALxI9/Yok/XKsan+hbizmtF3HrHLkblrg== 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=cfofvTSkHjYDsU3jyU6ThliW4B7lrnRRP6krW+vV/8o=; b=lqKee5FjaJUwjy97Esu9G8INWIvIDQg20ZEHtEVxOqB6lP2KZbQHv+tVEI3O09WiLKoqnGnx87/9NE2fGzXbIgbfdjUcSFuHBqxU8NZlGI07BkVD0SvVud0Dj+byPXWHSVKO9Hg73epRsFymD6NsbRWuhGty6YeaUd71Jb7s5WE= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB3502.namprd11.prod.outlook.com (2603:10b6:805:da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:03:12 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:03:12 +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 v3 29/32] staging: wfx: remove useless comments after #endif Date: Mon, 13 Sep 2021 15:02:00 +0200 Message-Id: <20210913130203.1903622-30-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:03:10 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6c126864-061d-45e3-fef6-08d976b6d769 X-MS-TrafficTypeDiagnostic: SN6PR11MB3502: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1417; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QN4ueOhni6wMhs+kF3sw9Dh7QKJBzA/xNhBtfaJwVI2OPCU16CoZ+PWb9e1NQ+KPYeBMvcYAFj+l+KqNRXmE4NkAy5oj2E2Z5eHcmmnoLJm2twgAbjdcj9GmHYJ5zwVwByBGeNnrlptUp8jRwBOkFtU9J5I/ncR7lTJ6XBSEtm6uCqZ/PX/fH1i59+/gXzNpPAB4Le3E5rWUoJ7y+Rw1I5esCEWQjhjB0/x68ni7nT9K0neZwB1XQ03bQiBsNySTka7I74OwkAA2JAsE5xJbetXSMzuMRVuMgeMObVoR8ho/14Eich3IdudRJr8MYsPnWv0CD71Bakyentjds7gl+9h1x1JEukNXmhUr0CaYVPE2zLsDkdCoFvh108ZrIA5id9Y4n5FqcVss3dqvutkQryNYJZMqeKGbWpehx695yO6lv5EeZ9Z3kF5wkmiNXzx0PlYwVPUtvk/bFGzsZdCx+uobWtKTn14k964tcAKqgMFIqFHCd0yBh6m1IVhdLKMJFjXYpksASkOVVIyi1gKRhboaI856t4uK8WFuHIAr2l8OLklA+xqkG9h5ow5d6SnTuVq0f1yPKeFq5xjHAfwEVdSJZLSYSwxCmLXFUdcJp0Hs8mWzFSPzWldCUOX/V0yzG4WKb7ZZyD5d99R6Jj8M2XtYAbQsVVCSkP+JP0MFybeOpwnCk2WB+oHuS7QwW/zcWSyw8YBFkf/Uvlids54Rbg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39850400004)(136003)(396003)(376002)(346002)(366004)(6666004)(316002)(66476007)(8676002)(186003)(7696005)(52116002)(66946007)(26005)(4326008)(66556008)(2906002)(54906003)(107886003)(6486002)(2616005)(478600001)(1076003)(36756003)(5660300002)(66574015)(956004)(8936002)(86362001)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?BrJo2FDYfRnbMih5/2OgdJyx8?= =?utf-8?q?5JueP8dLz3nGSuNWP2/kx5Plbj/ezdvT1QvBeEgTvfl9Ekon1Aw/fW8i?= =?utf-8?q?gJTjlLIcZdM9jYc1x03QeDIEKftCHycQwqoS/WVoVFbIyue1KPskI29W?= =?utf-8?q?FeHRN6+3XYS7M5KC5uCb8G5Cp27DjYbECyeXGJYrzAVJs+lw8FFjxzcE?= =?utf-8?q?fVMJTcVHPULbPaBmHEews77+WmD5myjYjbHoP+CvHYdv1nmMb8dRhc4K?= =?utf-8?q?vJZjfJ6D9FwJghbm1FQ8B2bDL4GfY3WBk9lSYx01gxffgApwL3Rp/3bV?= =?utf-8?q?IaaiIWP1KQ3TIBGqGQjbEL+Q2w6qKflMdqk+xicZWcHU/djjKcs32x1t?= =?utf-8?q?mITnXbu9A35aLEdOoXkArXybYBktHY+ZWoVPurefVbILW2LHJFRY9sH1?= =?utf-8?q?OVlaIO9XqgY4a7pDvasQmRLQBmuRJ8TdJBFgfrFFGlgwzwoKir1Mc4Q6?= =?utf-8?q?MM8Q4oEz5v6CKrhJZqoNwjoT7iA7GFX5FiU99lUcLf1PPAWvz2tAsYM4?= =?utf-8?q?vV5tX/5kJ6xG07fDnHaS/rAb4g82QDyvjNlVQ2CTFNbf2OYvEp7fxqyh?= =?utf-8?q?Mk5sScJ2uoX/3Uh2G73IYOm6xrMhNKPwuT+tV4HmlHZga5DikZYGI7cB?= =?utf-8?q?HKUoqHA8EYWOitJFM0yz9X1umReOKS2uczvJ4ePDvDyF8x3AMAPclpAv?= =?utf-8?q?p6Tq9A7KCXA9g1y1eUJkpLUOOOqUtXHtpUQAfqUPM/0+AilrSk004bLP?= =?utf-8?q?N/mbYfPnpGrZuEMs68U5SMN37SELvdueCzzkV/8xPm1A5OeVtRHhadZ7?= =?utf-8?q?6xNdG2tJsZdc4NEtpLve0D3+wNE83mH2jFo0d1iPOQHAoLObwn9PxQq4?= =?utf-8?q?nSPihFslChzxJDf/p18FIOX1jPXk/WZAsccPFOF1DZVviRa76YGXfQdW?= =?utf-8?q?ysVa/kS4t5OfhMqTUDfvAqE5TZyqL9tEwzZP61lUH+SxuF+6iwemJ1sG?= =?utf-8?q?cwlKGBlBpW6aSQlHH9mLW0O5hPsO93BwZeSLwUxOZguAWfeAkmQyCouh?= =?utf-8?q?49C//V/dvkhM31TNo8e0TG0kmODYu0hXdLdh6XTamB2MREgTjF1l5A+t?= =?utf-8?q?e3zMiGrvZqJftxl4OjQJ1kqUKsaA0GOeHOTrFDyx7gPRjSX3PaH0JZBl?= =?utf-8?q?YUU1qfxIKa+vBFMgNg0cTB62weO64swzvLwAvRPzwpbzQpZ7eH5OmpU2?= =?utf-8?q?XViUsgcelzhxEJzzLtiT8IfAgAKvC7Oi22xf535AsmoRQgAVpSSOt2k3?= =?utf-8?q?c7/mu/Vo3gFpcTOyCfu56sXL+kCWBNIQW3BOfk09GFcAdKU4NKMiZb7M?= =?utf-8?q?JW30O2dxdYIomil8vua6QawuOfesTO2?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6c126864-061d-45e3-fef6-08d976b6d769 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:03:12.0998 (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: pBZ7Ef/OZ4QUB7lsf8niZ4Pyop4u5oKPkwhLHQWN8pWLg9L48jJxz3/bOyPxxse5vznYD3PVNfp8lGlZMEOusw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3502 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Comments after the last #endif of header files don't bring any information and are redundant with the name of the file. Drop them. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.h | 2 +- drivers/staging/wfx/data_rx.h | 2 +- drivers/staging/wfx/data_tx.h | 2 +- drivers/staging/wfx/debug.h | 2 +- drivers/staging/wfx/fwio.h | 2 +- drivers/staging/wfx/hwio.h | 2 +- drivers/staging/wfx/key.h | 2 +- drivers/staging/wfx/queue.h | 2 +- drivers/staging/wfx/scan.h | 2 +- drivers/staging/wfx/sta.h | 2 +- drivers/staging/wfx/wfx.h | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/wfx/bh.h b/drivers/staging/wfx/bh.h index f08c62ed039c..6c121ce4dd3f 100644 --- a/drivers/staging/wfx/bh.h +++ b/drivers/staging/wfx/bh.h @@ -30,4 +30,4 @@ void wfx_bh_request_rx(struct wfx_dev *wdev); void wfx_bh_request_tx(struct wfx_dev *wdev); void wfx_bh_poll_irq(struct wfx_dev *wdev); -#endif /* WFX_BH_H */ +#endif diff --git a/drivers/staging/wfx/data_rx.h b/drivers/staging/wfx/data_rx.h index f79545c06130..84d0e3c0507b 100644 --- a/drivers/staging/wfx/data_rx.h +++ b/drivers/staging/wfx/data_rx.h @@ -15,4 +15,4 @@ struct hif_ind_rx; void wfx_rx_cb(struct wfx_vif *wvif, const struct hif_ind_rx *arg, struct sk_buff *skb); -#endif /* WFX_DATA_RX_H */ +#endif diff --git a/drivers/staging/wfx/data_tx.h b/drivers/staging/wfx/data_tx.h index dafd8fef44cf..15590a8faefe 100644 --- a/drivers/staging/wfx/data_tx.h +++ b/drivers/staging/wfx/data_tx.h @@ -65,4 +65,4 @@ static inline struct hif_req_tx *wfx_skb_txreq(struct sk_buff *skb) return req; } -#endif /* WFX_DATA_TX_H */ +#endif diff --git a/drivers/staging/wfx/debug.h b/drivers/staging/wfx/debug.h index 6f2f84d64c9e..4b9c49a9fffb 100644 --- a/drivers/staging/wfx/debug.h +++ b/drivers/staging/wfx/debug.h @@ -16,4 +16,4 @@ const char *get_hif_name(unsigned long id); const char *get_mib_name(unsigned long id); const char *get_reg_name(unsigned long id); -#endif /* WFX_DEBUG_H */ +#endif diff --git a/drivers/staging/wfx/fwio.h b/drivers/staging/wfx/fwio.h index 6028f92503fe..eeea61210eca 100644 --- a/drivers/staging/wfx/fwio.h +++ b/drivers/staging/wfx/fwio.h @@ -12,4 +12,4 @@ struct wfx_dev; int wfx_init_device(struct wfx_dev *wdev); -#endif /* WFX_FWIO_H */ +#endif diff --git a/drivers/staging/wfx/hwio.h b/drivers/staging/wfx/hwio.h index 9a361ed95ecb..ff09575dd1af 100644 --- a/drivers/staging/wfx/hwio.h +++ b/drivers/staging/wfx/hwio.h @@ -72,4 +72,4 @@ int control_reg_write_bits(struct wfx_dev *wdev, u32 mask, u32 val); int igpr_reg_read(struct wfx_dev *wdev, int index, u32 *val); int igpr_reg_write(struct wfx_dev *wdev, int index, u32 val); -#endif /* WFX_HWIO_H */ +#endif diff --git a/drivers/staging/wfx/key.h b/drivers/staging/wfx/key.h index dd189788acf1..2d135eff7af2 100644 --- a/drivers/staging/wfx/key.h +++ b/drivers/staging/wfx/key.h @@ -17,4 +17,4 @@ int wfx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct ieee80211_key_conf *key); -#endif /* WFX_STA_H */ +#endif diff --git a/drivers/staging/wfx/queue.h b/drivers/staging/wfx/queue.h index 54b5def2e24c..edd0d018b198 100644 --- a/drivers/staging/wfx/queue.h +++ b/drivers/staging/wfx/queue.h @@ -42,4 +42,4 @@ unsigned int wfx_pending_get_pkt_us_delay(struct wfx_dev *wdev, struct sk_buff *skb); void wfx_pending_dump_old_frames(struct wfx_dev *wdev, unsigned int limit_ms); -#endif /* WFX_QUEUE_H */ +#endif diff --git a/drivers/staging/wfx/scan.h b/drivers/staging/wfx/scan.h index 562ca1321daf..78e3b984f375 100644 --- a/drivers/staging/wfx/scan.h +++ b/drivers/staging/wfx/scan.h @@ -19,4 +19,4 @@ int wfx_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, void wfx_cancel_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif); void wfx_scan_complete(struct wfx_vif *wvif, int nb_chan_done); -#endif /* WFX_SCAN_H */ +#endif diff --git a/drivers/staging/wfx/sta.h b/drivers/staging/wfx/sta.h index f359f375cc56..4d7e38be4235 100644 --- a/drivers/staging/wfx/sta.h +++ b/drivers/staging/wfx/sta.h @@ -70,4 +70,4 @@ int wfx_update_pm(struct wfx_vif *wvif); void wfx_reset(struct wfx_vif *wvif); u32 wfx_rate_mask_to_hw(struct wfx_dev *wdev, u32 rates); -#endif /* WFX_STA_H */ +#endif diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index a4770f59f7d2..f8df59ad1639 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -161,4 +161,4 @@ static inline int memzcmp(void *src, unsigned int size) return memcmp(buf, buf + 1, size - 1); } -#endif /* WFX_H */ +#endif From patchwork Mon Sep 13 13:02:01 2021 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: 511485 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=-21.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77BBCC433F5 for ; Mon, 13 Sep 2021 13:05:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 612A96101B for ; Mon, 13 Sep 2021 13:05:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240308AbhIMNGb (ORCPT ); Mon, 13 Sep 2021 09:06:31 -0400 Received: from mail-dm6nam10on2073.outbound.protection.outlook.com ([40.107.93.73]:38187 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239407AbhIMNFe (ORCPT ); Mon, 13 Sep 2021 09:05:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kjg/uT50Iuat96GPpHZOSvIbScmksuZ5Dif5nWZU1VUOrAdPhuJednKzghBvNwXYP5NcWXPMl1P9/8uh44jmJyDUXC43dV/cFS/9YLtYtQZ9wg3r07Hm/S8FsyZZ0eboE4cTAo6vihwPZWSh5tDjXJR6uDKXix5jy6H1Dsx+FCHiyif9rBW7msy7yx0tEDQ/adeEuxe/l8CYFlbRSIlfJmu3xdW7YV0HCl9YMFSN153zLIXjhu/YV8apBPJZgqZIkh/jeKmED7HebLmqfH9TASosi8YoA04kCdCtWzQ8PSbmhPGUj4TqqCkSmI8JPMfzYzurQDiFydBcfcalaP1vUA== 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; bh=E/S/HshNlV98QsA4x8RNmUx1uBUgniC0pQCXSc86G7U=; b=M82md4Bs0P4RAa7kz6+1d/31plZ3waTPYPQljM0t+s9lsLRkJiEEeJCTyeiipu+OtPoKFVSvWmM4LmEfy76rAHn7q+2Ej67pb+d9gBo4Tp4yQpem8O17j1sR4vnC7lZPasSwOywo48ih1lq5J1fHNA3lSw07kk9/LBg1Uxuhn2bBvYr2QkS+odnsP0PagNsH5qGbs/8emB9t/URo2Qsuu7NfQfDIyGjSnt5LvFFB8qbDwsBmf/QJaOZfYALboRoU67tiGXrfHpL75FSOLeC9xyr6nLLwLPKl45JBVKEYSzPHlTZnloWE+LTp31sk217bi0KM4hUmI3AZS430TkuLDg== 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=E/S/HshNlV98QsA4x8RNmUx1uBUgniC0pQCXSc86G7U=; b=cISOXSPgOfSVQOmYnRFYCBJoasJ67orPOVzwx7s5dGlaBbM7Pa+lZj3U8FtYYmeDS29dBVB0xMJ+3wzSMkfikk9GgKcpbsIiCq1ShyCGSOLrGJ0Z7LnbEoxdwUqpq1scIRWwo/ejyTxy+cbALrrKCIHAw6Uxpx0aqcx77xNqBZM= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB3502.namprd11.prod.outlook.com (2603:10b6:805:da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:03:14 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:03:14 +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 v3 30/32] staging: wfx: explain the purpose of wfx_send_pds() Date: Mon, 13 Sep 2021 15:02:01 +0200 Message-Id: <20210913130203.1903622-31-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:03:12 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 89ce0699-15fd-4f1f-ebc0-08d976b6d877 X-MS-TrafficTypeDiagnostic: SN6PR11MB3502: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sehRm7WLFrPUDhR9iSH6tDX9ks9+sKnih/yrhPOtYZN1WUg+rr3roNmABc580anyk3lgZ0hSPzbxk6MrYfnV8DT+kz2NvNMRUIyffAMnnzRpW0CNCjbjyAlNYWqCAKPEBOCMPUAaFmjc2E2d9x350TQphAwq18x/QYr0sZoFCsJ9YpPe8HhNkR9pngCK8LCnJNH2652WPsAatUeBFvBErQ8H6tAAZdpxuIrUh5Mh4qVnoaQI7Kt9xVLLhrPAwsB0HLeTd607H4bAHBC0V3LgkNOJ7zT0RIs13tWP614c+UUKugPmUzwCRTm7l1oGhAmMJIjZz2x1zFSnGXkwEcu01I5SLOPZTbMGS6blX2rChabRGKi2Gw5Hfru6FGIF9II+Eoj6g/ChsRttj8elymHebRPUbaCK57qr6Ios9m1GSgRW/DSS1+wMqIS5A1/CDX0xOpx0bnY8lv/xNdIgifTlPbFnrS1RNi0DzAV/YJk/406eGTbFT3lqyFAKEZvdpYOkwLo3L9bqFb3fXuEQ1nbItsAqVfClBUcpL9RE/dinLhCqkWVqwmJKsCIh5sz8Pa5gzzFXyVwa1XiMXP03wPNnIaQZjjkXOR1WI7yebGXkuT5sM8X5Do88kzN4oaUvDkqzKXhsGKix/xzLwO50EUCQMhWCRZqJEb1gvvhCyGbVhy3us9OyYFRzsqE7qTs3ciBIhdl7l4Fn90KQz6nsRzETdA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39850400004)(136003)(396003)(376002)(346002)(366004)(6666004)(316002)(66476007)(8676002)(186003)(7696005)(52116002)(66946007)(26005)(4326008)(66556008)(2906002)(54906003)(107886003)(6486002)(2616005)(478600001)(1076003)(36756003)(5660300002)(66574015)(956004)(8936002)(86362001)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?FoCec8lJM0fcbWOPha1Vj+K5i?= =?utf-8?q?z6Ds6tnyf1lFDaD2tO8J9LmUheGkIJzb79Id2YpClROXQ2jfCk19M9tg?= =?utf-8?q?sw5Q3/ZCHiLb3d2He+fX7S1OxxX8MdvY71eB7OsMQuPa95ojUlbr0y4S?= =?utf-8?q?M/N/IgWRXlQBXdE6F0drK6XQ0FkK+ff/hStGkx9cadZ6v7kgc0usHuLq?= =?utf-8?q?9asV1NcwguK3SMZ/dQ00TAI2hW7GjK07lV3GByvKySE9sTUpBaHjf9od?= =?utf-8?q?0OIji3aVlksll+FdxzZAHlWI8r2rdHcWFfePWB6Ol5F1Z4Jj6z6C2x3f?= =?utf-8?q?dccGstTWTYGhlRQos04a5zFOUcHlEZ8/V1MEON41YCUaMp5z2AQ+Svdt?= =?utf-8?q?WMMFjegoJRRL2yYULjjsM302NxX76lfCo7LkOVApo13ErhcKgF9KRory?= =?utf-8?q?HhvABfwVAl+lRAcWorWu70Dd26xvNHi7eNq2H8DbnuECHdO94WbHRQ4x?= =?utf-8?q?dYitdSFsN4pzQpuZSw2OTDuAmEXdG2nBHik9S4cxJS0OLwZm5PlHZeFK?= =?utf-8?q?7CzAz9fIhqUdOJtdwGjngVt382MaTKHGpUqlpclxqMNTvJIHaRUznxqA?= =?utf-8?q?lS9UAX7ukUWK2RpDZVNRDw4bwT+hz+AVgnhcnNRpUBK1KB+Z/J8uIFeC?= =?utf-8?q?Xr5QTuTPD0b8CyACQicqE8ViULcFddiV7ULdndFBTfqBUAPsB+2JCbPL?= =?utf-8?q?R4V3/bt+p2mQ5GZzGyOvFtqB8WwEHCrDH+Sbd2A90m8GGFhB3NM+WxNe?= =?utf-8?q?kxSQL10OubHL261/0tJKYhVSY4FAX5Men6RMy2l1oQluf+wKENF+vXQS?= =?utf-8?q?IH+bCDHO5U0wrR+nv6b3wmpSf3ySZ+QyZRnHIpQ9TRuDaWgdxwEQa3Qv?= =?utf-8?q?4YE7SCxuOlUQnt5dqW2irNnnBpA/YKQ7vAEoVqoTZ6gvtEwG/GBd0h1O?= =?utf-8?q?wl4MsR1eE72VUWCcmIqQuGDYt8gNRQ6mFnd0aLHZMowRZ0d8eUYhnxqx?= =?utf-8?q?nsWmU8jmTG6WUXcIa2z9U1By01GgqKvumpQ98bTkVyprRzTUYDNZglGs?= =?utf-8?q?WbgLdu2fNn7vX7CO2kHdz8xxU4PUhh82zrz4Xyx1vUDw07NmbVClDtDf?= =?utf-8?q?gEXTT98Ir/pVU2sIVXjBDNhG7CwfjN5LSzEcoP/WxYkak/H9gt7C1ItB?= =?utf-8?q?GDuqkX5RIcvOA5afSmqFMHFEFCH3c+OSp3W1Dc2ry59xZOeR9Nni9U4N?= =?utf-8?q?8S68vo5LzarhiiekKFzG2/fIt+yxWho6AfpTsgzSDpS5HAzkbn9IW70m?= =?utf-8?q?Wtsqy5X/qHitL4UDcmu8iKOsNafxCGyJse8qB1JPJJJkkS9FO9Ij8mbk?= =?utf-8?q?XRky/3ecvFzpt8K6oGSByMdU8D619zh?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89ce0699-15fd-4f1f-ebc0-08d976b6d877 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:03:13.8698 (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: 9F6XgrK+zMixYTf5KR+4yGvipRLv700n8KZWx2TnufZIfFiY6WB5Eud3yfOx24//CLSgTIGQob+PTBViwAtrHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3502 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller On first look, the goal of wfx_send_pds() is not obvious. A small explanation is welcomed. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index e5e852ddf9c3..858d778cc589 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -163,7 +163,20 @@ bool wfx_api_older_than(struct wfx_dev *wdev, int major, int minor) return false; } -/* NOTE: wfx_send_pds() destroy buf */ +/* The device needs data about the antenna configuration. This information in + * provided by PDS (Platform Data Set, this is the wording used in WF200 + * documentation) files. For hardware integrators, the full process to create + * PDS files is described here: + * https:github.com/SiliconLabs/wfx-firmware/blob/master/PDS/README.md + * + * So this function aims to send PDS to the device. However, the PDS file is + * often bigger than Rx buffers of the chip, so it has to be sent in multiple + * parts. + * + * In add, the PDS data cannot be split anywhere. The PDS files contains tree + * structures. Braces are used to enter/leave a level of the tree (in a JSON + * fashion). PDS files can only been split between root nodes. + */ int wfx_send_pds(struct wfx_dev *wdev, u8 *buf, size_t len) { int ret; From patchwork Mon Sep 13 13:02:02 2021 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: 511482 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A169AC433F5 for ; Mon, 13 Sep 2021 13:06:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 84FE260FA0 for ; Mon, 13 Sep 2021 13:06:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240110AbhIMNHt (ORCPT ); Mon, 13 Sep 2021 09:07:49 -0400 Received: from mail-dm6nam10on2057.outbound.protection.outlook.com ([40.107.93.57]:42816 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236017AbhIMNGI (ORCPT ); Mon, 13 Sep 2021 09:06:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZW/ea27/fMLS2H65WcH8fFYXDsEkXFH/yEEn0VLjdMO7wQBn8RCi8jK/72XjsYWYa6CM75gVj2nmae8Ly7ISsela3oW5TirSiyRwZhia96OO3MsdQcmrhk+Ev4e8co5GHBSzR3/4VOgmsusyezbdD91HteCMgzSYB9vY2VJ8gHw0wdnlQAv4rkUKHiSBdvwmHd8jRceX9H3kKnskFY/fRGvNw7TkqZpfkI9YKQFM1GCgyWmVcp8s1EYnxyI6639ETmhgw0skhUI1IQLZYOZl4ZvrjIxtWm1cNgfRxoH+RBghFO7j/Ysw91pLfxuPwsKIEOY4ar6io/NOgcYd07BOhg== 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; bh=D/nDiHmFKBga19SVvGURvJf4nlMmkEyaiImUJbEKvFU=; b=GhjeLjIv4GyX/TJDDsWMl6u53eQvaKXCP7MS4RsgLIAEkCzrN5tnohjKs38aTt9r5s34CsjOXSr73zYyC20BJdq6wAe3kWl5c/XjIZFeY1aiXUpC8pH71qCOB9y6rDjz6LKTc4lsO10qklP85GJFkHMJXHY6Bv7kHUJaN9EWz0Ufi8AGv24pyuk/gYElyYJgYLx8TBTvRBxUoll/v6Rgx0+xHmoDRMFy8UVs+sgXy2BJrhFRIgNNJ+X6tgA+H9ADK3Z87B7HmnDZsWH+CbJELzHKBu8tCUoebdj1IUDbExr15YLVR3vARah25pVNh+Qsan2o7YVUjoTJScSXz2mvqA== 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=D/nDiHmFKBga19SVvGURvJf4nlMmkEyaiImUJbEKvFU=; b=WZS0uHER3e8VMqOhTZwjord49kVxgUaitdBzAE+L8t9xTA8XcfKGpk0cJqJr498WkJW1lMNL+Ls3eHNlosmNSWp2jblBQcOqx3NpRF0RATuyYY5ehzmqyQEUSc6bt8olCg2FoSRxSipoXt+be2ZbZP4NbhbnMwqSHF8NMbdOoAs= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB3502.namprd11.prod.outlook.com (2603:10b6:805:da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:03:15 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:03:15 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH v3 31/32] staging: wfx: indent functions arguments Date: Mon, 13 Sep 2021 15:02:02 +0200 Message-Id: <20210913130203.1903622-32-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:03:14 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aa716e16-c369-407e-d405-08d976b6d987 X-MS-TrafficTypeDiagnostic: SN6PR11MB3502: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:378; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GIJ5NXI1NcUNBv0xQtMX6uUK2KE+NCsfx94HuRc5DNlcrY2fPE9v2pWRFW7QIO4MkTdaHAremP67Zpx/EsQlkU3NdpAA9Yt89UGFqqHUCIgKI9wAyLmyL0Gj/MKfAi0mgXTp82/4FVyiUeDStZqMSJLIQwkVEr0ncz7CiOvb+e7EaHZo/WuJXoYvVNbcTtO7eX3Hl2iefKrUv5SpQSwdZAGi4wHMq7dqIFS2gfDle+NNZGc8ehiesrVWt2H25Jq0jQcWwBfTk3aBnfQQvsZcnP75/mJyHgQyXKgbNNY1hIqjwbgHnN+SBVtv2FRWs+iayhAf7e0YaXZuJdVeB9dcxp9GMR6EXLv4TgizN2IBWpn3cHj3wOfdBxhV2QNejhx9C+6KsBe75PQjjIA/p8zDWDVl2kgl/LN+B4rt10qIM04XKSOGZ8cgpD3fEb0slYM166D9npq+s9YWujyplz866sMEXstM45rPcggu1oX90G9LvkgWMwLOBVJsI2TJfRHEoAHKcCcC+kk8OBo5Mr6om9QVvHFZNYLQ6p3+p5Sw1392fCaEajHfU3kcJuLCXBeP3JV7G+bL5jKWpuYzdsYd+gr9czRCDsmZRXLlNn3Z8xUpTas+cNFuW9oNE7xIw9ILuB5LyXYi5ONv89Lwk18xlJ1xaO6UCxF4zm9mOgIZMpZPrCEjq7cZQKEDIvOeplSkOJIdX7uPEQaqL/Ch9WjAeA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39850400004)(136003)(396003)(376002)(346002)(366004)(6666004)(316002)(66476007)(8676002)(186003)(7696005)(52116002)(66946007)(26005)(4326008)(66556008)(2906002)(54906003)(107886003)(6486002)(2616005)(478600001)(1076003)(36756003)(5660300002)(956004)(8936002)(86362001)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/pV24xLZavMO83ELUQZbNxtVh?= =?utf-8?q?ovMy7FZZscLyilz2FFCm1RmrbxlU981nJvVy6ugmNqGnQoiOnzmkdZzn?= =?utf-8?q?Y7rKjRH1UZljKUQCy1fkAUiyKV23xE47RcGrhttEqMMXX8bLLCMwQxPd?= =?utf-8?q?lpRwQmPpu0ZfCg1EtaU4mkriUdHW4RD1JOHxFpSXdroI3c5OsIFNsFGS?= =?utf-8?q?9+K8dZZwA5G6geQnLAkYXcnfGa8NIt6M/P/iEqZo+BkFFXLKcPMTSmNs?= =?utf-8?q?6DQ1YZIgKf24yaphxdmowXw0c4AG23nF372mUcULQD85CAek9+bfQoAb?= =?utf-8?q?wS38EMk4mQ2eNga24acHLQtHnagCBGNynZCkIm+HfRBoBy9LfXC2eLw1?= =?utf-8?q?YT/M8wDN168dOgaKYufMO8hy5Yg4Xb3lU/mTxT8VBNt40cOEFScdapzg?= =?utf-8?q?HY3jXRa+HzVb1Z66A4XtcMWkOgxsM19BTXSMLmy3NPHONinVGvfbXzVZ?= =?utf-8?q?brp0P7uU9m8wx1/wLylHb5FI9hmvbo62gIJJHa8XXzh3SG6B/x9Lhi5t?= =?utf-8?q?yxt9z5MAMbiWZcMHDCSKChD28ygmc+7BsKByX2BjFoVoQ3Eq6TqqTl4R?= =?utf-8?q?mUrFxxlkK/hAEFJ4SShOMCEA6y5R77gk0LivKTwTS5q6R7CsqPVzB8fq?= =?utf-8?q?AoIc9Q3IZAyECrQFHoQofCDVe5LGw1O48Al2++kRm6n2nBeRgjyOu+1w?= =?utf-8?q?T7iDWTTbjo5NiefHUo3OsEYUqqNg2qTT9eDSmxW1qSGjUuJQIQOUAnjb?= =?utf-8?q?UcDKmhTmNr+vy/ZjiwpcOCPuCoA83WEGZHg1PY7bKlOV3Ctmw0SH1684?= =?utf-8?q?VVSkVriIlYlMh0IrsBN5axrcMHOJImuC3YlcWb00UHofQ1ETI2TUIk8F?= =?utf-8?q?MKB2X/5fXumz8CZLw3ndYF76PM+nlrQWp4sHyZLlpKj75Kfdi8tDNpCG?= =?utf-8?q?AZIXLutBBmK3UTqB44lK7HHvbgRdbWGHFEv6OH/Sfx1wnayD+HjcHFR7?= =?utf-8?q?z956oeze+FvXXP2cDWxN1OWPZCsx0axn6Zg4jyO/jtbPP4vl6oUmUnmG?= =?utf-8?q?RJNnCVkqWqw1CHgAdF2qAR7zc9VKl0TgTMNvH6i0Dwd4EE7rEevKmBIO?= =?utf-8?q?6U6HaaZ7UGhI1ShfAK24DD6JMxOQ+qLQbVUCiDZLlmehHtURcyGIa+de?= =?utf-8?q?gcdlYyhyZpO6Zu2sBXyvHdPrWxrq94GWz5OQ6HlwC6CAuii56I7rV5Jq?= =?utf-8?q?RNOnkDPsD25iMy32Ox5D8QMYF8Qdk5sgUSsR3UaG+nQDyLBk9s+AMznN?= =?utf-8?q?xvQNDwJANYG6BsIVUDb7xu8VZGJjM3hq9CnDcdyD2chQmvhhHL90CbWK?= =?utf-8?q?YP4sBvluAz+6isiPtb9r7SM1zHDUcix?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa716e16-c369-407e-d405-08d976b6d987 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:03:15.6448 (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: M2GAGUZVKOTtvVrbX1vXpfa1O2ph+B7iVb/HTVliHdRCFH8wpwghTMAYwT4OP/csxogDxgCStGawQRYa7FBUFg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3502 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Function arguments must be aligned with first argument. Apply that rule. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_tx_mib.c | 2 +- drivers/staging/wfx/key.c | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index 45e531d996bd..97e961e6bcf6 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -75,7 +75,7 @@ int hif_get_counters_table(struct wfx_dev *wdev, int vif_id, } else { return hif_read_mib(wdev, vif_id, HIF_MIB_ID_EXTENDED_COUNTERS_TABLE, arg, - sizeof(struct hif_mib_extended_count_table)); + sizeof(struct hif_mib_extended_count_table)); } } diff --git a/drivers/staging/wfx/key.c b/drivers/staging/wfx/key.c index 51a528102016..65134a174683 100644 --- a/drivers/staging/wfx/key.c +++ b/drivers/staging/wfx/key.c @@ -31,7 +31,7 @@ static void wfx_free_key(struct wfx_dev *wdev, int idx) } static u8 fill_wep_pair(struct hif_wep_pairwise_key *msg, - struct ieee80211_key_conf *key, u8 *peer_addr) + struct ieee80211_key_conf *key, u8 *peer_addr) { WARN(key->keylen > sizeof(msg->key_data), "inconsistent data"); msg->key_length = key->keylen; @@ -41,7 +41,7 @@ static u8 fill_wep_pair(struct hif_wep_pairwise_key *msg, } static u8 fill_wep_group(struct hif_wep_group_key *msg, - struct ieee80211_key_conf *key) + struct ieee80211_key_conf *key) { WARN(key->keylen > sizeof(msg->key_data), "inconsistent data"); msg->key_id = key->keyidx; @@ -51,7 +51,7 @@ static u8 fill_wep_group(struct hif_wep_group_key *msg, } static u8 fill_tkip_pair(struct hif_tkip_pairwise_key *msg, - struct ieee80211_key_conf *key, u8 *peer_addr) + struct ieee80211_key_conf *key, u8 *peer_addr) { u8 *keybuf = key->key; @@ -68,9 +68,9 @@ static u8 fill_tkip_pair(struct hif_tkip_pairwise_key *msg, } static u8 fill_tkip_group(struct hif_tkip_group_key *msg, - struct ieee80211_key_conf *key, - struct ieee80211_key_seq *seq, - enum nl80211_iftype iftype) + struct ieee80211_key_conf *key, + struct ieee80211_key_seq *seq, + enum nl80211_iftype iftype) { u8 *keybuf = key->key; @@ -93,7 +93,7 @@ static u8 fill_tkip_group(struct hif_tkip_group_key *msg, } static u8 fill_ccmp_pair(struct hif_aes_pairwise_key *msg, - struct ieee80211_key_conf *key, u8 *peer_addr) + struct ieee80211_key_conf *key, u8 *peer_addr) { WARN(key->keylen != sizeof(msg->aes_key_data), "inconsistent data"); ether_addr_copy(msg->peer_address, peer_addr); @@ -102,8 +102,8 @@ static u8 fill_ccmp_pair(struct hif_aes_pairwise_key *msg, } static u8 fill_ccmp_group(struct hif_aes_group_key *msg, - struct ieee80211_key_conf *key, - struct ieee80211_key_seq *seq) + struct ieee80211_key_conf *key, + struct ieee80211_key_seq *seq) { WARN(key->keylen != sizeof(msg->aes_key_data), "inconsistent data"); memcpy(msg->aes_key_data, key->key, key->keylen); @@ -114,7 +114,7 @@ static u8 fill_ccmp_group(struct hif_aes_group_key *msg, } static u8 fill_sms4_pair(struct hif_wapi_pairwise_key *msg, - struct ieee80211_key_conf *key, u8 *peer_addr) + struct ieee80211_key_conf *key, u8 *peer_addr) { u8 *keybuf = key->key; @@ -129,7 +129,7 @@ static u8 fill_sms4_pair(struct hif_wapi_pairwise_key *msg, } static u8 fill_sms4_group(struct hif_wapi_group_key *msg, - struct ieee80211_key_conf *key) + struct ieee80211_key_conf *key) { u8 *keybuf = key->key; @@ -143,8 +143,8 @@ static u8 fill_sms4_group(struct hif_wapi_group_key *msg, } static u8 fill_aes_cmac_group(struct hif_igtk_group_key *msg, - struct ieee80211_key_conf *key, - struct ieee80211_key_seq *seq) + struct ieee80211_key_conf *key, + struct ieee80211_key_seq *seq) { WARN(key->keylen != sizeof(msg->igtk_key_data), "inconsistent data"); memcpy(msg->igtk_key_data, key->key, key->keylen); From patchwork Mon Sep 13 13:02:03 2021 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: 511480 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=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D376C433EF for ; Mon, 13 Sep 2021 13:07:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 56FE360E9B for ; Mon, 13 Sep 2021 13:07:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240529AbhIMNIW (ORCPT ); Mon, 13 Sep 2021 09:08:22 -0400 Received: from mail-dm6nam10on2076.outbound.protection.outlook.com ([40.107.93.76]:58976 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236206AbhIMNGW (ORCPT ); Mon, 13 Sep 2021 09:06:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IYWstLBAS/ir6pw4+e3XufyRb0TbGi4GH+HqS+ffyqsWbmC/1csiGVtVZcndGBsrxXgDmsHIrrfGXW7d3SfSjrbZs8c6gdRdPIPs0Qg5i3Kza7iaf9dAlUZiq5XRJU2Z95RYjofirdhGo+6tSRbVlxU+g79htU3pnbhE70E5we45tXEvtHMok4RnusFi4FOb/Rl7CAmBOARlSEpv44K3cL+pkLh+P0ziXIMcxkVgwgV7dz3t8JZ+RO7uMJLep6lUlJeuYsQQjC0do84rHzH3947lWCX1tzsJxbRG3HRCfvQ7msJZZE0yOBXSkEEaUS8eRr0UFTzI1+JtbpJudnpemQ== 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; bh=JAmRoT+yqJyVJqFuWU287ozQKOUwlLHdKHeabfJ8CtE=; b=UZakWSIcSefVPvMipGXzXnlfk35noUDZth5fMmI/sjRAIz0XFa3xL8NmJA57J9OVBkV6/7qrRPMrhqc6RZ2KtfeIfrIkcLaMUU4mEJrsHDIceaozj7/fqmw9icUXQ0o0Inq79c2WyZo/VF638EFe8DqFqqZPmZ5KwuMBGk2fDpQ27R++Cn2ECJj1t/6dftD9ltCM0lKOkgJTxXHxI5CyNmOcvHpwbS8Fzyb7KMdQ6rBCi+boj6Iwqinq07c7TWJCG2mILoJn7xAGD4jiTYzJ7UZ4QjrARcMjwIKjRmN3SMXezf3KC1YTjv1fLgdr3/T2NWIQMPZwT7lEIjE08DvoYw== 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=JAmRoT+yqJyVJqFuWU287ozQKOUwlLHdKHeabfJ8CtE=; b=k2wgvEYOL6LmF8Ow+Q0YK0rKRVNLOcnRVd+Egq1jAYAxV+nWAgxu9nGJpT6r5zatzLXZNYif1Ly0vFaRzRnIuOOdpvP7FCfeWuzJ1kFGqt1j+29MnbG6t6hzKV+Nxff+knixMjJAP4eLbrF9ur39tBdoUwZ7qtcqd4FdIu9kcuA= Authentication-Results: driverdev.osuosl.org; dkim=none (message not signed) header.d=none; driverdev.osuosl.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SN6PR11MB3502.namprd11.prod.outlook.com (2603:10b6:805:da::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Mon, 13 Sep 2021 13:03:17 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::7050:a0a:415:2ccd%7]) with mapi id 15.20.4500.017; Mon, 13 Sep 2021 13:03:17 +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 v3 32/32] staging: wfx: ensure IRQ is ready before enabling it Date: Mon, 13 Sep 2021 15:02:03 +0200 Message-Id: <20210913130203.1903622-33-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> References: <20210913130203.1903622-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 Received: from pc-42.silabs.com (37.71.187.125) by PR2P264CA0021.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Mon, 13 Sep 2021 13:03:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8a887f48-40ce-4089-887a-08d976b6da94 X-MS-TrafficTypeDiagnostic: SN6PR11MB3502: X-MS-Exchange-Transport-Forked: True 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: RPI5Q5kS25OjCBLT6aPf7jy0QZEyAQb0aSeK+bJCu4OSrRRo1gto3ngKgUHg1F+2jVVBAWaJSQAcUc8PIbrx11lK8MBiC7mKFxau53cABCzkHpgaZ8gHIgXmBQ4XC1VgB8t2vH88jwMnO0+TfLUx1AioFClUatILn0vDQi1ieubl9kZAKlEIAp4T/GRKzkcAHmzMy2ECuUBjS1qW5n4gz/VJ3tOXn9dnRIBZw0GYH3wt5IUhmr/WSYJvcFIN+UeJXxqL+oyV9/dsA0oFePZ6T87XNGvDr18pGeaxbOhT6tjLgWR1sExqLTlm/zRZQwa93JTVjzMqm9stmtLEQ7LxjcRgtmJAxUHc1/XFVuzlQkwq4cZrwND95zXoIACHH5WbBn93e3gaFCLGnJ463Ccl8FKlc2QI8cPMxA5fgutL93Mm5fOTpkBM7SNmncDI1dlYJgt90jXDSnTwaIBa26uWt6wdKSTE42ALrgGOB9eNdmmjQb51WIkbTXlVJVRrbnZ0k0jZKGm0sJPJC1Of9H7a4uy0iv8kIWIFF+GusObdGH0fwEd1BLMhmFyveXcQJelVTb0XIqSHKjC6n+wm6QSp2jAuXHNdSOwk4vhqzpNqkCAKLQ2nJJZPLLCF1wRryJmwBzF7XOUP0JMYKZYoQZ/qDzvdE09a0A7TZqnMxAKErbKhsiROuWxYpUpBqIyAv6aRFGclHswm2FVCc3HYKi0hGA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(39850400004)(136003)(396003)(376002)(346002)(366004)(6666004)(316002)(66476007)(8676002)(45080400002)(186003)(7696005)(52116002)(66946007)(26005)(4326008)(66556008)(2906002)(54906003)(107886003)(6486002)(2616005)(478600001)(1076003)(36756003)(5660300002)(66574015)(956004)(8936002)(86362001)(38100700002)(38350700002)(83380400001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?cgkUiUnuVkT9sZw7IRpHmaDOC?= =?utf-8?q?kUEUKUQkj6Kaj8AAyUN98Ae1WWChHa9SMENCERf0Xu0TApFdUPlYf/xs?= =?utf-8?q?bHfjokz05ZPJ1wkdbZKFqkc5kHVjgBveP8AD5A+2hmmY03l21pgxaeuL?= =?utf-8?q?3Cq35mCVvQ/EO7RQYlndyRpd53UirnkWV34ceowJ2OQlT2PZd0YsDX8o?= =?utf-8?q?aZiiXwiA4/PEpySgsE0Cr2b5ptXr716Zc5RwAyEutuH329519HxCEwZQ?= =?utf-8?q?Dj8WmNMSkwliPmLR2QyDirAXbyWkeM2ru8HZd1zKmma4wQJ2fGC9lzex?= =?utf-8?q?3yuijagOejtje63pqBcNmaxb9APlbG/yBAcC6ppix/LBOT0Yee4m+77b?= =?utf-8?q?tG1PK8H4cBJrl8WXHZzztkoJokngjKt9OUXHWvIH9ZycYCeAiT3fSlUg?= =?utf-8?q?n8BGHOf3UCKYnP2ckDu0JwmzGCKe8D0Do6t+rSvFczqUQV1QOm8qLGck?= =?utf-8?q?PpwWc4H0tpbuAhyiUa4ut5soWGhEDWmgi0N7/V4wZNGstKVj2rcAWsat?= =?utf-8?q?DOLEFpRVql/hvEPj4yHzz2PNPQKgmP167IyCX05oIuB2pS5Ddwq419u3?= =?utf-8?q?x0PTIuDFEeqB8jAZ8JUy9pc/fg/sl5o+itq3fLm/cXVGZRT/Sfu/3T0k?= =?utf-8?q?R1OPHFSV5HVivMPyfqx5AGcyD4/KgNjT91wIYEqPaXGQ5ALz7rPqumJW?= =?utf-8?q?Bg4vGZ2IQl3ZKtpAsWhTBTc3JRAcCgADJKwbGZPQW3oyWLA/W+b8DyUc?= =?utf-8?q?urThTi06CrogDzbh7OfHKK+DnKqr1rgjOimtuoYbHmfAbQ5OMkov+3Ch?= =?utf-8?q?QpOE7GXVMAuUR2yXfB1jg2cTGk2VBhFdDS58GwrFMOGThm5cxV0sbDTz?= =?utf-8?q?JfIeEyyWMpwDQqsGvai+qVdUujV1UB4uR8xPXPFgS0FiDA20P/+EALkZ?= =?utf-8?q?Jf5xEmCmf9H6HISBDllD+PiHZiyL1pcoccMfI+D/Z0ZtrJIaF2YZLkpF?= =?utf-8?q?bPMkXwMkpm0gKMbaQIAyBUW/pYiq0Wr0MrbOBqAYmwlIenC2VvhCY7aq?= =?utf-8?q?nOOYoP2utLoxuoJO5d6P3UKw3JCgFnN4F5RgQE8LCY4Y6Xtyvdk6Sftu?= =?utf-8?q?H6exSIhkRZ69O2O/HO8+GGb43p75zG4bR1bX9NAvcr3Rmg6mbDX4d7x5?= =?utf-8?q?8BMmgr4uGjF8vJgfXFu9B1bzhpCaln0Y50nLXe1t2SNyWdhD4HHOdTdW?= =?utf-8?q?BH+M0bcip+FhXHy70G0RkBSNKKFChnFLhqZVCCmrxmiDiwcBmsEwBVhy?= =?utf-8?q?A6aO3H6ok+kvuVwNkpMUy1nn4u8CUzJnAVh6YDRGBp0D+ISb8pOYG2mt?= =?utf-8?q?8GPLTZN/U9Iw1Es6ITJsD9VNFpRKF0Q?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a887f48-40ce-4089-887a-08d976b6da94 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 13:03:17.4107 (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: FWoURAQRSpdc5Hiq7xzt9kJVaSz7ze4cOC881Z1j5YDrkif3C7LGaQFfeIwdAeQnQeaMou0ncBPgwrgb5CzpKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3502 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Since commit 5561770f80b1 ("staging: wfx: repair external IRQ for SDIO"), wfx_sdio_irq_subscribe() enforce the device to use IRQs. However, there is currently a race in this code. An IRQ may happen before the IRQ has been registered. The problem has observed during debug session when the device crashes before the IRQ set up: [ 1.546] wfx-sdio mmc0:0001:1: started firmware 3.12.2 "WF200_ASIC_WFM_(Jenkins)_FW3.12.2" (API: 3.7, keyset: C0, caps: 0x00000002) [ 2.559] wfx-sdio mmc0:0001:1: time out while polling control register [ 3.565] wfx-sdio mmc0:0001:1: chip is abnormally long to answer [ 6.563] wfx-sdio mmc0:0001:1: chip did not answer [ 6.568] wfx-sdio mmc0:0001:1: hardware request CONFIGURATION (0x09) on vif 2 returned error -110 [ 6.577] wfx-sdio mmc0:0001:1: PDS bytes 0 to 12: chip didn't reply (corrupted file?) [ 6.585] Unable to handle kernel NULL pointer dereference at virtual address 00000000 [ 6.592] pgd = c0004000 [ 6.595] [00000000] *pgd=00000000 [ 6.598] Internal error: Oops - BUG: 17 [#1] THUMB2 [ 6.603] Modules linked in: [ 6.606] CPU: 0 PID: 23 Comm: kworker/u2:1 Not tainted 3.18.19 #78 [ 6.612] Workqueue: kmmcd mmc_rescan [ 6.616] task: c176d100 ti: c0e50000 task.ti: c0e50000 [ 6.621] PC is at wake_up_process+0xa/0x14 [ 6.625] LR is at sdio_irq+0x61/0x250 [ 6.629] pc : [] lr : [] psr: 600001b3 [ 6.629] sp : c0e51bd8 ip : c0e51cc8 fp : 00000001 [ 6.640] r10: 00000003 r9 : 00000000 r8 : c0003c34 [ 6.644] r7 : c0e51bd8 r6 : c0003c30 r5 : 00000001 r4 : c0e78c00 [ 6.651] r3 : 00000000 r2 : 00000000 r1 : 00000003 r0 : 00000000 [ 6.657] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA Thumb Segment kernel [ 6.664] Control: 50c53c7d Table: 11fd8059 DAC: 00000015 [ 6.670] Process kworker/u2:1 (pid: 23, stack limit = 0xc0e501b0) [ 6.676] Stack: (0xc0e51bd8 to 0xc0e52000) [...] [ 6.949] [] (wake_up_process) from [] (sdio_irq+0x61/0x250) [ 6.956] [] (sdio_irq) from [] (handle_irq_event_percpu+0x17/0x92) [ 6.964] [] (handle_irq_event_percpu) from [] (handle_irq_event+0x1b/0x24) [ 6.973] [] (handle_irq_event) from [] (handle_level_irq+0x5d/0x76) [ 6.981] [] (handle_level_irq) from [] (generic_handle_irq+0x13/0x1c) [ 6.989] [] (generic_handle_irq) from [] (__handle_domain_irq+0x31/0x48) [ 6.997] [] (__handle_domain_irq) from [] (ov_handle_irq+0x31/0xe0) [ 7.005] [] (ov_handle_irq) from [] (__irq_svc+0x3b/0x5c) [ 7.013] Exception stack(0xc0e51c68 to 0xc0e51cb0) [...] [ 7.038] [] (__irq_svc) from [] (wait_for_common+0x9e/0xc4) [ 7.045] [] (wait_for_common) from [] (mmc_wait_for_req+0x4b/0xdc) [ 7.053] [] (mmc_wait_for_req) from [] (mmc_wait_for_cmd+0x2f/0x34) [ 7.061] [] (mmc_wait_for_cmd) from [] (mmc_io_rw_direct_host+0x71/0xac) [ 7.070] [] (mmc_io_rw_direct_host) from [] (sdio_claim_irq+0x6b/0x116) [ 7.078] [] (sdio_claim_irq) from [] (wfx_sdio_irq_subscribe+0x19/0x94) [ 7.086] [] (wfx_sdio_irq_subscribe) from [] (wfx_probe+0x189/0x2ac) [ 7.095] [] (wfx_probe) from [] (wfx_sdio_probe+0x8f/0xcc) [ 7.102] [] (wfx_sdio_probe) from [] (sdio_bus_probe+0x5f/0xa8) [ 7.109] [] (sdio_bus_probe) from [] (driver_probe_device+0x59/0x134) [ 7.118] [] (driver_probe_device) from [] (bus_for_each_drv+0x3f/0x4a) [ 7.126] [] (bus_for_each_drv) from [] (device_attach+0x3b/0x52) [ 7.134] [] (device_attach) from [] (bus_probe_device+0x17/0x4c) [ 7.141] [] (bus_probe_device) from [] (device_add+0x2c5/0x334) [ 7.149] [] (device_add) from [] (sdio_add_func+0x23/0x44) [ 7.156] [] (sdio_add_func) from [] (mmc_attach_sdio+0x187/0x1ec) [ 7.164] [] (mmc_attach_sdio) from [] (mmc_rescan+0x18d/0x1fc) [ 7.172] [] (mmc_rescan) from [] (process_one_work+0xd7/0x170) [ 7.179] [] (process_one_work) from [] (worker_thread+0x103/0x1bc) [ 7.187] [] (worker_thread) from [] (kthread+0x7d/0x90) [ 7.194] [] (kthread) from [] (ret_from_fork+0x11/0x30) [ 7.201] Code: 2103 b580 2200 af00 (681b) 46bd [ 7.206] ---[ end trace 3ab50aced42eedb4 ]--- Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus_sdio.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index eb70bef6bd6e..a670176ba06f 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -120,19 +120,22 @@ static int wfx_sdio_irq_subscribe(void *priv) return ret; } - sdio_claim_host(bus->func); - cccr = sdio_f0_readb(bus->func, SDIO_CCCR_IENx, NULL); - cccr |= BIT(0); - cccr |= BIT(bus->func->num); - sdio_f0_writeb(bus->func, cccr, SDIO_CCCR_IENx, NULL); - sdio_release_host(bus->func); flags = irq_get_trigger_type(bus->of_irq); if (!flags) flags = IRQF_TRIGGER_HIGH; flags |= IRQF_ONESHOT; - return devm_request_threaded_irq(&bus->func->dev, bus->of_irq, NULL, - wfx_sdio_irq_handler_ext, flags, - "wfx", bus); + ret = devm_request_threaded_irq(&bus->func->dev, bus->of_irq, NULL, + wfx_sdio_irq_handler_ext, flags, + "wfx", bus); + if (ret) + return ret; + sdio_claim_host(bus->func); + cccr = sdio_f0_readb(bus->func, SDIO_CCCR_IENx, NULL); + cccr |= BIT(0); + cccr |= BIT(bus->func->num); + sdio_f0_writeb(bus->func, cccr, SDIO_CCCR_IENx, NULL); + sdio_release_host(bus->func); + return 0; } static int wfx_sdio_irq_unsubscribe(void *priv)