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: 12488943 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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/Zr4Tzwtfp3oybsTTexAP0DjuO?= =?utf-8?q?PQYRFCd9lrfnPEjX6UxB6sZ42H1cZyA25p0GkyP0Xq66cxK2xuTeVUDpCX/ToqXVh?= =?utf-8?q?yoJfVEDaitntWKgXlmRGU22EoP6yWYVTF8QASId0Qgbh/U7U7Wj401J4C6ecNMPLp?= =?utf-8?q?/g3Yx5yVH/JaPbocazAqS6ylaZkMmlL5Vd189GzrdyH/tw2+5faI+j7PsdnbY7fOQ?= =?utf-8?q?ci2Qq50R6onUgigj/wAvIasoVrqcReeK4KQXwURwVsQskXjua0ZRryEaJwgcCbQ26?= =?utf-8?q?iCl/fVge/V6OwZvjXNOlTLQXaeMl/COU7Lv2nS3KIS1MVYNlzry501uZcl43e4vy0?= =?utf-8?q?IJsLNJUFbi+bgZnbJEmkO+BNFFwSYOZP6IdHs5hSU2HQ8oeG4ZDNpaW4sqiAHSapH?= =?utf-8?q?ncYf0u9mA67TOmlISe73b63b68t4CNIsdSLQ63PoPACm17Z1KY0DPGJNRhUHMjqgb?= =?utf-8?q?Aq7JsPdyrJxi7nCbFDd3XDNir+4JLh/sEiYAVqDJEEdZhUKqcoyl25yyke8BJVNs6?= =?utf-8?q?n2R4v0xfbYEvmdVzbq+fzbgFWtmCfY4kHNJ36y8f08Yel/I2cNy2NMRaXR91fAZ2L?= =?utf-8?q?RwxaXHZaDWcQb2I6v5Lzk7u8ue8DZzbVksWGUZ3PFoKYuY3sWitTBgBsqEDNrIRyq?= =?utf-8?q?/7XPcoD+Iy6WKjapWg6KtKQJhH3QmCRRoiLZADmS3fZtde2B+X1RZANpm2jbJzOWC?= =?utf-8?q?fhsSTIvb78e7s92aM2sh0ppf4+kiIh8aT6rUt+h0ymG2cqq9EtisuGer4DFt1ohS0?= =?utf-8?q?EUmTX76/fV9KGBaA8i8XHM0aB0ju1nIhsLSIq4GfiB6fK+zUTWXmgUq37vi798yt+?= =?utf-8?q?4VrC/ojlhN7QEnnyh6JcJh/TkFrRVdT8AK9puxC+nAx7JjdMdVr0RxDiYuk/GWZPR?= =?utf-8?q?v1nTbSItuoH+Aknsar/nX9qkk4pE5uDio2pi3GkpNCiqHeReoqY51QRy2XVEUsu/v?= =?utf-8?q?7fEPBnv4OBAjwTsqjlRorJ/typxu11zP2djSOpm/wI1sGXqh2NnArTv03hFY9j1cW?= =?utf-8?q?A7t4V290Irlx6e35SqaKEktb5zinncsdLiL16pPUxU5a4ydnbXLehuyxhu/ONdPWM?= =?utf-8?q?jRinmom2K0yQ2Es+HAlqnY1vPsOe9r1cSgrNot2b+LjCPtgtrxtdNRX5hj8zaCujE?= =?utf-8?q?hhgK4etIkczxhkFumLWtJikc+LF6meU8GBKUMf6kneEMDOFWu4o+EjdQ79P67cM3c?= =?utf-8?q?qztuP0q5+WH5BOZb+YANAszARlvrBjmo74pnrDpfw9aucZg5xmoLt7atBumTZ8IQD?= =?utf-8?q?s5nQU/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: 12488953 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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?PFPQRkRqoAsMtPN4jF4ma5He1bfI?= =?utf-8?q?jIwnnViw8Pr83kPCacJxhjZaMHDzWs+tYR60bigNHz5R/oYtnlh0DFc3CeZTKvQHT?= =?utf-8?q?sh+r/ThS4GTs0n5ARzgnDkq7CYv4DvBTUo2+PvqjBILifnjf0eInPh9L0xjLatHdL?= =?utf-8?q?Z+iYSvRqVnz9is5Fm73mGriXW7Um2BqZ54R602rJvj3lSgeuWlSxZ0jB/kDCk45UX?= =?utf-8?q?ZV0P7/tSgHIUU1eKiqczTMs6aScV6aUxeKjhqB4Bwo4+Ior3TrWX9cSWaSv7cpq/q?= =?utf-8?q?XZICENKr5IPa7AlEyllf6n+naH3C37BPVgtVKuKdjCohVDob1kNZgiB2Mc+3QWoJn?= =?utf-8?q?z940zwsXxnj6ptzoQC7IIu923016eTCMjbwU4xhR7SbBM6Uq1KykqG/d6iixqTJTT?= =?utf-8?q?zeD8qQET8/cKjDPp/5wJ6nDIi/feBhOJpB8URM0hy3Z23cN40Zc2jo+PvibPwABtg?= =?utf-8?q?IhGE8si8vfV/GmuAaXwZ4fAxgOy34t5oT9dq5jiZohOddSYpOPA1umFVwjkTbnijs?= =?utf-8?q?n86gu5IGTnN/AqELofHV+7XjpoGZFOlZX1qSjgLK4NI1izz7XVTuSVh6yt35txhhe?= =?utf-8?q?SINOrpGDZT06LVTFUbs/cVawgGeI8x+GsQd/WXXqN2enU4QArNlTRRlVYi7TaHNLo?= =?utf-8?q?IM6aB/7H4fvLldUPF1tt+yEjfXO+/+3TB85mZibWaudFyeUZNb49pznSeqBqC7Hk6?= =?utf-8?q?IDPUk1KQp19sAZhTUXdD07vMjOevto7+4DV+qyn1LCA+5DyX80U8Cfl4mStGTfvND?= =?utf-8?q?Kr/o/9S382Dd+cWPzf2jHq3EAhPACs0Vm7Kt/w+bO2U43Lr3Wnw3ldwPFJ7fjeX8s?= =?utf-8?q?RzIiz8TA4r6bWTBM8sy+BZ/THGaYENFO5st//tq5rvAwPiqIfhUQAzhuHV2Vuzf20?= =?utf-8?q?yZ7ZaX+8bDuv0xXgY+Vti9rjCrpNolUhlaB6KwQA2BliLJ3fDwIkGaDbeOoxSdjzQ?= =?utf-8?q?XXwOpm+O7ac8at44gVadVMEywj6M995CJYPuKwBiqKHErsLGTYd2hJPkBHRcuqPxE?= =?utf-8?q?c7evqXXhxgH1z6BFqI5/7+8BFWsyCACFWMY/z2yjN+zEVeg9KAHJR8mhex2+wqm0N?= =?utf-8?q?MNZhDeAevltTVsgezNAQIuDkHDrRTpkAstJTrbRgAt2CMnLIYg3tcxmWw34JvIaog?= =?utf-8?q?YnlrzMKjgvNbZmZXF/wTdMlKcz/8fWbAXCTDy2UJhKizwOCWH9ieRq13K1szbL9bI?= =?utf-8?q?FoXjt8yaOQxujjM98SXP4maoR/GdELopgLOnG3hMz+HAxzxeNNZUEAwnAeN1HuJrW?= =?utf-8?q?lJeoJy0FQKko8fAp?= 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: 12488945 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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/HgCUONMt?= =?utf-8?q?iuh9/dNflumB9ntxuks5+1J6Hgp82LWESAbt9aTgdi/pn0crUEp+lbHa5Cpd9K7aW?= =?utf-8?q?3I5oKA/IB4F314iNtd6E7ewcPwptOnn2eecOqrpfczmk1jMhWQ/tZcjlURC7fd2fw?= =?utf-8?q?DWG7NVKfg6uFXiFkXwJznRRZlYkBEZpGGETJt+kMpAynC45pMZvkxwRoa6Toq20en?= =?utf-8?q?96H3WcbpsxOFE8/ckhwkdeWmwvzFAGxHgSMY8Sai/gSC9y3VVosvcBr5gcZgNiuI1?= =?utf-8?q?moHe6Q5mcUt3wGT9Hxu1aTAxbQgb62V0tfJk5ED1oDMRney+DRxnBXUrwm1Vo997A?= =?utf-8?q?gTNDPkxVQVW+KZv4XNldMTMhVGcKcixum9k95siFC+r7XIlBhyT+bdHOCKfvC6TLU?= =?utf-8?q?Mu+HxbZEMyG4sPLwz1nwHDJOdADlorT/BH5q5ZUiK7xqcmMPX84+hrJNJ25/PzIul?= =?utf-8?q?Js19GrTracv7Q4MUgpQp76APnjdgd9X2DPLi/bmvAggellZ5Wsv4nub67hax7ZN3b?= =?utf-8?q?Cveu3WRtD1lb6ZbrpxqqvbbFB8s9ZwmAUqyevAIUVtewMLH+HjfZ6pzf1fvgLkfgf?= =?utf-8?q?7/UDR4SZMLgW8e7uFgbUJj0/6ST2g5Sa0MonYa9tT9vp+otj5v7t6S1nUx16Z2RCP?= =?utf-8?q?pSirz/dR78qA/6XQEqCKmsnmErqS53fsrtJvIJ36zmJ5lfkAFOgzenOWs9W8mgPja?= =?utf-8?q?OUI/wJvsOiuhFrptqGrZB1owtRrxvY87rtbDDDV7L1gXSm1horHiO9pg9p49uNMlU?= =?utf-8?q?3+ZS27oJOeqrA0Dx+WnYguQakLd31hU1mjRykv6dR0Y29/znVQBCtrAQGC4Zr8vz4?= =?utf-8?q?5HUyH77i1h+tvqQ1RRmMd8Otj7mOE6xmWNKYQOijjpuf5o9rJDRhZKb+W0hebr62G?= =?utf-8?q?+Z4JHY/ULu531xYENbwKld2NWOvEdzUJBg2UDPgdGd2TvMuhEw/hKGD736Sj0AlpL?= =?utf-8?q?As1J3ooPsAKTmvTwxCcUhr630xTZl9dQVBogP7a8PoOmyG7THBrpPIy5VlD13jIm1?= =?utf-8?q?XlW9BjZ//JeQWOz8odwqJFcRQV3auYH01h8tqP4v4JLK50xgwJ6AyLdOLUrDFrNiJ?= =?utf-8?q?EpqxZluMDtiMilYC1rLBn0GrTjs3HjyPxotS6GHQ6RzVF3n0PGRfos8GUkR3cC4gQ?= =?utf-8?q?PtvW39JySLDFQTMblMXEZkHA4TaRB0uoiFW2RSS0UbUhfd0FX94vf43Da5/mCg2HT?= =?utf-8?q?b1jqt1SJfkZ6FMWrEnnjf8KTuMFSBQ/KxmbjVIP3kORT/hgGlxCdsqLE/2/RYiOZ9?= =?utf-8?q?K9JmMoOdWi9WrWrQ?= 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: 12488947 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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/BLWGEp?= =?utf-8?q?LnXyuXQXCyXX1YjHtQdrpIOpDpGz0iDt3P+51EdZU7jBNMwHJyasbl4kPLVjHYxTa?= =?utf-8?q?TpNNbUjHbqWuRGmE1l3LL875AhXrgPfDsVLU73vXRHNnRl4pc8B6/dCkFAdUHkWKa?= =?utf-8?q?nWsgP43hJUjjStgNpYR64oErJ3KmMvpaYboNP3PHe4PkKqrJbCVpJSG003QmMcP+e?= =?utf-8?q?gGiz2+5G1MLy2Cia6xZnu9SVcZG4ZxxN+Z9vl+SMOVhbvQw51g1aVjoDOjuGaOW6n?= =?utf-8?q?RYsXhnS72wQ7ArR2UE6c2a/4/yb6kLPJPLq5HOXCRDPvs8vk3ADfse+4g5+8nkpJK?= =?utf-8?q?KXDsJyzhWbFhyLsE76ip51iOX1JmLXRMnI9SN29Gkiz3G9SAJKOPIV5+QJAmZApSZ?= =?utf-8?q?PR/Fbe6DrLqQClYIeUx+4lVn2XQKtN/Yq55cnNiHmpZiMuJM5aHdMilHOPxIjzyjT?= =?utf-8?q?8lr7U2+xeruWq50i8qqAyscrgxzE91hx30uA+xpiEo0m2YilOZgsq/ibOxB8K6rKy?= =?utf-8?q?UuTI/8PHTc0RLO1Ey1ZThAEVvPf3KQZ97iUDqP62lJHYvQi7U9uzk8QzZjVpdD6wP?= =?utf-8?q?gK9ZgcdsPn77p/MUwwQhit0u2ULFJu76G0At/ZQmJBo5kjdShmYk8VPrNE7+hyc5p?= =?utf-8?q?M0qxiiHxRxTTE5CQVZQX6hpcFJDlAh0vwiTleUHSMVFp+n80s+Pd1TfyKLhzsB1ib?= =?utf-8?q?gzLzKsfDYZKdDlTcKOdXfScBhmoHcDlU1ZVbK5qV86XeUG0RdDbNor6+kraudXO4W?= =?utf-8?q?+5uPlI27C4UJWFOlofJP8+rKEiKwd7R4lGq6bCrX+4pGoJv1M6aW7YoazdECMmyoY?= =?utf-8?q?q9UB1JI3c+11wdQHqIArS4chsazcxT4synE1Wh2gKr/FMKbWGCN6abBfRV0Oe8Qu1?= =?utf-8?q?Zo4JJ4K36QeGRgxRJ9v/a0rzkmQJro0pRB/HMk3kU6if2w8wlZb5B7wkJWJMsrYqi?= =?utf-8?q?rlUUiJrl6U95gbBK8g9S3NlmLP7sx/27WFiLmx0GQNpI1C4N01tq1iLrdFdSvLktm?= =?utf-8?q?E7WK7jsSHpuOJ1H9Bk3e1kOZhR7fQmHAz7DyZXNQdvIsp/rbWAPVLud6RTANJYCEA?= =?utf-8?q?HpOfV8dtdCWMYni4Z/IfP9y0nG4PFkA+6axDvAJt+zL6lKNhGNIhFF0htdJmqPkRr?= =?utf-8?q?CRZ/scY6Mk0ZrcC8clGtpw1D58YkEjHIb61xqDiuEiTSGvwM5fzGmRes+pRCD035q?= =?utf-8?q?PInT59FgUCrZzmouPJ4hQUuThmNNmJ61DzRS4w/lf7ZQHQeyeJmmujTpPyzlfs3dz?= =?utf-8?q?kyjLHYqa3ZGDXXG0?= 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: 12488949 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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/mvw?= =?utf-8?q?1NDGkBQl/6uZnwSosQbFtu/9x8hnnwuSlJAd0tnG/QjrRczdzhnyE1RHpIqFc0A61?= =?utf-8?q?YHo7mx6SEKGEBKv1Sevkpw0dzbJjGnME2WEGUAUhSg0bQcGZ32CzTB2lmScMwTLgC?= =?utf-8?q?3BFgzq5HzAsKFWOIRms8ERyPXzT1rmL+tDlUXLNfYcCrfBfuQ3C668bAi5rGpEmOQ?= =?utf-8?q?Cjv/a6QZIhuB8Anc+BnziPX67Szzudu8ZZZ8nWO1htLzQFgJ8tmY2JwIsdr3sGWjV?= =?utf-8?q?xv/+d9gitIL/AVyN7XedgRPA9/6KOrPKS0LcLbqQd1OO3RXi2DLKMZ+H0963xuc8x?= =?utf-8?q?HijNKmMj5vfvlHwd195FkeNBEs8XpMp+etBpshVz+r9Kq50bKtRhjf97XgohJqHbk?= =?utf-8?q?wEGUGKXRjxOsD4dwn92oXcMNPV++A8EUpy0J0Cv814zqIFE/rguM6Hb2ymkrCGGGL?= =?utf-8?q?6Jd+l7YMPnQPKeiPz0lzGC5QIlxEqmdnn1v5KtH/a8ono0+V519kYE5rGSBCn7f1H?= =?utf-8?q?2ZeymEQTD3aUIJgf6WWw5wEVjhrj25e+Uuh4GYmrZQweGuqiV/3p/KKKJjWDqec/T?= =?utf-8?q?aXICaKgVzd5unXI4bBIvXcpdxb+uLJCEf079Hm40dfMo/CgulLj2nKH3q+PAiSQ2T?= =?utf-8?q?Ubw1ptbd62t8yasvkBFEF6xFUk30sueDn1Insb/usKA7VvU2WrO+3e85p/wNsgMr7?= =?utf-8?q?faZ0/kMMpEyytKefYyVAaLo1hcTG/fydX80WDbGTSxpRhTsqS82T4rZlbD5GwyaS6?= =?utf-8?q?PXOkQ0YzI/xbuDBeHwN8ppMoe7DzsOav+wH2kid+YpN9SPsx0+b0BZSF7HlUbxUlS?= =?utf-8?q?4x1efwPz4+luXZwOvwSiq96P/DcrdsqoqkD28x5lHfuM+c/7urJStkqLfB/JJiwI8?= =?utf-8?q?X4Ahtpy7mtlMOH5nqIhAPV6JfUaDjVpOG/bXCR84Az/kgC7L250m/wWZteUM3Qff+?= =?utf-8?q?vmxz2mID2OYmbQswTwRV4/aFfEM8lXKYiyGhnbbwlI3HTzb21xAbWueREcc40Oph0?= =?utf-8?q?kb3sCPO3O2pMkByeWxWlzvsvbgZ4bFBtZPK49DLTP9BwcnntaWbhBcT5AOn+D6T3c?= =?utf-8?q?m4Lq3tWe8gyi1uDgy7QaIQ9ZG6Zku/KFE3y1UuPkJ/4oOwfeLi5+5bG84hLVFqcM/?= =?utf-8?q?V7gTM6oiHVTqJhqg2PLNFjQAk2gMjv49bOvvVZSoqyOomiMjuwf/6P1bAB01g1SJk?= =?utf-8?q?+agoPUI12ThYZsjABZZWeJdz31UTtT2Eo63SsmiuJKpVRSnbiyAmKD2a2xfNecZnT?= =?utf-8?q?GkR0ohLYbQm67VZ+?= 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: 12488951 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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///h3EmvGtWFv23k3Kl?= =?utf-8?q?j8eFSUTgDkZwSDYozQDry168CE7sZ0kgxAA7BzkIom6MeYVXvZn3oXICqr2oWUIYo?= =?utf-8?q?AjYqg9013tSn1G5xXjxg39n3g/UkVnh7OOluSSM1vH4m6frk5VVUdZSdTZvTuH1fD?= =?utf-8?q?ttp3JrsnhopHjqbbLJgy7FfnBNX4CZENnKnVTdno3wl8MQnUzIGjv2G8GfREtnmZx?= =?utf-8?q?89/gpJnnpNlJyZiKBpfMUJyUv+SCEKeYyl2wfeTKRYX3axzlAryr9/OIJMaJsuRS3?= =?utf-8?q?A1fYERiTxJ+XR3xNN45xAR1I1aZ8VoQCIi8+laEu8GBdX7e8bAFAY/dN2ObFFnlqI?= =?utf-8?q?H7K7Y6+CgE/bu+0hcu/jSMG5Ue72Okxkwe6/N09iCJhUQ0RUMN6I1mcqHecHT2u1M?= =?utf-8?q?c2AlSHFzb302LEU8EtgNRwAYZh9pg2E3NVCLDN1tvdjdOS8vVvdjX/QduIr9Rpn//?= =?utf-8?q?zctAG2tF2wCTU+mQxdJsOexakJK0SzzpvpZ14Gq6mllDTkK+yMis/TQqYPFQPffIo?= =?utf-8?q?07ceqzse4CG8jNXbJi1WBcabP1A2kWpMc4ScHhLRNac9OgQ6ko7U8w1f1xPmDU+Ao?= =?utf-8?q?UR6+s2iyASHYEf8Uv+3Wg8IMgnfH7iFRXfMEDgSHSom8JQrPczoqB/eDtbzBQ+msk?= =?utf-8?q?N880/FcmRiwB+2xzXqr3AKJVpkPNWxRPPOAEzHRQpTw8OMm+dhrf+zxZU/epumnEK?= =?utf-8?q?UiA2YAL9JztL5/6JxJoqNg1OOamvulOim7CXJMu8LUP0a9XX0xfwZtKFJKNrcOYiI?= =?utf-8?q?4KamyEGot2jEPSKhlTqOge1rR3lDO25/O2RMQ892cwy5oZJIZkac8O6Dv+bGzXTMN?= =?utf-8?q?vndliTRorLf+fBRSNp9gb8JRAA1m4aJRXsL1SMx/n7fxqekYTG02VM1xojpOutJgZ?= =?utf-8?q?J5M2KpCdH8gg2YTyg0AJrPWDfCTCA+WSDFhQ8pYy/waX6bJgreNY15m7tIuU3ZvnX?= =?utf-8?q?Vs5QchaaJX/+dWJEj3DSqm/8KLWti8dsC25WR1Z2jOIXJaDmDSIIW9193+szk00td?= =?utf-8?q?ABeRULk0wSDUnPLEKMIW1anRvI0/7ca0gyAWlFIo92mTGfMXIIBwKStvZ3i8JQw1z?= =?utf-8?q?3UY4Vs7L5HZG+GFVtJj8tVZX7H3n+YDFT/tvLabqHyLbkZYPBZqOgTv8HZFmVDI+U?= =?utf-8?q?J3znObA43pJvJnRuDOQBmafGlvYB1s0w8PB67XZUL9Dok8hyZTJrCk3Ru8Zhy9MzT?= =?utf-8?q?Ib4REcUzbFv06Y4o/XPLsL4g+J0EbkhbbPy7bpdtjBpuCYRW0aOa/JnjUXArIl/3n?= =?utf-8?q?cVoz33086dQ0dFEG?= 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: 12489015 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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+1e0q80Ya?= =?utf-8?q?cEpUsREFyL2rJ7vqShXPraqVvgiyeR2MenHAtQvjdbl33cygfNyaTOTNeMHFq+t7e?= =?utf-8?q?0snQ9pZf53tBxZqevYbCa0kZGoUyAPdhUpfHBjglJeVeJAnzj8DOXv9RcqLoN+eQm?= =?utf-8?q?l4K5E6pwLTfNIGYDStmks2ClM/U4mlDIlmb0dSE9SLs15i5WgwBmg0DK/PWRV1FMG?= =?utf-8?q?O8qFeYk3IrI7F7Nly+fDkvEXiCVfROwW/5J0aBRiXwa9ni/tpKpj/1q0hFZ6LGuD6?= =?utf-8?q?DClz26fGyrj5kVfmgr6aLnyr06tHG+G46Jt/bbJ+FIv4bOznZdnArNbZbq7YCA4jL?= =?utf-8?q?jNxOsftbNScKvTtzzOjSlIvI8gEnzA0nHZpGXAiyRYKEMhTTWF0SEFqrFiD12CrUT?= =?utf-8?q?U73a42h2exuyLGEDWQb2s4c22UEJtmPZhdrs1RZ2S5e9LxTsxv8yTv/70YiHN7v7S?= =?utf-8?q?wPF+dZG76CWcwim1RvT3Sm0648lzBV/55mvru1ORYi5TaojvP24L6xgYs10RP0VnU?= =?utf-8?q?TLCtVFoz8HfaEhMmKUWTyAsCAns6geRWR3AZN1rJNU/LiaCsXKm9egs5Wr92REX5z?= =?utf-8?q?nlvD/DM3+5dtxjFXRdvYFo7PAW/qwj0sq1c4ESJBk5qE+wpcxkgnhXojyVNyy1SE1?= =?utf-8?q?V5+gF3dio9f2o73TAn8negwDIzi0rLC3++15rez+78uoC7pc1ai9GN4wZjn0UG9ww?= =?utf-8?q?GIQ+0/APG/kiAnqoREXUrC3TJ3leTEl5oiBUnIuPrQIyAzrNsC2VHhTzsZPaB0KHC?= =?utf-8?q?hqbLtDaSNS0iZUTmPTtTQOIt972IZ0SEDqsJSBroC1evJ6id+B1kzTGkgwhUHjJIC?= =?utf-8?q?MMwaK4aT/qTVgcOzXtAMzqHlGHKoOnMzSkKYi2+qtYnqBpvaRFOE18MMe0AHU0IPr?= =?utf-8?q?Wlz8fMKiwHeFSgJxy5AtLhfF5bw5wJaU1W4cgiASyoBuwF+lfA8n4PNB70S9ogQrV?= =?utf-8?q?+pG7oKyYqBjf0+hAaiX0lgVZa+a+LzFfQApZfpjI9/l3fgwNg7pbTLkWZbo0EHSur?= =?utf-8?q?58E6UDt9JMYDJpq/M10gpwHoz13tIPxCxp9ouXlw5qODbgGlfovGHFDWKldvJo4UU?= =?utf-8?q?JYoLcEUtgK9ZPvldkpaIQdhnX3/MY1wRZCVBrrCF2ijlCLNfYH73RwoGW/UL8moZb?= =?utf-8?q?VkG6faptogCAWyAiMXoDMQbVY3fto5hD8UHfQJCIHyZsnLJd0DaVLDdz4c8fGT8JH?= =?utf-8?q?hTIKXLNI2GZ/dfl39u0tXocti2e8ekfMyCtwdtFvdFIqJSes2h7s4yXLCcWhi3man?= =?utf-8?q?cQakYUvHrA57t3fn?= 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: 12488955 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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/1SFVfgTRY4?= =?utf-8?q?tZ7DoXc6/aOIeonIyxCgzwOEmHPjunm2mVfVFBzN7AvglxrzT30cP2SLjN0Ga0E+6?= =?utf-8?q?yARRMt86NEFWnnP4j8U2i4b8ErSEn8ZHOSeHXLg/nTdaHynYlWoqTqTujlbdISPfg?= =?utf-8?q?NTlVJt66oi9g97+a5Vo35qzOl4iuqQGnfMczPi7Ty4fTyg1fxJOVPGiqPtLUZm4Zx?= =?utf-8?q?6Wlri9Ku+TEzDpkxBU8N1OcqqTHVbsphcE9A2fFDLFSGfXgf6zHkCj0a/h783Pzs2?= =?utf-8?q?zfRs2m4wF+JlCfBG6ua6rOCR6pohPpmqP9jYHOSQ4IJ+fNq+EAX10/fnOO23VHIWW?= =?utf-8?q?QIA7aBshudZOx5xjIOpSjSWJ9XvsrGzHFzXA5v+KzBDpsyPUJNW7ZSL/RmRkv7GvH?= =?utf-8?q?ryT4SpGqzomAAzcp8lP6Lbd/dZaZi13Su99zfQte/UgcxP2b7LKikataDj4um61+N?= =?utf-8?q?zOTmQfYhlAUlPp5l8dUeFx333MjO02miNFYf0I1qJtOJhr+Vc8VFrCTWRG7z0v3Rp?= =?utf-8?q?2+nHTaQotMH4d3hwVhCLo0B88YsMg3GH2MWalCxObzsqe/vI2X2FhFJW8Dci0nBnQ?= =?utf-8?q?RL5B2zq1aXiNgCRuNwG+/ee4FHQCKSC0PT6bBqJXLt2j7xAGAlWMUwweGZ3VHtFON?= =?utf-8?q?tilwgL82HLlkn8qlGPqa9Zu5DWw1oE7HVgfahH7Nlb5l04eu58A1YlwOMiTEfumUa?= =?utf-8?q?DhXzCi/FylWXcSy7rKpIT/+oYX004MSVz4fhvRbGRNiLyItz0O1BG+7OW733w0MzY?= =?utf-8?q?RLWomsBZ9Z5qfdKtSIz4P1y8CVCTYIkEa2mnZskYOgAyP1m7mZQJpH0ZLuI7w8B74?= =?utf-8?q?GBGm4D1DtBquedvbswuisopP2TPkes7lR6XXJbgZz2g4csKHYWSZFUIPgpRKMIeJK?= =?utf-8?q?T6CLc7QpLMP2SuztwtnzlSB3eZKJl0geT7jjSczlECMMYhDEOqw5eLGsfL1LzBX5N?= =?utf-8?q?SV9DF2Mi7p2oThcCHDZdl3idQAK8FhJ5UCj9+wpNcfTTcHsU3D8qV/Ur17HxobJwz?= =?utf-8?q?inNZw5bRe8uOruiXXLOepoi2V2gb8mfCRpIAw0okAiPlg3ODSFTbYd9yhz/XIVZfr?= =?utf-8?q?1w0Y2q+5s7ie0vIKcY6BqnftzoVtpJn0nSbZQG1QTrUrHkThfuxODBLs7epk6VGCm?= =?utf-8?q?WQU51lBWZahvoY2V8P/iMgH50Yvlyalvm3XlRE4vpcOs9uWzSYRzFKL0daYfC1dDB?= =?utf-8?q?/hVDT7Qr8grRu4oEfAgEhvYyJPvTXeqNXhw0sImGbh4R1NpOkEgrjXnb5uZI6yXCu?= =?utf-8?q?z9SdDsFSWO6MkZHu?= 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: 12489019 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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/AUolIVt/?= =?utf-8?q?pImxj0vqux66qUlUD6ngvXVraRJTI5l9rk8beSk4uHMi6SWkpE+aynjEMeen73NrY?= =?utf-8?q?MSaHEi/aIavvl8PKBtfNkXL9ZMtcQpZaeJWTWZ8LiUpJ7jxk6n2OTzfgST8ybrQbn?= =?utf-8?q?tAS19tfSHg6wmiPKFhqKpUXbpz8xxRmDJSg3yFP2ZuVDWKd06LXblosS2+3F25ElH?= =?utf-8?q?sDxY72BLFSsdZFnE6UNBcPNevR25QCE+fiQEka/+zurPt0HGUcROleUwIgX+tlu8U?= =?utf-8?q?WrYrSQIcZXMfLY6MZWW/N+CiHcM45LKxZG3RSPsFcM0YOAII0X5rYvom4A2vX8aFn?= =?utf-8?q?RXF4SZwOzAoIx1RCjWg90KbDOPQ/fIQUINoQseuLsaelvSlymQna0JOJzdTYObuoJ?= =?utf-8?q?EXKe4CQx5bzvzegmxnUC0OdAJIzXHdjuyq9cYzGy9HnU+J6g4x2lmAPSEdvM5qPub?= =?utf-8?q?NPrvnWULwkm+Ds1VxugD1/4q3qTMyjtmc+yl9rkJxbZhpoBMOh0wHBOMBxbAGdaa8?= =?utf-8?q?PaFZ94N1gsH5pjnLYw0nU65hQ5ZowVm5feGKv1s3M8/Ytqcqrh2aV3svZy/27Ee5z?= =?utf-8?q?lUgU8VDGgZopcA7MzXNDm8/HXMDhJr7KObXg+0zIUBHBomL+GfRX4cnbYFay9cRIe?= =?utf-8?q?BOm0ac1n/qS2oiRg4buy/xRjpkDm3+oaWrrVogUbbY03Jfa9jTDjhC2j6uMxVSbyn?= =?utf-8?q?Nh0OgGB0CceWlfWBvjeHdosv/PE1jOHXgWCbmqPh/fsp+J/OZBZN/nePZr8yFOVTc?= =?utf-8?q?FkpjpQH1aa+wt8JTOCD3RecxRDZdL3Us5ANaxqcr4KHi4T2wyG/ugI/VKDHKHC/Ki?= =?utf-8?q?sf78leDp34Eo4qnVIcKIv/NBL/JyDDybIsAKckdv6o+PMcPKFXWkzMxvgn+AZYS8i?= =?utf-8?q?9EqmBc6Dd46YQquiy9k5MLe/QzPLUqGN9qAU3o8zi2ZzFwbzBcFr0Pw6+BnNcH2A6?= =?utf-8?q?ASODvrVb6+f2oiytcI0/Ka6oDVMpC8C6Zbz72yiZICbtKwivt5oE2vqmJEJpnUUa5?= =?utf-8?q?e91vRdhs1ae3hPFrG6VPwKfRr+FvdB48sRnrxHLpZfGc0gut7t9DY6MUiTPfmr8nY?= =?utf-8?q?xmkmMJTlK3xdrR5oezMDTuA52k90bDI/wb/kJ+q/L2c6p+2qHAJxeUT84tim2Khd4?= =?utf-8?q?ev95eDBt9TGI7fpqY854UOiiFFnQmelhjhPndTj/hChCWlzYD9Fzptjm6A+wGj9Na?= =?utf-8?q?Ms+73u/trQoRekVJJLgZZlSfh/ZjZKLTHqRyBF6i7kq1Rq1lNo1+x+tEzz/zmopxY?= =?utf-8?q?Q9mblypHZIx3aydz?= 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: 12489017 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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/Nn9xT77DL8?= =?utf-8?q?KrLOG3SEy9ZKSdhdzCC3+6grAj7OXQz2hUP+NkzpIzRHRoV1ZVESW6nL0czy9rzn4?= =?utf-8?q?lBsOK7eXY4YEG1rlwScanX6avp9ARbCiA2lrQSF/WqtgQfLH5EI+HjSXBC/Mg8YQ8?= =?utf-8?q?LABgRzrRoeOPEt4VoW4USfrRke5V6vlnfJtOEfC/Qj2wJDjNNcU6bm8h7jwE/qVCu?= =?utf-8?q?8JoXLBMVaE9OpJF6tZjfmrKxL0WB0pvPk/emhFCq4EKDOG62v3QTZ7ZfQ7K8ewpzO?= =?utf-8?q?d+6J/vpjbA9aD24W7RWSXUvh1ps/UDOvMwezO29qHJqS4KpE90vZH2rP+JU65w1db?= =?utf-8?q?yYOhf/yzK9ZaTF5fFgxNx4C+lx2KccFsaw5NAyzhO7zd3ro14HF45yBAPQuWVwzjp?= =?utf-8?q?ggK6BTqacvGRHVI3wDmyxKlra+tlKvPiFT6BfmtuNAS+VzkY3N/8Lk+NyzpW5M3qI?= =?utf-8?q?CIlnvQ5dZKXihtjCDdM3Bw9yCPf7JzvyY5E/4BYJoAE9/YJNqkej7kB9Zk6pDMO+Y?= =?utf-8?q?l9/FKQ4OrKTtXgVEvGOFLFWtFl+mu4OZ683pMxWghl3/BO3GDcA6/1cGsaBH0BjZq?= =?utf-8?q?1z3xQNWYRkchHBRPCChJ2DB/YX2ZruGI9g/8w6qO1weaGj2CQ2b9mK7tSnB2hgMDH?= =?utf-8?q?KbQvMkFwbVobI0wIsyKD39Xnfawzi9Br+ViPw3J7cOOo/W4n9SLI394SggR38uLoe?= =?utf-8?q?4KbFgLRoClEy8L2oa3K4cZIgVKgPcyeeoYNPxzFc+oaJ2DfxNNnpxbzGEx5WhXPUI?= =?utf-8?q?Qe9yAFheqaEUdVPMAnuuzhednp7BUkWBUoe/ZIGCm6FPBpkH1lUL1/003MEMX8abn?= =?utf-8?q?c67xHRRCFSBROc5WOYrfGD46Ssk2OOJj4eXO69s9R7trdvm/3JoQaoz2Z3AyaIKrD?= =?utf-8?q?aP5/+IFQxy2QW5g7jnY21vsD6xnTD6QKMPxHmr4E/4gKyL+u9Y0nRzgakePQ2eGL0?= =?utf-8?q?tVJAP6oLeMDhAO1NWBy6XSgmTg2Iu1q2NhtjLW0gHWYPxC9erXPBFAaUfpGftf26Q?= =?utf-8?q?iKbKxFSh4w4mI1Z1P+IlmqaEbG7D9S9abTqMf9IYGi3XOumC6prbc5wz7J1EV/OXz?= =?utf-8?q?GYwJs3oz2Xii3LB8ZAsjQ/UMIe6Ej9S5DhLbNLx008goMQViYVAKy7Y3ktMSRTIT+?= =?utf-8?q?hhgy+VpzMliN98XeNlCgYTciPDkyhCv11tODgnnh2qsas+7izHGKilw9WiMNTTutB?= =?utf-8?q?TAtxeOmSLt0LB3XnEm1tui+i1k1nhPQsW8Luj08kk3ToUjySLUX81nzP3UWLBcMf1?= =?utf-8?q?uAPbnkkHUPwW+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: 12488963 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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?1ZzZX2aBYqICFx8uh4brp6uIbkmN?= =?utf-8?q?nJAKitH18bpybCsY7fX+PnD4Q/hjmWO6oeyStsniNmO2E7VV7GWJoymm1H+NUzcZ4?= =?utf-8?q?pHbvDhu+QkrUeYW0/Gfx6SbIbhsO0K2PQMYBXblspo1LJMAzh2GXVg50Lo+FbYfNJ?= =?utf-8?q?BUnDXrY8+3Xas1jxkpNek0pOofgFjTCpzUzcCgBSYqMsHgPqtCSlIoho6LQVGFoik?= =?utf-8?q?BcU+KAXjJLBulz6txY4VRQaQ6XFKCcCfzgaLJEoG8Z9+PalFlu6oUBcY3pTpdiMSm?= =?utf-8?q?hGN1aKZ5u5vKGjcctVSdj+mgXEIbQ5Smqgtu3UALNiTiUbO+R68dOcmNdJM2O1BTW?= =?utf-8?q?S1rVmUFIE2SVke66CVli5IppOkzqwqUb+ZuwDG2Rgcmfi+VQOQC8SGDbGPf+vBID2?= =?utf-8?q?qO/EvHlYctId0HpAXq/QC4e950WvTAD3WH9vMKQsI/wLlIKMhtsJm24rNAuijH7Mx?= =?utf-8?q?8UhBsrP6WpYt2q5zdXGC6jxvb4veuqAeFmPgThGTljzTMuL5A/ZU6mW0i5xU8jOEC?= =?utf-8?q?TdqGP0hOnLo9rqQytWx6b83xtUiYO2NYR033Gp/U1mnxQ9771h5KjrjpC/zXd8Ddy?= =?utf-8?q?jeg6fn8H82YKwzA3pl3T+bVaEen1G82XD66MDWY8UqvkVMPplFQISxgTH6GTAPe3K?= =?utf-8?q?UnFoEXczqSELO+sd5y2iaLMuSlCwU8YlGcycYuxV7cVzDciHUApIagbeaUKzGXN+U?= =?utf-8?q?iPt1tmf8SmCltM+owXCAJ/WwG+TRhYel/R73d4sLj2Z0OC8nUFG5gT/H2+oWz7TsR?= =?utf-8?q?LZl7HHoMk7HYCXUSnF0+SAo6p2WhePMCBZnz5WqY6mDs88J/p0gHqaI1kDEMEUW0/?= =?utf-8?q?Zxc1Y2BJXeii4Zw77Tacnxa9nIOMnXKukaZvFhWHyH4/D9JLsN3rC901BS1YkI2Uo?= =?utf-8?q?Fa/7fXZOijx5GrgfmI7I5xK2lP3BNC1MVCrLt8+a6wVLgHWAmTAuvssW7vw0+zXH8?= =?utf-8?q?f5vIz4qS9Ol6tq59tbdj8+pWge3bgTqD5UE201DGQ5byg82Sq5xp6C2juyBtnFC2o?= =?utf-8?q?P4kuYJx3xPneOa3EUUCTnsOvepWBQf9Z0+SmOhR8onhmAj45TZjLT0zLPNBgoDxyH?= =?utf-8?q?TUhl1hZrbXvglRNPcRlVWZ6F+hLB1qJkRmJyQROrZLB0HiDjD3ES9E0+gN1J5JFvI?= =?utf-8?q?B0p9LoPjG5mQvyexyXbzvJKkKtXrKavuaajfaolEfERD9mJuPdnVUBayaBoddG2HB?= =?utf-8?q?dMvlgN/N/qlS5wAKsNOFOkX0xTvrUStlR1KdFOT/nAslTWPYJun4LCY81h2KCCiaq?= =?utf-8?q?VDpBUB+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: 12488959 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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+e1nJGyRh69ZM?= =?utf-8?q?btNLnS5Ua/EDJP+PTl3xnCGEKC4WmRYFJH5cvB0+hJwrxm3ZfOB2GXWY7/6VicQtA?= =?utf-8?q?S0vhu7ujWOwrvIvRWstmpabDyoqSsPRWPyR7LSdEioLb8ItXosXUEoeVmrBC8kJxs?= =?utf-8?q?SZ11DHmAwRE2F9yM0O44IRAkuAhjGT2Sk05xFGnTG9VOIhCiNmG6pnsd6WEKZSGtj?= =?utf-8?q?qQ8JItIl6qaqgqztUJVeZK4E4BFB7WcgMq3lzKrXN8wQbzT0HmEX9Ob7OiRlGByNP?= =?utf-8?q?Gjj9izdoloOHlJy4k4Ct+nA2zXSHjZQmWBI9KZqKubzWx1UuBGxX7Sq+kOtgv8SaV?= =?utf-8?q?qbq6V/EsS0czblat43XQ+Su5WI9lbqMRSujXyU/0Xjdpy9lMqpOre3YuwQ4U5U2MC?= =?utf-8?q?XExMrmEG0jo+0c1exGprU4xpYH9nilGf8nkoMTgRxzQMeWIOLvYdKDImNKQkbDXOO?= =?utf-8?q?KUlFZql9IGZcGRDx7GOjDVuZIg8+P76rUfSFECKwIjAi0fUhUvEsJHVzBs8VCoR8a?= =?utf-8?q?3ZU5KZR5xd67N8aKwiscTm8GzT0/gua4qxD/6jpXEiPLhXl0rxkAFaWAyTF5pOabk?= =?utf-8?q?ZJd6asR4tykkbut8KkW/xl5BP2A6zx9s1rEmxZ551ECFc/D+xwjjm5l8Lk/TGEvEK?= =?utf-8?q?gRyUpOSELz0Ctx4XgZfXJo24o3r9y/sO3arVWDqw/P+hhL5hXsAaKGp2DeAvRDHSc?= =?utf-8?q?0dMLKPLTua/OSvBOMRoj0PTsD0qWEm/S2z8fh7KbUUC/3NChSjzAppHZNWWVG460K?= =?utf-8?q?2pWoj2iGhwduFJjvnjZHj91BKf1mRRw4uCrXBw7l3VK0at55U3FVKcOjsxLJthuKD?= =?utf-8?q?gekmvFJhlU8fRmxmawC3Euzd3B5YM7thhRKsPeTHudZBKJwU4/q477THZKq74IF9s?= =?utf-8?q?L+KjSrYaMaaovNR30WtUdTnGVwdlor6pLqrsssRsHKXCvBnVIpIVWa+G1VEkhk5jJ?= =?utf-8?q?s2RnzuuPoUB5Iv5hnnZgHESfa1esMB048IhS7x71bXpZD/7aLldGnfRk/p1jfOYrQ?= =?utf-8?q?x3k4Hr2fTFO1drmaCpJvqYmrrw5iJyYuYAec0h0OAjoakU9bkmzeSJ8tuvDDvqRlo?= =?utf-8?q?LMChXqQ+EhVMvIpQcko3UBhBNgs3vVExEgA8gG238NhLJ/ymuqwF0o3KH2EZX/Nd+?= =?utf-8?q?op+Mtg9XyDbEefpFp0Kc+AMmL5ENSAnlN0gxSd/KZNPQn+Kg2DVQR23Okq671A6Cq?= =?utf-8?q?tI7nYew6AQFJbik9FYxa0Zh9aMkOhiuh7eapgaVjL8Tl9Tw814u4JHpOAnHUNOmL0?= =?utf-8?q?ObBPtdmoNZUC4IFY?= 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: 12489009 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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+AK4NwV6VOHz57r7xKF4?= =?utf-8?q?4gPfN/o3l4DKPVzb/CDUHUn6hzb+d2+D/+Wb9XN7XrpX2+qPCybzz3IZ3KJe5gegv?= =?utf-8?q?0z6BGHAYsF9bA/zAITDIdcuEEnUsQBDXGZO+eEsFL8+XVh6pfAi0HpCVLSrIEJYA1?= =?utf-8?q?3Xi4WdXWimEQANaREcJ5nBLbMff1qSbkVpQtbAsRecrSXOMtP2EQZY1v2iqbbwRWB?= =?utf-8?q?1HBL2V5ot5wErQ0CgQ+fMO11EQKrCKy7hJ6Dtn7sH/G3p0QY/MIw8dZ4I6NpR5DPk?= =?utf-8?q?dfsqpgoto4OFAeVRymQmpa67jz8gP7iS8IZSSZfFKoIj0vPx7s9OUCymmZ+Qj4Pj+?= =?utf-8?q?1PmPi340Eh7sJ/JLB9e1boXqcn9UqX5VAWACBqOgFyrQ4EKEOJi4shroq0JPsiaGx?= =?utf-8?q?7ShHsx+jXevYg9KFihdZPOqlYh6sA3CazK1CmPQy2YUwHxuWzk9C71qGVaAEIeyzp?= =?utf-8?q?KZa5UY5JIHpEgLTNDkNBvB8x0jsa3//jsh+izwQ3prONDeaxcttkJ6qIt+LnEFvJl?= =?utf-8?q?oAnb/nKm6yW/EEK8X251LryChJuTN85CWiCBLsifN6T4v+18MJJewSip758KcZvWr?= =?utf-8?q?lmyPXnErYsPAgYBWLNrZDCVNmucs7KHnh3h23KcTRuar4vRJlKnVji5lx60RtG5qr?= =?utf-8?q?4/Tfr+Q9D3VKoxA1iA/iecgsGfkk/Ya7O+i4lkuxYnLFZNsacAiORt6lB4nSlY24Z?= =?utf-8?q?ul0cVX64IwD1/VlbRbfk5A0k/F1OxgJ23AHz1PVRRKDtptavWQpzX7bTcqwg2qasZ?= =?utf-8?q?+XKaMOqCtsHHcRqNS8Ccbvpjj8W2KuRj/E0lnd8TpILf1E71YokGzmSNYS8OqbHq9?= =?utf-8?q?fTu1tZbGVSVGnw5F27HSU8nfT9dHHPaqOvwIot0mDoevBRHyJne9tteZfbm1iBDsr?= =?utf-8?q?nbZPd5b1zuZcsnnACEcMBffqYL8mWoU5Vxwa7MFc7GLOcYttOKoAhd4Y/Ahgu3jdX?= =?utf-8?q?q0s91x2Kg8XLnaSUSjRgCS2ZXEkCz/rjxiGUUcsYkHaNk1Z+lmYvb2Qb+ehHYsfJZ?= =?utf-8?q?m0Jqn06g368cFodaPaKPLqO7xzudkh+U8EyukI6bko6cnrLI2wRn4vwX5OaAgU+cI?= =?utf-8?q?z2IbtgoCzpZLz/2ceC66lhYc3oOEdakLBeIS8U0inaGPRDOZa1WouydnInQ1NzIK7?= =?utf-8?q?T+gimRMDx6xwVinIF7bu3vFbN21rnqtd9DfWjyJbGH18HC6qhdk2I0psA0sJTs1/1?= =?utf-8?q?aWOl3P9Pa5zo2iYWUhmbksXMKbX3h+RCi0aTZOEYBSvD5oqGngQsb0+OHznFEy1zo?= =?utf-8?q?jYTENx+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: 12489007 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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+GTAfPDyzt7u?= =?utf-8?q?sIOO1ibODit2Z1GKEgrGtawd9m1pGg8nCdB/aVwxB1BOKMDvVEvGnfVOsKuAMuobd?= =?utf-8?q?d4p8IVpODHla2a/vKW5jYQ5mTTJJL3dH4mfdUiN2W876nT80wZm4wGCyLSh3MVUn/?= =?utf-8?q?Dp8BcEukVB4MdQJlXgbEs2WeHsoWhRTMHRsZtMDgW9/6I21EURu3XbgHKq4L1DJA0?= =?utf-8?q?pzCoHDrULP1M9VHIMuerrI/xB8TzPmFduHoLYZXifuA+eIlrWjgB9tIyxyZa9DEgU?= =?utf-8?q?L6kmokE7s6ltRMALNzHFOLEZJOGjOeCyByP13c2U5KzZWeQzARYwFh70srMlj3JHj?= =?utf-8?q?lEp66R1gv2KqlVId88NUAivvvlqXFo+XkmtvzOtH/cUsy8V/DHQDlcHRu5OmBRccj?= =?utf-8?q?WFPh2P1VnSrZOCIF+lgvFcI5tR3lD71URMPCEbde4OjoWp4ZvPaZ7qnehcDQqS0+A?= =?utf-8?q?6N0b3DvMa6kkXhGSVX5KYkw5nNvmozYmZkw3rdo2zEZ0FfE3aIPSNa/I7895jskM8?= =?utf-8?q?t8xBV/lvSueKSGj5LCr6ifnVgrOy6Imrl/kmHeLGvAwgjSfkfZlXB5aDsJiD91Wrq?= =?utf-8?q?3EJXvk1Kl00qB0OiYg8KQhb6g9eW1Bu7r0c2thEaHE3p4/ISeGO32HSTJ1Q5PYYgl?= =?utf-8?q?J9JLf1aT4YqSEgRXBYyok1OyC9+NL6en3XmcSWWDYkRFuD/+GviDE9c+JgzR3Ul3w?= =?utf-8?q?EzNza1/U0YYAuL7dHlzhEKZdEW/ACjclj8tcsWauXaegrQdZnsyaoADt6tQjXE6ci?= =?utf-8?q?FZrsoyUukGYghUb9mKxi/OvSOqMBc2pqJnbKq3lCunY9bsElb4zDm08WPQbwszbOA?= =?utf-8?q?aql5T2AK0CfnhwDQRGjmjfO0fy7+5pgq2E0Bg6MpFLEbqXX+MElHN4dicyWwX3n9w?= =?utf-8?q?C6uDxQaRwLQBtjQZtE0j1LHTUG6GUlJhmWLct10ns2M3Wz0rM60LK6Ey/urC1ZhCY?= =?utf-8?q?LekoLYC6FWlVZlloXolCZglWPbH4RyU5KodGPOHl4y926+c4mfXCCC/KUyWRWXugC?= =?utf-8?q?T8jEoUlbqrrDc43yHkTxJpfzg0OD54fiwd/RPift9nlhb+zFfII83zyF4ee9MKkM4?= =?utf-8?q?DbxBtJWfnkmvHJzCTMQnBsxPCUdxIi41QxEUe+i/L7MnoZ6pbtFyp1Ak3/Xq2Dfnu?= =?utf-8?q?pAAWWAzie7m+NIeG2qHeEjVS49Lyc6ep8p3M5GoPaDWua4Xjbl8iMec0qROAWm5y3?= =?utf-8?q?n5ciypAOWW55qPpyu/TTNjQjdKcP1V1IlLT4mqXhE96EruWMW/UDjxUGxFUb0gMvR?= =?utf-8?q?TLfn6zEkvnjpLzaN?= 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: 12489039 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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?4Hbre91rzbirOQuNy7OJ5pekE8my?= =?utf-8?q?+InH941hZdWlYLPDAyy+5tGOPvw1VvC3ViO8AlzXqbh6gHLM9pXSyf6G0s+9tA2DG?= =?utf-8?q?z81EexRybeGXGgg//9UdTfsoJMIRGSqGOUbOiZl0YEm2PV70i99RIbm640Jci94+L?= =?utf-8?q?xoI/DPiTUGlusqQUfosxbL8rb4nvOdEfT9YLZkR/VEMQxb7xDLtEu2IfLF205dq5k?= =?utf-8?q?a2FFH1DYk0h2FOwCNIpWpi9OTAKqce8gFklpcB3cAPdPTno1mKiEX/ncHzvx4moaK?= =?utf-8?q?0JbsY5D5fDufChmU2fo2VwcXz4fx3RtqwOznnSHjGYtCe9d+Dh5Zj/7c4Fu4BwZqN?= =?utf-8?q?f6DuAlgfC4b2AhhBD+OGHTP7mO7knkeTDu9aL9ZfHq6kmLjPiB+RhigDA9pkGHKxC?= =?utf-8?q?HL7pK8wh7tCdGgniOKrpqKwGVcy2/Mb6b5ajVT5zRttEyHRkFtmSu0NQdqkAV79+K?= =?utf-8?q?AY1vPqn2SLBec/g6+sVY1CsJzzPsoQUIDyv8ly1HONa3y1Ie/0scH0l7VwYIqp7ef?= =?utf-8?q?WgTdAU+GBLFpCE4HDEccUOjTW2SiDjbZCQmSkJwfh/Qv5UttNx1TDP3RFLQv5Cs85?= =?utf-8?q?KEqr71rg9klCotdkRVlB6QowGpPq+xUu/P2e4wwTKc5lpsVR4EoelVMJtvU/e0XGb?= =?utf-8?q?xsdXruLAwbrHIAsJ7a+wgPt/bMXoPOi9A+T/frv3OhNCAs2N2ukn3YMoaU2Fjk0OP?= =?utf-8?q?q4GJeACfQTd4CvvRzfyQXq/CMEpQC42+Fj9CjXSkk2jk6i4p8ALXVQc/W45GjIbGp?= =?utf-8?q?P0RapnbK4lZAvh5Tq2sHKy0r6Ld7sdkDaRWNKpX+qoNydiZnbHREJdEJvBqLi68At?= =?utf-8?q?nfRd2Qfpc7WCK/vVXyrI5U1W6fjbsSPM1+RLoKWAuAybCX2kJLoy23khQdDNVHP76?= =?utf-8?q?1WZM/u2GChU0lG1gbc5BYCxx80BSyMmzQ+HYX3CEwcgYeB5FcD3n90kpwlB6oZx1R?= =?utf-8?q?gue6J8m+QxjG+Xa4Wuo2+UG/StmRf5oNTb7XarLLK4hehta1qIgTDI8DMAnNtpHZM?= =?utf-8?q?jjEuwVnjLMYiJka4ho5EzEbA0USfnli8VunDWmY4zUk7c4P95/hi9ftW/f1QIMU4i?= =?utf-8?q?zGT4/7CRqGySXUQLNJ/yRlzOF4f0xXF25hmAVMouN/aK4KWigTA2vKXNxEZiZctjF?= =?utf-8?q?rL7ujkgI93f9Yt9xlefwo3/eI5BUIu0zazOe0uPG2rN4rFuF8WPr2kxOm1e6nJ+rM?= =?utf-8?q?e92E/pzh3xI2998HK3DsM/srKzSAwqoniLNuiA9N1j6PNgn0YnfqGsmISPnJztinH?= =?utf-8?q?ZYQG33pZzKFq+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: 12489037 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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/mL46LnkUAncLp1G2oDjKTBnWd?= =?utf-8?q?96pKim3rS/d0+nCGKBsFHJwIU9d0cWLIkqHm+zZ7nxx1Dce79Tw6ut58TnH1b3AU1?= =?utf-8?q?qw54IBKA4qfXoqep3TvwLQ1g8lmEDifXd3LzB7zJGXyWIMwqmrNhSFtOKoanTDOR5?= =?utf-8?q?E9MWTUtnZE28/nEi0MHI0mzxeoghkghW7NPxmt6uhOOTPzr4I9UBA8cKEZLfN/fqt?= =?utf-8?q?l/tnKaSPK7Cua+7AmtUJPiDA7pOTK4vBjVJYMlbNopACiNdU9peAUXttbS29TqyWf?= =?utf-8?q?HbkprwIfqQjqO09uIIedGPvC49ye80rNQREKNJCOwqlcJp82Lu8A66Vi+wUpxiF0p?= =?utf-8?q?i6Wm8atHfjedz+GnFLzxhtLhj6170/FLAsjubJ5FsCAt3mAv3JjNcVATS/i9/RSSV?= =?utf-8?q?wbJkNYTN9Wgj1mAQstzRgozMHTbihwjQKotvVswthmyxJw7gUtCEvTiT4nyovd68u?= =?utf-8?q?8QUm4btO/Wz3imrhIVSB1Qy3nIEcp8mityAy1qgWyXrP9imi7LYs44XMKY46VRDaK?= =?utf-8?q?zbBozJbmYOUjhBPqOHTjZ7FvCpeHzsQlgpKO9Rg+gxZpcvNZg9YznHfw7YQstj+iw?= =?utf-8?q?gfsbme0OiT3ZrVpt+dq6WWCUjVzYDToPuE3Fa20AObrxHcnj/YQbteD9ZREFnNfT8?= =?utf-8?q?3KVl4k/pDRJeGMJ0tOOrVFR51KqUl5UN9zsISqGd3YVH7lehxU5qqkxJWRnvRNqDI?= =?utf-8?q?WIrrnGIJ066evCdtV/mYrIC85eeX8/y8Q0iOm/zykXxGqjENsRPpSZ8MxXf3OvBGq?= =?utf-8?q?RVRCsAGc0Klk9oObe7mfxACNxiFkqB528J94TCKEkrQdxMDg4VevCbbFtHBE5Blvb?= =?utf-8?q?6Tt6QqZl8ImyKyxZH3l4+IOF6l3ahEM8H0AkT1CpTQDZ51rWCD756JMsaLxu44n5G?= =?utf-8?q?QSGYrYbXh/NtZYx5zvciXwcuMFDzMF5c6eUNvJkJa81FIZmvVNj+8CBkKh1P7XBth?= =?utf-8?q?FdNnJlPTp5aAZVm5ZzbYGDRptAXqChe2c1vFMxD/afYeg8cfleXlX254AOWyesBON?= =?utf-8?q?9fL3vVmjzzP4poeuU7OgWbqGnmuBfxloYRzQiLkpP/NcxBmVEJJL8m2lCzKN+LmxQ?= =?utf-8?q?DQwlyKc4lHjmYjfq4J3r1HCCZjK4m1o6MbzwPy9RxiYbtf3l/dHKDYQ3Zj0YCZU5m?= =?utf-8?q?h62oeT2NClmmGzkXGz0s1EG56gtzvfoyhy8Wbi0IFR7HjTLAlOy0zPYZawJGgiptv?= =?utf-8?q?pU9uqjAhZYyXZjkzkwvdt2mkge5qtMEdFa1VjA/CvEpiq9o7FN49IcQd8wKSnscis?= =?utf-8?q?5jwn9FsBjzjj9uwO?= 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: 12489031 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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?dtDj8Z2ddEMFxwFRCNO46TOFcHet?= =?utf-8?q?DjUlnFHhz9jmxSth3Ynm53HmEqDRM5BBnqvCxHdATvyiqGL+gpsCBa59RAeTysPYs?= =?utf-8?q?wzZfSz7E4l6XHmP8nPc/3sWyEV/A7lFebTgvOuBxTV0yf2PcXx7iJn3VYVYW8PoP7?= =?utf-8?q?CbyQesGU8QODuR5zBnfEjSmV3X5nD7J3aFtFICLUdnDhMViv4nHInnkT12woXKDvz?= =?utf-8?q?lcZZhn/g4xCiOuAyw4OEiuexNbFueqZP7nL+od5+PGcmapf6IUymu0vBOA+ppdvFO?= =?utf-8?q?yEMUjdnmCIZtmeHxy4Tsdfa1lgACRQQq2sROcaiHBSJvMAzRtTu+j5dTOmUixpqEK?= =?utf-8?q?ulXNh3lpptA7trk0Hr0nwjw7YdzLd2d0DUk46wPix8wIJGGGcaOGwGeQbw2lDRW2V?= =?utf-8?q?UOkZZG8vfMTS8uaHan8+VNXqDO94RZJNKVu23xkVTF5mM27grSvld+SByWflowKS5?= =?utf-8?q?rZD4W8Xj2f7nMXCT0g6AH+ywvUDnMpQpWG6L4uH7DVGldnuioVeK0oURqXpXHGY2J?= =?utf-8?q?4TG9QgTi+fhRvXOgdK1W5tPr1Q2IGW6cEk9GA2UbB6mi1CXdhKvjgNHyVFq7r/meA?= =?utf-8?q?O2uxaQQzOp0fbktKaIs+3CO/L0nIUuJkOrHenw/ZBLSdXJHWbebFmmqYQ67yisDAy?= =?utf-8?q?vffYYLpp0Wp9G493vyfhu2y6lnzU6JtD0QpZhvFVEVF57etv2ZIaOv/+UgVZeJYnJ?= =?utf-8?q?xi1+cbuvJ/Zj8hftyaIHmrgnsZAL622rHkANjvYGluVY/66jmEgG8e/OFyMA0WI55?= =?utf-8?q?dX5hjQljUxpbYS7sPHRmp/orxuWG5hXR25ysV/yZcsr3AxC4BlgHwJgo0UsuErKeh?= =?utf-8?q?k/Zn9UQ0gxcfrG4FIxuHMUOwsaj5NAOKI/PIp8I4iOGgk1FOJjJ3UDICEQqLihbRT?= =?utf-8?q?4OUpax52VyRFwxOWVVtgoz53iwBo74dvc6rNnTZFAaIDNyqdmj88JhvikpxxlqEo0?= =?utf-8?q?xGK646/Uu+84A41CW0y4jYrtFiPWhYEcVBSKlaIbRCMl21Hsw06sdDez/sNhIhLbq?= =?utf-8?q?IMUCnJEnvcIpXuckmkcncg7+rxXpBlDEJyOFSvcOOTYLy3BFgGVwKHJ5+3k5+K/xo?= =?utf-8?q?0dykSmwg4sJyIZSCaOEW9j55bn7+0dCBfQNLD+w2rxNNeXbopWNIVu6WBhfHzEhDb?= =?utf-8?q?+36yovdT99i1x1+djg36IFwJc332Q8N1coHCCV6Cprl0ombdrkpJ9IsujydrvFaxc?= =?utf-8?q?TbavPfaTmExXzLVhQ7pso/LtEXIxpSWuZBOeprGxCamncnoRqFD5ZuRc3L4hyAPBP?= =?utf-8?q?A92APupfd/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: 12489033 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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/6F0L9sIv?= =?utf-8?q?O39KtQZ1+txy2/LPqddZ5ka6DIbb6SVUzVnyDqfdCaGT58dDxvaaCQ6Pvf+IBRNak?= =?utf-8?q?E4P90seFDK+ws+F3lWMH13tEV8oy/QzXTJVuOMd6hJcJ1bDNIaq6IAb9RSumjUklO?= =?utf-8?q?HeK9WQaUjo7YdvDXeGq3UpJmbiWGUXTmOiOW+SxL+JIJv8iXIxXroGLf1DSeYK6+s?= =?utf-8?q?ynQxqhmUK806s/ko30cnSlmysayliFjd4ikD/l9LVq/L1gN/8XSdEH9rz+hXhvflA?= =?utf-8?q?MqHXh1Cov8jcuBRD8JfFce4fwpnGRjQuEfGOreVVjNFWJfyZPqmfN/mt3SI4iLL/K?= =?utf-8?q?AwhbD1CZ9vDb18K/rg89SiPitiZJpcrUyjCoGgWFbTvhI9BwNCdfpPeBx3iPcckVM?= =?utf-8?q?9HX2NSNrJAfGpg5QL7+B12aybakWy4ZMDa+al2pNsylMHVqaGjn3BRANG+6a+Caca?= =?utf-8?q?LlYOIUTBBTGDJ4djiRl6e5GqZmqlDZuAgQIBNpVOEZgGys8+xfQt+X5hHEVhqCA92?= =?utf-8?q?93h4fjA7ES2n58q0W0BSRt9HjdgYXPbQXYyUEtJJMyV2Z/QwF0nOer0h+u5NWLboO?= =?utf-8?q?K8q+zo/O+isB1LZgTtIku/IF5kpoB/bav5FrjJTKErjusoEddBAOlHtB69EGLxDyt?= =?utf-8?q?iuqVrtFp0k1aqiVvCHowWR9TCfANgxf/6kYF4sMZ9WUukM8KaC5usgX88XqciM3he?= =?utf-8?q?IfEzq3cbMTo2kLxTLbU16GxxbIKqadsCaCqXJQbuWNhoYKJcs00XDFGIKx9FDfySs?= =?utf-8?q?EbOwd1vKfElDsM4S/IakhVFGAH66nB3x6C1za3w26lgO5CjIi3bKMrr5C7vNdxOiv?= =?utf-8?q?ZFMGPWedoRWiHBeDKYzADItu2kHbuce8eQYgRat70FcAQ6VBW7yZkb/g40ovx5/6f?= =?utf-8?q?4W6pTJqDt8kF8y6k6Wytog07BnjbFSXE5DK2JkLgW0YkSzIJ0Iayaxn6ourRNq/eV?= =?utf-8?q?XNa9cu9wHPKrWcvkEL1T/CHgiSfPrtpvltYnUOya8C9QybVoy/wwOLdo70qmQCj89?= =?utf-8?q?pbZG91GxqJ9xjCvAS0BhG9QZ2IwwrkLAw7cILR0d78eP/66i5JLlB2ja4k+o04HQw?= =?utf-8?q?1gZu5/zpmcjrlcDx7n7f4c/sGGHkheAptW1s6u50mhtx8mY3Tn9J/R6B5HiHsdMJQ?= =?utf-8?q?SrpIs9lqPMpzxX2+qkR65eX95m6rYf79U3DL4Lp9XqqJfCXZCHUfILUNM8aT488Ug?= =?utf-8?q?HsKOJ7GLC74h7Sov1Vp26SeFdJ7u4a/qtxZQAtuNm1yxWAUrj6dfVTZZq8Cnuu3du?= =?utf-8?q?I6Stfv2YSL4Gyh2J?= 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: 12489041 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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/r6tcYvKcp7b7GCz8VDSjoqznF3?= =?utf-8?q?t2Pjo2AXRHIsspCg8/PA558DFZZqllVkd8XNk5v21gat86AAx5f5RewFNa0y5DjGR?= =?utf-8?q?cw3sdML4nva06/f7dZXKAjzYTbKm+WMRfWnhSqHnJrSW7iQ9c1wES8Yxp8xWujAvO?= =?utf-8?q?5QHySopVqem2D9xQP6rigPANn4VFuQMFdL5K6vwb/NZcIzaYhprKDtMSCCHcn9r8f?= =?utf-8?q?Yb/sRVc+cnvnI1bmlwWwHqvCOIcdvDFLtJqJzqP4mYTHUCLzIcScH6euDsxWEs0Rl?= =?utf-8?q?ncEyPz+9uYNBzxRYn9sZTmvc9eUa1zQo9/oWXsC/q52lA4CfNPz56vos0/Lu+oP0B?= =?utf-8?q?4BqqrwzZiCAu0W2+MiWxYQBfd6xtRIl6MFQamZ4o/iA7FpCJ3taHntDIjTjsDcfKx?= =?utf-8?q?cd/SP/c1eyfz7MLRfqEYq3h5LjMA7+MjCp3+nkvicFs9kFyuclndpEVzLnTdMvUEh?= =?utf-8?q?ktWUAPr0JKDEFR8K0HzVrcIDWD5QxeCuL2C3fAZETA45iY7ssDfmpdweWOD2NgaBt?= =?utf-8?q?7CzdyjIKDLNSKU6bArv7LiqOMNXz0RWzGCeQlaFct7+pLxdIT+0kAAIPBZ9shRzAI?= =?utf-8?q?M2JvK20LbnGlA4clHsauK+wBWASnXGnmS+mrZNh0GKZQgphIf6KtuBoy7EShjdS3r?= =?utf-8?q?JYbFI0YLbVzzwrEcPgtaZucA4bzx3V/6HO7HIqxV4o1Qz3su6FhhW5QFhO/ZCSz6T?= =?utf-8?q?3wHd3X5ll+MXHJk1pvxq1pbEDjorVOjb5ygmHHbSCrR6jKyryfsH9/fru6NK76/pn?= =?utf-8?q?G8NoCTiMIyUfsbXnSztnaUDP7rjHRQlvXkRc2Hyll4sCRn4g2qwHjct2b4trV+9y3?= =?utf-8?q?NdMF3wLuCPlLqY1sa+boxlGekFfNrhRnSGWQ2a6VqM+6uvzhVr/3X7L3yV0+BLLVd?= =?utf-8?q?kwSLRuDHk8GqfyW8xAe+smzw2e55CGZ0wh5mroXv+RIFKYbXbFKvNQ9XPzEPyjgFC?= =?utf-8?q?jJZiMfVBRpTAYnTjDe8JbtN4SG2wfEx95cc304wbdEozX7TXVai0214/kJfL736Oy?= =?utf-8?q?RxnSS/M9b8wSAKUKU1iiyEpf3PDV80kq2m5sW21l+EbIjgv3DOUnmSM0DhIZ+3CpR?= =?utf-8?q?VO6xfXXrE4aKgxjjsaZW/vQJgblTYgvOu8mY7UPt2iG9v4blKiQsct4n7GBsJdV9E?= =?utf-8?q?+03wsfmVLWDDwsmnoHW6Xt40yWV7Mf0mVMN/HhQKtEw3vmIyqm/58jw3BQHFR5keL?= =?utf-8?q?FsyU6ryNWQX4jQCk1epUX/+RR3wi0SU/Dan1dMUKcuq91mspYghOGGKM6p5eE4YUx?= =?utf-8?q?9JKdFZHyKhQuqamS?= 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: 12488957 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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?LwCK64isjr1IHq6p8sp2Y707cC7o?= =?utf-8?q?aj9y7d4uDBnZSnyuIupFlC13dFVM5idfryYsjbmZb49cK9mUmwpZjkLbSSK3WgZZE?= =?utf-8?q?n3G86ojd6KqPtT51aOZEX0Mj7Rx1WgyzDyWjNJmoRq+VCL8T6ZyqiwDs1XrOrG2i+?= =?utf-8?q?TK8Fcb7lESYMrNKVh1ue0FACEA95+5rc/MQRQ1WCXhC51h3K8k3sm8YcaMZh8A/P/?= =?utf-8?q?ocDG4R+oBymjs58U/TWy6zSY0VImCpIw/jB3ZQsw+3e7JMaVEFd/+TVNvjaJ4YE2k?= =?utf-8?q?bvwYgxqX0fnFW/Iflx4yLFMgkxXJm60Q2X9Oi8NT5VQol4RJEuJp6Pb0Rk4fWjsFE?= =?utf-8?q?+se2ve0VbGT/R5+K9nMpcdaphfcvLyoRPSKuBcjC8au2ve0kAbTMZwegKN40iA0Jo?= =?utf-8?q?9WjAzKXMLVtFMiev7NVSq/R1B0c9ZsVL/wKF+hqVu6rBQNCXeT3ZqR/LlIhYlNUba?= =?utf-8?q?Tz14I0DLoyT8OqVbGvqCaYCb33sAOkytdTKjDGxiOxAN8YV+dTYlVNWraOyiGbgko?= =?utf-8?q?CVD4iBEmeCeUIqTGNow835kjBhp3I8NU7Wm/2wYHXaCSqvQ2AyXo7ecCR7ZvCrZPR?= =?utf-8?q?P4k0cbbNHVud5pcB9hl36LDQKrhZbjWV0zYckX1cgXR3FtlGyWywHtMYBgrcgI0lS?= =?utf-8?q?9CtW5HaSuCFV2ZD9B+Z78h/OkmN4jHmLcujQZIWFr0IzzZOzg/hE5tRgm0Rrix3vU?= =?utf-8?q?gJmrNrAgotj4NfGRsPxFetInIIr3bAa8FBZdO0zj6A8PEDA3jF5H7xZrQWiSBQVz+?= =?utf-8?q?45p86wn8tr6DrDMqMtLbNa560bZefVMw2ylwSRS2c0xoWLhIJRL0t5Oph5uP4UMj+?= =?utf-8?q?/QOjBUOr1kfqP23c+ziBWHP5vJq2qf8G7h32nEXQzoi09zrJhLEZ1598cB5yV+skD?= =?utf-8?q?pr0+rG3u79NQkitcpQkF1CBoUkk1llOtEkrXhTGxxnxn4hEczTqZHBIa+T1v0uXhN?= =?utf-8?q?NgxtOsYHBBG92W0OAyZHL/BxEGkt0YR+7XQj8DvoUkxm3hTTSJAgeeSc2B17Az57E?= =?utf-8?q?FZ2i4Y4bKkniKdDovDHVEsYqa2WilQOHFIuqqzo4wnrz/XZ1prsmVWflwMmilzeVp?= =?utf-8?q?WuwXDBlEDJv+BpBzVFKzoI/T6PFsxC8d+ru/jz4joSqD4RXfVez/Wz3vBY6O/+5/E?= =?utf-8?q?BwKuwnCKOCWbvrctv1i3xSmENn9I7i7W/b2n/ZAmdEeiL9QlDVeNzu0gQB9WDWk8U?= =?utf-8?q?gIJThB5dhdZJyh8QuD1rCdBqek0iYFtfo8TjETGmCDavWSXwvBYFmWN1rJ51O77rV?= =?utf-8?q?1WWwF1AxjOvuG6zN?= 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: 12488961 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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/bMT58IAgldWajRMOe5sWFuxM?= =?utf-8?q?q8RvCe4G1IA9/xWt29J9ZYvmkNEpPdwG3quzZLIdk1eWY4OZKPn/8K+jJHICNU3GW?= =?utf-8?q?7Bg1EpaJ7fzkKAdo0Wflabsr5Lvp+B2SrMtDmpQeA+0aGyZ0ANM6bpHurjYfeVsyD?= =?utf-8?q?Q5lE3h2n5smYF/YldbTrErTTHCxPVFIouB2/H9Zi+GJPwpH1fcIutG/FN+72Exkb6?= =?utf-8?q?CBROzSwlUfzmiaJAM2KgFXEeMFRYFaq/Mv9mLUguGvh+lzLFmYfwUDjJZyKUYZ/3a?= =?utf-8?q?bILnoqLJvVFl3KeUOA1cHfgnsiFr/iWyQJamnJWVTOt6GRJdQ12sPf178A1+maTQ+?= =?utf-8?q?GKGjlnwhhLwGngnekae9/XjhXGRI2yMwy56A4vEcHDGIvONi4/7b+5RqWFqXQ12pS?= =?utf-8?q?/FB0AUiThv2c/ffr/C8lM2OF49reNh/chyNoCMd/v5UBYAnZqDb0Igbe0eDz8NL0k?= =?utf-8?q?8RcTWrXY/fUqR/qxuLdr8ht9dZTdF1ZbowW9FFnOOIQVTgUTSaZEAKH1MA6GS2HGZ?= =?utf-8?q?aUxftumSIZLZgdr4h02X5sIts7fHMUFWT7b9uQiMKDkN3me1yrJFP9mxNqwZmqXl/?= =?utf-8?q?gQ4nYCt9twFeSVYTItZuJkgaaOMy2Sanv3jeT7aX8ifaOOd+mqzzEnblKK5gOmkq3?= =?utf-8?q?Yrzyr6bkitpLYghYiBsT5iwzDlLhFtmc946jSYnWWzAPct47sTXI1oGzmeUAsoE2l?= =?utf-8?q?B8h++hNEQcjZPrm837afJeCQQOtuzDRO4+TjhVKPLjITsf0PTeIcQmyMkgiFUzE18?= =?utf-8?q?HBzbgy+jeDgGUVzIUno3I0v3+W8Jpj2RoumhbFCRv/gQEo3ZDtsae0jNP3g0DJRtE?= =?utf-8?q?x8bm9tSGURRpX3M7HdyNFVbwpCsgFUQbe6D+PEdvhZWiNDNwoPS5spi2NvLyNdJgT?= =?utf-8?q?TPYFnoemtRFCyZhHSH63nq1/ssoWU89y7nPLKYLTsg9iLvE9kEVqeo5FJd0yVCTNd?= =?utf-8?q?smGh0yUfqdQkE7MRbKiGNGh7bI1oeSCRLdUlBtp67/anwGyW+vW0k6bkxnNpjpeiF?= =?utf-8?q?Ti/UiSg/LOE/q4SJOfXKtZgLuSXStcN0K5NT3GRwTB1vnWyi0yxiD4TV1E1OorFrx?= =?utf-8?q?DBL/sid96LFNv2K9YDA5JX8AXxo1xm8iBktze7VmoPtWhaAoFxLNwFNKQYD6qkkIl?= =?utf-8?q?KfTt5Zoi95WRldcwZAc71llGaPowhrDbHMBUYsXBlM291AKGRLTh+uMhUNuBSRqP5?= =?utf-8?q?4UtmqocdbxrHYLG41WTBZiPLHyqe2PBdeERhSaOWfDuI4Lwy1kZ4ZQXVwS16h2vbx?= =?utf-8?q?F/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: 12489005 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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?wZ2lQ97tt9XNyuytgI7AkheUMpfJ?= =?utf-8?q?SQNyJDdaXBrW/nEdVPxWDHTQwr3AXI4MqtGTnxvAZ3FosKfcBzuBUwqnB+ms+sQZ7?= =?utf-8?q?4rauu32iQivCA/3N56H43VCb1jzVVWXj9G6i1c6ugEJQpQ900UKVnNbzUOICCr0N3?= =?utf-8?q?kzlMzLPIrYoHgeNl3Sbitxa0BtkIaFWvs1Dka3CetoFxxOvAM6wFW4NnlrgjdDzHi?= =?utf-8?q?BL6h++G6riNFwC37GzHyTiTkInM4M/AfOMH6g5WiRcYyOD7GY+KtOd/uVLcW84BEC?= =?utf-8?q?92b7XXB7p7fgXjgcYWJ7bOf0GypHBahCWwQ+3kN6g3726/T3I/R67AKDjntcYhYBt?= =?utf-8?q?djq2T3Z176SrylGQ05Rkf9mVV30zuX9Vx91vULB41FHqztsJjG47hxJWXFlZuHh8y?= =?utf-8?q?tkHFtxMn7O4xY71TRblSLKstd5PxbEELz2Id/6tSWwscX0xi5YgPFqb0ZKOUQYoDW?= =?utf-8?q?0Rdf7MuqIepd+pYdsEw5mqRIc6956NOVeqwByzyCyYQVMjjoi98/SWmoNNy1AQqx/?= =?utf-8?q?oO2FUBMos4Moiinf6BeUNTnImaYTBP3985XyuP0q9UqD0HCqfhwileHuE8965ysM2?= =?utf-8?q?0tO3jT2HuOU5hcZ/V9YkvqZBjXHHFwxr/z/LEde13Fu5hd7MsGmjNzVIlzbjpKHYK?= =?utf-8?q?NZuRVVMKNn4W2JbrRbFfPY0BZcUvF5fPIDQtfpnz+xR6TAwW72UrIxAJy1r1BN7c2?= =?utf-8?q?ngAsNO88Ud8I6TcCsK8du0A6etQWKl5XbOrH8Xj9+MZpJjavIo9CWEb6jUrXnrUft?= =?utf-8?q?gdeNzk9RI2xWz43EpVutvHQeCeN/8lhiyMKeZeAHZXdW0bakiYuIm4B0GN9v1U+it?= =?utf-8?q?PWD1a6UdgiG2rt0+xq0tMNjwaOYVlLreuw+JhTsLF+80JoGX0ekdjwbBKuLeZiX2A?= =?utf-8?q?4j6naBcNTBLVQarkLZyiib9VtVH776+hLJgCwBWwI1TW0Ud1pmM5kbquSUoEjWu3O?= =?utf-8?q?QQNLzBKODMdx6VZP//qz4mD6H4zvd9iFo2FgqyBCK8ggg4Tw+EeST9azyqsus9MVT?= =?utf-8?q?AWX0oEA+/8j8IwFgG9Q7dXamC/4wbhU4q+PBFLsY+lrgHVMl41enpW49FpiMhyCst?= =?utf-8?q?wZx6evajK1lxp00VmDsdOcYzt07RtF5J5xIqS9Euc+6vVxmR+exPfa3I0n3BruiDB?= =?utf-8?q?Dc3xX/J5esU6UXqv6lkS1Xi0s3stqkY6n5l6ny3qn0e2vAG0bhBx6S5qmPzAIyQgU?= =?utf-8?q?nH17ZY0h2nZNIJ8FEJSr6TElSTGavTxhjLPI1DUmfSD9AEh5+uimgUR4VSs4yHmJB?= =?utf-8?q?vzBzQn8epavNAkG2?= 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: 12489003 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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+pfxpUa?= =?utf-8?q?aDMZVHrOcvbYcSzQLijSKHra0iCiDNGscf+4tbnIO3SjUHRn1K64/sZJOSDug6wz/?= =?utf-8?q?/8uSBUI4LkcrvuP3QQBMljMX4J6EclAM3ub+7S541JWsZE4IdzNW5Vb2M6i9USUik?= =?utf-8?q?r/AeSyNJiYfL4Sc9adzosggOxwki1mOqItPOHkEiRuZ6da6De+EVRC1pTK8sBBcXc?= =?utf-8?q?KRAjAwa9X7O+9RqVZH2K48zkcCZ6FfXi/QVwkrobL6m0Bv2EHMhHHZzojcAB31oZH?= =?utf-8?q?cNOdUH7ivPqdj7m4On49kyeQ9BYNXwpziJ/vuJeSJkwrPX3qnScQn7DNLOT41b7Bv?= =?utf-8?q?J31e7nd02ojPfudkI5DfZ4oFB1c19Cb+Ayqe9aEBlHlBlfgQ/yyhYAimpRw7BVB3J?= =?utf-8?q?Vg8K1nKEB3T7Po09TFhTN95k00YSWbPX5UzxI8+TWI5xQmTPeQbqbr3jcFfP2ZHHu?= =?utf-8?q?Ican2aYY/6MEhMr7DFug2rySkiQmHwZ8gZgOxxKW3JzLJJXTvbOmMeii5AbEntdBB?= =?utf-8?q?pxmwW+3FPlWE3Yrd70TVc+EJmJvan4eiNzOy4VT7nOED8hNylsB0XCPVzPFbRsIwY?= =?utf-8?q?SDtK8fszbSdnhj3IR5shtYw+JQF/5w+DFwybh/YurUdZRMw6RMon+Y1tk4pj3jbld?= =?utf-8?q?R+Bqoz4kbboyLl0WQIZ6VKKZGEshoC6VSnLMeVvL9QGm3/8hSyRB6I8Aae8HEIDa+?= =?utf-8?q?+T4JQQmvCgICikQwdnEwrBQ3A3iKbOZNhozVni/DYn1IWxOjoZjV1uRQYB+pH61tS?= =?utf-8?q?TGTsr3EhkTbtQKXvOB3DD/6u0ddoPeu/4Kkb/DjVt5eXSDCWktVKafrE0a1qRTySh?= =?utf-8?q?209F6sFghjA7+E/NVOdyqOP8QDXGed1PaTJZtmF8hL1bZmppXBG/YnDSSBlXFKWAN?= =?utf-8?q?5HJtq9GCOPCccUTlysIxzn2zkk5PweZ4CqQSBkJAjlxlaxsFZlVhNgZuiXS2pMetP?= =?utf-8?q?v8s6B/249aKxPnggBHTbKK5vk1CpkXzzrjoey2KcvLqlp8Wbj1wnG86K7zCqplcF3?= =?utf-8?q?GqUZrmr4KloJESIKkYDZDEYyryh+h5xvxK8/nCRsKZHYV94zpZ3NsGek7VWudo8/1?= =?utf-8?q?NIJsGwJ7DDb0lq+oCHVekEvO4j7HrWbfQolMGyoDufRPXxzS1V5GWjBru8Hj3EXkn?= =?utf-8?q?lDp99/HYKzXC6ClLyTzFxAa0C5SbApXhV06kAiEla3Kunl7H6jq1llil/MdEZma0L?= =?utf-8?q?rxqIa6sJkyzbCaGzs2lgj/zrtdNtJUApCZCmMZPDKmImgBQac+mroOSVIFftfEpY8?= =?utf-8?q?iiYgoglwGwj/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: 12489011 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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?GqI7JQ8dW78giLnNZk3LkCbRawkG?= =?utf-8?q?FZfU5D3wxw/Y8eItpP+2j2ox8aIIBNOgdIt5/3T+Ahg01imqHDWcYruqTbhQ2IpsK?= =?utf-8?q?xCClm/ilKfdDYNbDpAm3ugzTSOyV/8877S0x6nW3+Wm45MhAs9TcPsg3GsGFwb8Ys?= =?utf-8?q?K2GcEOWgSlgR+PGH9ui6cbU+bWtKTj2Arvq3ad9GqXpKjrzGwRHGojNxnmQi0S9D9?= =?utf-8?q?rQ7/ReBVaYZe5UA6xJpF5MGok9fBn835pBs+TZd6ImjiGNmbGZfjYncz8qJ4UNcWc?= =?utf-8?q?J0YkSb7UfS7VGltcGEfIFtfbZqZOc/uPuZEtjKhy9/h7DFaZvbtEv3/Hkg8wstNRa?= =?utf-8?q?kPX0c+phpkUKu1MmmF4pCMa2QMbI38URDVt9trrCmcsJtPnko9pP8l6XUGcA3nXE7?= =?utf-8?q?x4q/zpAQ44ZK22IsaSQ1TaovQ2jHoD2SzsHvbCHJPcV8UhZ+p+zSE49B1SS55uKuX?= =?utf-8?q?vCIJK2lZZ43jRB2gsMOhtxy4ije97OgUk5sB28cvHE9eAdfFga10QhQe3KUoCvDw2?= =?utf-8?q?2exJ2Jdh49OrggzKrr6SF47ICo8q2crOF2n2E47ZaTYqSBY1ksldiKVQon6kcu73r?= =?utf-8?q?NuXdixUknOEpk7fC3AFbmIrjMtpuD1jQXLYZ0AZMuEpxvfBK3lv6CRfpSpF/oPOsA?= =?utf-8?q?ErpGsSSd2boSTqrzotYffpAFjA/VY8YC67he4ckYqg5NbQjEOypFohMeE3Cc5hGvC?= =?utf-8?q?LDVlzfpaiXlk0tyZZrb/IFmnsW5ARs0C7hglh7HUTpmNcd6CLsohWyKMPfllAe9e4?= =?utf-8?q?3H2m/zufNlMHjtUACiES8lw2sBfBAVQIREu/gh52UpB85IZtlst1nww95cWBcne/L?= =?utf-8?q?A1mImGAqivvvpd4FMXY7vAwLU31+lWbr2n7rIfmDTJbCYUFIQHY8acOdMgkHqcrxy?= =?utf-8?q?h9tm1vAadmW964xaRjwoysVDfO6e4SftFFRNPe/fm7imr3tXlnGssASsYDCr8Ucj/?= =?utf-8?q?vC2nQuUbnVaOhfPU3fIojYPnCDVxtsraMWC6cSVfMuVQhfpK6/4Y/EIypHyoxVEZy?= =?utf-8?q?kZ83trQAO2m6hjvpHMPtgANj0TDcE6GoU+dBt83MP+ONn7oG5zcdFkxWdygrVrhPM?= =?utf-8?q?88yxJ1nJ74RRM40MYf0YdmOlghP3tT6SJkTp7x/DAUBMfzNOBRBy/XVTW833+sIrd?= =?utf-8?q?hPYxBnV22CG+CgMeaR7LJbqESWM+A5k74ku8UOUh6J6zbDwyl3dTpr7hf9WdMjKrk?= =?utf-8?q?X+DkOhItPppx7sFNHRt+V1CTZgPI9/945FsqMRXjDa0fkPvdCKtvgernuSCDJYkC+?= =?utf-8?q?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: 12489021 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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/YxBFSG9UzDhBmn8qty7?= =?utf-8?q?kF7VvnbC7SEdUowQQetXnLEz5Xz+IQv2YOvotbPcLz6m2VwyNKZqWOFSVvG4yz6BS?= =?utf-8?q?QASeXgMN5owhmS6ARpRDovfJ6pgQpPma5643jSVHwpnQUhEoXrlCpgT56yf95V00z?= =?utf-8?q?fJAEaPq1rP2xMaWPIK6b38cMZKAkjU1WkmL/7IMfzkKUeXKQewLMmH4O3J7wNcKoL?= =?utf-8?q?HhEX1w90ohfqEQUzaE3MzC9uf6vzeDKp3Jr8Fmp0UaUtpTMPQVIDLm1MV408HQQWf?= =?utf-8?q?6pulRTdq01bu/4X1kQqSfQ5mJFm+JrSvmqpbhnynn8FLP+jfT4quqgvkY3zyR/cyd?= =?utf-8?q?QTwij9wUUPuxWyJ5/ubqQtwwwR/KOrQbFGbRpc8QGbcWufCcA3CAopL6d+KMVzP9L?= =?utf-8?q?DLGMs3IclEZ/5h/W45dc4dzI7ySA6Dxe/x5m7cVAgkJcUqlQjM9Jt/Ug5eYtNjswj?= =?utf-8?q?afwHFUasA6Vym4+u0vwkeSsFMoaXAkwVVQDRs4qWAwAewZ8c7EyMZfHXWWs/bkN6X?= =?utf-8?q?7yHDVFK4CCQKgX01NBkjlR4pSoy4Km1Nq5D9z1rqxhcJb5rCR16n0ArD2CXb6MM0M?= =?utf-8?q?oqZqZXE0/mb3dZWZfiq4n6zRjZ/DtPUiVhIzCtDeEQZSkhnwZ6+QWaEhjaVLn+JtO?= =?utf-8?q?xwhSE5qkEGfzNarFl9SCVSyiVew/Ka/ymrprQ9vUsUKRnF9MJDSYqVu067WuWXlet?= =?utf-8?q?pqmNvxG3r66xytlJXjw0/2Q8DL0iUf3dfK4gkBVzr1QREGUda+SBJJ0Tvg1Cxf3Xg?= =?utf-8?q?qqvPJQd9+juUvbizNgGCI3Ln9RW6uVOtHBG2iAGUsG8KOhq3BY5XLrlNm9CED6fRt?= =?utf-8?q?JMtdQ9GyRLILwlCoMAd3LPx10ZBJzfbTTtKZkaetElSjSQKhQK3hU7+BfWqdPQD6J?= =?utf-8?q?Mz1rQGAdDUSWM0iRvs3DRBlt2pd5vg/7BTmIAd24pP+WKk9SUFXs5rKGtrTf/uzVS?= =?utf-8?q?cxU37PlEvgq1ssl2EjzFAO8NEVccSeSVabg6v1WFvyyoRQ6crWyRx2Z6FhkUmrDkm?= =?utf-8?q?vtCvylN2gxecqg7RHl/BuLBgpIlLr21nur7pnW++AHL2I3nPBHYsUuC1YQEBZria1?= =?utf-8?q?yQt7tnk+7QuOpqque2NkcdJqAvr8uC9/b99cGqFLBbU/kVetecxb5Yhf9Q4HQfTfX?= =?utf-8?q?uw999HAipywMvsbI1RikNeoEFbzcy2td10aU2u2aX8sD35pGkEivWF8UynItya3NN?= =?utf-8?q?KRZoUteghNGvDaBdlD0EnhpnGlCosTqgyFUl3qz+iHcX1+u8HOWShYTfiQ5omGSvg?= =?utf-8?q?MI0CuimS6o6tW5iX?= 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: 12489013 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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/UTq2PlxKnsgms?= =?utf-8?q?VLgG27XnV4Zh45hMpTnQ3ZGpvEUrJhJ1eyrmVmcn0kYqIXHO3Z/N4mY2naQQ6Wtj6?= =?utf-8?q?D4ERLD+mU+r2o+bYSHgpi+LHnKvM7yxIQQrHpCgVFODUr3aaWwHh5LPpOfo81cw/A?= =?utf-8?q?Kqb74ZjW362XrOgtzPu9ZfgP5BRfyO7Bk2bWviXIm1cBv5z4M2sm37m2nwsqmh+bM?= =?utf-8?q?2Qc8QOTAIFGIjQJ9ISB3m2UW3+dn26t9kIOZVAXj2pAQTluDWzYSkvLkwC9EHwHEQ?= =?utf-8?q?qdMdRR0NoiMlS4qHIDzgmoF5MyVEvr8T6Qqa6v2/7JEk2MuHJneWSSe03HrbebNTS?= =?utf-8?q?o4xFR+gXSqM926dRcDm27yT4Bazp+2djwZVKgH9IiS6d/reSe07hPGY1tC6sXDxbg?= =?utf-8?q?RWF+0MJE6FYNlLXseiopkGcXLis3UMhsqyy/nbOrYiHtQHTVutyG5P5ar0pw6Li9A?= =?utf-8?q?gjui3Umpg1KLKZwg9CIaxiI1IXg6fjlpEbEUak0I3KJtQ5iL0OYLLkMUWFC0cgECp?= =?utf-8?q?LLvCEV1MYTooSfoNtvGhUouOTIE8jT80xi8Ka8MSiEADSPPqP2zloQGn9YOjWt2Hw?= =?utf-8?q?Q3S6N8WClSdayza8Jc7VQP1xEK+KhlaBg04xt/fPp5mG4huM3C74KdI8GM224I6SA?= =?utf-8?q?aE+o5CdyUwmL4CNlmULTtutiPy+k3Z/REHv9x2IIQzWNYH8aYxh6HjMOi1ZE/YNzn?= =?utf-8?q?Yc3f0U9nLYb4X+vugLIY7rnZiK1+bQFqWMvqEtUB0r1t6uH+Ks9hrxXJOFb/4OdBp?= =?utf-8?q?Oc+WLmNVaslgRoUur/AbALZnEBwoi/GqGXxeMhwUnb3uvLGengJRQge/q1CcxNP8h?= =?utf-8?q?2VKEUgambp0g92tzWFfVTJgcWe5op0KzcYQ7RBNIjEg7UIaq76+HqUSh9aTqADWiA?= =?utf-8?q?VuLLwHZRVizd8hM7CLki8gsGo8dthABdvpOp7PYc8Tzw8AHVV4jn9++JlAKmaAh0A?= =?utf-8?q?6WlVEc0yyic7/cxDzLMs6sHPdG20VysaIxtrrSMJxCmODExkgoayDxEJT1gtOC40X?= =?utf-8?q?fqzrCj8sc85NveQiIfJ5zPdNIeLt7YVM+vnJPAuawTLStc2SxR5+UkEWLTPK14C9Y?= =?utf-8?q?TJ9xzuhMqQ0hsFi/iGGai6Brt33eDJ9rvjggu6kS2JArq7P0jIy6KXrbitwKbFL7V?= =?utf-8?q?EUV6H4vy+bd93P819yGkzWSW0ibihcsik1NqL6Bsh6jd3RgMK4ZkYKeInsK3Gifgw?= =?utf-8?q?kqeFQmQEN5POQjjBHO5M9DKzo62lwQFpsMsWZ0L6bskpoEigjc6Uc6suWb/akpCeu?= =?utf-8?q?T1+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: 12489027 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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/fnhuzXMzwj?= =?utf-8?q?0RKSy5Lqr2/Nk7LkVXpl/6D6NuX3+ihdPssWfXTffNBX6s7zVVtUL28Zdc+kduEKf?= =?utf-8?q?sVXlc14lRerrrwc8qGhg+5brj7aMKldvDpkIXjpSyd237GJK8fnL425681qCBjsi6?= =?utf-8?q?IqMv1KV2hyOoqvblUHtv6Qqsa9Z+VzPLEoszs7RdYmLE/JSYIbqVsi0TQfJ8tTLsd?= =?utf-8?q?V1bHmQTYlBB15biWiWcmswQt7zfGeReRAp+3c0YpJnwMPDM+6gJa/FJoCgeLyv7ED?= =?utf-8?q?huGU05hW28m6zgWR8h7WYGPiiQdZs/kCOol8f6QkWKdPmA1kI11taYZPJ0PMjrgfY?= =?utf-8?q?8RC5RpgGmfGZxmcQjRU7ZdMm/VjqO7Qze33Al7gjz+VSzsnM/JbZPybOlo1/icWj7?= =?utf-8?q?kOU9y5geb3grlDiG+LS9hy1LY//LLHLf9/i6sn8J1KUSixlJP0jIAwFpWdThzwESd?= =?utf-8?q?+aL1XI8qZBtiUuu24fdbDiApyJluQnyDwGMXj5oK86zRwCDpMP5WYWm2A4KD2r0KV?= =?utf-8?q?6RzKGmnJhx98Y4US4Oli+ONC8hpth5JLEUpFZQWwdJPmDk0q4cygcC9EYb8CAr3+2?= =?utf-8?q?rIHqvRPnA49aVCl5PdskTJ/KILiIzb9iXXPgdnp0paScmJ+fYUz3xqzcTqSs6UJMf?= =?utf-8?q?h65jpKP9Uh0D6kThGB+VtdP2l/T6KqtayXuEXqSRnZepk5xcQwINAy8mbx0IjRfGv?= =?utf-8?q?6XsmEB9nXkSp6dikXFO2PaWx2LvboB2/2MhcwDCbZdpGThznyPDsrxl1S8gZEprsy?= =?utf-8?q?B3OBhmfnyYso61+5Dev7R1uCbfrBa6FW3MwXzCbSjhqU8fmDfQW3nRracfihRmX62?= =?utf-8?q?rLPQl9s2bJhZ8oiDEF88jXh6NTY68lejm+FH5gSobgIs1CKELq70VpVE2TcZyJKPd?= =?utf-8?q?xggtrw+c1XCUqRVAeBXPzzgZ90IF4N1dyHFUdvsouFrbUEjh29Qect2Gc+JuML/JI?= =?utf-8?q?XEM/LAhSa1cxocaGiZ57hK7N4ZNJse8MmYcjr9Cv+UcJg+9EM2emzbsI9SjevI8ir?= =?utf-8?q?0gsXi1UgluLsJXO1TPFAs8K70meS+Moj9eANfmKhEF7SV8Jrhxe2VzTdgHHxpUk4u?= =?utf-8?q?ZdRU4ifAul+uhaqh2bBaCF3chRF+Yd/VJUxjn42y1zvpxGct4Nn8ecL7xlgW1JXk/?= =?utf-8?q?GYneUXyUUutpE8ajUFHZbX6ZLR8wePS87XAr+BPYdgP3k9R1iyCFnBFqsu7cK2ked?= =?utf-8?q?C8HgJq3XpEAXU1piDolQvQQnAnPD92S19sWHiAs9CXgCnauEkTwLY0JOLMos33Mye?= =?utf-8?q?W4PMZ3UpBbJRbqM/?= 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: 12489029 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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?X9xXrD79dQwaDFqVX8eEOSLfftd+?= =?utf-8?q?nmJCch1/hxo6e4A5TgtwriWVvLY7qCxNDj0oNw3KIpnfSAwxzedvIdaeT+D3PJSwy?= =?utf-8?q?Ltg+2EIQdhRwvrIlNBiTAsJF4OgdMluyT/LIXSFf6+dUXurcI381H54CAO198Yx3x?= =?utf-8?q?+dK0waAdMurM2SQxTwTZt9W8P7SzY+roPu6vBGV3n9HqKtkihUFiN+7mBZMU+W72X?= =?utf-8?q?JH27Wx1OccC7jNAFFGtcVK2lrUNEOe34E/BMz1jtxkIGDoX/eKDCdjVLNlPAXVYxg?= =?utf-8?q?9188a6VzxbLCdU7nm6Hs+L6NQ2Is5CNzqtFni90PmQ+ckpF6nBpVqsL5J6VJiwHdb?= =?utf-8?q?0lKwlanhlJYcIB7xHkwSRIBrrmuVTTztjkaWFMlChl8jYelK1OOROuN1tSagPjKW/?= =?utf-8?q?IeEOmxK+Qkcl3CxL8gRolRGDrHeY/rkXPisoO/GUXhhrWw1IhQfw3fwU4DFCLY5IJ?= =?utf-8?q?5FImwKNDPoAVr1GAANsCNnaKLn9yr609n/RKd4bQwVvjqg5iy9uqJlJkWNL580LfR?= =?utf-8?q?qpKf7ergG284bJrIRbFxvaag5n5EZMgsV7+74OEX/fzQJiysbU1vSvmxBC8Ae+bp5?= =?utf-8?q?DwNIk1v7xeJYczmZ1jfTSPkDSB7tqiM5JeeBEbdXTfLJZYBYUUWPu9YR5cBAeEizH?= =?utf-8?q?yOAf/tUdYEXR7CZFDphhEnw7hvTmzHJkWChAOlWNr3OUUH2OzRzWiX3FH2HPChC/W?= =?utf-8?q?12VyZhfEX/OB+PrgME0WTvmwNaXArb3UxH6UHNLPUOadNeecxA7gc+4lQAR5uhC/S?= =?utf-8?q?5wuCmWZmoa4YyYhFSz0t0gEqJlfexI3pjI+WcP9c46Nj24WsY3GpmGrb/6Nymdhm6?= =?utf-8?q?5tnmLKvGwKjwuCLkztEaFrysxJxSBLu3cA7CquShnZYAwWOMt9t2Ag0Bg4vdXFjVs?= =?utf-8?q?5bH6lqpNscaIcGGXFx/0MGOhOAjlHRI8KEhypg8EzPk8ZQgb+I1OL6oefixdfzAsS?= =?utf-8?q?NK9mT7akCvb7VmHZeTFUGMkz6ttvCjeoLovqyBuDATmDLMZDX8c1DqZjUH16P511B?= =?utf-8?q?AOWevDEZYAkamQMAnOGuldfJ4x5+Qg3zRSpNm37YYhu1WK8+C64i8myhMTCow4P6T?= =?utf-8?q?MNMSJgGc0aUgNjYKnr8EHrU+7nWAcE2xrmBxGagc2Ii1jEQx6+Kzy0q+bStC+dmko?= =?utf-8?q?sRBPqtStQnSlCtYhfLDwMdIbe6M9ksvTTj/kLhjb3t5wUY+wkXGkh7rzjXlUmGaiF?= =?utf-8?q?Bp3Zt6VaGGj57b6RMjWeSCLIcHRJEm4E25fl2QQJBQPw+2CEaEz43vou4Dy70FYos?= =?utf-8?q?3iA/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: 12489025 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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/2OgdJyx85Ju?= =?utf-8?q?eP8dLz3nGSuNWP2/kx5Plbj/ezdvT1QvBeEgTvfl9Ekon1Aw/fW8igJTjlLIcZdM9?= =?utf-8?q?jYc1x03QeDIEKftCHycQwqoS/WVoVFbIyue1KPskI29WFeHRN6+3XYS7M5KC5uCb8?= =?utf-8?q?G5Cp27DjYbECyeXGJYrzAVJs+lw8FFjxzcEfVMJTcVHPULbPaBmHEews77+WmD5my?= =?utf-8?q?jYjbHoP+CvHYdv1nmMb8dRhc4KvJZjfJ6D9FwJghbm1FQ8B2bDL4GfY3WBk9lSYx0?= =?utf-8?q?1gxffgApwL3Rp/3bVIaaiIWP1KQ3TIBGqGQjbEL+Q2w6qKflMdqk+xicZWcHU/djj?= =?utf-8?q?Kcs32x1tmITnXbu9A35aLEdOoXkArXybYBktHY+ZWoVPurefVbILW2LHJFRY9sH1O?= =?utf-8?q?VlaIO9XqgY4a7pDvasQmRLQBmuRJ8TdJBFgfrFFGlgwzwoKir1Mc4Q6MM8Q4oEz5v?= =?utf-8?q?6CKrhJZqoNwjoT7iA7GFX5FiU99lUcLf1PPAWvz2tAsYM4vV5tX/5kJ6xG07fDnHa?= =?utf-8?q?S/rAb4g82QDyvjNlVQ2CTFNbf2OYvEp7fxqyhMk5sScJ2uoX/3Uh2G73IYOm6xrMh?= =?utf-8?q?NKPwuT+tV4HmlHZga5DikZYGI7cBHKUoqHA8EYWOitJFM0yz9X1umReOKS2uczvJ4?= =?utf-8?q?ePDvDyF8x3AMAPclpAvp6Tq9A7KCXA9g1y1eUJkpLUOOOqUtXHtpUQAfqUPM/0+Ai?= =?utf-8?q?lrSk004bLPN/mbYfPnpGrZuEMs68U5SMN37SELvdueCzzkV/8xPm1A5OeVtRHhadZ?= =?utf-8?q?76xNdG2tJsZdc4NEtpLve0D3+wNE83mH2jFo0d1iPOQHAoLObwn9PxQq4nSPihFsl?= =?utf-8?q?ChzxJDf/p18FIOX1jPXk/WZAsccPFOF1DZVviRa76YGXfQdWysVa/kS4t5OfhMqTU?= =?utf-8?q?DfvAqE5TZyqL9tEwzZP61lUH+SxuF+6iwemJ1sGcwlKGBlBpW6aSQlHH9mLW0O5hP?= =?utf-8?q?sO93BwZeSLwUxOZguAWfeAkmQyCouh49C//V/dvkhM31TNo8e0TG0kmODYu0hXdLd?= =?utf-8?q?h6XTamB2MREgTjF1l5A+te3zMiGrvZqJftxl4OjQJ1kqUKsaA0GOeHOTrFDyx7gPR?= =?utf-8?q?jSX3PaH0JZBlYUU1qfxIKa+vBFMgNg0cTB62weO64swzvLwAvRPzwpbzQpZ7eH5Om?= =?utf-8?q?pU2XViUsgcelzhxEJzzLtiT8IfAgAKvC7Oi22xf535AsmoRQgAVpSSOt2k3c7/mu/?= =?utf-8?q?Vo3gFpcTOyCfu56sXL+kCWBNIQW3BOfk09GFcAdKU4NKMiZb7MJW30O2dxdYIomil?= =?utf-8?q?8vua6QawuOfesTO2?= 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: 12489023 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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+K5iz6D?= =?utf-8?q?s6tnyf1lFDaD2tO8J9LmUheGkIJzb79Id2YpClROXQ2jfCk19M9tgsw5Q3/ZCHiLb?= =?utf-8?q?3d2He+fX7S1OxxX8MdvY71eB7OsMQuPa95ojUlbr0y4SM/N/IgWRXlQBXdE6F0drK?= =?utf-8?q?6XQ0FkK+ff/hStGkx9cadZ6v7kgc0usHuLq9asV1NcwguK3SMZ/dQ00TAI2hW7GjK?= =?utf-8?q?07lV3GByvKySE9sTUpBaHjf9od0OIji3aVlksll+FdxzZAHlWI8r2rdHcWFfePWB6?= =?utf-8?q?Ol5F1Z4Jj6z6C2x3fdccGstTWTYGhlRQos04a5zFOUcHlEZ8/V1MEON41YCUaMp5z?= =?utf-8?q?2AQ+SvdtWMMFjegoJRRL2yYULjjsM302NxX76lfCo7LkOVApo13ErhcKgF9KRoryH?= =?utf-8?q?hvABfwVAl+lRAcWorWu70Dd26xvNHi7eNq2H8DbnuECHdO94WbHRQ4xdYitdSFsN4?= =?utf-8?q?pzQpuZSw2OTDuAmEXdG2nBHik9S4cxJS0OLwZm5PlHZeFK7CzAz9fIhqUdOJtdwGj?= =?utf-8?q?ngVt382MaTKHGpUqlpclxqMNTvJIHaRUznxqAlS9UAX7ukUWK2RpDZVNRDw4bwT+h?= =?utf-8?q?z+AVgnhcnNRpUBK1KB+Z/J8uIFeCXr5QTuTPD0b8CyACQicqE8ViULcFddiV7ULdn?= =?utf-8?q?dFBTfqBUAPsB+2JCbPLR4V3/bt+p2mQ5GZzGyOvFtqB8WwEHCrDH+Sbd2A90m8GGF?= =?utf-8?q?hB3NM+WxNekxSQL10OubHL261/0tJKYhVSY4FAX5Men6RMy2l1oQluf+wKENF+vXQ?= =?utf-8?q?SIH+bCDHO5U0wrR+nv6b3wmpSf3ySZ+QyZRnHIpQ9TRuDaWgdxwEQa3Qv4YE7SCxu?= =?utf-8?q?OlUQnt5dqW2irNnnBpA/YKQ7vAEoVqoTZ6gvtEwG/GBd0h1Owl4MsR1eE72VUWCcm?= =?utf-8?q?IqQuGDYt8gNRQ6mFnd0aLHZMowRZ0d8eUYhnxqxnsWmU8jmTG6WUXcIa2z9U1By01?= =?utf-8?q?GgqKvumpQ98bTkVyprRzTUYDNZglGsWbgLdu2fNn7vX7CO2kHdz8xxU4PUhh82zrz?= =?utf-8?q?4Xyx1vUDw07NmbVClDtDfgEXTT98Ir/pVU2sIVXjBDNhG7CwfjN5LSzEcoP/WxYka?= =?utf-8?q?k/H9gt7C1ItBGDuqkX5RIcvOA5afSmqFMHFEFCH3c+OSp3W1Dc2ry59xZOeR9Nni9?= =?utf-8?q?U4N8S68vo5LzarhiiekKFzG2/fIt+yxWho6AfpTsgzSDpS5HAzkbn9IW70mWtsqy5?= =?utf-8?q?X/qHitL4UDcmu8iKOsNafxCGyJse8qB1JPJJJkkS9FO9Ij8mbkXRky/3ecvFzpt8K?= =?utf-8?q?6oGSByMdU8D619zh?= 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: 12489035 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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?/pV24xLZavMO83ELUQZbNxtVhovM?= =?utf-8?q?y7FZZscLyilz2FFCm1RmrbxlU981nJvVy6ugmNqGnQoiOnzmkdZznY7rKjRH1UZlj?= =?utf-8?q?KUQCy1fkAUiyKV23xE47RcGrhttEqMMXX8bLLCMwQxPdlpRwQmPpu0ZfCg1EtaU4m?= =?utf-8?q?kriUdHW4RD1JOHxFpSXdroI3c5OsIFNsFGS9+K8dZZwA5G6geQnLAkYXcnfGa8NIt?= =?utf-8?q?6M/P/iEqZo+BkFFXLKcPMTSmNs6DQ1YZIgKf24yaphxdmowXw0c4AG23nF372mUcU?= =?utf-8?q?LQD85CAek9+bfQoAbwS38EMk4mQ2eNga24acHLQtHnagCBGNynZCkIm+HfRBoBy9L?= =?utf-8?q?fXC2eLw1YT/M8wDN168dOgaKYufMO8hy5Yg4Xb3lU/mTxT8VBNt40cOEFScdapzgH?= =?utf-8?q?Y3jXRa+HzVb1Z66A4XtcMWkOgxsM19BTXSMLmy3NPHONinVGvfbXzVZbrp0P7uU9m?= =?utf-8?q?8wx1/wLylHb5FI9hmvbo62gIJJHa8XXzh3SG6B/x9Lhi5tyxt9z5MAMbiWZcMHDCS?= =?utf-8?q?KChD28ygmc+7BsKByX2BjFoVoQ3Eq6TqqTl4RmUrFxxlkK/hAEFJ4SShOMCEA6y5R?= =?utf-8?q?77gk0LivKTwTS5q6R7CsqPVzB8fqAoIc9Q3IZAyECrQFHoQofCDVe5LGw1O48Al2+?= =?utf-8?q?+kRm6n2nBeRgjyOu+1wT7iDWTTbjo5NiefHUo3OsEYUqqNg2qTT9eDSmxW1qSGjUu?= =?utf-8?q?JQIQOUAnjbUcDKmhTmNr+vy/ZjiwpcOCPuCoA83WEGZHg1PY7bKlOV3Ctmw0SH168?= =?utf-8?q?4VVSkVriIlYlMh0IrsBN5axrcMHOJImuC3YlcWb00UHofQ1ETI2TUIk8FMKB2X/5f?= =?utf-8?q?Xumz8CZLw3ndYF76PM+nlrQWp4sHyZLlpKj75Kfdi8tDNpCGAZIXLutBBmK3UTqB4?= =?utf-8?q?4lK7HHvbgRdbWGHFEv6OH/Sfx1wnayD+HjcHFR7z956oeze+FvXXP2cDWxN1OWPZC?= =?utf-8?q?sx0axn6Zg4jyO/jtbPP4vl6oUmUnmGRJNnCVkqWqw1CHgAdF2qAR7zc9VKl0TgTMN?= =?utf-8?q?vH6i0Dwd4EE7rEevKmBIO6U6HaaZ7UGhI1ShfAK24DD6JMxOQ+qLQbVUCiDZLlmeh?= =?utf-8?q?HtURcyGIa+degcdlYyhyZpO6Zu2sBXyvHdPrWxrq94GWz5OQ6HlwC6CAuii56I7rV?= =?utf-8?q?5JqRNOnkDPsD25iMy32Ox5D8QMYF8Qdk5sgUSsR3UaG+nQDyLBk9s+AMznNxvQNDw?= =?utf-8?q?JANYG6BsIVUDb7xu8VZGJjM3hq9CnDcdyD2chQmvhhHL90CbWKYP4sBvluAz+6isi?= =?utf-8?q?Ptb9r7SM1zHDUcix?= 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: 12489043 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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?cgkUiUnuVkT9sZw7IRpHmaDOCkUE?= =?utf-8?q?UKUQkj6Kaj8AAyUN98Ae1WWChHa9SMENCERf0Xu0TApFdUPlYf/xsbHfjokz05ZPJ?= =?utf-8?q?1wkdbZKFqkc5kHVjgBveP8AD5A+2hmmY03l21pgxaeuL3Cq35mCVvQ/EO7RQYlndy?= =?utf-8?q?Rpd53UirnkWV34ceowJ2OQlT2PZd0YsDX8oaZiiXwiA4/PEpySgsE0Cr2b5ptXr71?= =?utf-8?q?6Zc5RwAyEutuH329519HxCEwZQDj8WmNMSkwliPmLR2QyDirAXbyWkeM2ru8HZd1z?= =?utf-8?q?Kmma4wQJ2fGC9lzex3yuijagOejtje63pqBcNmaxb9APlbG/yBAcC6ppix/LBOT0Y?= =?utf-8?q?ee4m+77btG1PK8H4cBJrl8WXHZzztkoJokngjKt9OUXHWvIH9ZycYCeAiT3fSlUgn?= =?utf-8?q?8BGHOf3UCKYnP2ckDu0JwmzGCKe8D0Do6t+rSvFczqUQV1QOm8qLGckPpwWc4H0tp?= =?utf-8?q?buAhyiUa4ut5soWGhEDWmgi0N7/V4wZNGstKVj2rcAWsatDOLEFpRVql/hvEPj4yH?= =?utf-8?q?zz2PNPQKgmP167IyCX05oIuB2pS5Ddwq419u3x0PTIuDFEeqB8jAZ8JUy9pc/fg/s?= =?utf-8?q?l5o+itq3fLm/cXVGZRT/Sfu/3T0kR1OPHFSV5HVivMPyfqx5AGcyD4/KgNjT91wIY?= =?utf-8?q?EqPaXGQ5ALz7rPqumJWBg4vGZ2IQl3ZKtpAsWhTBTc3JRAcCgADJKwbGZPQW3oyWL?= =?utf-8?q?A/W+b8DyUcurThTi06CrogDzbh7OfHKK+DnKqr1rgjOimtuoYbHmfAbQ5OMkov+3C?= =?utf-8?q?hQpOE7GXVMAuUR2yXfB1jg2cTGk2VBhFdDS58GwrFMOGThm5cxV0sbDTzJfIeEyyW?= =?utf-8?q?MpwDQqsGvai+qVdUujV1UB4uR8xPXPFgS0FiDA20P/+EALkZJf5xEmCmf9H6HISBD?= =?utf-8?q?llD+PiHZiyL1pcoccMfI+D/Z0ZtrJIaF2YZLkpFbPMkXwMkpm0gKMbaQIAyBUW/pY?= =?utf-8?q?iq0Wr0MrbOBqAYmwlIenC2VvhCY7aqnOOYoP2utLoxuoJO5d6P3UKw3JCgFnN4F5R?= =?utf-8?q?gQE8LCY4Y6Xtyvdk6SftuH6exSIhkRZ69O2O/HO8+GGb43p75zG4bR1bX9NAvcr3R?= =?utf-8?q?mg6mbDX4d7x58BMmgr4uGjF8vJgfXFu9B1bzhpCaln0Y50nLXe1t2SNyWdhD4HHOd?= =?utf-8?q?TdWBH+M0bcip+FhXHy70G0RkBSNKKFChnFLhqZVCCmrxmiDiwcBmsEwBVhyA6aO3H?= =?utf-8?q?6ok+kvuVwNkpMUy1nn4u8CUzJnAVh6YDRGBp0D+ISb8pOYG2mt8GPLTZN/U9Iw1Es?= =?utf-8?q?6ITJsD9VNFpRKF0Q?= 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)