From patchwork Mon Sep 13 08:30:13 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: 12488207 X-Patchwork-Delegate: kuba@kernel.org 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 00D18C433FE for ; Mon, 13 Sep 2021 08:31:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DE08760FBF for ; Mon, 13 Sep 2021 08:31:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238059AbhIMIcZ (ORCPT ); Mon, 13 Sep 2021 04:32:25 -0400 Received: from mail-bn8nam12on2052.outbound.protection.outlook.com ([40.107.237.52]:33696 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237811AbhIMIcW (ORCPT ); Mon, 13 Sep 2021 04:32:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TFFufLEDhM1jEyIieyDRyZhtvi3Ont6paMn5p1p0n92/0dqZxveVfVvK0b77/kYjTfOQ7OQVkTPxZ62DfDKncpiPKvUvfdlDguADYgIUs5PLRUXZdiV4b0ULY67t2ngCkMYqpiKYc38ZhVSVQDGpHj7IEj4CvXQ2GGbU5UUenPSGoPDYytgkdOhDkHFee6y31lQjQqzgRGekGPrMB9brDo3q7bSlEMGP3notWer4Lie40C5j9R+9BazW8ue9W8m8u4atFMzj/k/xMaW0vlU3YU3DHCXahSzlilf4CveUwt2eFx7ER4vHNgD/iATI9r8vI5CHuOKz6+MxsOIc/N650w== 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=JL89hpNS3Ec2I4qZrddZiNvescyub5C9LzyGn5ydoyRZtl+M0beeRqDk1SVlpU2be4tA4A4pbtGqP9PfUoSVJ6cKijKg0sa9ZuImlB3N6AHDPCik4nxT4MdRFIeQ6zhtbAzt8tZQ9WA+UwWvpO1oaB0403gMLvqvEQ6eZdzj0nMT1HS/ff/SqtAu3XKBmWHQd4Z33e0qVyrixIGD8pmrkj14XUzr2Cha6V6qu5vJbsGA1oi+UTruFgdss4yGoVr6rZKnAB4dmy70zKSj+HciWU3uQqs/pBHhaAvx4fGwLBliWpJhOg5O71QCwa4d7xWjhGLQWEZ5ylPA/RWoy30KNg== 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=mv/kQ3PPxdU5sjXvX+yrcjf4l0SLV/KTpcmijD2b0J77UarRkmy4yyWxpUY9sWrAokBJYTopj1zC1W5OI0Df9IQ6FYFiWpvoGjBe4SgpMH9jfGN0rhcPcywsxYnc3kGXBbM27Mbm0hMUwEBzhegBbcA5fD7+2a4ZPxb4chA/XwU= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31:05 +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 08:31:05 +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 v2 01/33] staging: wfx: use abbreviated message for "incorrect sequence" Date: Mon, 13 Sep 2021 10:30:13 +0200 Message-Id: <20210913083045.1881321-2-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:04 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 420088a6-8ae9-43ee-1044-08d97690d40e X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: t6p8yyxYB11XRANi3ffvpoKXGhhQW4fw3ku5I3JHabmuvrtVBsnGdDB8ivbxCWBWO4k+TJ9wARSH1+LHg4+DwzLdg6nodfSP/hzFFMF6K+npLgLbvQLLIE7oFTwtxJG4YlxckiWbWZdfqHb7VH48vUPpvZEtLCJvvTaPQuBQJrTCMla9UuMtXg3FUd/qfTcQ37bByMflM/PHVXxu+qz+oucgLAmPHR4D8bgsLuXmk/ixKv9p/YeZzaz+ZmWQ5DyRNgtxI+0M6VbHw5KgQpkQy/P5rAKkmORdx0qtkdjhXNdBQq7h7DkpfnEMMcIx7k1j+N4StQyBlPGGXp+zlCHD9drVSmYXIMtliMqNTZj2Xl9eJIwZFdOmWon8ooQZLEygXhmPxg0PMN+QlsydXDlROJW1zwmvIlJSJVNLyzBMG9kDmBqn8EkKp0VAK8nSpARFRelFn7D1lE+2ZjiLl1dADn3pxD3YmcOI+4Z8MbcuClImVDIKzojWg2LZk0xJHPZhugfh3SseRNaLjbL+SKiVE6SkjmOIFfxpTep0e9nti02/lepKk5VZV8biNovdMfESkhMhqhcSFkw7n3VlEirAfd8vK1fd3ZlQRCJ8dBSINgo0JYSV9HTOMKhR+ZVlERuiqlp+44Vohxx+wMpmB+C0fTKIZqndzyND3rg5NP7R0quF/kexp2BgBFDSL2hGOQYGBITqc5s4abw5yJ3Ac9aeow== 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)(83380400001)(66574015)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(6666004)(316002)(15650500001)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?zjujH32hNn2Qpvz7ceTlhwan+i53?= =?utf-8?q?lsgEIFfgjkD/8EWQtLNRo+x4TLZzbTjSdhokEqlE1AHBc9agnqZeuAVY7PNHSPvhY?= =?utf-8?q?QRHXOCGOFGNaILC8bnkmpqQi4ESwngltRqnXZMm55cdMdzyM9yxkOntBkdWccBTE0?= =?utf-8?q?JnXMtZ1Dddulp+Du1mef1kZ5y86t4H5JZ2hecFilwaAI7odmoFRGmt9g6X2P63uQF?= =?utf-8?q?Z0sjPpwohHTz5UuQLon/JxsZ2k5P3aUjzEEpC4J7LVzdgl/uw9bD0zv4LKAt6TFmH?= =?utf-8?q?Z8jr91IgY6jeVn2afd9bwca9y2mN0dvVaE9YR1ZO7jJdf1WG6YqfCpv7QGjTNB6hQ?= =?utf-8?q?7Yg++uWWpGPJckWqa6ztESrs+HtgdzvtOqtN0UF4FTjb/PZGeAcgcpr2uPf/sYKgl?= =?utf-8?q?e4DXZoJHsHTtdk+g6NU/HQuq2AYD8lC7v1C+vWhavkcXA+niSHkLuLrkYUPUFvKuP?= =?utf-8?q?aAqqo9vv7y6CzmIOesYK9Wl9zo+ggVmpd0VIH7argldg2gBjpS4CrwYT//1URjFFe?= =?utf-8?q?pHS7dr5Ji2Srmu6XS6j4lQ2fbLKdTh7Eo9JAp5JeePRUyzuM7sISUgA63aqsOw/8h?= =?utf-8?q?WNB7EhQOIqJy05dVYLrbry1riqHatvD7L67VnWWA7UqRWi2KPSsGvfbICPuXVtSI5?= =?utf-8?q?mOMVzlvgIwOYzeVU6Ko5i/L62druwDZQJ0Oe7bPG+P03fg6DB8DMz2oKXzxpI9VgL?= =?utf-8?q?Lp2CULro5YXrB6S6WIl7zkx10FAF+3jj1yYaXU8oX3Vrmn3yC94oO75euc5OhinWm?= =?utf-8?q?SSMbhZa2NvrbuBiLG7lwtSpJHV9jPMWoPH/MHXJBV7Cv1pa07qMhbKkfz7sAcuUaU?= =?utf-8?q?aflnl4g+5YdloBC65LgBLSxmH74ODNM7OI2yXyibXYgIzhp+dVXPhp5ZdoWc4X8Xc?= =?utf-8?q?ZaAfDLlJ+YJMPMHIrxqpimTL1CnvDXCCzRaJB+RnoYYB7k+YUC/kJbGjZv4Qn8SeU?= =?utf-8?q?O18cWHNyIK5+jccOXeaV/kzdpIbXCxZcHclGtDNR6gzEmWG1NgcYnCQc+qO79sDpN?= =?utf-8?q?q2mHk2yc+gj2CrCIQsv6OZERbHd+n3fHaswL/gHN5Y9A9zxKbrT7Coxd7Egh3mtJn?= =?utf-8?q?r7rbx/AXZ9LxGLKacrBCuc00eUw354hQ7IXT6M70NH4QXvdJJ5iO3gKYvHgvo5TGK?= =?utf-8?q?wwj186z1mn/55oxDfq9DqT6AFccag58u/waUKNfLKMM7GuXnGIrg3O9WR6rQ0Gqv0?= =?utf-8?q?CdlfdGbl6BJFDqELkHxdGcP+hkemUAh6XcU2QYLb/xfqavPQE8V8ftSORsmVTkotv?= =?utf-8?q?88OOHEf8y+dn8Jdo?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 420088a6-8ae9-43ee-1044-08d97690d40e X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:05.5884 (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: TxjTk537Tr12P+SuDfWHXAnUxH+03pOGTBhbok1EjO2UaZNTzM9jUoGrwxW3+WFS42cbM5Sp1KxjF5meUYTbSQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30:14 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: 12488209 X-Patchwork-Delegate: kuba@kernel.org 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 BAACEC433F5 for ; Mon, 13 Sep 2021 08:31:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7BF160F12 for ; Mon, 13 Sep 2021 08:31:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238087AbhIMIc3 (ORCPT ); Mon, 13 Sep 2021 04:32:29 -0400 Received: from mail-bn8nam12on2070.outbound.protection.outlook.com ([40.107.237.70]:61217 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238048AbhIMIcY (ORCPT ); Mon, 13 Sep 2021 04:32:24 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fSmbgsVr0AOlbXywbqbjbhOwzaoNWXa20Ku1NyM5mRRH2CL2r8r+OYDiyOquY8h7DEFAozT2HCxl3i23RFrpEV/LtagfEh0/n6ytz3Ge89MPXSay+wayryBuawFoOYLH9RteBrg7oxhw7ZFBKXWWmVQ3rDmlnuwgcnW2CGLlWtiw1Ovq7IkzplAOw+YGTKcbCPC62xrq2UiOkQjx/olHUddDSHmM9fiB8TmU3Gsw5OlSS2f2pQq3aNRoscTBiykymNnkQOtzKOP+KWT8Vb7KpbfA6PbwwpO8MpoplkxfV69jSJnH/9kID6t+atQmE9ENGAHMsC+zeIqkO1iE1N7qfA== 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=dzRg2PSUSC31gMa/fJMHAru5F4S7o507LtOVzY43EeqoCBBe3l7L0x6K0W5ktHrSQ+JB3vHB+shXbKHOyWVM5dmY4HRwZnmy7rJWRaka9ozq4KPoGzyvcIUlOGqDOH86wpOX/w308cLOHvKZPhExVFRWhSXgx88dSRjaMsOQtxd1xxQzpyBypGS8JgjetbtWYH6tCdol5rnVkK0uGcLbZN8NeGemcZLr5QbIVDx86/eNGel3rwJQwujLnREAFysf3X1J0mKjpO3XhzEBE8kaLnsf0cK7UnV9WRiUz/GnIBLg185BElSpfCqUd63qE746XrgOp0Gz9z3100FyacuAUA== 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=CPmf60byl1bCyyXm4zPW8+sg5nmI3JotNpdJgMi2JgpZ8MeCxLvrOyI+YIxpEeSN5/HRknZJZBhV7m84U/JFViNu+i7uuwteo2IoDtCYkioGk2keBbR+ABmjycqOLMvjhCzJbHYsfjcsofDW1DnNP96cfVhqRgvIjzb8vFptmwU= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31:07 +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 08:31:07 +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 v2 02/33] staging: wfx: do not send CAB while scanning Date: Mon, 13 Sep 2021 10:30:14 +0200 Message-Id: <20210913083045.1881321-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:05 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a8604fd4-5d78-4d75-90de-08d97690d517 X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: fuX4Tu7ugrGwpJAQvpJVwRUGk7yQJ4d2BNFA1FuC9vWSiEkdDsLubw6L3kwa+B5ZPmAHN3E7MDVfSST0AYBx6FgIHfui/n+/ocHwcCQxAg2W0BNGca1KNLRSRuBxkylLDiAumUIGB7an4U0/Y9SI+RJPAXwOBBHwTqVYSCY4MyEUPoybtjDM7NY43pPS8uXeOx2VTnmC1LcvvExfVcr6flF0jo7Yv1e56vWdUjWlpcjzdxXzN4RgTRMJ+z7NZl6rvSSxeaMOsdU6xOz5rgtfsQ+mZKyxXyLyuzI7OiRNP5UaKLfEdb99c2Pa1jWb5cYa1AXT0VK8gjYqvzU1GXUb1LcTgfZgbOTnqMSdMBaVNAVtuvbLNwLQBO7v9fi+ZKS2r8MECw24T13OZ8cdSj+YTn1GtOOpluL0kAV1z0CBkQHPVmab9tLkUsUBvoWgeQDDA3kS6cehtJqw+w0vpprjrTPmkdLOyixgfseDcH5zTqrWozln52SUrUMCukCtefUTcIO9YP4LhAG1tpdlbuMP7019DLNGy1gSNnI7amthl4qhiJN15Jq3M7o2jlb2nulNnl34ybJZCSWrh8ViJ+fwyI6tKVgvj6sc37oI8Zd4ldWNctH4bzXz2yklhtCL6hwhwDO02kVogBg2KPRYvt7fL2u88ChrpUuSvuBuPJVdfAUNQD7GExbSqRcOfnqkeVQ1V3JACXn14KkEqwxh66ijoQ== 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)(83380400001)(66574015)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(6666004)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?uVD0x0hSzx1o10oi0A0VQa8cU+rQ?= =?utf-8?q?JoH2WO5E8h1ESOd+J7TzJ2gvXPPtCQiCM1eUerzt8QKYhRnwgxDV07V6g34UtPPBt?= =?utf-8?q?su+R2xF80rjF8RFvhNFoPpQPZbHcRdLb9VFZlLO6pfCN+RhtApEDPt6+yhOwRUy6H?= =?utf-8?q?q54dFkzDcg/YyQ7l7lE7/2HNN10bmcgFvra8LZXMR6DlwP/UnncSYG4xU0k3wA5z1?= =?utf-8?q?fUKKMC6HQjNZStZ0WS7rlV8r6dFnIDmImytdGqkch4ra2YkW9miTBGTDFaSVK/uK7?= =?utf-8?q?1vdTjYs6aeSsBTkvnBW9IwXknzJHGcLvo+xhMGPjb8C8KZ/Xewrq9rKrbSjy23Qsx?= =?utf-8?q?9yVcuXlrLquR8rtHj7RFZCKkqgoXEPBion2G9MOthDz0ptYnSoX9yPReSwKUsu1pO?= =?utf-8?q?4M2+gvF8xpmMmUAgbDBqkmH12Vs26huoD4KJ76q8jbsVzXy6nqOhU7gxTqLB+WNar?= =?utf-8?q?mwr/Rc4WInc8XmHpCEZY4XEUubR42I67U8Hhh3rffGs+kFrXmL3ju9I9nyd4ql4B7?= =?utf-8?q?o9OXnZsVk5dYzrUU3El0FnXVoz438SMjrz5UGApJtcVA1c1vu5lbxYGTQaTiu+DJL?= =?utf-8?q?PeLjEbfHGJeaI6m/pHu3igbuHVgHDqRY83tnY79EOYmWYKAtIWwNQOVdumdhFpJw/?= =?utf-8?q?aOuBPYw9grHt4rp+h/gkRe8tQrUNgYhbcQQwLqIQlSkfzcx8N0aYG80MZPyiD3ei7?= =?utf-8?q?P7zewRnBkxVePJE0CGf6tej3nOW7kvsNy5DnBgBbg9Mv6eeX/b/Iobx194Qdlutf5?= =?utf-8?q?zSZ+AHT+qjwTtSRiWIC++CgVUgUf4evHTSNNstMODrIiZh8zk+Ft876D5VDW7I2bT?= =?utf-8?q?zzS9TMXmYpse5XqIoYw4rzIDaGTyPnlAeQvV6wqC9eGSzJetqZt/UIqJu6dWMQ/xo?= =?utf-8?q?ONMUwPfvhLrqMQ9f4LX/VhlE/+D/ZyVWJxUNo3Z4GPTeLlb6Qxepk7PpObE6cPDVE?= =?utf-8?q?nuyThXqVAb8QgO7TEEWDKjfV1jn0sz1bmTg/1p92dzLdPpKGaiIXuZX3Aijst6Tph?= =?utf-8?q?fdrPdnjdeCkRIW8oRrYX3YGuevmkAi3JkJOJujuiGFwTwWTJ6nrwbuP+/azJ/icQo?= =?utf-8?q?xM5Q8ShFOFPeMix1dxATfwQkuiEf2fCfhxZPFSWuOFxcPN/LQwDBJAkCBnyVOB4in?= =?utf-8?q?qidHcQsfrhnXXuscz5sj5I673aKF/A74aYnHAiVR5iLRwR8xh8RdhJrN8VDMd8kmG?= =?utf-8?q?5bz3cfjc5fqLLI1/tP7lTSKzbn9zCScCLOj/U3jNIH/IuyimV13OlZ7kLqyoImIqI?= =?utf-8?q?5j5nt6E4szH4suag?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8604fd4-5d78-4d75-90de-08d97690d517 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:07.3344 (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: rgjFfsh/iDSFY0I6nOO1wUSG4l4Ge9YcL/INlKjzwr/PTIMWK9QMQk6LALvf53Xac0e+stspsk1C6OLgIiCecw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30:15 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: 12488213 X-Patchwork-Delegate: kuba@kernel.org 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 3DC11C433F5 for ; Mon, 13 Sep 2021 08:31:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 298646101A for ; Mon, 13 Sep 2021 08:31:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238110AbhIMIc6 (ORCPT ); Mon, 13 Sep 2021 04:32:58 -0400 Received: from mail-bn8nam12on2070.outbound.protection.outlook.com ([40.107.237.70]:61217 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238055AbhIMIc0 (ORCPT ); Mon, 13 Sep 2021 04:32:26 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E+qJ1CPskZrjhzKuAXjShv1ivtiN1omT/rIiO2u6coJxMT0g+YWOsNGSRBvb3axuF5YBOCccXDNEFaNtzDGlD1Z8+sspJqQaJEtKQZbGvspC7sAd4HHmznYmEi34p1MYH767Ns49uIN8CfCGOTovuW4J6ak3nWwDTCsB0PkcuVeP9wIaEVCKEmrFTlnOHN/BesPSvNm9L7YX/elo5nYj7GxenLcoEM+DIm3XlwABDSIJbAqEzAvumsIbiFvGast+na8g+TGsed3j23GJwb3Lh6zigrhARl4AB6bkL+GvKwfgbA3K53H3difctTwddMH6UzgIGx+EfrHr6VWK04onxQ== 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=B2L7b8nSqKedAcEWg27IPaw/DOjvH8jr4LlmR/vghBdah6WjshgyysfN8xLEYZFBjmS/v4jD9BQb7oAaSTxC/bXxn4Qr0tjGoLNU9bxH/aoMtJ6iAXj9beMF7CY742sljlD2pRW9szIxPSwSZjBrGUZ2n8jRx5PaCXa6VigRQ+TaMLo7PTTXRqkfvbsF58/Dar9zYTPCtxHC4rRpGZ3npA4CQBtvwmVXRwgkChD5aJI2U4PN18Y3SMgqtVbK8TrWk6O2DCma95dukPi6WN1qIBkTl/iAbwwAPCIpqW1y9vL+aWW6cY9SkiA9OquhO3+nVz31D9qmd4TUtsVzZxu8WQ== 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=Vq/7IqyB/PNldzMYzE/zzAOARxNCZdfHt/Ik2T8hcXApcoZcfC3ghezxAWUnEfOxv9H+/fdYHItpUghnKviatDAcRQN43d1yht3QSuJ1tM7pBAT3Bty165/Qcmxk6AT5FBPsDqx6BjRRxgsXG23WC5v1UPYQj/e3aXOXA3T7qbU= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31:09 +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 08:31:09 +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 v2 03/33] staging: wfx: ignore PS when STA/AP share same channel Date: Mon, 13 Sep 2021 10:30:15 +0200 Message-Id: <20210913083045.1881321-4-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:07 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a1c4315b-ef7f-42a2-dc53-08d97690d62f X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: bjg5shKgIWYzHweGNBC08C6fYU3g2pcOmaGJEpyH+07gouneTiOnKyeN5XVO/ybc6J6UFZArldGN+ixlwTdSwns42kMP1QNV9maoU5WxAV4L4S9YkvJzdsHODwavvtJMEoTaX4XoF/uNGHx2MxjJWtoUjnH0kCk14QncMOVFF48pEybGH3/tEeHsj2zskKq9UQRjizAU4piJ3fBvKjr3YUkRj5hOuxX+QQfu5G+2+E1KR3fRCkgywAez0ZYP0mmEKWjiRXdXRNQ3WxMligF62FxILEj0Tghs1ysKQnOekh6i836ImGs/5ezTbaouowIVJz2RbvlhNungpXbn65Hx6RqUjfUyGugdGDCL/SmhxjQAvrSDfQ3pErgvHiGaajvgYzBy/hZBQB50SEwFFAB4UzcurBZwvvQEIcNpAc3h7YSFLcanBwPwm4skv9vrywpOluihY34EedZ9NaGjs9J1fJ4kNvii8JXvaTKHXMcAyt0ZHUX/FesY6NzmSdPiN5Nqp4DTDYzyM7y/B5TG3CwHPjsUAv3ggHEgmJNxttcwi7rKPRtO+oowQuDao9RyIYaQ1wFqLUem9voTp31PTTiGP1KPC0E1EC5T2JYZkcAGaL4SVQwUqLlz8XssAGK4WXFNGFbaMrqIx+/YDT1Qh0hKXERWxyRUeo2kpd0wXyWv5B/mUSaPs1+dmHIl6jZ0N3YesC0yuO2iru3T0g6VrW1FYw== 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)(83380400001)(66574015)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(6666004)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Xjs6ZYSjspLZlaDJZD+bGr/z0NJ2?= =?utf-8?q?XzzRiO4EnabY8f3+irnMrJkip0rUxMJANgV6syz/5sgn6aByEkG9oNrVU+U1o+6re?= =?utf-8?q?59bY8H9obzeOMjlTTUDi6r/g7WSKsJ2ULnQwRsB5XbbhXxTU3Mb1+MyY4hkFrmuMq?= =?utf-8?q?HVaV5qfe97TQnmxCbJ/fVLRZQh8vybg6oKsl5vb6qmkqrdDpSpgM0QaKTSFz/9Hbr?= =?utf-8?q?XBuoVvtpblxgrnDAN1OD5EcA5ia6u6e6S30s+xQvMGiCP9EWGsgM7Wtkw+F4XPS6Z?= =?utf-8?q?4qJgWa4EusJ7td96dl3+uVN47ohka60V66/5ftbTk7XmpWpozDO0GhOnGdqA6dZxW?= =?utf-8?q?unzXqmbjAMfqLxZrzZ3y9BPLZthTH4jROGcA31IDrwhv3SN34zbxABFo7m7bpJNe4?= =?utf-8?q?JNIs1dPgEN3ERKB8BTq+RyhToRHaZtP6QaqjIJenPWKdNInoSu05F3b1oYT0LE3HW?= =?utf-8?q?kUzq7A/PXWZ4/qC+KOpEGBaW4Tw6Do0Si64MfFKPGjJ7us2AgI3S5QKYq8bNfEZH6?= =?utf-8?q?JZEprfR3o9SdQhNsOylSGOFPAK4FQs7ZfPDZXP8yfk/6c5I6d7dXMlyJP9GiWnDMl?= =?utf-8?q?Mcp2R5cZUESw8hW78gOy8RlbRWcOhzrW9OUDGA1/rgSS7wNpxy8iuMDaSmEo+sYAl?= =?utf-8?q?YRJGeYafwAr6Lq0cA6k2PnYKY3otg9tTGnlgJLRMf44U5Y0pQp4YZaoCEjpLEmdUq?= =?utf-8?q?QASmXsBT1Gyh1YpbPDL5VQ0iT6i92fTPwQJQ6SYDJtAT/BQW7R7HNreM33liG2tPf?= =?utf-8?q?q0i7Si3S50MNhoFxHe88Yr3S92P19COb2jBKBsK8UHAUf3iA78elN+1XW4rPv1YK1?= =?utf-8?q?EYUSpY9KuA3wOwwY5Lot+fofJomFRAE57xRck2ZLggIoLy5UVvtLdTFxr4eRUOS99?= =?utf-8?q?ip7UkpkmmurW3p1Ic9oU9YME0XswwXqEfIxrNR5BtFoNH6fzGO29V5DV7igoSmbhj?= =?utf-8?q?0sH1ySEU+YNAGe7+zqYozuyb4Z8gIZJj1oju41rG9KN1dZwDKk2z4qqFJ+KXSJCO8?= =?utf-8?q?nBAXQMz3OIYgpUNi7gbAqJNnTS8B1IdSYGMTXPpo7tLpZet20Hj5u/jZYFlwynKcD?= =?utf-8?q?udS7GJ9JpKshRPeQ1XBqyTOwuPj40nLuIPPyQmM444VSasPvGlDyvq6GSVtQgD6cQ?= =?utf-8?q?N5j20V+MOfW0cp3aVUK+mBBXxarFftHaQzQsNX3pDTTGtXB3Ck8YxQroMl1sBa6eB?= =?utf-8?q?QowoDcx6lzurXoGZz5jRb97fPk/RMj+dI49GXBVITNcD2dq7K86CWbBeMzAmApTnt?= =?utf-8?q?E/pkRBLzk9OMfQar?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a1c4315b-ef7f-42a2-dc53-08d97690d62f X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:09.1664 (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: POb4NpxbqwbqDBkGNtXv/W3J0WKTh0TkRhVuj1PkzUQTuODH06mNIxyk5mfNnB/waukerFTfpGZRvsm5MotoCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30:16 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: 12488211 X-Patchwork-Delegate: kuba@kernel.org 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 BB3EFC433F5 for ; Mon, 13 Sep 2021 08:31:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A8C8360FBF for ; Mon, 13 Sep 2021 08:31:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238156AbhIMIci (ORCPT ); Mon, 13 Sep 2021 04:32:38 -0400 Received: from mail-bn8nam12on2070.outbound.protection.outlook.com ([40.107.237.70]:61217 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238077AbhIMIc2 (ORCPT ); Mon, 13 Sep 2021 04:32:28 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=POwVjmZoASYuFi3VBQ15DnBd05zL050hmlIDTz6xzF0M0/GQaiwFogKOL9wLQI6AEs4QWZzFe8ILULsKguf4yiFNLkTL+DHagP1oOL1KHPNRNaw1ugbFyLmiYxogLj5RUfO4B8DHbiBW9GYY1lgCrKgqgSgaI1kaVC1Ebp6bNBXqBGxIKEgZM/XWBiI7s7sqMYe3ezt2OzB3rfaofqrBNeqO+bumbSt6hKaRbLjLqOn+PWgoUtWHz6eThPxZJKUfewSGoL4BZ6yFhsHVaM1odMbwnAa/F1OGJ0MMt3AQG3Lc0HslamORoGegZM/GjFBGm/3I91ZGQz4Ca2xtwylJVw== 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=DGeNgL+GvaMrAejBVfA3JjEvM0qvBExXxV/sKEbqLtfVb3DU0ZmjUPPdLHV5v8Eyx0ceAlPC1zMS425P+T7iNLImoTo/sOdMJrAc1FhlIW2jzHMzONEvr7k8l4o+Y/JtkNl5HkU6Tj83a5AsuffHmhknvgsZ4jNNLviDrYj2IGyA3KSKBUYWMsw/iAk3IYW054oe5mcJMRrgM2pgbr6QAeT18epbFGUBcMcgoTjcy6hJs08p7buFNhjQB9QWm9Ml8GNiWaoT23G+z2530hijgv1JeJhbKthS2LLEXCPdCJ798rG0ZkMac3gcoUop3HRg3JBNC0PJgDQd5ex+B4Rx9A== 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=ku//ZlRZxKs4XuISsZJ4p2zmv9jQbb4bal06NatszIIkS72TIWCDEAiWIm+WuC9xPDM11s5aaNCLHfxIcbaT5rGtEbUeKq8r0e8pMH3I7CwVxN6t0qC3eRPerdxrLEG4pMzQMJkvARx2VRW1GqZqYlH6PyCFKrhKaWV4+8NzodY= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31:11 +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 08:31:11 +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 v2 04/33] staging: wfx: wait for SCAN_CMPL after a SCAN_STOP Date: Mon, 13 Sep 2021 10:30:16 +0200 Message-Id: <20210913083045.1881321-5-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6403d494-b881-479e-60bf-08d97690d740 X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: 92O4kdBxjrM8NJlZuzisnT07sgUh822Ue2Q3WWRmH9PYoYpRFDwbGFSttzUtrzbtU5Fro+ZLBbwVa4k7WU+PWKFwvw7RNp2eVcpeWNVtqvCumDJsjP47MP9QBDeFFoXpkRR8SDNjBDO+lYr12BA43BGeHi0Jq/vYfVUn0hQqvKrLi5+RDpABoMPboYSqMV5IRW6yGAPIqOuauMbfeSdwADnNe6K0OPNy7MSwYDavv1fDOajcOXDYrZmsDK6a9V9Y3lVk0otGcETIGIyE4lTGRuc9UsUJTzhKK5XRK1dAghcB6THQvX9lWOAOvPKoYHxlSd5HIZjo8Y5EX6a12kboaSQkIorVk/lI4WF31mzlLPwdDQOJyz6vVui5OXMvpgDCBwjX1Xq1nunp6lBEhQXWxpcjNNuSmSEKFeW6O0t57R40duruqqLeCNqz/IyP+lVLQ4QkpPEKWZ9JnJyCsJX4XKsbVJI6abZGbhrr5o287JM/VVZUVfj4w3O5vuiZQbKqzHiCB2Eyx9jKoKAicRRfxz1P0Za1dsODMunv6f1PZekszpfohMCZBlO7PJyZOpi/i2psneOdI4GZlly8RzJ6DRr0ObZKVdGjrO1JKJRKQptDnsKVYmm9VdBtKWlhCHp6cXOnB4dy+HSdUalHOPJbPEkW4gTz8GJQdrbnW9UpuuYQ4LkFkA2lK+t3mEyGdqcrnM4+RfzdxqslBvAUtrilBw== 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)(83380400001)(66574015)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(6666004)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?wGxKi6HORix5ZIsok8XyfDrR3QDc?= =?utf-8?q?QVgNrFEePGaUl41w+vjnu7J/wvlCoamVUKlwwq0InQDh9nSpmCOjLU7ILaPUZPHZv?= =?utf-8?q?AkBX/qB0w1ini72EdI1ql/mwy5g3SNojvRgtzdikBcHN/xyiONeHT5Om2FSbXoJMT?= =?utf-8?q?GBZTRngAMeqBfThyUUnW20GEiw4SrbSkWWeH5pcHKdsu8M0MCQeNHyuKhAiKl+d8K?= =?utf-8?q?nExgkpOky33ieqT1MelHnWkROdcMhwAYCTZMMm40IdSiwY8ATW+iEQFTOPkq7vDAE?= =?utf-8?q?E2mflLoHHbYBTQBKebP9djMD1qIDNtZOAOM+sUD8PAmFcwKl0qV4Tn8PU2Q9nJZk1?= =?utf-8?q?lAKQnb1n9NRw8NB8DRVz4A46pCOfbgKb7N0fuYlNjzyPuX4mqOzo+MFLpGBJDwzhF?= =?utf-8?q?0ZGPp8xi2LXz8O1NHjp2MT+IRXLwifl+Nbuq3OV+cazRceFVZyqh44mK4PPWqrUOz?= =?utf-8?q?pdeMjFaenYLvpq34Po2AZu6JAofM7drFiY7lKXKfTFoAOMCU1cnLsp1j5wAXm3IWv?= =?utf-8?q?0jDCoE8isSO+9gEhUspwwPKYPEQTzwfli81Tzg/aVQgLBQ7GSDdQ65qbCwg3gisEb?= =?utf-8?q?DQQtPCngkq/f4daVL5YNQ+CGt9YmufkOFh5Gr/clK0rkgZAVV2O5wchuZhbrx0mdn?= =?utf-8?q?TMBmFfwqqd9t/J9RModdvmUKNmVPsnxgtD96a8RMDQhSSlvRomk5oTRLi3yXBL1j9?= =?utf-8?q?Jm8GZF0086yT4WEz4uMZ+3dKHylDpXHKWe7+irjgIblLPv/HCMS6zVITEDzCmSYC6?= =?utf-8?q?YicH11VzEa3ptT+HlOqfXUzSwU9HKdGGtPxN57pF5fnqmDR0mferb0i3POjA3Ct5+?= =?utf-8?q?H75KAJ0WrnQhqy0gHUnAzdstZkmFUqzTQroWWurEKfDdLmozbW81iMpJ6RQ32mIYA?= =?utf-8?q?lI++SBaW5wlLj+ofBBo0sVu/mOYZQJyv9QYIMoJWxkAqcwC1L4eXyO0JKctFt3euG?= =?utf-8?q?1MyqNhfhwQPpV528BvqBt+FEuegYyTJZ5Jm9SVtoxeQ0k6FJ/A5ZFalNJaDdpv1jW?= =?utf-8?q?kRLY93eqNWrvvqltd0OYzzz/smRsk9QGno6CR4xuO77P56Q37dao4OuW1SImjv1GT?= =?utf-8?q?hkKlTSWvqgS0bhqabeUsnDYwq1KDzJ0+C0lWIHgyUEuPy8QZQsZjw031WbJB/kegG?= =?utf-8?q?gyXAmCXMP4724HOfeNt9M5cE7MU1a7qY/RfG8amOix7qL2kl/imAnkOJTAOBQbwFf?= =?utf-8?q?QKpkUl2Mm/Xwj0bQfHDuC3Jg8Hv72eW4tp6cquEx+CZZ6GRc4+bMCwncgAZxqqX1S?= =?utf-8?q?xsGRnddWZRriEwxo?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6403d494-b881-479e-60bf-08d97690d740 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:10.9783 (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: zLTvTeDA0Doq3TGHojxKbM89HeZcvkHSq/doNDyfUEIGsf3a9nZrooGZOdAD6TBQJ2/9XNBD9gwF6e0Ld55Fpg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30:17 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: 12488217 X-Patchwork-Delegate: kuba@kernel.org 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 70205C433FE for ; Mon, 13 Sep 2021 08:32:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 53C2160F46 for ; Mon, 13 Sep 2021 08:32:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238193AbhIMIde (ORCPT ); Mon, 13 Sep 2021 04:33:34 -0400 Received: from mail-dm6nam12on2050.outbound.protection.outlook.com ([40.107.243.50]:38689 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238170AbhIMIdI (ORCPT ); Mon, 13 Sep 2021 04:33:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ilp3HjAgrY5ljD5SZ5cfiG8Wm/A5kFqEqkqk/FWnBPftKO3Cn3iGiq28haxbOCj/4unBhBhhp1p6EJJJKZPgmVMFqabyJyix19x/wxoX9SjXp0mRcbErHTpk07s8P817nxZteYJeiTUnRw8jLn6iohdisAhhMZ5qOGYTuSHbR7d+DDBq0F5Xiij1uxSYdgFlT1HdzIxekYVpYuirmxyxPr1NtR7iT5NUF9dLieFlpO9MLz0PLDoUMKcLS18zz+H9A2k9jEDnBQm2vse3CvKcxuGsiDWPOT/pWUAvZRt4KZO4/816ZYq36bbeaVSI4/i4xS1kcgDd5IFWC6bVyf5hRA== 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=E9KVQX3XEE9y0fFYXy0bycch7Kq3RJrvEUags/dMGwUHEzu3LKpJUfp40SjrzQlkZ3oeMeDq9fPkFA2Exc51KL7wfXY53AD/A8roCDVR0Atb2NwVMpxLATrl60gJ9sc7qTQgJAyhu99FtHHS2/jZYjRPCxvjyn7dMhC6pv+wEuBjEFlnRMOawVM7egbkKVVacQDsYiacqP9icFxlQ9k9vGF23yxsFqaSkB5OL2ivcxJ+uIlAN+s5nPzFIiutjw4o5efwvARdSxkQBx3rrfbz+gttN1P3Sff1XIddCiXlSLp97NPEDJh3JJTZv/QY+WPqolKg8r1oov06PpoV4/Sy6g== 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=WLr81SGJrxXzF6giap1tXR1cQd2NM+Zp5Fh2FjJ2bcVZn3NGdggzHFGWnvUprC4g56CrHpZ4sdPnZFesjAKKDC11wTOTWhT+jRtlSOh4fzy/Ay8f9jB0pe4nhLHwMjoK9Qor3VA4ESfRxqYW2LnMGMExI1HXVHRI8sem3zNGNHs= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31: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 08:31: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 v2 05/33] staging: wfx: avoid possible lock-up during scan Date: Mon, 13 Sep 2021 10:30:17 +0200 Message-Id: <20210913083045.1881321-6-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:11 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 33627f58-8ed9-4364-51fb-08d97690d84c X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: 1AhPcYg0ZLaSU+HY5GgaGWBF5wP02Gn+42n8GzJI/4V3kT9gQNXYjMzPj3arfVSgfZS8+76EtVa7cwPWLQKDIENXPEufs0m41di+1TjdLgGGJ+nX0NoujnXop2yr9lJuiGwLpffQbz+lxJkK9tJ7t2p+P6viQOaL0OE0HOcvau+JNAryPtQhSFIKTuCctvQIDr746hzwVm5K77CDdG9h3PvZeHFgQQ78pvoHPOTAt+IziM4ajxik20YiQ/Ha084xzKHNpimfertehZPuSm2wZQ9khY6AhRf9SZLoAu5znQ097PCSYO9AFBxo5CofQIpKhtT7/wFZ+0FVG3h+HDCQFvDpAv5FBeBCgA4+uxPoFyh3YDFz96oTVrTU35DF6QUix3PoRnZeJ0Us1RamD8gtt6x37W7rjIOv1va39QnWu3uZAgQW3tiIH0g8E9QgbvgeOFZhXEFSZiXDGstputgRLOqOY+cZOZmP6q/QdPalemdplH8wGC1IBLFf1TTvVuoxAJyRFIscaU5sxk29MMVqpxxNRmjNFKQEe0UAL8Xpil+iwXwbMRkeMgjkQa70eOYqMxULY1kcM4iJfYQ+7w3DC9liuPOtOGL1ya1hNzAgLiUMfIdhY0CV0IqgDa/YM1EMAvcjMwMcXeY5Iv1BZAXrU6ESm1X+f2E4rQaEfDd4Ygw+mNv8ZlaYjmBtrR92qmhKjcZx16cnAAnanxD405p+rQ== 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)(83380400001)(66574015)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?gzWkiMdJpRLS6kd9RZL5IGbdebKz?= =?utf-8?q?dckhoeWxarsCVWWifaK+ah5X7GSZZlFmopzm6TExVTeGhvl0ytQ48D0z9Dg4z3mii?= =?utf-8?q?HwFFfdJYcwc0aknZ83dq+VxxE5y/1Vk4sdNrLhyYoavlbry8cNbI5cdkaI65AhLfH?= =?utf-8?q?/+CwexKfikfgL/VCMEvLn1K4lXKjFBHFUGTCEmFs48sJAlIpx3Xg1KWFpK/Fn0fad?= =?utf-8?q?Sq3WEhY7p9YsQEpsm5uUKajOnsmgLR1SFNtDgePy8pH33MuoPEaFc7jnu9PHmPHr5?= =?utf-8?q?zIdk5w62eIq1ClUwZskSIW1BNKwfM4xqFKh7aQPrGATaKMQoIrrL6NUMeV+VYDfa5?= =?utf-8?q?/JibouAIXgzAgg84BVc4xfufKqdm65SmoBuIKExDZLdBB8IpSjHttU2v7PUfFqJzW?= =?utf-8?q?KJIyCfpcl67ehhcaHhLrP2Nmvot8J216S8JjUgvHpZeoMF1t5TTkc0427Asv7QiC5?= =?utf-8?q?bpxhLK0MKCBBf/3atNrpvhN1i1goOezCfk/wRzliQtYqxWQ1dtY+Z2JWHIRK4em+Q?= =?utf-8?q?VM3+SLo5zcCV37aWRV0+ImOwA8SSTl3OpqdL9H+wWO2LmiksEsBBzZNaC68wDupsy?= =?utf-8?q?dgTz+4XZ2NpJjhRBHygG+CPFQSj9CU9eom0AOqRqgF/Nyh90WzshH+tNcIFcRH/Ak?= =?utf-8?q?x8NZJdtrkY6EEO0Y8HRu5qwr9gG5DRHc7IPPsHOLe57kIWEXsjn51m1fdLKeye/OH?= =?utf-8?q?F8xc/yW3IK1ojqn0AsNewCcJ+4NDEWb9wIE95YhNqJh18IA4XmPSgH9i/KqA+StJD?= =?utf-8?q?xZhjVhBu+AeQQyHReJZO9TmGrltn1pdVSO5tshNI5zoSghMRn3LFcsT5Oi8jyZNOD?= =?utf-8?q?/DVvKR4mZHRgtlSlxnIl95pb3hq8ubmvPQkF/sX30FgV+eSCw15KCV8Yvz1pZGXk0?= =?utf-8?q?GYLFhHx0YtoZ2WPgJ3uBCblYzwE1x/ntHKkz/nlISSPJbBmGZ74eaU9vlqGrj2B/a?= =?utf-8?q?QVYIocq09N4MQyNlmQCNc2Re4c3FD46FNrRTiDkC1NEY5R3fL32+J5EqB0/MYquMt?= =?utf-8?q?NKgjbMSIP7wAOrVbV3TFG+2F5HhrL1mLVsTlJv8i/siTVkiGAI/a/O1Zm8zwjk4VO?= =?utf-8?q?DEE7LSDG4S2ltumsvI6R2PcefZ/3l9fXwCrSacFSZF/B6BE0lufwisJuKRQ33hm2k?= =?utf-8?q?8zkhRL0Op7FbpvCPHvJXYcmZlNxICxCwn1J6UwgV2zmida/MvaUyRH/30uSgxvMNz?= =?utf-8?q?/n+r3WyHLZphg/R/NB/L96awcjX2zZGn+ELawvndySB+tkqmFhkZ1NeUN3BVA7Ffl?= =?utf-8?q?9HPtLWlslG31qfMH?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 33627f58-8ed9-4364-51fb-08d97690d84c X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:12.7523 (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: wdjAf/f6koxGsCCYwSWQP/DstXK5KC0wHcgfD9LCs8+cnm93pddYpllwNHDpFUB++4nm+0/fBgDCPv++Os/BPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30:18 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: 12488215 X-Patchwork-Delegate: kuba@kernel.org 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 1B0A7C433EF for ; Mon, 13 Sep 2021 08:32:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F3E5860F3A for ; Mon, 13 Sep 2021 08:32:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238188AbhIMIdV (ORCPT ); Mon, 13 Sep 2021 04:33:21 -0400 Received: from mail-bn8nam12on2064.outbound.protection.outlook.com ([40.107.237.64]:55755 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237987AbhIMIdD (ORCPT ); Mon, 13 Sep 2021 04:33:03 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZxwIF+rfakbS7YtFTAT2czKoh89pWjykWr/O4COSBzoeRN6i/YC5/mY1zvJZyH2MNI/tESwlndOX+xg1kPmR91FH/SLxgi4odGH+Ril7anxAH1YLhpMbw6vvIkNTiZkcYTYvqVQjIIExwPXSZ7Pdg7bagSDf6ny6Yl1YB305OeuiL61t8f6Fk79V2yk867euvsP22p3U5p92xhiJsGLwaJOKz4jKE35kSDsv5iJQhH+rqvbMujy4m2+6thTJ8f3nuFazU+yFibqY6w9qCXKFpw1oZiWWv5UEXAKiI1p6nDYXoU1bKwPZtOZRsiq4Sn1x0u9rPHMU3ZgzjYplLkZREg== 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=fSlIysBZhJey7R4RlEDXiIS/Nfae7fAVBSYaRe9hQU4Y13SbMjnqR4He3pou2OJBoc+auNNoz1l3lKw56x5/d6S8d7xm61rHFg7f7jvSPZGH6z3wxphmPQyNRdNPwHBQr1TaM+p59jnkALyrRF2Z4O3j/vu3K6x4T8AKmVKeYArzYb41kWQuKAmmv1M3Whwl/hRbBWpIOjlxhlqBgt8yeJc2tuMWUBPuHgNi/iOn/U7jOh0CRriYrMSmvJyot11m4kEYBcsP4/pLL68mEszh8LdEy8moKAlfDfV5QBsfFudNKVrOE6JrHaZSTl28tTDptpNeGhKMncELFrX3qC4V7g== 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=otPHp+/HdcuH5t96RGhUhD7WAtIz5a3g+TVysddxfiDcDq/R3Zwl1TXJ6EOhSfyzmIGxhlfgOSJuQDp//ImhxSb3jcr/vVTfMmF2fCSfDo/rrmSZ8P9wLxwIfayRLQ+j1rMOjuVtP9DUs1EQpk0Ak5tN7gaPmRcWil3AdyJOcWc= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31: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 08:31: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 v2 06/33] staging: wfx: drop unused argument from hif_scan() Date: Mon, 13 Sep 2021 10:30:18 +0200 Message-Id: <20210913083045.1881321-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c685d950-0724-41ad-4ccd-08d97690d988 X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: GOJ7vKga3LRfEM6OAiHDIFKdgtegPXB7RDaFjVFL0HtWtTRN529kK4Js8pozI34np6pnRsc7qa9nn0iZTVfZC0+aLsAhjGSzT/6UFODNevHj6SBVpZJfqMV6v3ywawb2OqDTzESlgAcEk+XY5l0pdbNMInvjRFcQhEqTMdNPPwRrgja2CTuX9og4a4Xrs3rqpimk4zXVJfyKT03niFeixzG8c/rxVpe1aWlgST9VtUu5o8qZtTpurZkuxwF6MLKbtRnfodaMRHjTsr4ueDEUe9BWTsqrRv/r0xQ6WtgUtqF6kuuJklZeSzfTmc6XVnvU6Tr1reRyCdEtCRT5xFX8kLT58ajpCxZijyZ+rUb5ma0s0UvEFqueJXwqGHdsUI8ReB43wvLSKFuVsmDnStEXPiEqDzgCIJ8MavsWpgWcirsEy9sPgMr+H+uYOUfbsMwtm2VwIfT1hsgfGZ+yEIMLs4CiPqqttG3NkGmjF5mSSzrR2OWlQ8E25AQGbCTZOfmYm4lH2YtWx1xJEgct4ee+r3KNldyiPIaKVeHMqN2ztmHV/ZuzfHW4taS69BMwJQlkgYCa8ZgdQdycn+K3h9E4sc2rWlNVXtJEw1T5NC3b/wfCSRZrTpMn10ytBBsO3qEDJjhIF77qvVPrftbBku7Q1PjeTYTGaJF/wQ9SGHU84DXgjLSXFRCVxleTCDthXPZdJQARZ3D3pSvJgwr9mhjkkg== 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)(83380400001)(66574015)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?lU9e+mmMfggldw+Z1HjUnEpH/5jB?= =?utf-8?q?UZn/acxHUvMaGhni2IZ3KDCoqzM4weLqX/WhzyUOZR1u+YWyGl0+Es2XLrKZPhMm3?= =?utf-8?q?XLUROMnD8wOzSr8uUu2Iwcm7C3MEcgVXLRkckEB8P1kLGG16ifn76E/G2Y8oSbhYz?= =?utf-8?q?6vA2Nj3JAFNy7Hd1Y6A0pANHnJ8QlmMxc7GZ8y+BXMVcnIBjDXBN9nLBbK6AXGamP?= =?utf-8?q?3GCymy1lrlcz7Da3rCpTPMwBbeSD+3S9JRPttGMnMO1HkRwkKF1V8N3ULqT+ftwEt?= =?utf-8?q?T/fj274BC/sk+S2RXXx/YQMTCeHIrWfd/Rm8YYwNC27o09L5LZzVwadX21CEpAWBW?= =?utf-8?q?BC6pR9EGDTuFjUxbO18vbHANYxiuvXMxCDU+72fkrKVbE7DhGfxNb0LfUrvJa62Og?= =?utf-8?q?cR/+zhTzEHUTMKMs7nM7TpCNo9v0tMRMGe3aVB5AiQtTQZy8e1MlD63H6k0oHBcQd?= =?utf-8?q?gNWJpDDl29221gysK7mnrcmEfwXosk/HWB3Qf5NkTW9KxGxzz6tWkVL0qUEt5UJSa?= =?utf-8?q?dUgvPBOdcaVnCfYHT9JKAARjZDeoXjh0Xx8jFuAm80aLnjuqOAX1/HsOVfOLhMlS1?= =?utf-8?q?PzoV3wgAO7CR6sei2+3QOWpFh+c4nhK5R0xaJ9XpEEWccwbPZ5gStGn3+1XhdeEX/?= =?utf-8?q?+D3+ka3VBKE88UIj+La0kuf/3VU20Qw7Aw7TfE/Wiv3TM8FACcmYxsXHgsqk0YsPR?= =?utf-8?q?Ee1XQzi0ZpJpnrmPBiuN0MGi78BaIO4pcez0zMf1tF/39XPcHu7hAkphg7Ew1Oafe?= =?utf-8?q?rUSoRSENzuh9mn1DUM4R3RbefXH0LzKbX+9qsuanxhED/ugLM4bWgt64/svFkkbJy?= =?utf-8?q?0dfYQwHCOjqxG2Xw7bgXa2pRnbrE90H2PkwPvBC2GXlsWqNtJbzJvFgeBj7EBNJv+?= =?utf-8?q?p9RsD9cyTnWUc5aMifCasgDdkunNAkLeo/orC7v/ubcWPznmdhceuYQm5NNPeBX9w?= =?utf-8?q?2J27Zbs9QVWOkkXLeZVTWiEYps5gtCHz0ISB1kjLgzclaC/SMOYA4jY1Tio6JeaDP?= =?utf-8?q?rdoD4Cqg8JBZXgFKbHlcdaQDyzKub3tnaVciAMtUu12iKSEx2xN4cH0i3YMoD9uiH?= =?utf-8?q?yJGOhv/byzizyPDIv4X2iaNeaF69DVC1lB7Ps+Wp9ASiUU7kyIDCjnYU213TD8X8F?= =?utf-8?q?EfVTrboSeNGU5VW0nqPDxlpFvWk0JRbTxzGU/i3MSehbiVxQvVxw1OOAVLY5vjLEP?= =?utf-8?q?+OD7symeuDDAn5sQtOlL4OWyNI97vqJ2Nkipq59lAJGveeMuSsouDKKHJo271VH+/?= =?utf-8?q?xm9jOH6vvOcvo9MO?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: c685d950-0724-41ad-4ccd-08d97690d988 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:14.8351 (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: JVHHfrKHcLkhGDZaE2mwukBVBOKvv7KKUQZSMAX4wJFgm9A7KI/pXs18bhq/m4SU7Q8zkE5bOxVEeaTb1iYlBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30:19 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: 12488219 X-Patchwork-Delegate: kuba@kernel.org 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 31C87C433EF for ; Mon, 13 Sep 2021 08:32:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 15F4F60EE9 for ; Mon, 13 Sep 2021 08:32:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238321AbhIMIdo (ORCPT ); Mon, 13 Sep 2021 04:33:44 -0400 Received: from mail-dm6nam12on2048.outbound.protection.outlook.com ([40.107.243.48]:60019 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238239AbhIMIdN (ORCPT ); Mon, 13 Sep 2021 04:33:13 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B1sxZ68h92CAs/G4ibADC/jmmbP7enwjpALaJ3Ye05m/lGlboS8IEexZAbA9JkAwjXsfvQ9Ri7YMRE67eEwqUquvgk4KmEuNy9SMmCEkIGT9jL8Dm0ts26Q/oXjYVKFK3Y4VDpNcpFW+S6tGLzgwVcXo2cM4L6d8CdDHMZ6JfuaEWyPHJ5m1uA7zxL1ZwklnaXPC/rOdHQnDAifo9l0vWdcoBV2HVX/KDyQiC67pctXmNA0VV2YEUXvQse6kw/fmjnSYRNgK56WCqVDaqicvkpoQkgtutP5Lfk1EndzpOwYegKocezayYk/aqV9zIxWhOQto8LpYgOgshXVzGf0N4A== 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=AGTXtyow4mo9ENf2vvCwWPwv8CRkwvmsGu+rGvufi0ZUPZpmJs7WfEpFmTtfLKuc13oI1E7ZxbOm+gxytXOjfRR0//Lmj3/IR6tIE61GuLUbLEiHIpgTwC+4TXfBsFGdvSTXqbw2rlGvDeqdatkc9QXl8ezPcOFo1qq9gSDSBQKKtSq84h5jThjOw7x9TfqsIBA4MhAi0FLy4Bp0dRn4PUjbfVzTcJ5CoKcqMWFxUQliDQEnkb5PzjHDoTqVUSPi/u/jCA7A7NSdLSLhsepbhkZKb/TDConZt639vt8dRsEajCsRA6BWrbVXo2dzJUIPTHleCDd+h+05gvbcwje7Ig== 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=QqTxgbsLDZMoLsjir0E763d47zN/GqfuXSJ3+d1W9yjUO45PEVlDT6VY6F2KQsChIZPJGt2Q7Js5wiw8PvHCO7z7zvMXCpn3+2Spuvq3TZcTTdXAXZ8Sv+5DXJ1qM0N5gnVmbdmwERIzRTlaR2jVqKsrTNHWY0RLAkivX7WiKl4= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31:46 +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 08:31:46 +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 v2 07/33] staging: wfx: fix atomic accesses in wfx_tx_queue_empty() Date: Mon, 13 Sep 2021 10:30:19 +0200 Message-Id: <20210913083045.1881321-8-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:15 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1ae7e1df-960e-44f7-713d-08d97690daa0 X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: suHJp/PtkfI7et1wbWLy2wyMWGbkngKLdaima1MCo6FGmEKqy0pjf6bDUz/p4XNSvt30JosL/oaHCZf8xkXVgg+3TLy/4J9kc6KBFqhQ+W2jGF2E10NrDXh6D4gktfvGoebYkl80Q0p4KU3GEhrV3YyP8wXwCLek65rAyP/i97SXfFNK0/hFZr9mHpc8I1+GQ1Ifc8jQprCicXgQ1aX9peHtzSKGEgPjMQ+9W6GJzs27wAAoVUkJXxU+kUDFTryHKJiJDh1+tYGcOoXhyfJYSgUjdFCy+P4TLfunXVn419P4I3v7CtnBv6r4KnjinlwUJHPlW/1g1bNpK+jh0ku9zc3kIBCewcEAFiIzE0SLG+xa6uciqDo7NLmrCAIpLRQJ2a43r6AmaVUPa0p027emRfclp1R0bxBkFtACUsTqZtZ7MhVx1860T8ZsQyW6D/1B5O6Shc+OG4u8rZe6i9XRwFFaFi8uXyIYK5za8urrlBQvZXBQF5IOipL554fOxNBiMKqbRY8ZZInMl+C8+3bC6sEmptgvJq9CyDRTwSvS+apso67HUmfWWL+fLGoRyvjMnp8vb6TVNkEdxGUmCtV4xbA+oKmohi9KTqoymxXDSrkjtmDk28fxdNqJTVPe960IvZBmEf9RoWcegUzn4q5OS5G7jdkLh4GDBcvusgienivDrjEkh6JU7439wc+siVYW 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)(83380400001)(66574015)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(4744005)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ny0hBu9rYw2nioaZ1CXwRFu3NJy1?= =?utf-8?q?eS1iEGsywXUf7h/PzPN3u7CAa3QNP1ISwt4Vkke/sCTMaT+MYYdqwg5vI/OujGhof?= =?utf-8?q?sVGG6KZC8RNlZvXBGgAfEDpvgVAKr3YYHL69UeQp7JSG4dm3IHE1NToXqGugFVol3?= =?utf-8?q?P1g9phFwGRg1L66S+9ieGCu//Q1Xw5tjgaXEFT2a/ecbfSk4GVsTRaL42qipQgtZj?= =?utf-8?q?Taxf7V8qaK/EAm+eq82SWaxae8N5a9ZGepltHkZegSRGauWBaR+KvNjs/EWKHZ6fj?= =?utf-8?q?J7B0Qi2M1tbBHMZ+x38GMny8/XX9HCEGl8iFZI1GlYb3TRqBy6F/GzZGbFKlgDwHU?= =?utf-8?q?1FYKajEcp4DrAk65Fg1TH5uH9MRz+frr/1xM22w2ekUXJiqU85+zDXHxEuXV+eI3B?= =?utf-8?q?h47ovUyjQLI3c5TIFBrWLv6cVylOTCHw0l8a2+K7FwuIkGprdALfwiZF6TnOUeK2h?= =?utf-8?q?AK5vS73qHoo0itzdmA2iVB3G6SYgGAjexOSHPaPxozCcAYp4aoJPCHgJGOXSkXj+G?= =?utf-8?q?vtRQDXZUNtAt/V1NcC+6XpmgwehpzTgTYVmLAxK3htYwgPtpO8chjTYS2I95qICnx?= =?utf-8?q?EuLnkNTFMUd/i4iS0zZ5+bpHWsb8rYhgIWrlGHrAcHx/Yvdzeh928Mqb9o+YQQoJ/?= =?utf-8?q?q6cngxnG9/qpyx25I7StgwyQCjeeHnm9hY7XmvrG+Dua/TiI3IFXIU77g9MmVEq1j?= =?utf-8?q?dcjPdhJ1msFM7uvahcByG2NlMrZDzDBCyX4GrVp9M1DvLaQ3cj9OSq9MWjs7pSMPn?= =?utf-8?q?Z6p8RtNF5b+WN364b4vgh1pfUijqfVz5lNxtzZ7Wb1fhiLRXw36RX9wMQdgfObUMO?= =?utf-8?q?D5rJz/lxVMq9hIn1aCUTaiN9r5K6fGgPEFlvjD931lfSSg6BaBqbjUVNcl9Fd/HAu?= =?utf-8?q?bI+WuLnPSD3iMMYanKKqkmySM96qCPnb2fAVQgpavRli/IjlSiJ7bFZD4EvSLfdBW?= =?utf-8?q?PfCKY396LmbSxmH57aJbSMHl3MGEBzF63o2p+KYcpy5m9wH3ZacugVWeB5t54gzgw?= =?utf-8?q?Sc609H/KDzlC2O6Ksi0m4rdcgl7yHa4Ze2yBYNYeM6RqAXIzkTtVokxfqOskVHIFe?= =?utf-8?q?ucHZMq5/v3wy2o87MrMhZzYOfDh3pYPkFpJ9qQR5GeeJHpp8WwEgQW+VNAOO8aGQ7?= =?utf-8?q?3dOSqWHXYa37twmMlKmSlED4XsK7yVRcVrifjWpyIOVaIuWFDhSe7Dgoqv945k1cz?= =?utf-8?q?irmCqpCf20az3I2ZGnugkICqRiwibDYQKFeXcilgn2MT3LncYw17ySfQhRaSaEOFq?= =?utf-8?q?qekumpSNUMArV4VU?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ae7e1df-960e-44f7-713d-08d97690daa0 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:16.7570 (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: o3HFfRCAKjHstM4vp92X8EHmBwwfo3+XN9cYzfo4d6EMMW3IR5WhqQpHW7AzcpMDlES/kuiURyWIXwzIffG7/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30:20 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: 12488221 X-Patchwork-Delegate: kuba@kernel.org 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 B6856C433FE for ; Mon, 13 Sep 2021 08:32:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F29C60F3A for ; Mon, 13 Sep 2021 08:32:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238255AbhIMIds (ORCPT ); Mon, 13 Sep 2021 04:33:48 -0400 Received: from mail-bn8nam12on2064.outbound.protection.outlook.com ([40.107.237.64]:55755 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238126AbhIMIdO (ORCPT ); Mon, 13 Sep 2021 04:33:14 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BOSOrGlqeoWcKD21qiYcTBS8qJwBKfdaaFB7u0KJpXZ4ZQCKS+hRQp3bzcNFc2+JNZHj+MX7oZ2WEWMm9L4NOLjRB3Z+KgxB5XXBU3+szQRpNV3xe3UmhT4ZHvc702W2v3V0fJMrnNJk8AY2wg9nefTd7naR4OzqVkrlwYoc7jRqM0q5BzqsKkbYoAQZfvso4Jkbj1JlXCVRNZ77ESFzRd0Ye05qqsw6PXYbTxNt08K+CP9D9nQ78m3LO3mTZCz6f5Rx26dEvMSk7sCCznCow6cWMZEomu8EYvyq0m7R+zgtHpfFtXBEyUt0ECeUeXsS+t3vkTsdCX1iN3n5gJsvEA== 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=UfwBUviiBf87r2xKUoZUCOBhkTAze1fyhpk6ofaNgkOp6+7fqU0VDJ7YWmHdyz0ueK9PCh1bedpEcEL/wb2WqHMw/QkM3c8rIoLmRm+0HGmh4GqimnrNTnDWwTTuZmpTy3SXbyngB7xc7IB/IcjVA13fRyo61ktUtal16MXVCIEjQ2GDEAyh/dB+NciGOsBlzYtcrCNFC6XPQ3n78EXEx+wSQ8ImL0DM7i6Rgdag6D5ilkViCiZdoe2HDcDDE7Z5Q+3eEmPc57sAsuUEcQ8i+yQ1kyiUE05vuCj2GtlpAj/uFjMSP3Q2Xbiv/W5qY4I/aOMlKaEu+2sYu0yGzLqw5w== 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=JSyV/to6s4W0W5ONL7o/xnWgcLHgg594mu+J4x5Epb3tnxU9iNpQd9wlP3qUBM6xoXrhQr+AGBApithpXfusvjzyUV38yuAMD/K0HXQ8lYtb4whyaL7hYN5GxN9YNluuK1xO7jq6SYUWiLq6IZHKlfVl/3gnPfpCPNCrJKbIXn4= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31: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 08:31: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 v2 08/33] staging: wfx: take advantage of wfx_tx_queue_empty() Date: Mon, 13 Sep 2021 10:30:20 +0200 Message-Id: <20210913083045.1881321-9-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:17 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9c120811-c4b0-4357-7276-08d97690dbbf X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: UGVD7iG7rZ45Dkq+PqZFgRu8Dx04Z1uR15co5sm9vZoKS75Gne6RlsphFUkQOF9SkFOf41qd2DJ9xXGxJVjnunGjRi68DMT8I1/I//7eT23WrBoQoa1Y0ixPMATpC8mTRJQGM04S1Sy+zC24HdJiFf7aesjDTLago4+j8O+1O7K+aRK6stQxw94kuYjxMTHPq3mDWWVFfPXnLgZz6XqnpxaKDEqbDmrMqikh5WLZaCx3sGtAF/4uacakuoBsOp6beQhjFTkrOYq/BKQcF7BHSyVIRj1X7Va9Nd16p8erzrKX542LtmaUq1xfoQiYAPUD2OPizYnabZsccG+DcTatHB6aX9WSNNAqOmraxKRxPJd5zt9OE2aCzSNj+rzof7AjvxdB26HyGFwn5Vfpes6GkwliNUo5jiD/lvk/39sfj2SGZI3rhh9iW/E3d8VRnS44PrRiLtsORE4hrId2dmCME2/r3FjzT6rY/u1QnxgjGZVG47kk9lkbx/CC9mqT6en6CwqUDUqKzzkbF1nfIFjJrYfm1TGuzIk/h6/ZCv1ArbuKXOJ4c2s6s6lKnEVxBiV6JoDdUY0TVxTK2Q5ykUtb3irnuNIMfUQswlCDR48n0UApEZR6JT1RS8elCu99zZ0YkAboeAKwjCfVfSyU769ohten5m+LzGDKeixLOorWTmW8XdZsW2znAq81+rc28m4R 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)(83380400001)(66574015)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(6666004)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?crkGnC4M6EAKKban7Sn5IYsLBJty?= =?utf-8?q?1T3uQLOcakVM64B9uTv6dsCDbI6aLrYQ4IUNapj9aMAe5T+zwn/nSt7jvN+gHgb8U?= =?utf-8?q?prcqjvyHyfmEeyaMiWLMhRhZB+3aRvV5ErkpBSOgfQDeEWZfQZnSQ2Qi5OOIZY3a5?= =?utf-8?q?ijFVeMaB3jccatQVFdOl1KR1UmVDza8AKDFcI4f4tr6O+B2260pPdbTGvf7DrAKVc?= =?utf-8?q?7OCuizFNEpbTxSIytzti99UtkACYzJbXBwqZIiTT0GyaGCascbodoLUdLjKYmpOpi?= =?utf-8?q?qqWSh1kP8z8KV8JkQxqPvnKid7xyCyaV14i26b92RBgz2P1uXFcuDWohnlgMmvpQS?= =?utf-8?q?yPzAzshbV24FfyuStTRCQ7XEp3CLpzaQ60ex5nBuPPFcGhF2Bd+K89NMIVrR63kQe?= =?utf-8?q?SlnHp4CgNnotq8GtHnnhyAFclkjTU1HkMSoCg/N1eqoxPxs8ZqJVa3kaPWJqZTvjW?= =?utf-8?q?KU5xa+uSYWjONp8BLSeabLx160aZkZtI1LC0jTqNll7IXVP519QBjL4pfFhw24dyZ?= =?utf-8?q?ZGmviee6TrCwlq8ykikCxRHNUjTYugr4FMhr/QHTNjAU0PS2drwull2zlQudv+QfQ?= =?utf-8?q?HeiY74LYQ6vsZXHUpwSyJWXN/fcvNjF9jRLxnTjyDEEp9EN7UbZzOm7OOYWX94Cus?= =?utf-8?q?K0vEQ8qj3LyWysOmygrVYljDrcFnCQ/NgqQASBS4ULLYNzeKkXizPW7j+JLj9LgHD?= =?utf-8?q?7laQ618VPSsOoW0HwgsP90vxucR0un5QXm2oOxChCv3cVSvTWZjed0GjKqvXa33pI?= =?utf-8?q?nt65W7LvC7yy4ZJV49xVkxxUf799D3NelrA4dAwEKf6dCt51THinyF9lzbWiUAFar?= =?utf-8?q?gG7uQYemi4PzsSeQLnkE/+IeT6+b46RroDPJbij1v14it84uzJKftsWhCEjJeg8QC?= =?utf-8?q?989Wzr06SRtPBE7sMhGLRMSIOVQPshZ7tuxjJm2WbgGHyJZo3WA3bQmCJtg8G6d2M?= =?utf-8?q?TC4Qhe5BCtxsaYTl5whCT54bnMbNf7ilgqGG2SyImrKKmzK/6LU7kYlz5xX11b15r?= =?utf-8?q?ha89lYOmb8lvlcwNZlb7AGvWspx6aTM0Sko3rnE3xQwthrYpnMHDAZmYEnm7hRpQH?= =?utf-8?q?qyvZIMW9dUh9ykPKpaS4lqkmiHhH12zZl8qDl+i5j8gCntGcGVTqZMAXgyXmKs5Mu?= =?utf-8?q?1s7mqQX0p5H9NqVXS2WidfHERWnKd38UYg6D7kEbU5nCbvPd8H0+dvqyLwUiYEfP9?= =?utf-8?q?hq006EQdgl+0hqF/ymItFUI+n27v+xZnmEpm4YBwwP8hx7wQBk5GwJ8O2n5defjOs?= =?utf-8?q?nwrYYnXgqWpq3hQT?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c120811-c4b0-4357-7276-08d97690dbbf X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:18.4940 (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: m/ZTkMfvZ0wZczqJSBEQv0yBNLcmw1SVY80sqbSp0HAXRVpl+GnI+nSJz+14vGBuIMWX7rZO11kClU0tFeCg+Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30:21 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: 12488227 X-Patchwork-Delegate: kuba@kernel.org 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 4B59AC433EF for ; Mon, 13 Sep 2021 08:33:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2EA7D60F3A for ; Mon, 13 Sep 2021 08:33:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238262AbhIMIeW (ORCPT ); Mon, 13 Sep 2021 04:34:22 -0400 Received: from mail-dm6nam12on2050.outbound.protection.outlook.com ([40.107.243.50]:38689 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238118AbhIMIdd (ORCPT ); Mon, 13 Sep 2021 04:33:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NwvLRTpwsdaz699K95tFlYPtOh4pDTaTgtn+AjkUGdLMlp5R6yjU31x/PMYKfBJH0JAz6nMTCR+8PrNuWzGyv2nfKRKNYX6Rt0OnYSGmutNNXgdarjM6BvwJ3bgHptY2vOW6OdAaWivSV1RBXsSBfx659XvlI4dsFgLDs9WryaLJThxRv6MuHobJvkLl1OB72AMOIQ8G5veZb728BSY7kbCnHZZ17Jnd3ErS3TnTA4EqrfGcB18rAsTDDOnQvOaNBHvrcfxu6qExGCPynloxLmjBxJIXhPwHxF3rFxkF0sRHomOQ0VDa420dD3SofQtxQb2S29rGL1BKMthfvHip3Q== 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=eepPism/nItXBy/U//Hexet9/at+PVTNJbpv/UVfKSHtJkyHdPFZxqUbf54cJBr7ik8M2AhIJuWYaHzDopjExZMJR+VbwBYPBtK0V/YZwzj1toiefDxpdGMEfd53kSK6gInNjkVrMM1MlhAULYEF8vUCKswSwIxao4GCx+MdTk/s5+0vUWC81fwdsxhq1DzIgPpBHI+1YFmqj5o4ke+bQ4rlkegV9fPasQm6UGwLPyzkD+muf4hmy8iyQ9SHksvfSo5Wu4yMMxami0tPLZK41YZtNkHxUfJtk/FApvltv3bFTa5BO5CQmiIyu2Q1aD+6HYUV5pznXNhZQsdvQS/9DQ== 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=DbSe4pEtG0VzbCm1eShWjwPZEE/k8KVEMpQpVVDTnRAlHmbIJJD/qJMRUgtlurOmWf/V9lROQ5W870+3o5HJ6iSiEkzftwfWPHPhkmKM5d7jeABn4KYUeI4FgXwWzDrbU7xUKEFUPEIaPU3TM3xG0sXJICXsBPk5henfT+TNTfE= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31:48 +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 08:31:48 +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 v2 09/33] staging: wfx: declare support for TDLS Date: Mon, 13 Sep 2021 10:30:21 +0200 Message-Id: <20210913083045.1881321-10-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:18 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5f96e9e0-fdcf-42ad-1a19-08d97690dcc9 X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: TC0AKGLsV7CbGnwCjHiGrNOdPXJgyEoVmvb+mvtVj4BQ+njTBb2YiLMCg4iNND/A83LZPylINf+9zKUOveZLFXoz3rrULr8Bs04Gi/sG41h1aSfuWSLkBs64pUfAKhv3JWqHk/GlAg6SeKycSFlANwbknEwznr2Qd7jreB6Jv4xOP1KrEMBLnbY3zbXz7kqBqnkIr6/cpZOt3OJ6u2wR83Z/p3LYMn1T+89RHlqiMJ7CGvlDAagMto2KZkjY6hQY+jfwg7bYivwschWJVzuRvaosJvB2g/H3yVa+el1UNM5OG6EZPqCkGBPlvz8JgZJaoA/jKqtsidIZw5uVyQzOCF38JxGzPsl1GW/QAB90Xk3cOK6U3H+KcO8E5ZnJcwNTgYrKeZjltjqsy3eJ+3lXPs2zPJMYjvHmCfKOUZnG0CBeykU8qQV13J9QOJtOQf3edo585Zzo8roZ73ZAbXEDHkvn5INr4OHC9iYsi1JzU3Bvd8BoCDNgL08xsFV1f+iBXPL6BsM9sgrycGOskSeyhicM5uQq57dCu3zQ657rvBces2Zw/2ReFkU7MB+UXHUJu5CfGkbE0qayAdSjf29orL96WQlsajttJrOl4U82XVb1+s2PuQ4VOUCMZOoghWDh0mhDc5xZRaeUF7pToFqidw5OgyiyRrxKm6oYH7dfVpiPiuEvDqYpVOBlNtF/D2c/0pIPA9rLgBbh2eKhNGiVPQ== 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)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(6666004)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(4744005)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?mtJMdXnRNCYQS/FbSrivqEr+lagN?= =?utf-8?q?DkIlbT+Dn39C0MTJlKt1jjUMx4trL9hSyHJlhXW6eW8zsV876iFQ4q4T8a4nMVCWx?= =?utf-8?q?PZ3JgbYapUlNRuZWl/k9VPp54l4EmbvUMnF9MpjmYV9DQrJ3GSbwl+vvI18aPEpOr?= =?utf-8?q?BGodK89WBbA6LCJTxq+GFOhO4dKG4zUKJmbab/DNc8TAvxhAExhwtz/88VHp6G+Kt?= =?utf-8?q?806xMNv5kihgGcwaPdSeMXKmFMzT4ZPmM/7ggzrvVntveDZSvhTIxGVOWt18i1Pb+?= =?utf-8?q?0EHFgJR+aLad1MStGzWNlsA9DRJs4ve1OS9NqeuG3Jdt/2NMvnA127M+7DHNaS6gC?= =?utf-8?q?gotLjK9CwvnXN5g182Wr/Flu7dmrX2+4/0sgwj0bHGGDYC63mFS/AuH6v8Q5xqTC7?= =?utf-8?q?FARDuY9UP9Bv/6Hmv0UcaysTHTPutxjBQ1gBD8aonvjr+RSMYIsEMAutKm4Z9UQdN?= =?utf-8?q?aNiwEkxQ7Tb86ghcuCNyulrEGLvzQTagoxvJm9cSZYiT5wL+o6WzYUBSMPJZBCoAH?= =?utf-8?q?r34uV4mDqKJ4HL00EFuTAqM9D6vsrNGc87F/1Umj8o4qTUKLDJR9nKhuM8qAlLAXC?= =?utf-8?q?A0Xzg2cxyl43rSVgdBYKZ1k78vvcD8ybW0q4ntbm9m6F5SBGY4bOH6MCMXLj+NiOi?= =?utf-8?q?gRHdu5V0osYddgd4SlXM3AD+mZ+Kc8xZJv+XiWGsPG6k0fXF75azYSbp3lmdUIRw5?= =?utf-8?q?Sw1e1P7JTAnksFXI+YhQ71xO7phRzILduV5HJwsgiqc7CIKc8qYFE0mx8R8Pdsndu?= =?utf-8?q?b0fGcPNeRU3QiLdLifyh2SY2qPwTFOD2Z7/4FikgPWL9AAZ1S2Jw9p8k+6bCI8wkG?= =?utf-8?q?LrimihxrGgWjJNMxYj1BgTkmv/jy1h/wgln62xTuyxvThL8M/zFWqm9ON34flksdD?= =?utf-8?q?MCBu11q+fxjRhuVhnFcD13pRCiYTS2DJ13lAnGVd3SgjiS0j6txecY0rvIeZHceah?= =?utf-8?q?BmrNpFz2uqMAbPtXxUtZhHT9UFA9Yiuibc1H/yZbu2QRv1z94twOAq+AKYS2BVmjN?= =?utf-8?q?zTUVUkJvCigHCR4tg5WpVUHtx44p925kK0GzZ5hSx28XLYfhY8LjrgfyLoL2X2MK7?= =?utf-8?q?2ZYqO/CEj9rhjo3qMb+utxmMDQ8/aN+S8W3qosK6NIieDQWK5SfI6hi4YlxPt+Q/w?= =?utf-8?q?IYIs7nrxSfBX7EhpUA8cwCaJqka5UBPu1htOuewuQNW75majmWVqw/DA47168VoLy?= =?utf-8?q?zt3e6WGl4cy7Wvdr40zU8UVyahT14TGUNKQ7H/UCb7us/GRmz2zwK7/SsnyKBeEcm?= =?utf-8?q?BubvZAR52fv3OalN?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5f96e9e0-fdcf-42ad-1a19-08d97690dcc9 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:20.3599 (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: aLgfR1o5jDLqvONGplaM33Aa1AABjX6J7td6cEixvBaKC7xi08kBk98fSqmu2KscChcC8u5q5+UF4oANWKhnTA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30:22 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: 12488291 X-Patchwork-Delegate: kuba@kernel.org 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 2AD94C433EF for ; Mon, 13 Sep 2021 08:35:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 11F7560F46 for ; Mon, 13 Sep 2021 08:35:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238487AbhIMIgb (ORCPT ); Mon, 13 Sep 2021 04:36:31 -0400 Received: from mail-dm6nam12on2048.outbound.protection.outlook.com ([40.107.243.48]:60019 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238170AbhIMIdg (ORCPT ); Mon, 13 Sep 2021 04:33:36 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gZ142NnM5e1S4h2TwZQFyNAOZjpnnQn9o/waEu/oWYszjFI/4uYrznUzdNXdqqq4IlPc+XswY4bTcL3LOrK827cSO1tZIRZSAPHdbo9vsuQeoFbiZjH/9gSIVySnwuqIXhU0fcf/JnuWlwGDkn1+fYXhbSQGpWRkU+E4hdHnsPMo+0mUuUKEoxEFNjfWTUZOaXhOQHEv7ZpPe5a51dIVwK68MS3lVocPf+PyH9uipiV5veXxYSKDyMsKP13Nh1jvwrWSFqdGKKOMEYvZ+XjOrf1Fk/BRZd/whHwwLyU6Poman0+4c0zVgcx6HSke6pAabX+rSYe8N+L1rnBqIq613w== 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=kjm6VQMqHwcfyoymZEOtljy9InkbFUdjyQIhePOQ7Y+H4pupbNCfXyLIS6BCv1te7VKoJADryrqfwiGPfcvcSlehvtA8QD3ujnKmH2f5WoAIMP36PdiXHG0hXqMOOKj6jO0uZlgMqzbootkYCaNWu8ZDX1oao5wRtSZH/8ijp+xyLcqhfBpLT90ogG5HOgh6oc5rYg2XqOGeG/ZzXOK1Pgr8MoAmQdOlTl8/pPaZhiVBgWGHY3QHnydaEejfODSJKqQxCrOT7dGtAE5kC2EGRJj1o+y6RdLoixiIJsbElJSgNlISpIHiW76OZp4Zp2o8CoEDUzATe1yLeXzV745cQw== 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=ez7+CbSMDPFfks92+nqxlwnOcShaemdORDKquiMpY7y9J45f87PKUpzccQzSGk4aODvLWHbWweTpaS+8AfN/GW1TxcShx+jvqNGGKZyQj73M9s9u6L96+/eR5ZjgCOdBznr4zP/l9XWXthNOL4f5eVqQZMlkmuf/RSolbP2U5MU= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31:48 +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 08:31:48 +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 v2 10/33] staging: wfx: fix support for CSA Date: Mon, 13 Sep 2021 10:30:22 +0200 Message-Id: <20210913083045.1881321-11-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 82b7b09d-97ae-433e-7f2c-08d97690dde7 X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: CB0UYnHnw3JQ+X0NZS+C5TufdRx1+SJ5Sh7wq0DK4XuBMaHMRNqWTvrPnsXzOvHEr1E6aZa/Ai6mEC6jcmnYLdrvUHKjBZQBet1caHtKZiYZoWwPMZyGbVLF6apQmv7dohLoKT2bNR9hfQyspwjjZbGzvrH2KL979ECYGp18xqCqenQo2LVecJWSbaoCp4odQAClRG0y/Akb6xta/FebjhBn2IOpb8s8zpmg074eorGCYJ2grpALPWF5tj5iPdIYnRxnGlREUSdzvBxKzkShhNjpcXiQ9yrrz5CUDzYgWd0DWflP27XK5JJu4+C57eVOcNrasbU5ngew9Vp0/mcZPuErkYEzlidt4Rn2U+g27zUsTT+jLPmC2kVTXjQrXjQGHWcwA8weV/FYkjY8ZRU/KerQw0EFCR/NAm82u/MvvPSlxNaBLT5Z/w6Ftz+nGYV/QOJ0eS/hRVgULl/aIAWrnsxK3WEd1GCduPNoqSUbwHyQ2uA5+UmzUHhthy8inwDT9f2OL3FVZaNQfnMMUAygybTgT0ldSA6Kur+s5VFknOCge8xgLYGuvVPWgobB5eiVV2vrROrH7cJEUIgcBzhBB9URaZBdhvYfvYEsBQbfYVjGQwzVECb6lenB9v3I+9K4WfTrqRBTiJQT3irF3fqkKpRUsTnVdI6c32r+8S/NMBYYQBbYfpy8vubvEIqC8rDFPYqBmQi1mBjlk9U7ok3zqw== 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)(83380400001)(66574015)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?0Cm4NUbXHglNDoTboL/uvCE1APDy?= =?utf-8?q?/RXziDTCIYV15m5hTTOW27EeClOG3khJPUcrqnnlZISZyZ5FYYJOikrTy5euQABGk?= =?utf-8?q?ZvvgbJPgGCG9p1YqZuOUudNWed/cEQYzqbM4AYOKyXuFKeaUrm38QsRvhL3442xbv?= =?utf-8?q?6ANtaomxWEWOph6zozN9PvExNEaOYyflv9WSbRFgFrcqnb23kmhmT23n7n+QXellz?= =?utf-8?q?4gBKv4drXcolRdKQEupjagnZ81BCs5EzuWhJ6PNf5ICYgRKFS199GiW8NgHLc981b?= =?utf-8?q?KU4M2xz8cuZRGiv9dTf8iOP3vLnKKBbuqqent4y8X01p52+ZKeArvsVDLh7sIiIAh?= =?utf-8?q?OHzDg+umJ4UUg0tS67D+B6iu0lXz6g5svNp6vs7FW9EXGjVfbJtweHF+oOjKrBxpX?= =?utf-8?q?6Fe5dwyxJfVp/rkQelRRzQbTAkSab+PhFyBqde36YVIJOBnMt8RH1s+Eou6IgjQhX?= =?utf-8?q?7tYv1ysOQNDwruZ5ck7XFE9EYHfHlk6lQEhV1OCcmYjJU4GVuu+mKCp1PR8/KqlDV?= =?utf-8?q?WEwhKPKIWs1e+c4b63qvdVQNj2OZT8ggdDdTrw+579nc/w6MMn8vh31UkJhqiKQ5S?= =?utf-8?q?MjHhSl9921VnRCYmCU3kk5SS5h2//FsbpJkwhsiWfDDV1vT8RHyXwqsMCqfMtQSSn?= =?utf-8?q?HAAUTGiWAFLEKhW8xLQoof54muBusJtgK8aPxb8LeFYEOG9DgFtepUi3d7smaQKNa?= =?utf-8?q?PbpFsivgx43hCukP5VjZYIaD5Zzlms2iSbDWzwyj6COrvY12Ojt/loTbMvdHLWT7h?= =?utf-8?q?Y8vVioJw4j50TiNJDbbV2AVIDkFr+rzEkN9xVnYBih1NolQvDBe7K9042GsAQJqTF?= =?utf-8?q?TGTSkjGz9RaigpwZwxHc+n+0o25upoqg0SKFxMtfo+N6VdDGLn95UQxQx1cgmgEpf?= =?utf-8?q?G74rlT7ysQH8UoM9qUlqR8ryiFp8sS/H12fFP5dMH8zNT3SE7WTe4UcnoPaeuTeAT?= =?utf-8?q?YXakTfpfzdFEhDf1/DzXaGsUSGBjpPGsq4fenTbB4z4+qo8wCEVY0JxaiEjKqZGEj?= =?utf-8?q?+xTSVZAQo2EJMsluu26baJzkhcovU9JVRLkV0Be2snmCxUIcmlv7ftrEdRKMNhOxP?= =?utf-8?q?ii0FB/O6/rKqZWEUUOi7207aFz47tywOyuTvNQdzE+Ku2KPBzKenqjr70sgB2+43R?= =?utf-8?q?O174VYXydvG9sSKB6O/iyJmNrhRBEKvG4trTa2lPqPsFkuqZ3WnbVD0nTd39qdJoL?= =?utf-8?q?j5JFSJqhh7cSQTy48F0ldmB6BiLWcnLjqcDXX6KRqXFcG8/d8wDavL2tibsU/sfPa?= =?utf-8?q?x9acUKdC9HJVtvF3?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 82b7b09d-97ae-433e-7f2c-08d97690dde7 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:22.1219 (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: 7WKptL5anlJ3eMM7a3xM8cFWjpYaGDbpnIaH3OXa9MoeZU4+qSUa/lGWhFKWIFeyevMcoRBOqJb2BEE6zXjQzw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30:23 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: 12488293 X-Patchwork-Delegate: kuba@kernel.org 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 C1185C433EF for ; Mon, 13 Sep 2021 08:35:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AA8DD60FBF for ; Mon, 13 Sep 2021 08:35:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238415AbhIMIgh (ORCPT ); Mon, 13 Sep 2021 04:36:37 -0400 Received: from mail-bn8nam12on2064.outbound.protection.outlook.com ([40.107.237.64]:55755 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238299AbhIMIdh (ORCPT ); Mon, 13 Sep 2021 04:33:37 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WYkxttvXS18OGCThcsxRNxhQMug8/g6VPa6Xusns1tDw2zp6+LwRbd9AOXXEdknSJA8BI6fmnmoKr54cATz6jmKHEnKrk8tNVFHc+bFxmA9SQGVFVwYRwvP9kisX9I5/Pu28dlytJlyYPIoqne1kmzSte1AQcC6/osa7n7SDyUGZaaZNF0uVWMq/S8y94lF2DyfocmWbLf9sBEztzHfJ5nkjhN7mPPBwU6+khPDK5lT/Z3iijFfIoi3WEHjJ+M1mnh8L7abRmtH6DNYIc1ROCAuZRA6TDnenocWap0IzXCsoxNlecJUzuP6w/mZME/dWGvE7SqgyERmfdNvv6086Hw== 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=irK1qzipT3QHIWJf6rEuMgUX9uURfiAS1g+yt6uFeLc=; b=hSx7zTQrhF9cznnQEQJZ5TzLSiaVXvIqDoUm1RieuqtVcMwGLg1QtGB+DW88+qjVD6apAEaIs6QTrsIsUyoEQGwD8YlJ8uoyk5SFWkZtgWX4knUrRdoONaP1Ouq1l3avskJnahD+CF5ir9IJPdKCys+iE/9rkpvmLz7vcFcEgr2YUYMf81fkhgVfdtQdMqzZUpI6ODKMyLrrVZh58ou1+cMKIELN/vEncJ7ziNfQkV5ntK632lM63GpraBPYgmmfrvRIVBGTXVPrr98YlmeJzsC9dBeGtdgolC3COefo/+SXlXdImDw1WfsTmhimN2FLwfn/cMNT5yTcEb1yODugqA== 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=irK1qzipT3QHIWJf6rEuMgUX9uURfiAS1g+yt6uFeLc=; b=N+sn/6owAZRnfUX9MqnPgJ9EQHi7TLCxj8kFSEvS0UsCbghmxgUpkoPCYxOyCCTplVjdTgZ37/brh/BerjFBzCwzt5GEhudsCHNMZYhpt330eLewuYvN8pgHotYhsmQeFdREKiFnsysBbAX6bQC2pVsiT0mgKynTSuKNd+w0Zj8= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31: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 08:31: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 v2 11/33] staging: wfx: relax the PDS existence constraint Date: Mon, 13 Sep 2021 10:30:23 +0200 Message-Id: <20210913083045.1881321-12-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bdf9e4cf-1623-4ef1-cfc5-08d97690def4 X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: OZ7lxQt5+joGZb7vZlQxG6aiW9e8rb1/S9UNUQYyk0o7NSsnxw5gcXKXeUo00yuSHyBCePmF2s6W8VQJ8Ub4jwxPWHkni2+CNSPgjo7gH9rtzSxNUXkvCdX5/cLoiuyGI/q+rnlE9ZuPOs4UlMWIELRgPrrTML3t/30A0WUfFpSQ8Avn4ixJLBjCy3xhTSwnbZT1w9FQORbQjY3cYVnd7MQX23oU1+CWqR6pC8XaHvdZhNZhXPr+KKHiDArb0M7Gw/iJ36PMJpBWltwajqP5CqwEElcCWdHDv2j7sjVMORzvUlZ3G2UkrX+U7MpRgijqKvNqokeKJlHrPw4To4odoL7+PvAyWVfIkaC7zrTwmIM76ZhVAEoV1S4D/ZPE26xpXomxkUvIsYgsd+z6trH5rCbkVkqL05XchCyW0PkFZpY9G9Gxpfh2r/1LGvKZ5+oFKoMLP5b7sNR4AkoWMjCLhU8NZeBe6Wm0zxCHYjz51jma2y4EFRCObmV3auMOg9Exbf0affje+PX8AlMrzPm2jB8MCEqcNiff6N4nChQdsZPVN/0cAuHtmKMq5LwgqWLdfh6kXS9DTYrSPgDj/8GJapfh+Oa1WXoFaLo6IqS7lJF4kfCedkD8YOhjAFcyW5B5+ezgVqfy7iLAmwAwgl9T05ZSf501yZxUaL4iyTWsbMkp0HtgzBJ0z+tRMrJFgMsi9YMKu0sZUZEh96aOiTC7fA== 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)(83380400001)(66574015)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?evkcLzCHBEfsgmQ8tPMdJKFty2pv?= =?utf-8?q?634h1RQ/1BCgtiBii0iftbIctiju2IPIjXS6ewMh6gUKX5QOG+vhE+eQh3O7TdaqE?= =?utf-8?q?QR0zennwie60N7ek+4A0fJCM0naXloN+r7Xh70pnWRIXszAwmUVtYHfHNpGsBLOP0?= =?utf-8?q?OyTTjMZdaItzbXSz2emxzJsEjCTS6IrZ3zlsFmK5tOo1tBVyanNyUTWGF7/GI/kLg?= =?utf-8?q?Gtv7Se6mYzF4h+06v3ODSXNigG5rk7vhUzLlzJwypvIATxGDF6QL3GU3piwZnExnG?= =?utf-8?q?8+UEl1ZyV195HaKuNf6G3c/rqaGbveSp8ZM72IyvXrTeiMQ35ZP7UT61Qe1fLuVv0?= =?utf-8?q?k/uBexRPpYI0NFpmulsYiglaE0KqKWRC10/pOpGDLjpCEEQYlkfNT9mNZRbf7Roj3?= =?utf-8?q?fi3WpVMIsnuqGZcxggyhs1TYdtHmq5U0igmjF0BlPVQz0zly9tOffUuAppFE1CFx6?= =?utf-8?q?AfUllkmsqBESLm5n3+tQUgQEmBLTQK4y5QJsuWGceQimXXsm9iSvwVFXzdcyqPqSc?= =?utf-8?q?51YnNLDRsw3MKdoXd3SBWXLS1w/ATNGZ5FUPmkpwj38XNx1JERqgTjVozt1UC3HBD?= =?utf-8?q?fhhWHFSROZa5dVmcE3qLQ6HMx5X6tFMNH+h1D8paZLFE8IzHjW14k/jqSxvY0vr7x?= =?utf-8?q?+m99GCvoOdjR7tvN6h4iYvDF606LPdYjtKhi1bwZt5h335EtGg1dV4bqR76aBs5/p?= =?utf-8?q?OkfvMajLVv8M0ylxjbtvQadehWscY5jN6WQFU5DSQWWGWIlYYXIRT2DNgol84s22v?= =?utf-8?q?LOim/sKSnGpxKr7Etpnx7zsoYLGtCfQSYCQNVXqhjou98xkuIyLgeK4ABZJADYI+P?= =?utf-8?q?+uNp7BRe+xQMmNudO0qU1kplHLOlBD+qETaVpb7wl9p4Vv9VCgNcPGxxeU+ZQRCDc?= =?utf-8?q?9f4u5mxfxvBvL/bHIAXPeVoIp7QH8DLMIkq/2D6S+yB5grxXBJO+AJCclLxDvrakP?= =?utf-8?q?GKuaJCZXl9AIC6VGwMbYy+jZos6bujPD/4zEZL1vy9gk9GPTLBbj4PBw/1AjQXX7A?= =?utf-8?q?Y6wgm8zgVuwMo9NxWU/Eu1wB60hRihRPq1Q0GaVuR6ah+7S0XTHGJvFNimb/thzlT?= =?utf-8?q?MYiTYVv/ijyNpMewiKybG4o5u+ybeLP1PcJxmC426jekGrpo3oNDemX2whBI+R1At?= =?utf-8?q?AWpO30ZJ8eKaWOeh2GYM4sdPV1+vVgaEYjr57IfgTCgLBNoyfqv+EWpLOHGyfXoVY?= =?utf-8?q?QuHBH+0jj9luo+Lm43xtUHMOPwcaRr3YiExshRC5uvfuiz62vQZitsdY0ZfBN8/Lc?= =?utf-8?q?s4spGC/3VYJ227/Q?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: bdf9e4cf-1623-4ef1-cfc5-08d97690def4 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:23.8959 (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: 0GUo+DLS4nHsXJErd+jaUjkC0PrkQ7ZGZVBv1DGnzXNhVy1j5VodnVDpcf+S1IDMZeyQgq2vWqxuOZmfjK7OSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 0a9d02d1af2f..b790d8573de6 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; } @@ -395,9 +395,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) - goto err0; + wfx_send_pdata_pds(wdev); wdev->poll_irq = false; err = wdev->hwbus_ops->irq_subscribe(wdev->hwbus_priv); From patchwork Mon Sep 13 08:30:24 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: 12488229 X-Patchwork-Delegate: kuba@kernel.org 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 C1B89C433FE for ; Mon, 13 Sep 2021 08:33:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AA7626101A for ; Mon, 13 Sep 2021 08:33:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238634AbhIMIeh (ORCPT ); Mon, 13 Sep 2021 04:34:37 -0400 Received: from mail-dm6nam12on2050.outbound.protection.outlook.com ([40.107.243.50]:38689 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238219AbhIMIeF (ORCPT ); Mon, 13 Sep 2021 04:34:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DDMc7D+maD11eJLhe3g+4D4jPjf8ngCYGn1ER2BivILuiyd0KXiSPDq0zCePxN9bhv2IQLcQGYkEihxKeqU6hHPxMwrs8Xs1gRnu00G3kKoRhI0KohBHgeygcXz1eGKtTsEwtb4vlV0OkpsUklorx3cAHUK53rTqy3jMQT8wWLWHeBJfYRgIdlZMuZlYVT7yE/Z11cfYaQqNcMdamEiuCd6iAo1S/ygk49javhhvQWa+yQXDG3+PAvufuw7gt6L2YXFx+21ANe7g/0phVVxhzXYMmYx9kH/wZkq9gHRZG96YOlIz4kbCSkUJUKJ1cpCSxp9IC9jG3EsHh18SSiKLNw== 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=FwmAPHbajhF2+WsJKbgL8BGX7TdC1AgdDDz7sKWPBfE=; b=Z/Kubct9VVKetEwUwiMRqCvKoGx5Ufqj0bgi+gpkSFx4x9uNYnXMoaOnO5ofMh6XULXsOg6f7YKknCUKTVfU3mCsRuPKyZZeeB2j28YFta/BaX0rO+da7AzU+GDczAQr7XoVJQtP06lLvV2nDR2XUZiCkO2rkyssEN21mokK0QYs5CARbqMS0jSLsAS+nJhknw82kc8ZREuGEezX3VT/FdXtDqXwU8XYWz1t5lu2RBcDQFpmQiTb2JGaZdWEqc4G9VhApqc7VdgmgIlC3WsiVmw7ruUiDDlysAOWEqzJRJrIPpE6Q55icvXWO3mb6dP+S/HhNvoSFHzw9M0U4Vfrhw== 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=FwmAPHbajhF2+WsJKbgL8BGX7TdC1AgdDDz7sKWPBfE=; b=g++asta1U++LetZ1aNkGT153DaMO1DNi8KVjJe/wZda2kc7DsQLHxDbJ9NNcqwyzhFAm4xkgz2SzbkW/ifxZ5yDo4Q8JIk202K4AN9purHxUk0Sx24KKvmR/YmzROfo/bRlGiaamLxZkRAWfAU5PXAT+R4ZtnflaRsAZtGPd7Iw= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31:51 +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 08:31:51 +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 v2 12/33] staging: wfx: simplify API coherency check Date: Mon, 13 Sep 2021 10:30:24 +0200 Message-Id: <20210913083045.1881321-13-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eae71990-c9ab-471a-cd29-08d97690e00c X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2958; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GLVh9zFP96Jx92fh4K0iERFk3vb6A3snP+guyXlgBiaPOdjyDTpSrIvYWXTzi8iMnWdJKxubfV5kzd455atdd7s9yNdIrJfQpkUPMwxLFBPeVlL14AhVZdSz/Grmpfz87YD/raaSFYM0NnLrPtloKjfKgNnlAMRZu7C17JypgkdmmXKad/2fAa1SFbFdd9zzp6VB3JqiQP6kjv74rSPHbCyeJDAW3XLDSVMtjuwGybXkrjT39dlB/M5JBnuzLI1Sq5ww5PJwww745RtDzemgZ5T8+DuVO9pLQQIsSJCPP3v80KKA3Mw8Q9EpSioy7nt/thPgqJ9mjnF7Hsc94GX+1Qn1KC6HbQLGqct8BPsxzD+spEWL4SPBNWUVnW/tMu3cR3m44hSiY4Xp2bpGa7WK4kfZ+CvsXXEel67L1DKUtbLsAliA1RZQGcynEBch+fyK0w44IfZ8Zjx+8OzpVEeadyGP9k2qZs5Djlfw+bEdxtwKxrJ0zkeIto4vNxQKlpOExSW+qlaCL9MDsFyG8kbVm6AfKIEtpSNKo67/gqwcUy23AAUi+0UmFLnsdZ1Vc3vfm2lzH7W2W6NsVIRZk68uFc4MYS50W4l9hRDC3s8v+Jrm+FDrC87MqHA/oU1P3tkHv8zucCJM+VuHDTg4sMzYQ+f5uyTKrwnYsIKOisTowfWTOytxT8YjVlpYv2tiaccbmNHqvLgLFHk19TS962iy+w== 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)(83380400001)(66574015)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?9z5J0V94lIM0fiIBNn3R8DGuwmaF?= =?utf-8?q?II19dmAH2/NkCv4IidXgNi3JlYZqOk4RLIrMBDSj5v6p5eTSR803TgnzQxWvQx9eG?= =?utf-8?q?VSZZExTFa+ZJsT/E13nBApDsfSydJEeAyKypMEOZsFRlxptfwxmApda8nxHrFwGZX?= =?utf-8?q?Vos8q+htNsMUjgLWFX4TSx0hOfotU34CJz65ZHsWTGhS6ypTJqRnyxrytWwTnBAEY?= =?utf-8?q?5K0o3Fp1ouwa4n5lk9GRToA3e7q4yVd4EkQbKgUKcMz8WFqLyTwMlefdoaCDZrFkZ?= =?utf-8?q?sGDFuucLgRqMu/sSBVvzYOK0PgfmtaazNP4sWKO82LvZd4otQqXjudVCRu0BrKZ99?= =?utf-8?q?73THpttkBukC8D8DXx1TnoeTWrOVir8ML4scS1KHiM/ORYBoY3aULX/QLGIjPzmd6?= =?utf-8?q?WyXMgCQVUeLMI4D+a4ApJ84M3+F4HdHT3QVfjUWkOjmKNVjshvB3G9OaYh8ext5MF?= =?utf-8?q?3KrDj88vD9JIYdLfIuv626XNqb+iGhQX/1r6Z17LXTcDY0cp343lyka3jdLaKewBw?= =?utf-8?q?FaZrI9qTnPtc/JrT7iU1YbLJcq2Dkel/Ms59Vq8SkgEnH5fB2aCfC+Ue+qMqBBC1L?= =?utf-8?q?3tgLlFh1pwHaoChVsLuYym7kXiZAeMAqriAFc/Dk6DOl8koKEEOPMgii4wCoCoW5L?= =?utf-8?q?S0/J0nrxd5HcWesBtzrZdYzZDGlsZzYMCD+ZpU3UdcU8UnvwYArGjBkpVQ+/rGY+f?= =?utf-8?q?XWqtB+LztJuB87dUouCZOJ2xITRQDCPPQZVhRBgR84OYA0WQ0u+jxnQeOWUzNhYko?= =?utf-8?q?cYhiNhyu0R5jrjwR9o1Jce9GYkCpanD1aBXecnsfz/TNpUfxLAXI6F+dG2xQEY8qM?= =?utf-8?q?ZyhNxUKTkAxcdtYz/YXQ5+An8XfiomNMuSESq2kdb9ooVd+zy/pVm5o67IpFf/nWu?= =?utf-8?q?betE+DzdfvfbLjVbYcdkcINCTqWNmn2rwoQU2skY0H9csbFQTuYI2kv382LOenB4x?= =?utf-8?q?Kr6/+kGAX1DQvKdFSuOCa1VRZ5gYVFLqokq6UHCeHuGYL9m46IyCvfR4Bi+D6pqW7?= =?utf-8?q?EfNGZGJOqdDAbDkOmZjJoPhBcIXNTK8TSwkLaYCQT11MDJGDErVwsnhGd3+lSdOoD?= =?utf-8?q?doWPg6DbCFcUIruxVhC+mv/itGJyRN08y5O9WZrLPEJ7z9UTRGJPtOxnrPMCNndu9?= =?utf-8?q?6ETxnsuChuVG5HLYrAgRcD2WkQX7slk/iEc8jd5US9NxSDarxBFmJKGTsQxIfRWHg?= =?utf-8?q?zmQgA1QqYgKFRZs+drpNP80nZqn2MtjYLVnryV3yAUOC2s7WuNdbVUyl3CO3Gxphg?= =?utf-8?q?yWZLcwpl8bj93bzn?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: eae71990-c9ab-471a-cd29-08d97690e00c X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:25.7018 (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: u3QsZLkLkqe9YB4nyzcciD6I3f+8fQlHSJfmDzSw/Ylr8wPPlX4Dqqrk1jbGQwM/REl69zM4rgcZaGYhMEVCnQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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. A call to WARN() at the beginning of the function reminds this constraint to the developer. 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 14b7e047916e..6ffbae32028b 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -299,10 +299,9 @@ int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, WARN_ON(!conf->beacon_int); WARN_ON(!conf->basic_rates); + WARN_ON(!channel); 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 08:30:25 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: 12488231 X-Patchwork-Delegate: kuba@kernel.org 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 D16EAC433EF for ; Mon, 13 Sep 2021 08:33:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B75D660F6C for ; Mon, 13 Sep 2021 08:33:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238661AbhIMIeo (ORCPT ); Mon, 13 Sep 2021 04:34:44 -0400 Received: from mail-dm6nam12on2048.outbound.protection.outlook.com ([40.107.243.48]:60019 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238389AbhIMIeK (ORCPT ); Mon, 13 Sep 2021 04:34:10 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jjsdfTXGrpRpFG5a2jqvUDdZaBmd5OsFkwVDuVjFuOYOix0IeJlqB5A3JtwahV1kROE2EsBNnxPDP2ers+o8zAOWAZoO/rGQBGekENxJpP1j7Nsq7CFJmiQFqYn52bnMuW7PudCXE01xlKtpJEyFq551BFtO8U++d6t4ULfqZ5DeVIxMRSfqcEkn+JfbGQa17Q46AJmSXXsn4q3o7cC08OqPQRB+ub0k3foZPUMcZJ/DK/cg5zFwkXce6rgZ47lqWddtl+LETw1Nk1bzgmezQH7K8CDz3Segp/n+pCA8/WBJmqpU0RGyIZS7mZJXV4EMyniXnNCDZ1IKaFGWuAZ1UQ== 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=R7LujJ1bXZuuv+S3QhyLZFX1A2mcIMarq4RyVh7fyKNsBHgEq0HMSBmCD3TA67huyuJN8Yicqv6OmxGmnlYhQDKRDoN0MhSQ3RKl5SvExFEDZKvnHZ9c7iStze4roXkq4s2Dgwynm05ZKgPbUs4H8RXnuYXxKNZibRUdquCIwYzd/FqcSWMTm7td2eN10VYG7OkJ76iX6L4KAKdaHRjFoHs1n+EUKX4CqrhWAbSfVtFMsoZhpN8D81UPrrQUOrcOymamr6/pOMZHXCXi605Ek+QsASfWpOkmTkUEPINMbJ6ugULyJ7t/iqkGgOUS538NSZ34i4eHbrtDjhLQJnJhOA== 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=ZUxo4vE2s1yhdSZYI+4PYWkd8LSSr5r79INIS39HllhPRRTL6iYSYHLeOqLrX8H6XfYmh6n63qt6PeGfIjsUVudrEKvb2iQMHuh6h9FruL9df+8kMmgtfosWTaqx5GbkIytlibME9MLstcjMyk46z7//0YnKJ9ynyNNdzyVasFM= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31: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 08:31: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 v2 13/33] staging: wfx: update with the firmware API 3.8 Date: Mon, 13 Sep 2021 10:30:25 +0200 Message-Id: <20210913083045.1881321-14-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:26 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b53992ea-05c5-478e-9bd6-08d97690e116 X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: 3fAl55nHIPwQHnzJtpbLjeS+vciFmWwnpaTQfEtwHN/d0ClvYs7XSZZtcy6lLd7UpbCJ3C9uCMd3OmdxnScilvgWKyiCzT9BYFnB+6s5Wcg2YBhHVSsdLyfOGc+t4vEnee/Y6DGQhHzEzrTHNI0g/jDdM7+jhAN7aM5ct16Z926wjdSMgPP6IwlkEn5vB/J7QlmPjUQS//ZZev/xDPPSjGFR12u2yKdAJjEWYxWucuFxJzsoR1HVoCH8qVEmt8QaKEPOMi08cOy2zDGZgHuhSyB9E3bjG+YkfykXc5MbGf7w03+a6qx1YAxfd1Mbly9CZUeH4laLtpcPZUgiPaAh/hQir4EX2gredgQMoEEv1fU5V0/RqYEhsTO76iCW3OwHR/++TBzVKAcipHfK7X2fm4Eeq+DBZnchMl+9/b9LVSRzaURcVkVDJR8DkQhetqyy2Zhzm8sxM6KEeDfYCkuSa7rY47iotufoOV0DwfgT1P4EOGtvVEKQs+FC42XvzfkPAEYacIArtpjynqcoyirooxYO/yfO/jUtF5xfiZ58XfaeHKLDqlZXmEBrJG4TxRR7x5KNZbohtK4FzqFck0t1dRJod5nGCSH1kbehs4PZr8ry6JYLJtn6L89+sOwUEm4S9BdQ7lilppui6rsX6TQ4wQOuOVQsODGHgvEXkQWk+wdYva1OxgdEl7oQT7RiAcmcjsA2UTehc6+2RzCTB9YY4g== 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)(83380400001)(66574015)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?djg313ugOCVQkCyjO0tKLtNFIL1C?= =?utf-8?q?ib76OoHAmQ3zTQ5LspFd5T8q1ZtIJ8tOAQDYiJtlFhUAa8mDr3SxStpY1EFpfB0/X?= =?utf-8?q?v0/sGud5s8UUKaW3VbD2kNPHXyJjyZ+sLU0jYPVAZ2R1GCYIXrnMQqkGl0RAtmavF?= =?utf-8?q?yJTKjlWXO/13DGDPzzpvtGwcOrNtltFeWMqcq5E/JkgnCDHElRckvfoLH1wfZsWTx?= =?utf-8?q?eJzfe7MKB5AAZoikrDXSRbkPIVE1o0WisnOZz8ghmPv49JbK9Dk9Qr9gBhOUm2nVK?= =?utf-8?q?2zGIE9mRgTorthuL3xCDAQzIPcNGfswKk4zq7PGYiwILU7XwwpEZgXfDdWgQiVx54?= =?utf-8?q?ToWWw7syZdgFxCSEsikRmaL7vSpRp8rBLco2bymwWbkndAODdUg9qsimccqfbg1F+?= =?utf-8?q?inoqpmD5JYNPP7i09EbL1uvID6oP56VhI+A2BzoQwPera/Ob5BYn46DHlaY1DDIO+?= =?utf-8?q?Ey5Qqp6JvgK1riuEoarphY7HDo4WHzST7jUCQQ8sB3rdgf2xJ++mRfihyNotWpiGD?= =?utf-8?q?3TuXCA+h3Cir9A2eCcxnxlk/09GiVtfMgbRJ1JaIxzn3aH9GhzlpdP3rUqP9zXlKd?= =?utf-8?q?Q0e8Y7TJ5YxFVKblKFhyataCKLUX0PTKBxWSEhid5zNjkey66YUyYRg+o9Wlin0OZ?= =?utf-8?q?Q7YEOJWZ3AfpoO5ftwXxa/U0gvsLzAE0EG7SeTnOIdkSkoWlGTV1S26IsM+hAOu+7?= =?utf-8?q?P33OGSAsoxetRxRRbnsILqAqufp3aRGjdISRPuDMLZZKigl2ZY52up5euOoOq581R?= =?utf-8?q?BA+R6YpgFXSoWCG9y5lkX9zdty/LLPJiHNu83Xk8vY+iysgDkj1H9ISjJzwr9O5cN?= =?utf-8?q?oiQcCKWwUzbjxAYHEy4m5siHVSvSoEY9aTUC75xtSQzDVq6XE9zFfYgwz2OyylK3A?= =?utf-8?q?Y3tSG68jUwi9+Ngfrzdmp49NI3GjsqsHLS1nPqnU1hwh3iQXxACNWNcrYdYpPpjZu?= =?utf-8?q?qykEOO/IkX5lkQzxNUvGowUgO4qoBqciNB/BA7/6D9e4YEA707R4ozO97Hi4PHE4M?= =?utf-8?q?G90GpA5fCGJqmoXNLwR1cw4IHrX0lCjmVQ6LofQXYoZZ8GPSROrUO190GQVoPBp6e?= =?utf-8?q?rTuq+vcjAfw2iNjCVsj0xEY6ix9yWmnnI21smSfUeFwV2U0NMqcG7E+uDUgQLzD+b?= =?utf-8?q?mI76cBiB8Ywk8SuMx6GvYh23e1Yo5d3m5cSc89nXalusM0ADANG0CSUjg/JaOoVkY?= =?utf-8?q?mVgngU00cHMWePxf/bKPeaLZdQTMr3xR0PVonQwovPaueby5A5uZlZo4NAxpAh3VD?= =?utf-8?q?U5w9Eufr0hHBUCQn?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b53992ea-05c5-478e-9bd6-08d97690e116 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:27.5028 (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: lflThaV7wLd6ccG0NA+sL0BPb+b1BS5asLeEyitLITz0sJldrINxSzyJ3Vc9MpxXYGqg7EYysTlZDWgSkJ7xhw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30:26 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: 12488301 X-Patchwork-Delegate: kuba@kernel.org 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 53D7EC433EF for ; Mon, 13 Sep 2021 08:35:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F9E960FBF for ; Mon, 13 Sep 2021 08:35:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238137AbhIMIg7 (ORCPT ); Mon, 13 Sep 2021 04:36:59 -0400 Received: from mail-bn8nam12on2064.outbound.protection.outlook.com ([40.107.237.64]:55755 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238399AbhIMIeK (ORCPT ); Mon, 13 Sep 2021 04:34:10 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YTaioXqjqfvxMrHzidRdYkMVb6AzVQANDsnrMlmDYSZPldi2Euj9iCLRh0jsFv09J4xGZiPJGEdvplThjRRn9pzY5x1aDFnt2ocrZNtWfijz7UpAb+h7fjH1diHhdWlSTn+bqDXi9KVLUVTCSHWNSktLGb/GcRMCYA/jvjN/hU8bkGItwGWNmKTRqPyrDvVRlmuvezClf3amHwqxXlGedRxXESr3ybkdQpJuQO+9j/pj+oarvA+/6z+s0Dkcf75f925C5O5JYziHs0oP61E/+RHiJCklVMvP+3sjVL61TBhL8v2His+fjwOI7pbDdyAhIObFgxwq1flkBDbnQ5V6lw== 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=A++33iaI/+B7cry2nPoeA53ULRN1nFeoywfeXQe2fzRQJZpyIu/KVWnNFThug8OMM6Jk6Y/o4Gc8gE/Am1lUaggm6p+y/HrEjGnK8RVI9UJhj8azntpUYFXpSLVQXTHRdkfXr6yAGrwVZpDa/PcU/WT63Irlmhm+j4RSwgD4QGANai//oyTxXoNUiBIRYVQ8kQYxXr6gGlUZvleeA0L+ogvhp5Wqi792JoyPcUHEQJax+rI2/pe1ZdvZrN9XEBVFqIdey1wroOm5iieOSBx7J1PJuoZ0wwww1qp/lwCNiMjX5t6NNi5sb4BIKvczmMi/mAjVvdk8UbBmhtnwPdxl0A== 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=VdIt6m+b0C4jywLa4rwDIDQSH2lkjupMplQRhr6JU8YwJnXURr3Y12yPjHt6tb9xaI+Mbfvlwh8tqUYjxZyE/8NtJC1cdO8i3l2saq6uUVM/DOqAveIDN+VmThe6Ucbrajr8ZBLDTySXbvo7VFS61JbmPwMNSSazysaKJ0unjqU= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31:53 +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 08:31:53 +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 v2 14/33] staging: wfx: uniformize counter names Date: Mon, 13 Sep 2021 10:30:26 +0200 Message-Id: <20210913083045.1881321-15-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 535819c8-0fc2-4d62-99e3-08d97690e225 X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: QZYuBRLyWVb2L0nwfIM3nwgYoJ2x/GAjbLsjwJieTR1Cz47Oph8sEZQ8wSW0HJ9AW6GcN5YzE/rcWlI0+cD9R/l+zZY++b96m2aFCNut6/9WlAWVsAgRSkMUqpGJyAr7Go/LvABnOyNXIG6qROXK/y7SkC9IoDwOyyduln46a0lizqQvrsmYvyYAbmMm367TXhWkqRNoEqQ4OHlpeFOj1vldy37LVoECJHTt23qsL+lUmyY6uA4Vsie2gaWnxTzW3gGCoSyJKdL3hHAjLqFhh4r1eLpA2M82WxuZFTGNqwiTn1ggwgc4476id9jhRMh7V8P8l5Mb4MfToVnLSFI1El05Q+SX/1TR5wLeA7XvHO4L+RaoX3gKH+IKgpqipK/kPS422OcaixiOksVH6gEfixJlIrMcNlJpBmAeFVLRhD2lzO8BJSUx3/oEq383f0NOmzXLxiYf7ZVQzJM6t/Kal1AQMyJN8vUraeJYE63HYxToWB4/zIOm05hNQczs2Mt023Q4LbxXaUsS2AKILE4fLF+iJMecBAt3vYbrcH2tjphguhhcbgJ274L6b1QjiwEfN5dVocbyMhFDHlDiGpoyuKkLibAWo+CDxQ9TsskFaCKwNQTA1+WxGAwixg8SlZ/kjfZ4RR70uU9mqgJbAWL8E4XgrAa+mgWUYe/E812FDyb6fiMGdtHSWwAmofubgdy+9ra8KMsK/aUsx1maN8PhKw== 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)(83380400001)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?hNp6wJh7jLFiyd4KRwHU23amvqdV?= =?utf-8?q?Vucl5x+tqy5mhRRiAH7YRBZ0NaEmLBhYc1je+tW6hWKjreK24SL4QM423lhlgchAa?= =?utf-8?q?1PhN+dBlBOSEOTZ2Ts9e/Wp/JLWcjya0EmaZyUrbXkWpIQvCxfpIq+2+M+johSOsm?= =?utf-8?q?hOQ+qlt+oGALuqvyiJBarYdNTs55BS7g8j12K//XXOABAjIL7o06H9idDWSAhh9W4?= =?utf-8?q?JeGwoBi/q4k0EErv+mW8+VNFAa9Jm6e+FUr/UUrAqfpbMQxHfAibynwRnF57I8WGm?= =?utf-8?q?/jNoMnKsGFPt+eH2H7LTyNrzwKnnR9kjj7DJou7r94Ln8lDLTXrdPcmJiLy9eM70I?= =?utf-8?q?YCcp+eSFTWujPX+QhZHwn3za4WUOlAHlXXNdpXHlD7SMq6EHMyLJkHt2tc8vyu5yL?= =?utf-8?q?iFSZ8zydUQLGq4lno6VsOpNyWBn+ynHB66n1Gbw1qR2C0avNecZwim/G+oqkGhLVx?= =?utf-8?q?SVJqySZATfto8i1oTdExmJ6WBQLSOxjyysKCxC0ryk82GE+tIiFJ1deZS+85l1Tbs?= =?utf-8?q?uZyZqSB6yyEPiJMfItzrs4xnkR08G8qb1L5gcPt/wGIK+IuipGl/pOcHiqlR0AEvA?= =?utf-8?q?L4ytpjgcP/0SueumhsZp2EIWHWJH5RKv2D1e3yCGhClB4dPn/GzVHL3Cd9djfFsKg?= =?utf-8?q?/khjwtbJwVkLdyTE4akXilMk2OhJehHfyy4TczfyUquTNMruO7Ve1VyCmg9Tcf8At?= =?utf-8?q?tLisuog3JVktI2D3PMtNXcE20VHYYDae+TpFcpGG9DFCuFa6Rc0/hDJGJ+SsiOVEU?= =?utf-8?q?c6LtOVorpzhXwrbKB0KCV0KnQWVqzTMcWjgXSlrHSNlylRrxSvQZ4nRy7gGOySE7W?= =?utf-8?q?0lnEWNtXLjbz5i1yWR780VyHpAV0KyRqo7w7cvgbWJTZXUzWQdppDj8MGAMJRDDUf?= =?utf-8?q?yi4r4KYqNbvktmKvzkv849wqBF9MY0/3SAM7aNnyIAKZh03UvaBByyiISz36EPdju?= =?utf-8?q?V/BCbXPMJRgTJm2sHp1ms6aEGeCwlJPiDuspE0lzu/kWGSs3JhjcfIWdqz3ykmJ5k?= =?utf-8?q?1/ShJ+8AFLJpG6em7JGxyuiDQ3KrUgDOtnp0lGnJfm1v/o91yybLMtnpxdS+wR1fU?= =?utf-8?q?HkLbi/RHowG9FUozrzMswv/xpmjeO0xa+z+gQfKMu+KoXRHcDKHHx0fQIoutzDD5Q?= =?utf-8?q?Eps4Nag3/7Bj/Spe70isYpnFFDKmUMxllfgMvig/K7njyRDg+SonYedjQuhjsXKsJ?= =?utf-8?q?AzRATTgFHgotHpnqofAsCzvlBkumtcfQMZS/ExyXAOiwSVUMlpRpvq4ny+RjtnHEd?= =?utf-8?q?jyx67VKab4viGq9z?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 535819c8-0fc2-4d62-99e3-08d97690e225 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:29.2268 (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: uXf6YoVnlgA3LTMJpfzMvA54LzrUioS4s6U8XukeuDaBOd87f1cd+W+U36R7q4ddUhkp+tyj0oJE/o98M0MWLQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30:27 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: 12488235 X-Patchwork-Delegate: kuba@kernel.org 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 DFB07C433FE for ; Mon, 13 Sep 2021 08:33:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC78B61051 for ; Mon, 13 Sep 2021 08:33:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238627AbhIMIex (ORCPT ); Mon, 13 Sep 2021 04:34:53 -0400 Received: from mail-dm6nam12on2050.outbound.protection.outlook.com ([40.107.243.50]:38689 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238492AbhIMIeS (ORCPT ); Mon, 13 Sep 2021 04:34:18 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LHjxPSyWhnOJFquFjpZmrJZADrwRN/kkJBjLLcdSy+fQXkCQVpGFfZtcRGMQILUOmF20q4nndYrxQBX922cZ8i1vcqeu9noA83NLdZ3N3cFIb4lJL0+/f0uNOwzEm+tyCgdGOEGKouA3oqzedYjizrO01P84J7CoYI6NJvfgPuN98ibGpi/FIZZ7s97dOiRTpfpJp8zgdUGl5D8GuFj7uOxOfBxCsEL6C1C5q/cs9XsvwZEtzQCklKq0qwhhDqWWG63Bp61M+L0BIGGg9328tdIje++8faqrfL9yArZwy7JpxLMm8a0/OxR/VZPIy8IeHawrtb/XEh2qNNNiGyZOsg== 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=oO9BPzLSre2iYvnNlGZ7W2bjporWmGTvb3BHUg8tVwCnPUnRZGoUs7KyoAuHwqY+WZ2BK559RspWrzV5k01kYB3BlkAzIo/pn3Vs5TSPDwBBU8S5oGnr8z63bEHWiv0mB5D1heHq9Pwd+AdZKZytqUVygWWT8j088lYXZmb0+rQyQOn6yPHbT/sxpPNZMD6UOnGjIOMwoQ0D/B2OxQalwKomYI65CEfBAuDf95gwMA9rjZPurXgAySIG65tTWUiz0H2m6SOJeooH9+ONHudZSY+wEnMvIBQi7wlWfz2bETGfyaKXP1/1X4ppnQDhzfuQgNpKajfLjQHfzOmGssB20g== 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=AScfunU90kECODd5ks4Z7M5pnirrg8I52vlXLGORTKk5YtkX3h1/HGMfIfWWS0+n5s04tM9YjPtaxuigVvb+XHD5ltDEOAKpEzqt9Hutrnef7KPgs4/osmyqr9gGx4wMBOW6QM3Nyq3b1Ddx3cdl0dhE3Pw/p/vEv8C8h2EAV3E= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31:53 +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 08:31:53 +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 v2 15/33] staging: wfx: fix misleading 'rate_id' usage Date: Mon, 13 Sep 2021 10:30:27 +0200 Message-Id: <20210913083045.1881321-16-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:29 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f3ad9465-56d6-4f61-45f9-08d97690e32d X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: FKfh30aoSfjfnBuBF/RRTUP95MK4kW3q9T53OpHnJ5IGv/G5OSaGPSYmTRx37ofABM9i3I4xUrwycg9tHFDwrjGYrtx+1/l3W8DL0B2kmkwFRPMURRLwXTABH9QBKa8/dlAjYiMwEAQWyFLWUB+ajm7wMdguH30ZXIwvh39DoY8sp1aAksUQuFuH9cD3vsE3Gg41OYIhDguCSrsGkCjUyf/6jXgsxU3F1T539D2vgDBukomEt4VPD6nEbC1/i6/XOTvEThkCx9YvGHoc/44CdqSvoXrflB7+HPf5ky9wYfE5kdK0ME7c0vQIUTwtOpth8LnBWgYYRg846VoAp/SO3UMA3g45jcj4y2N0OAaFlr7zphPsw2sA7S4EAGcbtY8LAWdXw1dsn/BC2JZTOLpmGgHDC5Fmt3YniGzChaZctZ6v1u2sVwVPA4sUH0tOaL0h1srcdp0DRDcbxVcEPgl1AjbWDqjmnrXmAuEx69m+2NWSJYn+/9UH+WtxrUsfA6A0v3pSzIQIsDvAql9EO2ykecLmLfu3Z68BJN4qd9oBB0W4aQ/KBao49fstZM3ds4OFpXZeuPs2VardtzHNUgE5xZIfxUiRlihvEn+MS2uR8eQCSIWUa6VM9YR+/3C4v0ge+y8kOqtZY8S7LfhR4sg/PmmvZ6YEvjAWncfHhWSRrdAtDZN+bL4lFigVwh4PtQ6wvNpaiwrpykM1HR+BgBIGNg== 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)(83380400001)(66574015)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?DtDVYon5k0a/o5BQKCdUkt2OZsFQ?= =?utf-8?q?Jr2SOWpCDR2Xd7lszrcv1bDO4M2h2qAE/bV97Tagu1Q5cugf0g2WobyHREx5Ws3QJ?= =?utf-8?q?mtSXDreMZK4kinZJ6bIIj37sj18oU+FJwExhyr14VHaGRLcf0+p4hWb5LXfdX5VsE?= =?utf-8?q?iR34UUzSBPX/N/RUiVKBrwCLuEcv7xxxywMRRe8YfMMLfl7vmU1/P3StctIeNi5w+?= =?utf-8?q?uzW+XEJ16+cJQXyW/9+nUQlO8kUDnEv2tV572ZgSQTpeiz6t6EXVGINI4anjgorfs?= =?utf-8?q?jOVWmReW3+qEE4vtpVSGa/KItGxVImgR34mmYOXtKRjB1vWTJ/QsMCZCoEWcNlgHL?= =?utf-8?q?pkzjZXaJBLZ4/DCEoybz0kSny5vCA8dSb0k5bQzQxHuw4slktNjl9XPb7NpnlH9d9?= =?utf-8?q?iYwDokMAXMtk8N/2wfI+2tYVZbJo/VOhfrTBLGk835ZVXNYyiTWU3kJndJ4FZgTu9?= =?utf-8?q?2dtn4SDKauvwJUxeGvCLpBbP2rapT0Sue7sC/ibTw3pTyEbKAg2+TGxcffEN4pi8l?= =?utf-8?q?B7hRI4bxr3rdR2tYswHTIDyugdeAxRhXokORLyursd4vzUCufYBp7x6ygjekXqVEF?= =?utf-8?q?vMLkbPQin6lrvkBWLwb1HagwgY5CO2Ty9ybHN/hFaClB332h/ynWAmJryDjN4kOGY?= =?utf-8?q?eM/STgGOsfsDeD3KwCJ946DXMyBATd5EP2UEK7ZdHo1iPN00Ie3BCFx772T1xQNUP?= =?utf-8?q?sNhyJqY+7whiO3Bo9biaKwjB6TSySeT00GI6hzPuwLWCx7Vrjt5fedfLQfKi+/IL1?= =?utf-8?q?MTncyGhkHCjQ01pzE2nARvt/KU0bzdr2GGwQpMR4Uz4V9Z1z3tMN9tqJyovY4MN8u?= =?utf-8?q?Xb59yGHs3F68zVltp3WxU9Oyc9sxY/YKSKDjTpa4YjCJTXA1D1CjkHjXh4zUOEnqB?= =?utf-8?q?lSx+R2C3SUHt8YRXi7uFi4YyoVdrhbC7cRvemSIMT+cQSbfvTScXXiBxR8QTC6j5s?= =?utf-8?q?ID/V60L+y1PUWROhuJvegjXMlDsQ2Tvm1sAOVazIE0gJP2VgEBlc1L9j+8oByhXzr?= =?utf-8?q?QvPYUVZrJ3p8dK683tiTuro7fmsJk43wNyM1bqMOOQAI4euuiHnCzDIPUwTc9AXq0?= =?utf-8?q?VX2RS3ULGf2aeGoHmMxiwCCCu9lLuL8MCce2AZunlmC300tyc12GXF1idLYYThKbf?= =?utf-8?q?2LwaV+o8c3v9xaHfGZxD0Mt+JNAT3+ANFRfsZjqhbiODA2/jkJ7SCN4F3nxIPzlwR?= =?utf-8?q?jMpUc+C4eBL49iP0KLnBtm1xKEnREquKKsfsKyYp4bKHOQsv+r5eLlabsEX3VB8zN?= =?utf-8?q?Wm/SmulZE2+3Mw8d?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3ad9465-56d6-4f61-45f9-08d97690e32d X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:31.0347 (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: Uev+2Gd0mbA+a+TSRO8eZUoYiTue1/hhlJYCcZCuUdUD77nK87TX87IrBLycfB3p7tF2lKen9ERC4Yt0v3k9oA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30:28 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: 12488281 X-Patchwork-Delegate: kuba@kernel.org 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 079C7C433FE for ; Mon, 13 Sep 2021 08:34:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E244860F46 for ; Mon, 13 Sep 2021 08:34:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238201AbhIMIf6 (ORCPT ); Mon, 13 Sep 2021 04:35:58 -0400 Received: from mail-dm6nam12on2048.outbound.protection.outlook.com ([40.107.243.48]:60019 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238109AbhIMIeV (ORCPT ); Mon, 13 Sep 2021 04:34:21 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A3XdyyhCAMr4Aa5bBKQJWC525f1g4+E6Rz80GfnVaj3k1p1mrldVx03hx8f4OB5MCMBaifw5LTvOdZhcAUT7hm8kBNi4EtuKspWDrtjQ2slN6MB4KQtDe2JqQz/mKbpK3d+RMZcSa0D/CNhG2QzQJL5D71LBXevd5QKltqRGDtRIg9dPqIxndeU6+72u4nqUR7Op8QMr42YX+9fMCQEYfEz1U+4WRQrRXqQ4iINXdD6fskoSSBZkcBvlT4lZ0aA0pTQTzcJzBfSTm0LGE95P0FeGP8AUIP3kOn1WXv+23rhSa2fuIiHYT0YVr1r25E9QijE9OLQGAF0ISNckAxmujA== 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=oaQhnKNtSG5UkXUiU6j2gg/GZjyRXhqrfHnnyJNcWljSCbTD3rSDdNwyA50NfjOh87Q1D+1rlO5vMGlPUXsEzgvSdzrCAT6J/u5H75las/Zrgthj3bGrGHepH6xu79SlJ47jJpFhBT4CkUktob1WfajoExCSI9e0WCeRglA7ob8tc8IGR92Rl5LJY9SzPjP0/LaQHu8vRLixJ/SWFnrPa1jQRzXf//OlvmvlR2zBYgfTHZynYD8YgJC8AsNOe1iznE0zFo06CvUOmNfNc2UFF2LQSm2Qk3TufUA+83h0+PZGgybuXlsGiCk+x4m9AEaVVJVgzA37QFs+OqDkiQaDbA== 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=KUaPIrQeGeTihy6vikrj1R1caCbNRjILuRZVpZMhC2+Hgh8SjMIQOuxKa9aeLKuz4LH0AiuYFACL8h6Vx1eR/oM17eMV9Lb33SK0RneQnKydb/w+pSVhn75CFVwuEC3kPUxFxAdvDomP1xkqMOH1jp2mtHgJJml8OOsZ4BeoIIE= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31: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 08:31: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 v2 16/33] staging: wfx: declare variables at beginning of functions Date: Mon, 13 Sep 2021 10:30:28 +0200 Message-Id: <20210913083045.1881321-17-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:31 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 58f10d22-bb48-40c6-4c58-08d97690e441 X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: 8YDi5/c38qvZdf63MKcqTvH1IHTwJgux6cxnZ7Sm8ingGBPL/sgJQQLZlh7bNQb2p1qrpSqdviTree4WQux7tQo5vdjj2yWQN/OPXEPo2/nEepkzc574sqC68zklgALKhIL4GS+Onr52V+5B3iEvxT8MbVqlhfHQH/mpTjj+G5g2KIlmYPzAR++iFSfMcUUWt9IfQ75QPDFwYmVH8lmhUcbVG86QTJQliCJwESss3zbEjN+uIg5arjAQwQtobw/Wg3eNliDcjMmgaW+yKI9sv/KcOvVkZ8OVv/vgx4/amq5r61lLXUh9cHTcQ7RLPMbesD1QuXvvkLMJlyMxkSNZlfQDV7w/3XmRY0Mzl5Mk8b1yaMIzhcTp6xT7Z+OnHHXWIb6G7jZ0NNZ/d7qbEgN4ArMK0mE7lPl8XKuqibZxSbLobbsrE4q1AoC2Zy27wVzzltKcIHmMLrOx+oQBfYGE+TQr2p4nNVoq+mMr93IXsLkP8h9FPruhqjwZw3GlIN69P586ZrVnPm8N1zF0SZ3uAJcWd9SYorshwZc4FM0y43bnSISUHldCRLOk3Fo2srx7PRLyZvohu4b99zGeQwW1TbwxlAinuEnJBUMcGuiLLt9RJWHrG3OYYLyTwXXnDChslM73BQ71ROC4zh1S8IGm8ER17j/gQH/l626fXW0elpAJJOLYs0fUwnewZGHhtmWnjARTNhpuHCDgi+gWXQAzTA== 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)(83380400001)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(6666004)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Z8RDe7OGZWhsxFgRTx4U0dBS+MUp?= =?utf-8?q?tYxG+KS3M9WowS8UvlLbhhUIaXt/TrzNnjWP5A3WoTfKq8hLzfdqtm00bMAFnyyYs?= =?utf-8?q?ymEDLzm/ToKelvVIQN/+Ss7Zt/KFU9N4RlRsjRb3bIQ80tu657Y3o+SpR0EvxQViY?= =?utf-8?q?1PIGQTiSYKu6E5Dj+2puu8QR9F/y9sc6OwJIX2OPgdmnqa/akqiyu3FAFwCNUZ5Cg?= =?utf-8?q?ss4eOBIV46ffJm03h9gXDkJvjmyi0IXbWYozeKz9JcOkhkIjaLX7/5WlwfzUx6ZBh?= =?utf-8?q?Ri168d+60GsR355qB6jF1usBQD3Xto+PJw0s6nqDAVRL7YO733mL3z91eIXlGrrTZ?= =?utf-8?q?m1QNVSVqsfZElooUQbNYPP0/sEoXVWQmQmGG/DWmOKTgY/uiy+XPR/4powx/lbVxm?= =?utf-8?q?4Os37Cqj9i4hw63Sk1tq27mz78m+XkLuLvIXHjnoyG7Ynzpj/V7F/ySRiCVTy5F4M?= =?utf-8?q?ZiyOUbxDTqVoiei7Vh3FggGxvSfUdVy6unAMeJx2tGCxYU43rsF1hKtsaQZ++PGVW?= =?utf-8?q?JSHt5ieG22DAeEtr3uWps1QtbqK9kfF2Ppg+v8UvVSVtHIbF+4q5A/wp/rrgJGe7K?= =?utf-8?q?mDZDc7U7dOaX3c7mtCDZPrqS2QItvGiCX4MeqjDHg7C4hsJWnI3MlJMvARtq5eaVM?= =?utf-8?q?w9AgAR1b4/b/wp7FvS55Q2U9uP5LobwDOZCb9OKxQkmyy2S4jxm7AjuwUbbDwK9aW?= =?utf-8?q?YbOUxSRnrdRwfVErXeqjK8VT77gtIdLaEtd6qImFcfdY64HZOywrM9BXKXQ5ICXD6?= =?utf-8?q?wxXRkLegwxK6vnAaCNM6NI/F4Md/QqZrxhkoHFmikt3oRcqWurFHXnFRxY/+JnwHr?= =?utf-8?q?wBfF3butNCUQykhGQN9+BhAXafDUejGhoehVdPJAbXmmkD2XqFxPXQOwKpEo4mb0X?= =?utf-8?q?+X8MFAke1YNY4hi1K/vrYMYVUgyLfd8UEAIIC6Y2N2/v+0qjxdotuRfqflxpjvdCr?= =?utf-8?q?WMfiz6djAgbFqRCU2GkykATpPbN0imTnbsmxYNtDjFSU4DkU4PAxvJrGEI2TKieQL?= =?utf-8?q?Q6nOkqpDtYIyQVY6dcka4BQWjFtmFRep4gJ/VtN5GKBlAPQQMsPD5fPBd+4TCDI9X?= =?utf-8?q?OgJHQzysaRrZyjkMnCo0DF0wBPW/TvZuefSzDjEXmK3HgurMl7OMvBTH+LTMBuAJy?= =?utf-8?q?L+fGGQx0CpeHKx/pCX/0xBaNoZ/VqZkRdO+lDOjM2J2Zjtc9aqsx9v37IxzZ8YpTl?= =?utf-8?q?cPDAcfhD3KGKlVsSwIXmwuzImiK6VDd8nMSbQmuvh1k0WUPjg9nZcbx4g+5VHZA4j?= =?utf-8?q?XXsBraX84ilCvPj/?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58f10d22-bb48-40c6-4c58-08d97690e441 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:32.7618 (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: s+8QcJHoSJNqZ2zSbpsBs/q9Q4GCe7eGVjqspV8JxUKQ2gA9xAQfqJBSVL6wZWLqkzmVS2xy8zwEK1dADUXqHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30:29 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: 12488289 X-Patchwork-Delegate: kuba@kernel.org 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 497A8C433EF for ; Mon, 13 Sep 2021 08:34:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 36DD060F46 for ; Mon, 13 Sep 2021 08:34:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238849AbhIMIgI (ORCPT ); Mon, 13 Sep 2021 04:36:08 -0400 Received: from mail-bn8nam12on2064.outbound.protection.outlook.com ([40.107.237.64]:55755 "EHLO NAM12-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238190AbhIMIeW (ORCPT ); Mon, 13 Sep 2021 04:34:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h+tdtzAd2mFuhcwcpBUl+Yx3eLay8nHeERMrUB+V2YjPt2tcrRmjis8J9+bVr0t6TUeKWVQcZsenDmfmYNlct0FH9Ak4f8pt2YJhocT+FQ4f4R2U7CIztSkBDRrSRP7CJS3FcbBVj32TogzmKPKby0d8+bgr10WeJCq6GudshQNvZqVqdKMKGg9EPVodADwXsQeJkeHbMztThY9hsBxpAjPA9h4AeBHDnO5QEn7HaVE5vD3oj3UEihZ/97YCuZajYj6FeIOg21TK83eXwKvIzYnYyi+ewTFxLOu83GHF+LGVejxRtu9+/NRZA9ML42wW6lgYS+yPA3OXk2mTgFtTWg== 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=62Px7Pc9Wfa37Yp8kwwCsox0dv9QXvJNMbI8fHPQiLQ=; b=HjWid1f5pHPJRuDZHHNqEX0vZ/8YJlqrzuVlEZDhYt7v/pqJ3MxenQ2BTsoKeoy4Anf78Twh9AH5GOhmxT4WpeeERVwZxXY2xd2bH5u85UG3+6k2rPs39NDS7KLM2pp58976y5dXmWQy/Td36PtEKwpdo/7GLzJe/mN/mrXGauUKIoVhy8RyoXyGUTFK78D5rvnqjySuMiqBbek+zo4EmnFpU6OCHmqNogVVsHZVjuTuPvwysJw+ZIA7tMztx1cAMwiMjt/PrvS/aIPN9bGzg/rWua2WmOSFZ8JJiygeFxSqADCCxjX6MmpuWWd8Gwh0/U35+y2TPNIpOkr1uB5pGA== 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=62Px7Pc9Wfa37Yp8kwwCsox0dv9QXvJNMbI8fHPQiLQ=; b=ZyVyReZ1chk2SieeemPJQ31/JruwM5HRLOBoHypo2Idy0Xez83G6BDzvIlQdmEgzC16YEyfGJ37m4udpxIHG+2FVnfkmXM+7ptdG7se54eOX7Cye8vkjQ12gcWUNCjaFm3sU0O47fb47qIDZZ9A13za0MlESbQz0Xs/FjfbHFmk= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31:55 +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 08:31:55 +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 v2 17/33] staging: wfx: simplify hif_join() Date: Mon, 13 Sep 2021 10:30:29 +0200 Message-Id: <20210913083045.1881321-18-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:33 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 17359336-8c5b-454e-8355-08d97690e548 X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: 6FhBSh4WxkL2hUFKHUjAN/mNQyi6JnqQufVfgar5zrsjz5E9y1lLyBGBHyntoDce1m404nXlZ9S/zCNgwnnpVBQ08vu/BBMZK4bwq6rN530qXHAs8TcVSP9gDfAmMwxFvHD6j/cpHcx7+8Ecwcc1q88Sn2XkJDSQIlLHxQIl5po56jxtlCSItb70SD9l5R1m3BSRXCGDRg7ACS21Yga3vv9X5JgW8XKPjfobs940TN/NZwS3eTNPfRQO0fRFl6pix9j5Pby8Z0ViAuLXzYwdvYHiW2XpA8TcqnfL0kFJD9TkjJcYyQcs13whPpYe1JdH7XqgEt27iTTAGSyiFKJ3IZhxKgEDYtBIQWKGI/gkcHN04CjXN1Z0xY8/tcesYlVTztaruplDAL9NUoQBjHPbJDCJJWef7P4zP93Ti9+wUL9/c8is+R8HGvk/ACsIp2ZTdZGoiWZeaw/A8abb7wEYLEDIrPxFSCwzeZoR5XnDpXw/OA25w3QoDUhY+t/cxraj95PqnIkwBf/t8Pxv/yQ+cIKPW7VfF7kuOyFZ810VsowYgh4yMmOs0vExIxFTn8bSm37w3/N2ZfCEyceqMiG21E6wkjWPECRBrZ3ycwk8wH5wN/s9l/FlfE6xSX6vO/8ac/rrHEtPf5Qevpj9q46vC0TlAQH0ORugFjoMyEM8j3fmlKq5IEMRDoL1YNAHz9NPvardIVBir6XFFqj0l3FXxg== 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)(83380400001)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(6666004)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(4744005)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?35npqTaKseBwdaYj3L8WwfKJj3xI?= =?utf-8?q?j4Ucu52N6IqMfXqN9+A3amlpmFlo9VeAGhahKErAbZAxtgzD9KVGs+ESoNw3ffH+V?= =?utf-8?q?WgIHyt51T+0ldeEIqqddfzQOQ9UUx0cnR6icdyQCuKXwYlA7LHwUyekN/fHo/XbZ9?= =?utf-8?q?iMZbzjGqYKDRLloG1W6ytr8NIUYQIcL47NiKwwFn6Or454hIj83azUApv0t9QG6kR?= =?utf-8?q?R64TIMWgH3sXuDRkonROqxgwMZoomjFBkoQwKxgurc3sXx/qxMBp54glDaJR558iW?= =?utf-8?q?y5c0Y4ML04qL//DL9swRIchYUZytMBuiHegMPu9wSBEgc1viISlKRV0KD0l0+Nrqi?= =?utf-8?q?TRDXUMsXZx4W/478AcPYvAHCiRL/0nqK9vB0S4SzHiF6jo0Ak2Aj0NlWPf7Ymw2P5?= =?utf-8?q?IDtUfTOQmZHlzLVedtapMm4+dk2GAg3z/21RmZlOBoH+tMYuR0RLVnHw3qPOQJ0nf?= =?utf-8?q?jEtjYaz+rx+aw+mfOP9x4dIGoSOee+yaovuncwwwRGPMnLcekgScX+87gM2HqBKN/?= =?utf-8?q?JkkLMUqRBVdrtfb9laCs6E/UN2VM3+MSpF9V674zQZQnBhCqCs0AYFkUwK8dyYtrG?= =?utf-8?q?U40e0msgzNMyY9PztxhQ5LHL9CRWeNWwD3AlNd3W1DyxaZLAMF1rVP+ntVfGV4GtJ?= =?utf-8?q?S1lpfBTJG53csni9BXsiz3//G0QrDVCzr/n9TuT+asJuw32u9GlnUb3VQsgBRZ5OF?= =?utf-8?q?sjxvXceJVRCtx3uhBFV77VFu7nTPRpXwzOXXFGpRetXPpD/7UCaN5vB2IND+G8B8r?= =?utf-8?q?MU8F2wABF7eyOfal/Lmk+aJdBW6m01QrNx6bEV4z/6TSKzPg9Q9vKWRDPR5vBy9bp?= =?utf-8?q?hIEUnP7w+qN1P8g68yMmXCvOjL+l1wIHB+Y2GgXsp7OqXudPdkEn4aEqk0kjsUp0V?= =?utf-8?q?yDb2Teeqk484oL2CCxZuu6zfvw4+q3Xp1yXBpqjLbuPqXGMofZkzpiwN4BnKMAzPh?= =?utf-8?q?lYCuAJcHS8u/UmiQepONZECFNko0GyIAq05xfkZSXuwEZmql0yH7j8xi2tuEYelh+?= =?utf-8?q?6s4gMcRPo8yO+luNz7ZhkdVg4CtLpTWlMr2JcrGxwcHVMuvpwSFl8bSk8X60M2nL0?= =?utf-8?q?VomczO96Khw3/OOUPv9ixolDKPEnDfUAQfawTTG1IE0itATk7zOpk5esgt1we7v8/?= =?utf-8?q?0NW8VwV/qVGCKS5sPZX9ZA2PBJGgoyNXxZM0ni0LhIUGGsyo3WU5LChAJo+hhtM6E?= =?utf-8?q?LZBp/UaHUPEMCdyXPmGjN75By7EoQlsW5lUrhljpXk2fRRkUicHVFrKyb1cMeMtKN?= =?utf-8?q?krQIX2sNW8sLFmqM?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 17359336-8c5b-454e-8355-08d97690e548 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:34.6367 (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: +y7i/nbSx6JKFVod8ZMoKoKM9qUJ2ubUotPsu/77bOeuD8P0kNzFJkSDZmb0GB/MZYzwPZZn+oKJE9VLP0aOKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 6ffbae32028b..aea0ed55edc6 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -306,10 +306,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 08:30:30 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: 12488237 X-Patchwork-Delegate: kuba@kernel.org 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 93BADC433EF for ; Mon, 13 Sep 2021 08:33:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7B7C86103B for ; Mon, 13 Sep 2021 08:33:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238580AbhIMIfL (ORCPT ); Mon, 13 Sep 2021 04:35:11 -0400 Received: from mail-dm6nam12on2050.outbound.protection.outlook.com ([40.107.243.50]:38689 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238591AbhIMIee (ORCPT ); Mon, 13 Sep 2021 04:34:34 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nZq3n0lO0Fw7ai2oYzJ48xxXpAeR1AIzJFMnBMlVj6JjblX2bF6g3OEs4iXtsDSkon6z581CBXG0j/HnxVQxefCnox2ZZjPUavd8yGX/34IHEzlZEBtPCgwFFhVS4/bYh/hiI69nOgmRQJQy2C+dTlQkVeV5PVQWOwAzc4oEnpPRPw1xPA+U44QvcEmriwy3rjF8oLz/KGfE0lMy+mvIFm25pkDNCFhtXTlhv7Bi/qBZiPg+9tBJXvnWAKhcsnnd5spMB/ECDcxjXaJ0npcJ6HLjZaOW2EFRSwzxugWDlf4DOfJ7kDFzOqUyk7B3lqX3xAASWYqYr9B9UZX/6AwVvA== 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=bZDxxidLZXheAYUlpH+bC6X8z8+MkHZTIlrLURTmgsJOYeUtWEJe2B8HvPAxhdeEcCm3xYCVSIX73Dk28X8OGF9HyDujAFZeftbsVGWuKZnXhR/Jw9yaSWfin8B3gD4wH2s/UOGKPG1emn162VBwKXudOVDXL4+08YjPQNU3l+I4n1+oRvJBzyntHaPTECOo+WeWnHtVvKc7RTaPKiPdQMmQnlDnARLKa0XRDdhezN2G4o9sTLbjV+YWenjk6K0gAEQh5S43Yayr8trgOwnRFPvuD8R72QsD113sg/oTTF6Nlrmyy3fk6I3fFU6O1YWWrQRwvKwyvvDM5K1Ohrt2Zw== 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=ACCQEBzXWCszHiTjNq9W1SOMZP8guPpVHTtIOPrTcs2CrMxLQCUaW7EWf0oOdVYEDdNLD+ETnVel05jwTMxyLhxyW251e/hgK6mRkwLQ0IFEaPETAySKLo9h45CXTA30utas7lZKQVfMtDoU8XNa5lP0u2N7l2N78fqI4YpAE70= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31: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 08:31: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 v2 18/33] staging: wfx: reorder function for slightly better eye candy Date: Mon, 13 Sep 2021 10:30:30 +0200 Message-Id: <20210913083045.1881321-19-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a530b546-4bd0-4ca4-20ba-08d97690e668 X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: O8dvUi2QX+uQC+iECkKK2bmXX/er2kAcYIjH/r9XlR/JvLaDrDzS+HG2UZuqvA7DQsoXKiww+rYimtSt5rhiRWHYd0Rc4VPh42P+1hq0lzgm40t5RSKNtPUThPklImYs/VlfwwHpjD8rzOcO6JNO4Aqm2qwJz4C4cs4EpvSJgF1ywaHwlaAK0CHjhvrdi5oPh/quKyBbqMlGaE5tw6dm4ERwt1oas/1UkR2Ja2+WiVDr2LzalLvAf93+ZG7xO4tSTn0KNWosNmWRhZ3R/XUDkZ62roHayYTxMldkCs8rl7ihXQaS7mCahT1Dpd3KnZk97iIpCaLjYAmhgh8pV4+PNKznu9IEX1lDBEPSLj7AWupksdR0kvJ5Jr+CRtx0zUxK4+V7bRXJZ5uj2Bm8C385aDhQD/su/612ay7fCcoxEnaJ63sn43Z5oFGrtdSXAkCWeKpaTS8d3fHIgFlJgsYhQwl6jP9ZLqVb84/Fw7eOfe3Aq2T8Piw2NFnIfkKTeGnE1Qp55dZ41YnG41LHR5TfLZzW2jAnB7B53nAxcRwEYz6kTRcGcgrPeh5cF1cQk0Ykxyhf0BtGu60Z8fYl0YTP8MIF9ihhUYASjbTQgcfn4rFiMf6FosuqunKRUymQh6j4D3soqcPDCDeZ9BJjhbvAnPKenYhzm8U49aHTSDwoN0BsoM3fLvxaMtn1hmiwYph7/HtPZvREPwg2UQqwJTuP1Q== 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)(83380400001)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(6666004)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?v9FtgUrTNX74PNwMnXfbZRHSbLH2?= =?utf-8?q?y18EoS/Ob7CmnSTplRlWG5bNqtBwKFoSU25UdJHd6GB8qRtv6eYpQXwtULceaCQSN?= =?utf-8?q?LK/Aqsl46TkEnU9uQ3E/l8bf2QI1C11j3HaAa3gColBWeyx54eIwA3H0230w8wYnB?= =?utf-8?q?7hshP5xkIexVEkpQZZVdmSKNFwRsWTA2ksUiJRbw5q4gzIbGhOarvCwWpXAk0Ydfc?= =?utf-8?q?REhY7ffCjXB+hOQb2SSnhicPPhQZGhi2083TktRkXPog+MWocvP/1puueoJj93NVB?= =?utf-8?q?YpZYhLMPdFaj/I+XnFNGIYoCab6EWslKbjBeFqfIQRvDJTvPwucnQ45VfTcEGew5z?= =?utf-8?q?yiGMR8u6uqw33aDsFBvzVw5IW3068C7Kgee9D547BSKSG3lplwsWcRPx6Ov9PAfLI?= =?utf-8?q?vgxyjHlmXyCIRy0A+qiVdv11p119E4JLXBkydcWMxVuR7J5uCzSRfEw5BFG5dKUmO?= =?utf-8?q?8o8+9jAqgHhnONdB6cMxA7Th7F6/ZpQYamNoZVRMpbFnBN3hkN9jHZ2xcYCFZ4un3?= =?utf-8?q?UyzWd+pgj9UeBe2cJUjf0FbE4QAwGKIyofYnHMB8THtIq8skJuJ8iIDMeh9Uhn2lJ?= =?utf-8?q?YqhntVlXHkuIh920gu6Mn9T6PGqipXvnsEPw5kiLzdbbnbA3VGs/eVvJOiCjNGk0e?= =?utf-8?q?yVS7/PW56jJfu2rECBZ+1o3RgPiZOOuOIrulexkQNVCvS+PI/pys0LWZSh0JwjuOp?= =?utf-8?q?bM2azV6kf1dJdKPOMosFCFYMC99uy/j+2zQ8VJe/K0NUY47IKXXTnJ9Exiue5t8YK?= =?utf-8?q?nRVsQhI4jkvvXZefv9N0TeAaIlHpk5hKHfnKuDn94cmpq8TczHKBXRq+OWIXbYph9?= =?utf-8?q?4f1rSTcQORGxuLpAye0OIYJ8pWuU137eZ/ZVanjWeU9XVyOycD/fKA5/m1NQTqByJ?= =?utf-8?q?8orMLAX5vmzcDNBQdE2lKgGppmU2VR7amDqzlkAP/1Bc4P1Q5Ym+Z6/2Mxc8TzfEo?= =?utf-8?q?cufhkCs0aw+4A1a7CTxyDgF7uM1p70QM9QADbdHMD2qDQlRRDi7Eswy4aDtLjDnBd?= =?utf-8?q?qpCpY6LekaDkzX2vz026MrDTVZTLOfOm0nwOX+uLLn6LNIuIlXQpwaw/QxoRVQSd3?= =?utf-8?q?c86+U/z1dbCLim3iuEq5bv4qz/wO/WR3Ggdc6Fxl2JMXwqusKmULYSRwjJr0d7v2a?= =?utf-8?q?ZEs1wat05Sk6r76tsRRjexetKNepZzrN7wfDrpwKn+PHtLhc9udsqhfGSNamgdarb?= =?utf-8?q?OBJVNdib2KceOIxQa3Q0jMF3dxF0VPp2etU3bhxSQFn0VuKxqm9jYIYfuZfXNSmrC?= =?utf-8?q?f6Mm0VHjOj+ZzXft?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a530b546-4bd0-4ca4-20ba-08d97690e668 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:36.4286 (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: oeItaCF/q4GGMJ15KhR2iRz/GNRbiejme+D4Vjvo8LBU0M3E05cSNkY1A3jbyCuJFkwUVPpS9b9OzapPFK10wA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30:31 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: 12488241 X-Patchwork-Delegate: kuba@kernel.org 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 4D4A5C433EF for ; Mon, 13 Sep 2021 08:34:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3560160F46 for ; Mon, 13 Sep 2021 08:34:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238347AbhIMIfY (ORCPT ); Mon, 13 Sep 2021 04:35:24 -0400 Received: from mail-dm6nam12on2048.outbound.protection.outlook.com ([40.107.243.48]:60019 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238401AbhIMIep (ORCPT ); Mon, 13 Sep 2021 04:34:45 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FKY8mtkdZHgS6gq47zBdF0/IZ7atbN6CKmYQP/uUrJGxq+GSdE8IobxbKQTLskhPhJHJoZI32XRG7jvJmCapxuC1pUfg51T2OqG4T4SVsdiF1c/CFRi6i+2oTrxu3Pd0zelu7lVJFUSQ82KZXkBhR8PQM7gBjHgmdMMQ3uYZF4O1R4DnvBu/bHe2Q1nU1lYN9zgzu+5fY3P4obYzOH7ERwY5nnokNaS1TmS4JS8YzAHL+ZYE3I2U4wnV1UutINtQwvC8OQYnraWjnpw7RfDIjlap2d22PZgX4Pi7kXDrAbyd7d/91RZ0va2m8ndXFOXg7jqJZXAh5s/e0X0mVGhvFg== 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=H5IerR+Cw0Tp5MGR94md1dBoib26Ap/rQLcMMdPeErRj7dm7Et1gl8Eo6OleA4DZFJkZFQbH3lpGkyEIRlQhvSyrYjifaJkOlob6aCSN75yiSd3u3p+pH/28Nf0IH6duTXmQOXS/+ADwl/NEwKKCPEc4zyeRrSVRKWQRoXhKXJe7VNmErRwXjqb4APBzDargnAKSpIZeTsI1YEkdoAhG9uAmAEEqghDp5ODIjnJ1+D5LPkoq5LsafhmmxsQMblLodBqJQJQpVOze8fQMxAmlYwZzaZwxOPaecct+O1Dsqawb1AD4T+AgPpodEtagrRRNKzGxX2HugWM6znJNOQaXHA== 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=e6lSDYWh4WLVkQ1sv1ZpPiUPH1XR4Meu3J7GCTAt8FjxzBS6wNd9O1GygGXnJOs0Kzp9VFVGYzIX/EfHBS3Q1SWkmr3y4OnK6huBJQimkmZ0k4+A9PZyhPZRCYI0LwTnJ4l9DQ18GG19dS60k7vQJV5iDtyXjMKrH0LxK8YAjbw= 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 (52.135.97.18) by SN6PR11MB3263.namprd11.prod.outlook.com (52.135.109.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.18; Mon, 13 Sep 2021 08:31:57 +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 08:31:57 +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 v2 19/33] staging: wfx: fix error names Date: Mon, 13 Sep 2021 10:30:31 +0200 Message-Id: <20210913083045.1881321-20-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:36 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 66885a40-108e-410b-3006-08d97690e778 X-MS-TrafficTypeDiagnostic: SN6PR11MB3263: 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: P9eBg+VHhT6+MQiut6ga3YW0TKoAHAzuMnuT8soVKUo4AiV2xhuKncdd1lKpxzH14LsbKbKD55tPUFrbhR+vO0dNl5YGinAT952rl+32V0AamDEInw0Eec+zhEICB+JG7iHcUHZ6TlUxldezXfUX974Xty4osSBl65ZlvcaPcaPEbb9AkF0wB2wa6tbTAVZkTm7UMXde/han31tvJ9vfbMRXH7HBgEtgoWe9grgG01RyGmb15aVFqhV+S3m5AiTlS6LPuPHxRgP4T9MlzSs/igGUtjEh8Sx5Us7WGA09Y7NVNi0iWYQ5iqf5cn7qFxmT6lKHYaqjxatLnMl50neRNecneh3I4jSkwjJlQiam3h6pA7CskXaW1D5OB2TCRrItT0z8btbP0FEl6yVeqQ99A588otZd7hPOuNul3lEwWWqS0YFW9yGjW8564GbecQT1Ox/AUmQXurc32KkpND8hf5iuKtLSqouVl1/GVaEsbR2uTIe0QdXwFWeFF12oCNz11kOOWz/FHyleOJ8j0hHFDyFF5UDpjQtxrB+bPIsLmuXrYX7tN+w/xqdlxiOW78fen2g4c9iOFs7ZF3DpGMqIq4gYUKsiPHWUQfpkTGZOyKX9qjJ888D5OjFc4mzeW793xpN8fNkTz3bqw7ciyvkcy9ER2d3kVuJOHybj6INkdYjcJ4zGzEBTtBycQahhCmfvU8V+vDLo/0iD/Jaq8hRJtg== 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)(83380400001)(66574015)(107886003)(956004)(2616005)(5660300002)(54906003)(38350700002)(4326008)(6666004)(316002)(38100700002)(66946007)(26005)(66476007)(66556008)(186003)(8676002)(36756003)(8936002)(86362001)(4744005)(508600001)(52116002)(7696005)(6486002)(1076003)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?lF0qJGvOBIAMjLiRNn1fQCzKtmSN?= =?utf-8?q?oFIGVFBOSJ6oRpOlJbiHw+DkyLeDZu2aG4+jsBDP7lChCGGqjp+EX6KTbHuX3nT77?= =?utf-8?q?eir4k534jANWQUnHC0U9LRfZZDAa1U6z1HFnjiywsS7WQLkd7Tbl24tpNtdGWw2J3?= =?utf-8?q?UJCBAF8MCWM+Wiwzo+pHESRiPRwbz39Xxi8N0JeaagJq4/5Bcg8JvWfyVM1LgN3Tj?= =?utf-8?q?rWNvdNSIX8yzql4eBsLWkfKKO2GyE4IwtVrkZAxHla3oFBG0htHWNmXT14WmLa7vY?= =?utf-8?q?d1pUfpa6Jho7cnJR0EcdGLWA4QlOmbn8R0SHRd73qcAZWc2ig0BCE7w6XeetAxFTA?= =?utf-8?q?ZbENB2GVv1CJs0e6INF0qA5IjMGRL2NtvWtBYMBa8VhPBWy/J4mffiRmWfH//U+9N?= =?utf-8?q?RtztlJiqGCgg/tbCa8QjTj7VFHCY6VIBchFHob1/zrSxQ321t/9luCkkgr406uaK6?= =?utf-8?q?/oxj7O5Q5KUwKvl9axk9upcwqI4ezQRlLbzuEftm8u3pXuUWBUvsGdZlw9kijmkPM?= =?utf-8?q?UktjbvEhXeYcJwGSpoE57rJhBrsAU9eLVch/6OIIIbP0KKl7c0y/u150vca9+sSI5?= =?utf-8?q?uEttqnmr0i8pKxUqQ3nzqyGWTsSifOja4Y0ZAyRrwl940KgvbTrP6e1qzlg9fyRsx?= =?utf-8?q?Rw5Hto0sGdj4vFGycyDBYUME0c+xf40PdJGEeu6c7hVNOaDrVvzIvKeCO9OQwfZcu?= =?utf-8?q?bvuF98XaVspRE7wdPlklVVTVHIV9UI6W44DY3LWJCNeyzjxuJbPi7FB7be670mvHG?= =?utf-8?q?pmb0Aoy05niCyvR9XKIUGS7qLRzN6g8nYrucr1aGnGJIRRWGLmNruTLhS5+xgbnhv?= =?utf-8?q?LsI6mwpUdm3ttA2l9nKsfFN/kVPeALMz/qzI9TffqmYf6UxKzVv9r0zvfr27Mq6Bk?= =?utf-8?q?AhZECRO9Kr7pTLuUhQCa3onbvEOm1nMybJ/2Ilu+5Qujcvj7b2/FKBqe0+AEaQmQt?= =?utf-8?q?EpER/o658x4R3C9qHcGrPqqhFUHVuwlS+ZV2OPA2AMDmUcOozMu00Xd5JPxJbkslA?= =?utf-8?q?SGB2mBAw6ZqLnhhh8zVYgoROHTBvm4NKwk/q0gynZpz8LFx/ad0GPHMLZyx/fDjKo?= =?utf-8?q?3Xntv3GMkdO6a1my/+ld5W4DuXdmc64W5tPBCgFpOsmEUPG0TaO/4P+fLFftgHD2Z?= =?utf-8?q?/j0CTDALQs11v9mqKBHnuBklfgAJGp0xOGa/f+0dFbzIDZVu7ZGrss2O3akgoQAYk?= =?utf-8?q?9FGSmi1KQ3Pz1SFEuUeXaJWrhDQRrJfyJ0GAtd1Xeo+VixRYA1qp7hNlC3xefRSKq?= =?utf-8?q?GNV5M9DJDpNqyE6R?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 66885a40-108e-410b-3006-08d97690e778 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:38.2936 (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: zuloeR0Igb6puEENPHew0/pfdqu/buQ/+fBV2ayDlfMVYF+TxlA4ighQoqIB2SKeFCi3PR4bmL2QK1QepCZwjQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3263 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30: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: 12488295 X-Patchwork-Delegate: kuba@kernel.org 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 66190C433EF for ; Mon, 13 Sep 2021 08:35:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4CD5160F46 for ; Mon, 13 Sep 2021 08:35:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238344AbhIMIgl (ORCPT ); Mon, 13 Sep 2021 04:36:41 -0400 Received: from mail-mw2nam08on2066.outbound.protection.outlook.com ([40.107.101.66]:47168 "EHLO NAM04-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238166AbhIMIdh (ORCPT ); Mon, 13 Sep 2021 04:33:37 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LhYEvV9zTkLOBDbHJp24P/22X12a3MyV5YAzabNMy5sfu1cG/1DHzmVTK+YKOimdcSlzcmI7+ecEWbso/TqKkMTiXzEJyE5U2Mo1D/l9n2Klzt6UUge+i5aimNJXQEjoPaniRmLerBIo5TWckS2KA7rodnchCqa9PoLEoxNQCGjw4DiFRx9kkFMWCq0cl9svQ3Q00RpF5Hx592t0F5A7mmXJQ6R43gOxqKoUdJOJ13kQqml+mQxRZDO9p/F1V6Uxs5hGTTA5F5Pu9tqc/dQ58cxfAP5hQgS8YqJqzKgclE/4AC/MpNxcYQ4j+4uKAo1aO2nnyvNVW75NEunHE9Ql9A== 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=bIPqRwJFsy7kbgNrQM7Yv5BC5hRMTa/tubMYp/6xG7Iv/6Y8i4Mrf0oLH7RcATNqoVxiTnWAZYUMy7GERXB2XUXPrY56v8UwWb9IWq5yAlLkQiMaLh3iypZhuzq3WtkqCPOohQCAPgQ/V+FXmQFrxfqH9TJAZnb+Ydi7DJBt0qBn3j665emvrckg9zqqRG/2N5DDX0z9zKo8WtOj50DR1CW/opWOxe4ibuYbJcjRCsPG3RHCV8IpTP257m7hj6FR+D7f6rRf46vQRSSb5y5ySZDfPUL6ptcpY/OoPf1Qfrelinlc//ELJzayPc9hFUN09/1fD4ZwV1lswD6P4eg27g== 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=B/zYWNxA5yAtz9rVVVvkcfxDEBXmCvjaISXsAgaMWorNmt0vbxo9HoEhAvyp/mlkDqHQ1RLswvMv9sqP44rPaA5l08F5tGeaRRen6vq8OQEgvF6pqhct6IAb4Or+5pY3d+azV3aJP6X3Ov9TSWMQ/Jz6tMoflejxC8dmS0PgHZ4= 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 SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Mon, 13 Sep 2021 08:31: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 08:31: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 v2 20/33] staging: wfx: apply naming rules in hif_tx_mib.c Date: Mon, 13 Sep 2021 10:30:32 +0200 Message-Id: <20210913083045.1881321-21-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 812a8717-129c-492b-7668-08d97690e89b X-MS-TrafficTypeDiagnostic: SN6PR11MB2717: 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: EuyBiNLY0Uh5N3S8FzWzHdCaTgQlknPsmC+6sqTO1WsJw5r7r+QJojYenBVNs0Ti82AxD9I9Wiovwg0LreB+yuVxO4e1PsuGwtF6IEychsy69u9jY5PNIj29oOUixk9p4EBIqU0BzY6myvSVAowRjUeH7IU/ZbWyH2CQckZUYneZ1gr0oh3Yp641IwH+cyAE8VWE0sdOgqJS+Ws8Xo2cCAcus0GLjHyCqAoYZA23Ze0+XEmnPjk8I3nkP1zrQeRhbxfAq2/XuIJSM9PIN2b0JPBqPgIvEDj+ZESNVwb5flyv976fyHR0JQm7w9F5uT2zENI0iNaGZFVHNbF0Z6NPUn7lvByCSwqu65BLKqUzuLfiAjXXnDYPojokwxdX8LknUrhLkTcbpGgaWpAig6jzYiAMqZdoTwcgFJ/fefOssHhr584ni9f6xqR6jQ4uxbF8SamwFXTkkZ4EWmZSqD4Q8OSIXra9GCMF2Asyk2q4Gn7iD9R2PL2m1viW9zGz4lMbCRdVJf9+Pf91p7ku4fnMWCRd8Bg9TeFZGAcZQwwbJWTyqoE4NWoXL71PEWxyqgku/qc70QlQtMOIWDnO9EeeUEdvWr9xtlId6LelhoONozNMNJc5SIlHwyXyDxzq70ebK/bm8HpGEqdf+9htA//5n8SDMaxE0eN4LH2Myjk5gOkRHhGkLCxkGr6j8fG3QvgBC586yQa0J95ts+YcPHGJRg== 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)(4326008)(2906002)(107886003)(26005)(66946007)(38100700002)(52116002)(7696005)(1076003)(956004)(36756003)(316002)(8676002)(38350700002)(186003)(8936002)(83380400001)(54906003)(66556008)(66476007)(508600001)(6486002)(5660300002)(6666004)(86362001)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?CUSy+PHF29tihULtQSAnaSfDRcy8?= =?utf-8?q?cT6qCwL9LSHJqkrDghcj4mNTWHKGkVYPY/PyRoipVgDFegXizFBdKIadJJRSVLykU?= =?utf-8?q?jwaTz+ADZ/Xh4BWWBCuCNtXj27U2V3QuASigk41uuzmXmr/lWnpeK5xj0ViaGFW8w?= =?utf-8?q?O8iOQ/r/uPBf+sXFGVn1ks7Ywm/dxw7monBeEcBcWrnWR1Uqe46hXTEQwhgwBpPFf?= =?utf-8?q?gjQLO4ALEioQ0I5gVDJyoKIWz7rJWYWp4LR01NScnFaPh8M7fpvuRP3KIeO3fEOL8?= =?utf-8?q?4d7KmJdnjcp1lO1a2ctwRZrkmJyOE2ODed7wQdkxGKrAoPtMOh5QYgzXRa5q2q46B?= =?utf-8?q?jwOdJnXq4R/jCE9k9a6GbMqhdAtK7GMe3MMyI1u5JBnWL2oFThpGdm5wEGwHdZSs9?= =?utf-8?q?SL/xlJjCtHazDreIYXb9y9IXJSdKQxWCc2sF0SxFTYo/IGEzUwtH60hXFhDr8b7LW?= =?utf-8?q?1I0c6GDTLEc8A6NRR5LAjeWTa4ZBYfv0kZbn7ehnokLOcekArXytS5rJ8JFNFh/8i?= =?utf-8?q?VD8caG11qjnHcVbujkWxob6UU5vB8cyC+1W8bI4GWJrTSO3aAq0uJr3obmnz/nyrW?= =?utf-8?q?eP5qz6e6T1lJ9v0EqJUS3mb7BNTskvmyEDoscXZL7RsqG5cUBWKLUP5bv6pLIrzCG?= =?utf-8?q?VEhDSbLcFkF+i6F3AeMC9jK0pg714buZViklxr50FlWr/ZyC9YiPImrEvNDbyOQbq?= =?utf-8?q?2I1cpptGQVJLf4IS7JHk/Ok6OQ7IShIuZ15jzUY+7rMWp2Gm+IiJwmHBcJi1clZKt?= =?utf-8?q?CFU0Tr7isSQrXHJ2WxotwxuACGDfzw0+sH1rkpPY2eooNr6e3jpoLwiFBFO+io4pR?= =?utf-8?q?6VlBP8hseOdZvoGexucnlfckzjz8aZRyGBMUqBmdgugBeQo/Wd7AGd+OIEzxBJD/b?= =?utf-8?q?Evq5OSX6oO7HAdJw5hi7lRYmatl/WkpmmNuKspetliHFaXGqL72BlDD6piOgaHYto?= =?utf-8?q?jld0e5k3KhyzRrontovjgvNTgScXup5N3pqQmjOnFuQRYZdvttEmMateLE8R4wO4P?= =?utf-8?q?jUTinulSRETbv8/9pl/OYvryexAbFJGh9DJZ8IVxglWF1NYrnymzsLLShEWGRgBaG?= =?utf-8?q?3uwN3Sb5Ql0GUO/+TqPzGeEDNznVQRK3dxLgITQyE8Jl73ks3z1TKxWT5t7miQg98?= =?utf-8?q?U5QG9jLSkEbFAiqP09cXVNM7jdtklRqiGh5aZSRc6e3SbJ79J0bYPLgLbxQvq4lQu?= =?utf-8?q?6JybAy+JFFnC1UxMBirQD0P1RurN6t5dFl7bEL6SnXcqZCF0KDpwn09lcE+ZOdwtW?= =?utf-8?q?RLFGWlLLm6etVcT1?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 812a8717-129c-492b-7668-08d97690e89b X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:40.0545 (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: Zb1ZcbmvDkFdBDDhrbVjb7yGpe4hgKHAOHIiyTD/jftewXjW1TxXr/svm+ggk7uvFMTmxm55vyBpCBgwMxAxoA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2717 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30: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: 12488287 X-Patchwork-Delegate: kuba@kernel.org 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 91AC7C433F5 for ; Mon, 13 Sep 2021 08:34:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C59C60F46 for ; Mon, 13 Sep 2021 08:34:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238356AbhIMIeG (ORCPT ); Mon, 13 Sep 2021 04:34:06 -0400 Received: from mail-mw2nam12on2084.outbound.protection.outlook.com ([40.107.244.84]:62366 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238265AbhIMIdT (ORCPT ); Mon, 13 Sep 2021 04:33:19 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aMtLxSlBkwhKdEq2mkSYaYenzNfBRRjdyMuln2TgjKS0LnSnpNstctSWgCtbukKqbC2h1PV4bLNj6ZelbQWzEuBfswCeIX2PjiJS47yCKPrr2+XVxshD+wLaopmjODaV/U6zfQVWvD+h5ncRu5aneujYwAd4WwDfYWNKE/g/f7th98/+bWu2gVrAtnL8BLNmyd2+p7damn4NNeyvWUeAU2L+LzhMbzkEghrK1vILtzGMOuVuSWawERIt32xITuKEMDdqFlcKlxfdd9Xygh4sAmw4Di+0swxLxO1TagNFzE788NdkzCvv5C9bdNBk/E7xFp7yP5jS+E4tUuanpZh93Q== 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=ORTlXl5e7l8t2oTpJBja2pVMMCVotv6lCGq+fAVDky4HPQ7z6IpgNp8yGRXzC06AkR5Aw/DjNvZ54UWN9WB8GmJ/GLUNif2P6JAylmmUEhEoJkWSqRspsZ6BkpTN0ssa3X4JohUprDiGm4UCQlODxpi0TJz/AAScveZLa2Eq3gM3wNmVTrMmqNQ1UF6rkMe0Q09laDSUdWP2fHm0xGZ5mko1fdcWVtyMEP+UvE5vOFDxPLbLjTIV0/jqQEjHhYlTNnaLDzPA3efgTrBZ+ATxjP7OJ9Z+tfCC0czsugsB9xOHaEpAUOPJbd36BP3CnF6Hr2/mhmtdBKfQ9t01Xjw9Dg== 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=kfUwQABpihYsUrpyYO7vdylGzZwQ7Mwy5uL/FN7p4nGWYoYz8UuJXfCYhPhTFBgeN0Odn6QXUI6OcRq0Htd67/UFUpo/LmN0ze0cAjzb9+PRTqVx2fHrSomSQTcQR7I5xHfGb1I3gJigAn2Vb2CdI8he2TOoRrdrqTMzBd+eTuk= 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 SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Mon, 13 Sep 2021 08:31: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 08:31: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 v2 21/33] staging: wfx: remove unused definition Date: Mon, 13 Sep 2021 10:30:33 +0200 Message-Id: <20210913083045.1881321-22-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:40 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 39edc353-aa0f-42df-cb79-08d97690e9a6 X-MS-TrafficTypeDiagnostic: SN6PR11MB2717: 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: OoDPjuSa8oj5fqyU+OVS8QlXQQ/HpMNuuhYU9ogV7Z0GwQjKqZaKtZkgwbLTVSS/8uD/dCkY7jjSkU4MKFprwiMa5MqF1josQhAksRgBo/JODXS6F3lGTwTQgGyIkH/GmMcnxYAzPpLPnY94fnfpEH71XZabr3HHnowMuDT1wzTjpq+cNJOdJr6qVamfrHtW9AC5oA9wUQYHrQ5ZkVpURDKY5CRMV4nTMnnovebBW5bv51FTTavpMCHIFyo5pfi3c9s2lTPqJws8xa8SInpGdkQdAYlIsa/VokD3cZc3IA5iaxcf9RN0vCZ6WwePoBQ44G5yDYEyz8kLVHsM+P0y745sfVZGWnFmm0Wwv9oYD9UL80cccjjiIFNrLjVCf4ki0CmKaJsbp9DPVuirRUmZv8aG7q8/OlipMr2Co6p2ARzyyqML+TKntVrT10KFqptJCBpgupQMukyf3OGbNXGjZvlGeTz3dzetNwVsMPdTjpzFWsMed0IhI3Rte0V4A8JzStUnntmYuMrV80rOyrrX4UGLUurZju9tPhlGDBODCtvKZkPAXVQrvbpUi+CFRDbdTCXv1ivzm8Vmk/z/SpwN5JPoZJpqH+G1o4YjfwU7wNK8IUf1UGeckuMmYlsRAB3+oeSNgN2IvhJ+EJKNgo+eVo7KOzRNWo/ZR+Rdaa9xiyDnTodEcuEcJjqgiza9zR4K 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)(4326008)(2906002)(107886003)(26005)(66946007)(38100700002)(52116002)(7696005)(1076003)(956004)(36756003)(316002)(8676002)(38350700002)(186003)(8936002)(83380400001)(54906003)(66556008)(66476007)(508600001)(6486002)(5660300002)(6666004)(86362001)(2616005)(4744005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?zC238Gk47QiLeV3ID9Mguu+nXVwQ?= =?utf-8?q?jO+qrIsJa40QMDxNtpO40LFjCyb99Op7WaejiFGgzN5Dr7XkOckVuHp2FGIZtH3Vx?= =?utf-8?q?bUgEREzRW2L2L5ZtP+jGufcPb0/1ExAJvtUWc4mHC4yEQ679lXvRw46/YNPYoecRS?= =?utf-8?q?Te/MNBeh2FAOylC8H5T7yWP9i9O+Bc5euuvzcmsymNAmlo0BHggeWgDqTp6P2v0Ct?= =?utf-8?q?nVcLDss5xHDsM5lkSDBNuqZpe0kMWe2xnn/Pq2eccrmXQvO9c9KFYWFQqXA8orDlr?= =?utf-8?q?l56wxTf3AK6kjPvi64j0LMWIgeSmNvZ744Cq01Exz+0N4wIKj4MEjiIl5p5FhVXQX?= =?utf-8?q?4VScwah91Pea9ApApfwhyNklKYMngANRyNx6XW7nQ8K/6EwSoFgTlAfCtGIHvgr+D?= =?utf-8?q?wIuvQLLK0uE1OTG3xL/8+2eNh3TvxMYcO9CQE9QN4cYQXxEcxSRZjVWlhJOSpK3fO?= =?utf-8?q?LE/U+olSRbyzDd3kf2vaRLNELl3U9BXfPkopUD99v+HfA2G4IWci2DZdgC+qKVGcL?= =?utf-8?q?4TM6+nI0S8g+JflrfNY8B5feb2lgR3D9Y9Kyp3ll8Yb77NU/MOFRtfYu9SxGzXoY5?= =?utf-8?q?Q4acH2VL8U5haQj0xgGRjakbTZRBeEyrVhA6/u+qFRdN/CTkMubpKFt+gGDEB0igV?= =?utf-8?q?ubZFkHlduRSGU2MHH3da699UbKVApNULzx2YDa9D3sXq5B71rS4RcXwNwraCu0Cp1?= =?utf-8?q?kPPMz+sPPIKAttGcJljXBl/G6epinqkzOHNA//B2Hp2+vNf1LAVrKz+qs355cyWFM?= =?utf-8?q?mFQDr39hQyFNHoTit84rlNAjaJPV6nP13Pk9irMWN3owRL6Gd3OKU2D6WSGrn2Dms?= =?utf-8?q?jHJgXh1dOV5OvQym3u8ObuQ5Oc6spBkZhuyd7NP5/NbbpFb+6TDw9Cwl6nFad2EPi?= =?utf-8?q?xabKUGcLHSalQ1lJkFeRNf09NnbahjOSGvCY3ybKQlqMBnMgtIIci9mcQaDY1NMmt?= =?utf-8?q?A6voxkv13N7ckKX5AqSqCQ7M5tOk7ipaKOrlp3mOqdpsFA3u0mNWy35Nhblw3SPMM?= =?utf-8?q?vNM8+QaZLPCDt1TPfQZEuctAhHkl2K1f5uLFU1e5NqanSwu97bbI1ntKQu3qlWF39?= =?utf-8?q?Iby8le7Iu83uXs+tNZOP3MPxK4d3bktfNZFIbPaSqgyNhWvFkdzM+95mqrS2WppZC?= =?utf-8?q?+Z5wP8K5MecjgRuKZsvQtxST8kmjqIoyHjT134fOxQJx4uLssbYS1FwKO2+xv1Ki1?= =?utf-8?q?LUisefnOBmzZdzYTtVaWJpbn/A0gHFUNsMeKgtZ8Nd6x5tR2qOJ9wfqFilkVpfoqP?= =?utf-8?q?L9djEHlbkmFb/Tz9?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 39edc353-aa0f-42df-cb79-08d97690e9a6 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:41.9315 (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: DE1ceCGjKWhNW/SgS+w5BfbsraWB5IFux1qd/vKpePKj6SE7vIhBXFn54qfuFSqTk2tBvhAd/jrFTtwxuRV5oA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2717 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30: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: 12488223 X-Patchwork-Delegate: kuba@kernel.org 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 C7ED6C433FE for ; Mon, 13 Sep 2021 08:32:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B249B60F46 for ; Mon, 13 Sep 2021 08:32:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238355AbhIMIeA (ORCPT ); Mon, 13 Sep 2021 04:34:00 -0400 Received: from mail-mw2nam08on2066.outbound.protection.outlook.com ([40.107.101.66]:47168 "EHLO NAM04-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238153AbhIMIdP (ORCPT ); Mon, 13 Sep 2021 04:33:15 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dNLBxbZampHeIvpKS4gt6Sf5zdnCyIPOZ+fFhLxpRW+7H5aLf7VMnHwbN9ENfqfg0NQ/uFanCw7dPTU+pXgdGyMgoEveR6ashI5HotZzR1cAzp9BcicreDs8aMvRzW/RZvDDlinGlXDhajAABp1aGWhEzkXFb5l2/I6XDoa3ylxRL4k/aYVHvQ/+8lMMi0TKyX2B/xeoO32BUdzYb5wKKFbANTMPKJpElw3902Rqr7RO4N99H4oE24P6Gl0Fp1BYWJLk0CCMaJoZvsrjSzrVA2tG8Aqj/oxSu9BbhFBRrSWbAFxNhBm/oEWY3M8j4poSUG2MpmXAaljyr2Vdfa85CQ== 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=Iv5sb7jRxTUY6DW38gcuIaBnoIxhYrCv66hUu3G2JGf0QpkiIgTwByBBHKhSSMhZ10yemEfGAjuD5pOkIiubsI+MI6WIC67+RaU2agEfINj6f1cnxn53yhlUB1tFmnmUOMpUmsZdVOHWRwDNl3ENP61YYEpLlSHxkc3ubeIBZ5rEt5OBNoZpXL83VsMRURvFmR5hLY88pmbuT1GBVVqlkH4ObJK3wwpkM6wYmKYtpTrgwOjgqmljTXF+TnzBQyb21zgglIbJEyYseJ5H7oONID54/2pbm64IAT9KOGFhNEXQIjIJBiKJFJMlZvfMEwuFLxhyzG93dX0U18B1EsQ4pQ== 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=eEOUXY4cn6IQoinINZWs+KYsa39Up77a7R2kojTKjrShbjLuB5S/nyXmBXOuvAqHGJiLrb77dsw8il5hrGOxo3QVKSESId+T4kmb1DhU3++VxxoGmp8MCpOtgDn+5yl6L8qnOsq0NffQby6UgDy/lFDEiCVnfds/NVB9A43U7dE= 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 SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Mon, 13 Sep 2021 08:31: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 08:31: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 v2 22/33] staging: wfx: remove useless debug statement Date: Mon, 13 Sep 2021 10:30:34 +0200 Message-Id: <20210913083045.1881321-23-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:42 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 71a2b5c4-c658-417c-6d4d-08d97690eac4 X-MS-TrafficTypeDiagnostic: SN6PR11MB2717: 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: jloJ/QYivMXd0Vi4neUJCfGLltLma3FYGo1yXlER5JZYVzUuT+bE5QslZ7HzmU0SdNCsGO1gGHQypWhuVyHKuH8l7aUbV+tA/TCuteEqLSe0/oamibucAKV36n49y/ssP/R5zdxQE8++HsYNvlIvhK1tm/TNbhCMEw+/da4WWESg4QzBpvBTsrV7qgCHb8sK4hUzsAgOetSAVyC0JQ3vKqOeqV1m5xlZdNXc9jVqb8unwlWt28Cs3qabutT1qUUh8PohUCiN5oottwQXoGXTe+xzvE93/avt52j43eN/MUytGud0r1SFH4eGjF4cxmXstFICJYW+GMsXXzejop3qBrwYO5HefzlYG5LpYLIJzt0WHgpAkleAO3f2km21F+V6X1sYLXQKKF4x+SvM6/G2d7+Ve09JRkmYUIxjKetRueh/C4Z4z3s2F/yf6qBrdSirc4wKuu5uAzno8Gk433k6VvceJLiX7/JeFuhwXG814rQe6kb7PNLLeSoJ143cU8+gLPKlaNYEeMMtmzHYj4U5xY3pCzBNE1Dl2apx1Vd0s6MG1RlgAvSVLvS8EjLeRUqcT8RUZ5RYuPnBjvcuEfoB2K9LdYKoBJsuonX8ja9zqoGmqGIWC1kfyYGvRiyPNLbd7O8jdyUHO49nLQlX5c6ttpA6nI92eP3gJ4HG0XLQDus7D5peWOm8pDpEV2TLd70yhjHXdx90woHDTGKIKiLBpQ== 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)(4326008)(2906002)(107886003)(26005)(66946007)(38100700002)(52116002)(7696005)(1076003)(956004)(36756003)(316002)(8676002)(38350700002)(186003)(8936002)(83380400001)(54906003)(66556008)(66476007)(508600001)(6486002)(5660300002)(6666004)(86362001)(2616005)(4744005)(66574015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?5qu8pCWQTLNOIIXWbC9NrFNO1Ue3?= =?utf-8?q?n9YRgrlZGUSyhDQfO08TZKeSokrplmDak6o0GPL5G5C7W+dTIFQv7RCO+d7OkLBGO?= =?utf-8?q?2X4V/UnE6Ijopd3rSujZITJ3B8se/Umtlu/ds3NMcX8dWcLvnisI16SNgM2vwhGeO?= =?utf-8?q?L2Szb3sW6KjuqRT7OhWO3RjtviY6UM1ADfam5rYFaIxns7zaPURR/KU97HTNiS7ZD?= =?utf-8?q?X0kLJBFL5Bf4ELOXkPuMltXBYJrlYWkIN7WzKlx+3qDsTZAgXHLXVOY9KUKhQPhNK?= =?utf-8?q?/rKRCt6QqjcGUWwEny1CiJzMsRkEKTkG4C39kuBFU0bb+Em0CWTMqMPxgoXjUqjkt?= =?utf-8?q?zjFuKI56UuIH+rnIbRcKndDcEbtNOpaIkc5GTF8bP7NBPZd1lOfrpA09QgaIwNrtt?= =?utf-8?q?uLhwD9nbDRVki8XSX8JPlZjqz8cCOT7yPItt0Zt73fjlNWI915Ng+TDeQkIOP6y9s?= =?utf-8?q?P67Dh4CBVDcQbZ1eWpERypCFk6tkJ3BjmUjQDX+pcfiflb+UaTza98SOhjOEBcd0H?= =?utf-8?q?iE/8rpucxF3D/wNWk0CivQAUCWYp2etv+erBD+cSmm/u+KwPjMWaAuvWraWvxaoCx?= =?utf-8?q?CDP5L8pHMHgLe3IA1IYalGzI4SeJ+7jnYLl4Jq7prrY14hyytINr0gFzBagBhkaWE?= =?utf-8?q?gdHkoCh6QA/x0WSfw530Apy6a6PRS4zq5UFbXEr0u2rdaXveeWk6vwtkqCBLH2EuG?= =?utf-8?q?3r48kCnRznUAFqWi9wOWqLzv7m45Pmq9Ct+Gy9dBc573EQ4Owv4G8lcbYpH4zjREg?= =?utf-8?q?BicJggtqryYNN3YzWC5d3zpg24vXrYxpA/e2BdNg7UuXrPntk98Edk+89q5ibaqjp?= =?utf-8?q?7gA7EYXPJgc9rLO61AtNv4e/U0IDkG3Nxgt8VFd8aGXC5n4y6cOtwK1s22e4pU+U1?= =?utf-8?q?VZaeZnohgkk9VKD1O3uoVE4/fSNxjXo2H4zk2lR+J6kEVZLA7NBtARKHHh9HYrl2g?= =?utf-8?q?MGyTgYcGkBRdfDXaZQ05sfRiknpTyIoNoON58DvQJ4/rfJnL/2l8rsD1o+2Wsgwqv?= =?utf-8?q?hVG9xKlKD3y2wcp1mHra1tdxvf33/9/FWwSb6aNkKD+WF/8N2N0umZwt/86HwRdOg?= =?utf-8?q?sX1h4jBz8mpjqxoPV95VHeL9H340qgekMyV9lIVNDJ9L2a4LtkcDArng3M/nQI3L2?= =?utf-8?q?lfb20cUxfTrehI/w+qdyw5rQt+oUbuzm3frhxpc0cwkWnBcTF3fVBUfHSuz6lWj7X?= =?utf-8?q?Hbo6yqpRVcRR5p2+kslHPhAfx0fafJDy0oG46uiI1PiysneGVETrBPSUHivFnBKvi?= =?utf-8?q?xyrKaDX4NYloGeOT?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 71a2b5c4-c658-417c-6d4d-08d97690eac4 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:43.8344 (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: +h3758FUe99H5ehoPy5NldOMi60bkqioFzNuuDjoVtyd+UXPnON6cIfpz9NGwTu3hV3VRcYBVtoOsKAvSyxf+Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2717 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30: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: 12488225 X-Patchwork-Delegate: kuba@kernel.org 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 3DD08C433FE for ; Mon, 13 Sep 2021 08:33:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2579E60F46 for ; Mon, 13 Sep 2021 08:33:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238571AbhIMIe1 (ORCPT ); Mon, 13 Sep 2021 04:34:27 -0400 Received: from mail-mw2nam12on2084.outbound.protection.outlook.com ([40.107.244.84]:62366 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238310AbhIMIdl (ORCPT ); Mon, 13 Sep 2021 04:33:41 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c2mSXw9xpBU28OQDFE8pkcV94lo4dS4+8osHdgYOCvBzqa5+U6XudqRMMNw3qLQd7r/c/is42xq8a1lKUVfrjOq/uD0Gqwbuz4YOH8m73CL2kFS3uUJsdBiKusAuj7xCnCrPYAwavOehWQUbfCgt/+BrQutSBZ8jQHDa4vCs6Rlw0+Eli36V+AMH8Mp8nDHS4MIC7FqnCNwi6NHy7yfj2DtTbPZbRZdLe6P5+N1VEGYv/b+FCr/m3byWztehzfr11waSKZSWJqFTF2NQLKTsE4NvLHV8tnUT9pr6fygHSHrgFNWJnFmyFXIa+4rp1kOxJkqtd47xxYIKFrAMO8jfqA== 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=SSjw5S8hgJpjwa1u8PuvRmT7IvqDsY37CiQbHln3OIup98GCrq/yOi07Fh3wJVR4bSf8KPU45C40UIIQZxDmJbh7avOCurdWH9bdvNtUnQ6xUG/44wG9U2R9fwoGiGx5pV6rvrEKq857T/hbcMScxnnKiBzMMBK6bUF1YY3820ztACVNlU8/+gxAVfUNzPssMymteiro/wINR+uM+QNgDUhUYy/PoG5Fg1lgjVeRjizgExaXwL89IdBV3AUgbwTHvDbuxS4dNNkE356rTXJAiso1z2vJG2plVsVzcdXDpULjcl/8aLEfCW9PEikhQKl5LYIDBcbvme/mmF5VKYljew== 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=MCXdWtDEoMBjH6kPrSNrdiNNmnQ5x/LFg+uwArzN7YxbjfUh3Tp77jPuQRj1NqFhTNLHYx29uaZn6caGWyWKzX9cH7sZZQNN16GaOaf5hy/qv4JDztLtPew3CEhi1uwIwTSGqnnSpVWFDAd42z1tg7yaopB/QgMYckS0dpjbuiw= 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 SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Mon, 13 Sep 2021 08:31:59 +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 08:31:59 +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 v2 23/33] staging: wfx: fix space after cast operator Date: Mon, 13 Sep 2021 10:30:35 +0200 Message-Id: <20210913083045.1881321-24-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:44 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b5bdc03f-f45e-48cd-7fdb-08d97690ebe4 X-MS-TrafficTypeDiagnostic: SN6PR11MB2717: 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: ZYOy+WpD8q2RW9rG/AhTJqqmMTDrsK1rB94M0IvZz9gMQ5bRZDbJPSAAvE75RILcIJQRVDAWdtOyURiVEhSj1XxmwBBMaYqNEvGmFVHiteg+RjA8Lt/jwlkJ1EU+PWYg1f11gOf0xraourkpokYXS0yPYKPDmSywzUZBeTdF2r6gDpEz1W16+PYUtTAO1b7p3x/af6B517l56CM8PprWu4Rl8KSECfIXClTXTBHdM95/6WydFoOqs47fzoNzokay9SE53z+yvflx5bAlZOse2CUh7z2QCU/o6l0kNDluicFs3M1DvOkOKhWo0N/WMNDh8aWXNMw/B6GrVNl8icZvoVINW9JF9J5Bb+U9xShaidTABWg8qhMnTN3wTb57qtIxK0H5tg6kOLdyPgGVc9IA0wBhlPbzGhOIeKXhAeKmCL4zzaIFsbOuX6mZODCuup6bCx917UzbSuW/D/BQgnN2JI+Mls8gqljlXxWwOC2KeG6nNA64mKmKJ++wwRGvgWbX/o9MX+h46QjSYemHkpqFINSeZETVWtyJhq4Ttqb/sW3OTG57Pm9w3gKfTBSfUiHBqn8oB/UoDxLgbhWw/ms28+z8A3aqhIeg85B6qnOaLFn/sIMlU1BBX5r/+XA/8CPNuXu0EQxM54ILFOXXJxekLElxRd/sTPT6+HYiDrWkG2TjrhEQ0CNPtZ7DFjuKEWioGD+PbiCHodI34Er1+C/lmg== 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)(4326008)(2906002)(107886003)(26005)(66946007)(38100700002)(52116002)(7696005)(1076003)(956004)(36756003)(316002)(8676002)(38350700002)(186003)(8936002)(83380400001)(54906003)(66556008)(66476007)(508600001)(6486002)(5660300002)(6666004)(86362001)(2616005)(4744005)(66574015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Lzi23bSCp8bnTqRN13OwsOMc/3MC?= =?utf-8?q?8YtRljXWo46yEkdGDaXbxmWsW/94oEXAIfpGZCvN2BbCIgdCgZkdWLgqIM72hmu9h?= =?utf-8?q?hJv/oziYGCll7WTohP0y9YsJxvFwLDustIv8xaxCpzfI0JstYwG7NN+CEOThbS0ea?= =?utf-8?q?zAeNfiE3eiWpEfURt6yFtIcGuMjvCeW6DPzvOJEJcqu2typXMGWcVCW6oJSviCcNb?= =?utf-8?q?KBfZOACQiWCfM5S2cLtBgX9lpMufyD1/ApPbeIlJ2clPMGZs96ruCvaZeKWzk8H+2?= =?utf-8?q?Tvt021XoubWn7yHjDn9ziQX20qEtS4QClpJLpDC7ivwkMLnTy7mNlvrMIWJJu8XJP?= =?utf-8?q?ymkyBjf+lj+989L05mVNF31MdOCKLS8kGA17I8q/2Ak52ZBwjYxwiCX7axcI7YZXR?= =?utf-8?q?P09KLfYt0FtYs1Ry8aoFEKWfhDgWhShWoD9e3azW2ToZOtpSSndZ06V/FDDTbCJ40?= =?utf-8?q?fXhxWPJ0K5avfXikeG5UvtwgnVuZH5lYHTCzuNpDZ49ssz2DyTAJxW9lpLYzMWNp+?= =?utf-8?q?Ar/9fS/x6ZJCgWpdui4iqNcg/vQBIIY/qQFmrD5SzXdLlQ6qQ27TQk6EjYF8e4Z/Q?= =?utf-8?q?ikdVHspTh4tS0E1XZJneDA4jrNdmZqBEZYGPJwpwuZoJLSxt9nZEuxglSZlCS8ZuT?= =?utf-8?q?wGvdSs9z/sWDJiVI+QEoNefPRsTH17GGgl8XBBxFlpsOueBF2ZqMSzDmZnkC38Cm/?= =?utf-8?q?7WWVwkMDhOYdcnj037m+7Ix+NlSAM1iK2v5BJ7Mv0t9YggWTfYsEDjX9En8p37P+Q?= =?utf-8?q?aDIYu2I4KRLy5+N5wL7SMVb+ItRocgzoFgVbXC6VFynaXxWe3BLA7Q5nmQpXOGDUu?= =?utf-8?q?TsYF37ayShJ6QFsG86FgleBrHeaeS53/0lozdyhzUP2iUmcPklNoroC92x0ryaUOJ?= =?utf-8?q?grQ7hQ+u4/wSFq0909BDhPKfYNLs6VF7lxMjcWo9RNtRrLZjhpLB3tl6f2f+p1xEW?= =?utf-8?q?V1nbV29lkRHlQHJlODHLzrGd3QTAw8osN4FcvP1H8Y9qyMppkUqMY9UkdjfBoN+xK?= =?utf-8?q?eceiplm5a2avoGOBTNoC7GWqT3YuUQXB56rp94v62D/tz6XabXAaVah40qodziWOu?= =?utf-8?q?y2SJUgmb1yRopLIXrrTEXloTqFUXFekukDNSAWog8f1vJwFOjKQhPIQ0mw3l+eAlW?= =?utf-8?q?sO4Vud+zhrTn+YBIf0SX1sa4FszyMMs+HlrKZ5THDHmMwFtBQMkRIHs9H65pKFM/9?= =?utf-8?q?F0JQFpDW8gdWkClKpdeccqbLfMdp6oSgl9Sy6RsEUtriGFZ/Mc3g1qr7YjgWKAvhw?= =?utf-8?q?ueLjtQCXCpFuh4rh?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b5bdc03f-f45e-48cd-7fdb-08d97690ebe4 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:45.7023 (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: t002txGUfPNJ52Xj2tw+yn5XduXULD0cIp1dhALH72ai8BkdJu65qYC/FYLMDLpYXQjr8mVEeEEvIRMfU+noZg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2717 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30: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: 12488297 X-Patchwork-Delegate: kuba@kernel.org 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 51965C433F5 for ; Mon, 13 Sep 2021 08:35:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3A10B60F46 for ; Mon, 13 Sep 2021 08:35:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238973AbhIMIgo (ORCPT ); Mon, 13 Sep 2021 04:36:44 -0400 Received: from mail-mw2nam12on2049.outbound.protection.outlook.com ([40.107.244.49]:21169 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238342AbhIMIdy (ORCPT ); Mon, 13 Sep 2021 04:33:54 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dxFoOMn3gnCs23vPZXfEIwNDeMpxnKTzFXerhLZEaqsqV+V+/v43NHeYDWYPEVcbGWKFtWNbTsDCUL+00xb4XAue8H6zWAFyU52U7mrTSoLfzyWRgcYugpRJdvvt6MKR0IeQP8J2xWmxO4q3CFu5HmChA3dZUvghs1vtcHEZmB1//WaRHIQjxF2cfxr9BVxpNIF8LXV1g2Bzu4X3SXRVWiudnoHIubPUP9J4HD9XzbWj1bQ60AyxC7WZNhBSKVFfSKC1CZQcNBqWi1lIx7fmOMIUTt6BGmeMx446IOYWkqMCTwB3YTR9EdlJzcob/X6vSj9u1AlIVpMePOnGWCNMww== 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=qr4jktKApd3vPid5yV4TqNO9sTX6qj9VQ6yn+nxcptM=; b=mBFCY1mDiWbzsnu1mETY3w4N7JCsgGns/WAUd1UO2offAl7j/d3JimzttGpsUG5yapEAVKl9QDMcYEQNlwfL52JY5dC28QNIydsKQTyBJ9vUnv/RLMSpOu6qs8HmlsmPnHh3QvbdY2BOkecSthhQ/LHT4lp8UELXzrhkMHZh1mzUPT3FORECkWpjKFqIM5pkKfUWc2PoEeMxJKPLp0g/3GctUa9glO0GcuKa+XpgXQdDegLFgYELTTwahAGAMz5HPse8zvL9vK7sTXZIO8+BWd2yTK7NUVLq0seneO5b2074crNrF54lcc/5qKmLWgO3XPhiZfIwSvq+yaOarddDqg== 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=qr4jktKApd3vPid5yV4TqNO9sTX6qj9VQ6yn+nxcptM=; b=AoWdE9HpNUNiFIQOb5vaxlR+XDrOLESFErYcn60n2ieHuKyEp803rJP2vT6hpgOlNeJhlosP8tmVOwAJguFPNQVqaH0rmbLTAbuxhS2AKS+ztHIuojJk2MuKLL4rAsq8+3Pm1A+ItPVd6FIScAOmpYthnN6qjtZxdq6jiLpKxQ4= 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 SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Mon, 13 Sep 2021 08:31:59 +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 08:31:59 +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 v2 24/33] staging: wfx: remove references to WFxxx in comments Date: Mon, 13 Sep 2021 10:30:36 +0200 Message-Id: <20210913083045.1881321-25-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:46 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d0012c72-9609-4477-e074-08d97690ed04 X-MS-TrafficTypeDiagnostic: SN6PR11MB2717: 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: xm/LrRAalElFGe5DMdhW1Nvww9FwJBPgskzR6sriOEuVOnlk3M8WoaGBNkIvGYENImBnGBOTO+49iBmnzF03M6q1crE5f00eKX2egPIt6Fy22p4T2cNI0rEl1WbcPzAe92pDXjxgo+5cocpfrECB5DBvZGFBKRDofsMwpsjwKe9W9OR/m/dxzYT0KFo6+wFX7YN4LUmKh6AC8foX91Sc3gXXaiSOm7MebFYICYJmmAasE92AgQb8gzY6M0f/4ZcB1c91m29/i/AzAk3zjA4uLwjSiTrUTZ78T2ECxISZMBKle3e+/fP+CSp1HLhBdpdMuVDrEdXC0cYhnI0OeRyL4MG8Eyxqw8Y6F642mJnhoL1uEt9WigPhkjKAJzVZwQxy2oaCu3lJepHw/0hJ0bUAiHkPKpcVson1dUHFDmVEK9GaUIFMV9Tq8GVVVOE/Fu+vncOp6X/8KqaPvJ4srlqBhzrf/CXdHYxs9GzQnkw1VNNlfPcBfeGw+Dj2ugfZDUskrQG4mwdIX0/BxZLjTp1Zn/w1yCDSVHgIdWqhFistvDh0fVHeojMsY9gfngGCoY74VnTCxseoLWVwzKIMnySjzATQmsj1qaOzX/XjATHS36JPQAbubfVpoTqUToVwRyj8RK9GUhq1VGFSGUw8G60ggAwkStkR8gam3eNp0QeqxSNZ9dbNGSkZZDIKJ671eGQ/iHOCH1hArAGv3MpLsnvHnQ== 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)(4326008)(2906002)(107886003)(26005)(66946007)(38100700002)(52116002)(7696005)(1076003)(956004)(36756003)(316002)(8676002)(38350700002)(186003)(8936002)(83380400001)(54906003)(66556008)(66476007)(30864003)(508600001)(6486002)(5660300002)(6666004)(86362001)(2616005)(66574015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?XwZkGq0M/zjfBGh5ZU3WF2lY7mnn?= =?utf-8?q?64H3NBtEhvPcQRVe3dGyKT7vfPNQHu3nEDkqF44nNpx+DvnOy11jhZ+/U0ATWv8Zp?= =?utf-8?q?Xrd3xRgvQKN246UHdDe/wlcBmYXa8B5lJENL5D6RQq4VjNpYxeZfMgUBJ1hBDtzx1?= =?utf-8?q?GhKYpODPFiXrJLiaZJ+/VzXKxdINZgssmEnbUJQfSxp1oGEEHoHR8BeeghHDBmH5R?= =?utf-8?q?9pI0iRVczRuTL7xaC4cVa0/p/yYMaTPsTHl9SmDtVX+NkNR0RXP86fUhaBgoMstsA?= =?utf-8?q?IIF/PsJWEyvNnYUjV0ciJOb7SECjLRyflj/z9gS4Q7iquICLZUuhxXQINfwkh7MtH?= =?utf-8?q?coM9W6RMDp3vP0pMNei7Qp8VZJQMd2qXk/jJdlEqYhswINeWEs7/f6QsSObdqMLRD?= =?utf-8?q?qouFyz4oSHMHL25nOBn7fHYNjnuZij/bilPiCb+0BEWcWSQmPCQ9kHCHGOmEC77Sc?= =?utf-8?q?Ej42ux0sTU7HTLSUye/qLOBIydz2kEynLfNvopQVOX/G2m9xil2d86on6XyzrBlFg?= =?utf-8?q?LrcDB6B1s5X/1VQsYZyeNNPytEEeUc9cbA1ThRQvMUkxTUS6AnDQ6glDIJuBXmwv4?= =?utf-8?q?jcAlRo3DCfJDWcfpSSmqT06cOJy3DEGcvfZm36EptA6rjLZ3i5oFe7k2RvVQFAjn/?= =?utf-8?q?BwOVgXwtHsN2wD4RMeF8IJzkMno4vlmeLVh2gttpe0Se+6LlQMhBYHz/Jm5LrXnwg?= =?utf-8?q?aD8mbgiaXCc6LfaIqlB/nZWjiat9OL8KyIAf+nQZMEFN5Ve6GNmAxLCCcd75Mgbpt?= =?utf-8?q?GweqQMcgUUuyCf3XXEQ7aLewoNfm4w24SUS6+39imMLWURL4U7ZdAqLQ+RG32OL3H?= =?utf-8?q?+C5TEayte3vkyzNRHU/AEkyiV2J0KqfLZiHENph8WNNNWSyUmSQrn8nDYZw1l1k5f?= =?utf-8?q?HHz0FAPH0xi2DowKjssBL4qhN2i0gEb7FyZKFmce3HOc422XRVPEV2sa9wMhWhzBk?= =?utf-8?q?bHH2RzTdGL7eYeW1o9jxDL+TzamN9fidxNBD2IVSXpgoDn+K/EnCebDTL8zCAJXFG?= =?utf-8?q?Fd3PRyA+N/u5H9/eW+BvKHPgJLGPYA6VzTHY/xFu+/nFsYG/gTIbXmBriWy5fiLFm?= =?utf-8?q?KKZ008D9FSyzWWzVrDAvG2QzhtlXKI0vBFOK4dv6X8U8LsUb3kKEW0p4+/ErrE61+?= =?utf-8?q?qu/0BHkNLxWMInMe53ZWIskiFJzeHQk8k9qnEyLWQ+RB3v/0AomOqc5lCpQ+Z2Kgd?= =?utf-8?q?iU0ldf0xJqALQUZo3146BNd0QvJf2q+IHVeT9YyeYEuLjU7eawp/dhiNebr+Sbypg?= =?utf-8?q?0jAsvqH0EGrC1lkX?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0012c72-9609-4477-e074-08d97690ed04 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:47.5662 (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: s6fyXowZIXXv7dIBwjpWp6tznMc08YzPW7vhf9S3trQJrSxvNiDM1YEzJSlom9IMFb9nlcTkVGQ7re6/R/Kxfw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2717 Precedence: bulk List-ID: X-Mailing-List: netdev@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 aea0ed55edc6..97da82b5441f 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 b790d8573de6..3642d4ebb018 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 08:30: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: 12488233 X-Patchwork-Delegate: kuba@kernel.org 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 473BAC433FE for ; Mon, 13 Sep 2021 08:33:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E04360FBF for ; Mon, 13 Sep 2021 08:33:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238191AbhIMIes (ORCPT ); Mon, 13 Sep 2021 04:34:48 -0400 Received: from mail-mw2nam08on2066.outbound.protection.outlook.com ([40.107.101.66]:47168 "EHLO NAM04-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238397AbhIMIeK (ORCPT ); Mon, 13 Sep 2021 04:34:10 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DG/aQ5+O9qiVQSUG0eVHd80AWEwQcQmsBQuihWgmNUNgc4BnLGeETuOzuGR4oBbxWtvKJWHQvzr9DWsi7ZvbcEcT0Ilh0RoRhUb/lTsNPEWdhzqnOIGhLTUUQHqcO2Ek2mgwwBwrbDIi93rASOcPEK0w1yPqDKQ6NTqWwWlf40y+072glw8UJk3s1MJCuTs6Xm52aUwzsppS7X/G8qrPYctT2fClyHvVvybfM0WjFf6utCMmRTntSrvhpLhxfLK4HaCJSrTbzQY2tPPARkz3pzDd1Eo9Jrzz6eCUBO7bGlZBXacDKpXy7zlnu9yR0RDYHkR6ZjrkzNXVWZWAIaBMrw== 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=UDklZ8c/tIvhfwDyd9TF2fqiDaiE/kJf82YKyWbTdzfSeP1dEEWn3/GIZOi2YO3uyXNyOg9IKM1949Q2tcbOSgEF6THUSWGG4axVCZMZ/vxnFTSaQfxeeG/ZxIUYtF37pisFbjKyIb3rpC563dPdGyQRgMeGfSY7Q0OmHqnBg+tEZZcCc055vZjy7Qa4X/wzFIuzpkkrJTLPGqeHCNCVVY096v/WHy5wWiCu2L7xbL8K60lxxigzOYkZ0MO/jFKQ4/sTR+kNUdvGRh9Z++9O9HZ8/YilKUHTiTA9vhjCdF+VReVFnbeCY5w0muyAbjigu+v+/H62ktk8DTUZjJaytQ== 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=HBuTO+92LuEp3M88ST0OeIy++Mnfr/64b6vVY8KPE7uOs4k8oA8oeDxLWrSoV+5N2oqux8ptPtcMbQ3FIE/TPi4ncgVz9H9L8F57rHX6JOkAAuTyt/cvFlj66dyCqgqkFo58tYxTIz2bVWOu1DgPJhXXnpJBi3hOSVrof3h5mlU= 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 SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Mon, 13 Sep 2021 08:32:00 +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 08:32:00 +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 v2 25/33] staging: wfx: update files descriptions Date: Mon, 13 Sep 2021 10:30:37 +0200 Message-Id: <20210913083045.1881321-26-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:47 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b6873400-b805-4faf-11a9-08d97690ee20 X-MS-TrafficTypeDiagnostic: SN6PR11MB2717: 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: Sj9b5eyYBginveUajB/krAtAcXilWz/QaYO5ZOxJEmdr47Y9x4g9/EQLtVe1BNG0x3e7Sl2ddMxQMYJlcLXvylK4ypUncgRTBhnoG+c8UxD8tqc5lapJviWML8AEyR/7ChOVGIJYQfSG/Lvaedv6ATRdhWG2JzVuHO6WGoUNWUgLHJIjd8jLz4QqeD1rBchZ6Of9RJJJiGziHuq6iUtgvSxeNGyhVDkJjJBzc8IgC8+61qkjOF2YTAQGUusxNIZWnyZYTVVjCYR0A5ZZGBvSLt9UorK5EtPK5VhG7MV5LKkwUEUsSy25m9t6y0zftGTjXzAVyfsPQ5IIzWuNf6WxlXFPgLZhMyo4Lnd+/CoczZ4kS3hTEfu7uybvBICZaFELiy5+s2y+tgAeBNY8LUMibtpRwr6RhtIWbCtXtIfc2jSgCQub8tHfPvOb01pz5NsFwaJswDs6u7xw59Es9t50ych3qGkZni8iy1ACn2OYNNA1ZsudgJ79Q2YsJU76Qa1B7cJ+vNhdPZGHGSkZau6djcbfSxPKY1ChWn+daVP9WKTUhHScu1lSzVG/lGIqDcj0Kga41LzZTdeo6D0vxTNYYwN1s/LkU8ilWRrox7hrDAY/Bn9m05/MRt2VdVB75+ZUcm/yJabHPLiov2uad6/Ffq/tvK8yphGMUzlzjKFaGuVG2pKDtVWqx3O93AefJ5bRLhYpnAlxHK/4ozwZOrnZrg== 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)(4326008)(2906002)(107886003)(26005)(66946007)(38100700002)(52116002)(7696005)(1076003)(956004)(36756003)(316002)(8676002)(38350700002)(186003)(8936002)(83380400001)(54906003)(66556008)(66476007)(508600001)(6486002)(5660300002)(6666004)(86362001)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?DtGClWeK0hP1roYZQiGA4dZ4LRbV?= =?utf-8?q?EHjal4GQpY60j7gF0zizB5+gWUHrIhULyFr+/ULFWVV1pK66h4IUhODyNWsmmH7nr?= =?utf-8?q?g648Luqv2hwgu600PRPxJHgIPhCT6iXkyZoAU7d9LyiWdNjy9l78DSTlxujHWo9mM?= =?utf-8?q?e47bKR9pJcpCsEh+Vg4+WbmHd7gXWK+IYq0gI74QI9cxDUp/hUPz2Qa/eFpFxxXhB?= =?utf-8?q?CutPg9BiKEt1x6RKZzor6IHkq0KT9FopGWjZe+9edgUOMBbCGitvC55rl294Wt5mj?= =?utf-8?q?zXpA6lSqe585Y+bhPdveig0c2ayN+GN7bXZqz4DDaqXQmdlKF/ng/LMttO0EF+rgX?= =?utf-8?q?nlsOvkuQr1xOwJCfmnyTnAoSUj75X6jte0MpeuIodStYAxF1Q3N1W6MH6Gqx/tr6Q?= =?utf-8?q?6gFsoRVhwWFswnh4vkmICeRsNSiPK5m3RmOqf5u06zO5XSBDGdlqEkQvhA3cybsqV?= =?utf-8?q?G1Xo30bxN98BLyTnHOUBBjoNIIwNd0iCLvhG/IxYoU2fmaQZA6hNBUWIW85EW6whH?= =?utf-8?q?HzFSWWeCQQLazmKxGrKRcFv6vag4G85NDgad9CCknUjfFtQVm9JolY71kTuGYeHTL?= =?utf-8?q?tYkeMyUcG3urbPTyi+TLjBww3HwvnNVrKcBT7jn3FjsW9p/1WYqz6vg0z96etlcyW?= =?utf-8?q?DTHV0oWmDFKSCt4hAS/cb2D5QEvetq2ImmezNtexKMPrrIeVqzOMbmHpkpOZzsmtf?= =?utf-8?q?7nsCle4GfHgPvwtsTNZ+F1OpMVq8ZnyWrfQ7DvjCjTKLatPsXAIlfRmu9LEFAUjHD?= =?utf-8?q?2NcuaXEHOli9lROQtH4hTjio8vIwaYKKaVnIoYvSM2G6Jk6J3WU6uZ8GFTpdZbeZT?= =?utf-8?q?ThlyTkbIJhCj5UEC+d/YD0q4VFwtwR3MmEgsuGyJ44yWsmEj8FUcEXfOyAZ7KxmAl?= =?utf-8?q?jSqRecLYvqj2juPMvWMkWJSmw+GzRfjjG3IZLNF83ihsemfI7D70CZmYMnJOcJHgm?= =?utf-8?q?3wxGQb1nNW8xsaFCMZZAHMeC9j0yELPLeIBRXnMyC4ZGXImlRC8ZERgWimETzM6ii?= =?utf-8?q?y1eQqf8Ld1ADEuAc53zTXLH4kXLxxKs+TUOAO11f/7oWLTH9LrB2PqU0OXUB8UxWx?= =?utf-8?q?Hj1kIYqanGfFUWiyG7r6lSHZTZsOEKncyDDK2MYCFUJw1JKt/yuik9E5M1Osbhx+8?= =?utf-8?q?SANMtX+NB7VqqbMG6xyypaIqI3X7U/DM6xAatxb+1W+gCqQyoL7iuW0gCW2NMazn0?= =?utf-8?q?SMIvpBTdQ5jD0l5Wvr6OWFRplR/Vlvroy7Fq/sPXu9Eja+A6W3Cm+wHik2r0F47y8?= =?utf-8?q?fVUXPvGdipq+YY57?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b6873400-b805-4faf-11a9-08d97690ee20 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:49.3292 (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: 0ZPflldRdNrVhiUZrgr33a+a88FkjsrW0gWf5Uxte/45EkL6nJJILNAEDj6MFcR9mJZPrcc1N7SiCmLXEsYd8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2717 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30: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: 12488299 X-Patchwork-Delegate: kuba@kernel.org 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 309F4C433FE for ; Mon, 13 Sep 2021 08:35:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1B4C86108C for ; Mon, 13 Sep 2021 08:35:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239004AbhIMIgz (ORCPT ); Mon, 13 Sep 2021 04:36:55 -0400 Received: from mail-mw2nam12on2084.outbound.protection.outlook.com ([40.107.244.84]:62366 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238409AbhIMIeL (ORCPT ); Mon, 13 Sep 2021 04:34:11 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GuWCdR9kJqE3YUHd1wypuW2d9VxoCUctHy/lPtDIBzkF+QhK49Xil33hR/+5s8hbPh29ZJZjE+K70TqUjmfpxgg393mFK8I5ocRJsKHP8MTgbHQmvE3oxoLNJL9fk7R5r2YrjMdOhDWqWtBQ12GgFevKesvsViE8UDadGWUQC069ja5AHvK5I8Hi0NBD5mLCAjIDF6XeGy0kOhFzOQctYJvzny0ZNU7wvEYbXYnT5oHnGu+s7jaEHHYEiuuUmEstu7njHhU4LdEau6pEzmkd+CJ1TqbAvtOip6zsdiXSOxYocx/rYmaVhdyr2C1hw2TRWV+ye3va/1SsuWAg1ftJiw== 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=KhZB73NzNiv3lPJ5b6F1Wd/g0QvTZWCTHGMPMcyUACGzOmTdUv/Q5YoAl7xWE+0Rdey+p2Lyqb4y1PfpMcNUVcES4yvqidiIGsSJBXpFjCENVGaNNRWgADgKikpzOc+6+vvCfqovvqx2GYfRohW2bXYoSZF6awx9efXG0qFcVFv11bv9PbeyjHFExshhBSIzva0a50s8SxmccjH/bhHdEgLTLX2O9t5w8toGhAXhE5ji7k9DMLVl23WhrOTo0KgT/Is0H1Ap/gIV9nqh/AmdvtOrGVTvULm2xGd3AeR0VjmjzB20fM/B86wUVLzAhbCOmnVnCStZaA2oEmEbC+rqXA== 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=m8MSwioNsgbwLBexWzJQzxPSrHfTgR+KwNXMiA31jeBZM59j9hjFBEfwVKIhjouDyDts8sFQ4JYyrH/JiKMldV9CQotqtC+6nRV0SYgPxBUJkAvn4vHoUYLrA4IHom8nJZD8iNGyjRRmQEJQxXFv40H+3Kp1YBTO7yYEliDK0Bw= 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 SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Mon, 13 Sep 2021 08:32:00 +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 08:32:00 +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 v2 26/33] staging: wfx: reformat comment Date: Mon, 13 Sep 2021 10:30:38 +0200 Message-Id: <20210913083045.1881321-27-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: df7c2017-6dd6-485f-ed1d-08d97690ef2c X-MS-TrafficTypeDiagnostic: SN6PR11MB2717: 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: 7RBlCRmxZD7gouTyB/9BsbUInRlZ7sz30bU1yxo9WUVvWvf4InTMZR9Z7HGF4QAiGc/mYfE4x8mhUHiq59Lp405oNJS8tqmHucuWzQFqQSaWWauqbduBi+YB7DEVxKUN5XS/K36BQuKjkYz5rlTpyH1/1wXYyyLWmqTiwI2Q6b3E1aQ8rLMqWSqAIvkgdwI10y5egjNWpiE8H5ztrUWLx1k+Y/XDRGxAVlB1J6md+tHBPNW73KGppRoaqvLhwNFGO94smRbUArOXWNQmt19chhn18oiVVb+1zCPcvv4Ug0l66N8f7geEm2eBhQkrZfkxUZ248aqclaXP0DecPJRnSpP9JlcSVHW7bbnmFGi9mJCe/ZOp9DM28RMPzUE1kJ/x4QkXZyMr8Ga42h7FGhC2wEN4DijlOXZDAUsGtjrJXhBNPcWsMyT5v1hwgdqswOtQIxaErmIwScVk6bUtJ2EfGnz9JR+aRYTaXfJTHrhaDddE/Uxfl0egnf9yYKMOzq4RnwG+wtyBfg1aZ4iMgUfpABkM6YvD4Ux+vTWQmPhPbsXqnLzCHM51v4mJUdvQeUWQqBEgk2WdF1Mt/KwhRZw82IHIEXkKhvCgNO0SVqoP9mcak5ZyIvW02Sv0q0OemNwyeJAKxaDgwuCQ3K+9LbmT4thHmhsp9OAcHwEGsrqWmedSUGCqpTpsQN1F8WVewFB+RDXVLBwoy7ENIOu6cXpHlQ== 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)(4326008)(2906002)(107886003)(26005)(66946007)(38100700002)(52116002)(7696005)(1076003)(956004)(36756003)(316002)(8676002)(38350700002)(186003)(8936002)(83380400001)(54906003)(66556008)(66476007)(508600001)(6486002)(5660300002)(6666004)(86362001)(2616005)(4744005)(66574015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?h/iqITJo7TKh6Lt05Sl7R5KgaeVo?= =?utf-8?q?2guFonwvj/1RgHahNVYbCAB6fjGk8pdVx4fFVU3Gg9enAh1Csn5Th8YEGDTVwvUFJ?= =?utf-8?q?RWuhS7P8zseN34fEtyxW+vBkqIVM0enR0q0h3rSmqWB1JlE+eKUXTdAQDfbslCp8h?= =?utf-8?q?0xouXXoNpqG9j7VywiygusTfUhdNvJjTsrXlCTLmDq45opow7ejxcEXqWjlUg2Ycu?= =?utf-8?q?vGPOf3NjwMyfiNDDSU9Wnk4YvWQMd3NOKBiXaAZ1o4Q1Hiosm13QbMwILinuVpti0?= =?utf-8?q?lDCHqkuqR0cO1OMyAhotik8N41KgoHDC422oXGxYbnVtnS0yXraHhYh73/IY/Mm/T?= =?utf-8?q?Y74/NbTr86GFADy9Qx9dnhEY6eAp5yMH5tVvUzPM40SbXmbazyp5iOZG1Z755m94j?= =?utf-8?q?Pj+KuVXGEWCY9VHr4TkdPlbWtckeLYijo/yD8tifr8sNfPoNn+Q8t93L0dyNjb4Az?= =?utf-8?q?0Rtn1hQlUE5r+D3q7BSQ0ErmlWGM45t5guC//tYThVZrkEuE4ezQef4Zr3uhzSDOr?= =?utf-8?q?3Nbmm0NooXQypBOLK0o2VP17dT3LAGPuygLFbiQN3NqiVDCPwclUddO/Ydoc98/ui?= =?utf-8?q?i5CzHMWeKk3o+iK208nzjliqB+O4O1t7QvRdk2EPML/Qs4Xw6Vhrreul3jmya1Vlq?= =?utf-8?q?BEG2EXD8gKW8ZQQMS2FTe5khHu6eT+O0j1BqOTRkHfI0km3d+95d1u+/5cRvroD1V?= =?utf-8?q?BSxa+ITmq5N2UYvEHGUq34oxUGECdBDCirikr6yoIGPcLea/pPGZWvl6VCH7VtvLz?= =?utf-8?q?ICjufQGe174zYrayJtRkhmuafEaytmSFmdl6hoCRHIcW5FYPYGYLeEXedQAwoi9ON?= =?utf-8?q?6J8b3McupWxCIZGD0k1tHnEXz5m3fzywCuJ7PVQD/5SoZN2l1pIF6xcgP3kfUiaKQ?= =?utf-8?q?bDAn+wPzuPLskieDwe/ySH7VjMFoaOLjUi7DSHcWfMRTKBShHSdC8ecnOYs9NAYDb?= =?utf-8?q?ks7o956VtAsIQmRJTJSyDLp5LxXQpIHfFHt6TqjMI+LQGMHOcSOSNv7xHVVhN+Hhf?= =?utf-8?q?L0t1A2M3nbTB/Ttuj3OPOkj2hYTS2gu8k5HFYGxbT8NDjH+a7CdZlMVZpbJDv4Mui?= =?utf-8?q?3ajadVDOYtOTHeYu2XWVLTKnd5CgtrMY2CTfTe7V79TuhglE6yZSxpKGpI+X42LfN?= =?utf-8?q?XIGczC4/Sch4+lS2/pFdor5zrZq7W3pCrqyimQjckriy4FCepM/Q3FT/2ZlQLy2mC?= =?utf-8?q?1/dMLa+/WadCrCRNSSQwEf8K6KDFpNmWv7KmibbVS2gT5A1cdneYEtNKFX9rG+hWO?= =?utf-8?q?g1ALV3kO/+3HdpYF?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: df7c2017-6dd6-485f-ed1d-08d97690ef2c X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:51.2651 (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: ocuokpQ9HYgGyWAn8pxTUUXv1J98oAxODU/b5mIlAhEoh8R17Id2ky7UcZaVsw0QfoJzklCgCQ+Bjyew/+l0eg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2717 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30: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: 12488283 X-Patchwork-Delegate: kuba@kernel.org 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 65B95C433F5 for ; Mon, 13 Sep 2021 08:34:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3498660F46 for ; Mon, 13 Sep 2021 08:34:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238853AbhIMIgB (ORCPT ); Mon, 13 Sep 2021 04:36:01 -0400 Received: from mail-mw2nam12on2084.outbound.protection.outlook.com ([40.107.244.84]:62366 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238266AbhIMIeW (ORCPT ); Mon, 13 Sep 2021 04:34:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OoenmBm4XToh0jh/15rAxNmOlrMdC6sXkVM5OhVFExpgWGtkqKsHFmwWI+Q8KuXtkvcZ5ur0G6w4F8X5hnNTlPbcsITyJWxK3QdQFNl3bDh8Z8wWNoHUuwgobO9kyJUYsy+ncjdzf+5nV6Cwpe7pdOdvp61kJXKoO4xhsrOIrL6qdaDh2RQWpbMt83xMfcQxQuq1UwsfVy8QZUoUXuQ5mXTeqJ+YocHjXtKRCok/2yzXrs1jzLXRiQgOvUjlE0EEXlpM00BvwQstOZIPuiPvIQ/j9qtlDJKSOnC6c7m+p9dlO/z/E54WEWvhh1Z3squbTOrBgoshT5aNfu6bvxT9kQ== 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=br0ROEejEARSP12SzrIc3mNIa62WA8549reARxuR9ro=; b=HVqqk979fKqSnYtSgHD8Mp4Z87hUthRpVNuxINj/pAIw5hU5BUslq6efUfeC+aDRQFOTM/ZagLTl+noZsTh9DklsQEt34FnthXSCbYw9lEp6yr7cYekuOYOW7BQAI6FZGR9yFM37gwztpKl/1c9pGdUSSEtw5VdJJcRf6/vUsUtIE2L1At9STJ1A0RYX/qEoWFTenZp6AVELudA3FUIUuUql1HQththT29obHLBcQ5fibsbQPCU3bAy7wltqIPH/TMp/vo5Z6aUPp1nM/kXO2hogJXJSkNuNCwV6kLAnocepGHRi0BPIbWte5MqnswDYONn4/7P+0YCUuXT+oOaQVA== 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=br0ROEejEARSP12SzrIc3mNIa62WA8549reARxuR9ro=; b=Fx3TWoFZzLoKRzyEWMRF+5zeBAwcnATwuj9G2+aehpzPM7PiyUd3gLrVUrauXZLRHu2yngtEmhZVxMUEzZdbYoqLHM+fjIw+I6FCa0jWGgBJ1KBEYV9hkohVteqHvb6uLGXX6/BW2Pgyj/DMReU1Qo95jXfc/M8I6jeSn4r8TOI= 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 SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Mon, 13 Sep 2021 08:32:00 +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 08:32:00 +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 v2 27/33] staging: wfx: avoid c99 comments Date: Mon, 13 Sep 2021 10:30:39 +0200 Message-Id: <20210913083045.1881321-28-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 03270679-bef6-4020-edb9-08d97690f054 X-MS-TrafficTypeDiagnostic: SN6PR11MB2717: 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: XIYVbOj7c6rJ9NSC7JUtEVbRykO4Xf7GWVq1js/6twCPZhQmFHAVbb3749UR2nQBUW1Y66Ipe5o1CLOXxJ+uQyHcJPcnHQJ1fLBthMbHUP42v0MNSr+Em+TLkp5LTS66hwHXNMmWuDpWVDtPogo7T9qtk5llcNik047F/6Y4hr+MRl5Z0eskToxDTLVcACNO5fxCWSIwfu5njVEzcSPFKn0fpe2WYqB6fjak6hhIk7ePIqvl2DkeqEoQ2LBwgu1Q0rajDVvb3bs5+E2rBRxa+wLlj6yghbLQe3IfpCu77j09q2++OOL7WdnST+s7u7CB4oHSfk4j4D8YJ1oU3pPFE0Ew84yRc09RSOzreQ/VUmGCw09C3wXbzromobkVLYr5yJp/wMxK04YwBazKISUC5uJfFBRJr3GGUQH2GODG0x8MGh1I9xcfgFHUyXaG/vUoTVK4jo/vTtJiMjY7/r0xhbGEtW5Ha9o1QJVax6htlILSFRjd/d4J0meGcc7L7ZFDiLEw+KfKep/PIvR1hjS70EPWr8DE2ChvG02asZ1PR0683ynLdFOfJbgUN+vnp7dBJYBYRgzZopKs4oUJY+LNPiTDqS0+/R5Fn6tugdWpQqAxB4X6rcJ1LZ7lR9Z8iarU2WfC95SrU/qKvs9upap8sxCGPiR5BD8tS1SaoC4QO5Y50/abhYgifXUM4UnV6fLnPyiJnxdJJAMkZn2EpLgOww== 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)(4326008)(2906002)(107886003)(26005)(66946007)(38100700002)(52116002)(7696005)(1076003)(956004)(36756003)(316002)(8676002)(38350700002)(186003)(8936002)(83380400001)(54906003)(66556008)(66476007)(30864003)(508600001)(6486002)(5660300002)(6666004)(86362001)(2616005)(66574015)(579004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?XYudG8p5mWqgJXQg+i1eXYnuzqAB?= =?utf-8?q?IMHBo9w7kLp7ZebdAPhm/V2hxQKSKsAeZtFsc6Gh+ptAEjBxMYHwAzm2WWrfGtFbZ?= =?utf-8?q?OCeAH6yjS03bAEDxF8UNClw3Revw0M9WK/nuhsXlTejqndLw0vKxOk1KNbgsf4liW?= =?utf-8?q?kIGXQWaSnTcv5uvpkXpH35sESOMF+sMs0X5/a+NCSqBzc2XNFy3wIF+zdy2V/tqk9?= =?utf-8?q?o+T/CfDDTLHqGphuy6FLaoIaKgKZ5xHrd35+AAg/9OJBGMeHFvbUTAs52MxXjKA1R?= =?utf-8?q?0fRcy4P2PosUQLpueJ6wQz+l6jzBbAvqO2qsceBTF/4P2ppsu4AGPdCiaCFG4USuW?= =?utf-8?q?+f1l4ADMVpta1JDNhLdstL2c6vIO8bQ/4PG1EYANycNqYD9uhnG0IxFMXI5L5lJiP?= =?utf-8?q?B49nR6Kb6ru3VWb9ME0dw+2rs7bgTG334kYEGApQK9yBvPCU/IUSA+kr1J5S0CMEt?= =?utf-8?q?R72dXBkNdQWgYZqPbidabTmCA/JKJ7pNY9gyFIQ7OQHXpOLpYk2YwfPqREDGeup8E?= =?utf-8?q?nVleQ13yU3ZDoO971gA/GgIDGQKnGpBxtSNUd4cx+wrqHRzenEy+BysSVe9FwfHn3?= =?utf-8?q?t+HXTMxLtMTAgcTFEp/BP8aDSZqRdZebStH32M9sAQfOlIzHE+1Ary7D4EwbTVmXQ?= =?utf-8?q?5LyCwEdpZqsUdMLgJWzaNizfP5u3m69OIpdzMVsPyos4Pf+OYXlPJG+UlLA0Zm4Tq?= =?utf-8?q?tzfKELxFNEuEP8rW+ejYmQ2JpDLgwlZsWhq6jUzgZWFC6jpdyikCMVFoXMQSepJh3?= =?utf-8?q?FGa3guMp+mj/aj4zaosxO4c7QmXBoTU6WINw6LPQZR8JeTZTBKXVSXyeYEv62Kv4/?= =?utf-8?q?d5hxBVExvwDoYyyavuxPCVvXgjLxVDZwOWokpt03QFDOc72leUYq9gYS1oGaQsOyb?= =?utf-8?q?rRXszCTAngxtRqOwwzUBnCkfFlnjkmVDeez6U13RUCzjV63BDrN0i5lTpjnu8HbAO?= =?utf-8?q?oTaoDmw14TdKXzCZtHfpUwdFTwMsNaJwn08BgATzKU6jxUJZg0mDzh8ieq5PXZQro?= =?utf-8?q?Z+YsjCLV8JbFM3FPjILAXiKzCCU/CPCMDkwcyIh9GG3oBi3DLYcWIz9t5dV5nscS0?= =?utf-8?q?grqcOHuP4VS9iQt4rxh8Biu+DEcTv6u0HZzyNTS+Q8cstRrG3gKyYd6zLKh5Obi/7?= =?utf-8?q?QhAhm72MSazXXURrc5qXGFNokN95wvTDJUlyMTgVrKTsjh8koFHr5ZfO6LkbJmkYw?= =?utf-8?q?PTPIGhFMy0X4dcTvQzrKOLnkE/HOjgkxFqpEatD5WlnlSXnNKM9b3/NfXGXM8WbQt?= =?utf-8?q?kU7T2p+rM8L2+Qc8?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03270679-bef6-4020-edb9-08d97690f054 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:53.1450 (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: H97O3X8Qe+BJWvMfmqBvMHre+MrBZBIpw/RMtxJh9oDdwNdKoXhtk4TmzdRBqZYcrFZmGzcujXyWS5BKbUd7mg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2717 Precedence: bulk List-ID: X-Mailing-List: netdev@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 | 18 ++++--- 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, 203 insertions(+), 173 deletions(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index 78fa81d82517..e2d2a64ce66e 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) 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 97da82b5441f..d39366c171ba 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) @@ -342,16 +345,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 @@ -395,7 +399,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) @@ -420,7 +424,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 3642d4ebb018..83292544b10a 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 08:30: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: 12488303 X-Patchwork-Delegate: kuba@kernel.org 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 DD410C433FE for ; Mon, 13 Sep 2021 08:35:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6FE561051 for ; Mon, 13 Sep 2021 08:35:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238991AbhIMIgu (ORCPT ); Mon, 13 Sep 2021 04:36:50 -0400 Received: from mail-mw2nam12on2049.outbound.protection.outlook.com ([40.107.244.49]:21169 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238445AbhIMIeO (ORCPT ); Mon, 13 Sep 2021 04:34:14 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F35yjArQ3LHKOEaNh1ijJEu0Ws2F9JKtG3T2bOpDVCHA5witXUI9GvDe1EEV11FUZEqVZkTJkwxmSONziOliBzmhFHpuePGRLorOamoUSFaguytZSZT5MTNkSHRmRVzbZn2YTg1gzmKwRotpIOouoCLF88M6BmlOyQfGIEJ0NcdpAa5clUIlGaRn6WiKUs8GxWPb8fEfsr3cMAqPKm56xMX2AEnPHUiNzw3SvtyLrSStc2G+kTIYeMkjSJ9J5dTPm/DoIWs3C7MvjZBSr5IQGMk02awNkCucdWpA4Bf9PC+rCU8FcRnKGWxr34UpOgu8KptBw2VqGLGVxgec4u4J4Q== 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=ZGgVdt2go7Q00UnAPMxv3X7ETCI2xEeAi//N9oWKOxo=; b=TXTdtpg6Z5Gt/rC7Bf6e9gjl6Qo7gB5zIeJG5ga/YKKX1re8fOM+oWx8q5lW/69UEYfq+qEmgH8Pak+E8QmytN2RaXRW7Z88ktnY7C6z3nygcK7Rk1FZewwmjZRT+s6YQImkglvl0mfgjpEmEQc/FQlOG39OJ34X2atjO2+kp41bGal1uH3p6fDXWURNIxPTzy0EUPf5TBNxxXBiY69dxmwbvQ9DUD0k6QD4aOHx1KnOmhF4fevTUPLtGgdAkMLDw9EL5Y4rMgNE7lz9A8Psn4/WEbMyCtVEDL7atPJqANM2YxKOUcL7LMTNGDu1s8yLJVQVsHRkyDbMC1pjkv/uxg== 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=ZGgVdt2go7Q00UnAPMxv3X7ETCI2xEeAi//N9oWKOxo=; b=V11jLYzsLAR8DBZHZ4az45nvMpxKJRZawF+9G5Pa0CeedXO+DAHpCZhRcLg1VKzgjvvW5vy/XWIqWwTHqSAaN7ZHSqQeBXBY5iln5x5SrP3VqDXLom1xRtDq7HSKSMOaa1JhxiJo5G9vAVTDW6KpFBwkU8yDrQu4vZuNC1k0OTc= 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 SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Mon, 13 Sep 2021 08:32: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 08:32: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 v2 28/33] staging: wfx: fix comments styles Date: Mon, 13 Sep 2021 10:30:40 +0200 Message-Id: <20210913083045.1881321-29-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3929018d-2e8f-4888-26a1-08d97690f17e X-MS-TrafficTypeDiagnostic: SN6PR11MB2717: 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: w5deJQ/olp98IGoioFoJfdLMKkY0SO4eo370jjHCyFCK65k7KiaeFMisPmbz0a4vF634j00I2lzo/uroT+or97VykqOHK0UQm0o/h2Ox0ZoAEMw7sVqkr5iQpiCWAnzzHY/kict8MGh1XCFl1OMSfvLpAep5G7TYP6aSn90uVZE8CXtCx7y0yx76R//OchZ48cfsDxGmoitK8wIWNaxT1I6QaZeBOBBTgNlRKCMEXVU70a+aQhGjH9HOVJoem32CpWUVQXIzcEL5dToTmoagN3Hn2F3RUoK5J9cbmbome7yOx3Q/+uxeEK8ahaNmHHQVOoxq+xlO9K2DbiP4NOpHxs7kj84W0o8x57alP+JjtUDrCD63DuL7rqaMBRcY7KJGT/D/rEI3IB8e+tW3EHjHGifeQxYQYndKf+W+t+z6aSndA9lA5sVF44nOdKX7z8gqeeWg9HuwBphKCCwIvH7ZVf9qd0ls+GhuHLsbLAp30u1p0JwZLd3/+IZdJpbPQh2WgbSVI1eFFQaFwmcyYOkqqjTZXKpv62uG5Lh2IqJ7+VClTLyLxgDatBWMxnHSAyHrVJZOgG9nkCnAtrgDEK8FohwhWmo0IsQp+Qm1Q1smZBW3l3MOS7H8+TWGURt9IZdUPGQObOC01j7hL0cQ0Qcevl7To6UGUE2gD0K5UCkPzpai4S+Ue4wGX61dgAukTdSEH81hDzmpvnASNCm3q5pM+Q== 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)(4326008)(2906002)(107886003)(26005)(66946007)(38100700002)(52116002)(7696005)(1076003)(956004)(36756003)(316002)(8676002)(38350700002)(186003)(8936002)(83380400001)(54906003)(66556008)(66476007)(508600001)(6486002)(5660300002)(6666004)(86362001)(2616005)(66574015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?XCyTxdpKh6BusCK7fHe+X1j4MpC5?= =?utf-8?q?cg8zXLgD0B7ibg8c13DDIcGLQQPWIqdt5pXJI+hp8SDl/Jy/J1lsfk5I5wuhMp5bP?= =?utf-8?q?jeOyWnphTjJp/LDcziubopAGJ11BybrTG5e21Bcq6v5SsJTXQ/oaqkjOokHQgKEdz?= =?utf-8?q?oR8OTwHLAxuAZJmt+eAp8y6SEROOWePr/CPCPrJF2GsN0buyDzED0oqJMssBreTDP?= =?utf-8?q?kDN20RMtjmYwGcZXvg0W+njdXigo/Yq766xz1QqICurEJGNcsUiX9op1JQMyi14BD?= =?utf-8?q?H/0+AK4ixvS5Zy+gpJUuEr3G3eiX6vd0fDisK0SlEmy05J+y5WDnp/pgFinYPB+wJ?= =?utf-8?q?gDqOgjvK7IA8esVAN1ney24eQwV34FfIHI36/Tg13uUT8nI1WyINzDPg5hn6qtRYM?= =?utf-8?q?AseGlE/FJbvK3whYtNwJoMZ3G0rIlQQCyTcRiALsC/GicA0ceBtznRvWO86MM4fjw?= =?utf-8?q?omtvqJ33X1r++eIC87NtY1pM/16gYCyCNW2EduqgzfIwcvkBdtOe1NQ/jfTfnQREV?= =?utf-8?q?NWxt/nNAAfIIUEIbGaosK4qrypHjDnYM3iFU134yfWlA/0tVQuoCgCHod9HJtNBQX?= =?utf-8?q?N9/xV7LmEmEQx8lJkYnLTPA5RCofrPnqMYGYBco9GD5qiZJ/XIzrXb+PIN1h6CZzA?= =?utf-8?q?zLeiijV1Kqo/Nj5rLDLrdGydjBN+L7yK3I5qhWRAto/6FzAAyj1us1oFJoIm/KPcH?= =?utf-8?q?03ezSe752vwG8YP12BQnEAJ/IxaP0WdSgQ/h777JslO/noU3pPXeTtob91x/6Tyts?= =?utf-8?q?i/XFBYB73o+SrvaAqYDetAApXmNSjUmUNcwZ8U5rFGn+3cHC6rTW1bkni1l91C4gh?= =?utf-8?q?2Zd/RQC+2UxcMm3HF86y5mgw6SWFYpuv68sU1pp/qkhvgYIFBVqkaq6ToGqwyxQt2?= =?utf-8?q?ku2SiPW14Q9a9poMpyz1GapBJPSTPMDRFLAg16iR98GY5c88d6HVNlPYtmXKFN3q8?= =?utf-8?q?DHlA+Ykczdr1kTL8BDmrXs8PNuRCgqrQqozCKn1rn/VqTkC7YwIzseJhlzvGfCIGZ?= =?utf-8?q?8htzv9GmqHott29e40iPqDuFgdmbcXxxKpTZTcORGyV7Z+HN5tyRsh1JABMIyOcwX?= =?utf-8?q?H32ejLJK38uTY+OOmLEhbK+AMxPqYIrbqhbXTvEZu7kDZAXXdYS2iUOkZonDdEgQZ?= =?utf-8?q?yrDg4PRHr+jJxYhrNzpzla3qHPkdmORBQLuUTdNCUQ7kBaEz/umFswfU1c1BPWfLU?= =?utf-8?q?Yq1ZrX3ykql9CETAFFv0nJe8EYqOT1MRZt0W0zbc8xj7Ul+MJ7laD65N2P2tToonb?= =?utf-8?q?/yRdukwSDwoF+3mx?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3929018d-2e8f-4888-26a1-08d97690f17e X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:54.9659 (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: XSHafNSBqwJQSEDXAfHoZP6K6r9zq42vSD2mSZZULABeen6gS0e8dikh3aSjC4176bs6xzKg5IcjeGGGkBalYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2717 Precedence: bulk List-ID: X-Mailing-List: netdev@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 e2d2a64ce66e..b026507c11ef 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 08:30: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: 12488285 X-Patchwork-Delegate: kuba@kernel.org 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 AECA3C433FE for ; Mon, 13 Sep 2021 08:34:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 97EAA60F46 for ; Mon, 13 Sep 2021 08:34:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238867AbhIMIgF (ORCPT ); Mon, 13 Sep 2021 04:36:05 -0400 Received: from mail-mw2nam08on2066.outbound.protection.outlook.com ([40.107.101.66]:47168 "EHLO NAM04-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238163AbhIMIeW (ORCPT ); Mon, 13 Sep 2021 04:34:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DyYaUarUF81lv3881U6RexRii6aPUjQRCKfwxjyPo0t0UEs36LoOiadmROECf6qATiasGFNkaoR1kHmNRUDunauNbwmQ11g0wVMaWfsx789qM1YP1VdvWpmXqRLvOLl9NzTYynTl4DGel1ijtrZ/i+1sHRXn4I5PHUl93XjnlN8Ac/PEoowmzb6TYhfWTXqJiSW5jVOLhSjnXm7iIPB8luHoVpFiDnkDibI5fdkS7mOzL6aoKBLtGoJlF5ASthft9hh1OSLE11ll1V6D+cvQWG/y9Ly8KUELvh9Gq6/b2fYJAoT9uRaU7vrYBAbavlXtbQj3LmNyjBw+LNvca72J3A== 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=ek6QrKdnWmtzkm1/IqQ//vMiDYIKm+ATpHzC3tvqJpxK2Gmyt3MY4cJEL5KfGxZlefGajc2++Af1t8Erjj5Rwf/DrWP7u8VWD+j4GBeR1VFrwUqigSNgwCzZYBwphgAHcnktU0z512/vhFjbshVow8DXpyRcfoqq27NcGcr70MnR7UkbDzxgRh2bnR92j34vd2PXGDPx09dn+v0NHpDw3XfN5NMXHA4ACEtTsoZYmibWcZt2HJLhssmwz/EZlKv7GKObo8YRvfG4MWbZnisN1XCyu7HiwRKwN588qfG1XzZl2ZA4gJOOIdxnLwPrwfQCeRUazaT+9rfqxAB3+MAjbQ== 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=UsnhylLmXxxfSxc7ER0IkVSfZgZrIj51eJ7Qg3eAxyR2AgtUzK3aY8ZiVD8A3VavBrsjcUrJA875TdL7EFSeffpxVBL68EZ9JcCDln3CxpDjllOnFjf2T6VL9q0Bbkbazv0i1EwyY+tDarJL0gMHVj9Mo2EKyKAVC4b0Q1PZ0v0= 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 SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Mon, 13 Sep 2021 08:32: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 08:32: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 v2 29/33] staging: wfx: remove useless comments after #endif Date: Mon, 13 Sep 2021 10:30:41 +0200 Message-Id: <20210913083045.1881321-30-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0e4e8c5c-50e7-49ae-20d0-08d97690f286 X-MS-TrafficTypeDiagnostic: SN6PR11MB2717: 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: BxzM1wBOmycT53nxqcIExwbhfdqNJ7d+WUCX3xbzuvEOEXFnk8V23v0AXYN0dRUaShqUn38rTPbS2sBKscMfvfH8rDRvG4C4ScHMM7N7S5dJRBJP4bsh8SOvLyv+YV/PqT5nqm6ADehAj5YkIo/UQHBdy7OVAut6zCsWgjF/8A1mid4/k4x5aUnbPcBhQkuoN8IVO4MoXMcUrF9K8ggd1UwyNtkY380sotJfFC5jE6Bnmc3BKDdkiWNb9p7bPbP+YfeTbgJC4rzyEK9MyQTLNw+CSgrpZBLpf1TLqfvFB2v6RLHxi9LEA44hRLq+km53aUtoappJYet8TD+qS73Hu62g6do+6cdtTsk1dE9BYaSf3i+e0Uck7uIRDx1tF/SG76yMB9Cm2GlXS0Gp2V1g2Wggxgdjw+p7gYnjPbhreqNne+8Vgqsdc6tslNBxXKxOcFziSaw5DDJPnS/uGAML8SF7co3PRKtaQCRROXwYdB5p+Xxz+JqQRHEfg4n7bDhSBajj5KE0urwif3CW4rbjLfkWcmn395c1GaYCn1ggZafYXnlsAjVud3Yt0NgSgSinLQvanI6p8LO47atYsotnbOfDBFKExDfvviKdUer3AsuCFRt0+HhJ5EvNimRqNVJfLCKQkAZOemL/shllFSoSPfIMEtVLeACBtOC+ciO4l/QZEBKYep6Q8syZmMh8cmaT02arkuhgDUBhG8w/snme6g== 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)(4326008)(2906002)(107886003)(26005)(66946007)(38100700002)(52116002)(7696005)(1076003)(956004)(36756003)(316002)(8676002)(38350700002)(186003)(8936002)(83380400001)(54906003)(66556008)(66476007)(508600001)(6486002)(5660300002)(6666004)(86362001)(2616005)(66574015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/wn0ZswRVK73maodqwQSmdQ3f88m?= =?utf-8?q?TZB0biV3aXEKoLuoRS95bXSIrmRjWtj5LCmRrC55W/90M2ZyGRQT6mkC8NFHb1Hmu?= =?utf-8?q?XCmoX3Mn7hqd0Pqh6+OOYhjGD0UAjAahwrx3q5UK1RENUXrwHTpbdDeAVfWihwVdz?= =?utf-8?q?/FKIgO1ThqZ2Vk0ULw95NBQ4NWG5II6eet9zxApxCMfc+O8x7TfpEhrdGeyNrDn55?= =?utf-8?q?m6SQOi2pUXP0CxOlNlyt2dMTXKQDhoWiZODrWA5kcgV4hu5WdOY7SITIcP/TXE6gw?= =?utf-8?q?sM9o+njK4968gcsqtNM7uw+tV4VVp+YxIYTyf/ILCf5wHWWzNBikeNKMePqLc/Wmh?= =?utf-8?q?6HSV5cmFXgBEnqhLpmyrym7gnkwufg6SG9RjKpD/owRIma6WGYsm+LNsQN8OlXBrL?= =?utf-8?q?hU7vcHUBfJxR15JwXrFByV727S26eRLsglXuSFUtywmiFAlvLvftmL/5BWE5IHYUn?= =?utf-8?q?WOVwPhdGQlCUPOU7TO0sNdpUDCSA1l7E3CaAlYeeEGr//HhAPm8RxF2bjbgQXDAKL?= =?utf-8?q?W0w+haGhY3HZ4bsFjjA35WeSgHUfiI1DRSLQSBJ29hN+wLwW42V26K3WL0ExkCi6R?= =?utf-8?q?ndgpjw15eyGmSotRC+Dr8d5nWhQpQ7Do67fLgF8xB4MQad0bVLtkjE+gdqOXXH3iy?= =?utf-8?q?bl1jmikVp/OOLt+m/RcdxRZpyPmbcoazX+TE1Mb/HAtnhdnLwkJWlJ/iigqW5vTLq?= =?utf-8?q?iwjLaW9oMxRa7n2i4JY4a0iE/LQjyfvDdxb/s8OniqXto+Rx7sJ/wks1MbT7QkwkD?= =?utf-8?q?g5GmkEkLbJK937nSYZKs7l1YYHZYqA+iLf96gcTAGgMzrP3IQxrFlGltZYzq6XKNx?= =?utf-8?q?b4tCUWQDHxXCBoTNyPR9KxSuUGDrQYUyd4gP6US+JumThjxxKkOqetWOCYgQmaWLG?= =?utf-8?q?LBAzz0lQ8rL4ZirlAsEShKAk8FSaeJ6zn+nJDsaaR4jYBI3QzBeetfXq3mg41YjQy?= =?utf-8?q?BWIXIvANvl7vJFG269rxWvkawWdVOLOjei9FJoPu2u0vMS7jrRyjpgeJtgxMG5e+j?= =?utf-8?q?37s/5aF3EA7vSziOF6wUtB+Q/M/TLoCWwReOWQPFSkZSlPPzaBPaMdp6Z9sFXSslB?= =?utf-8?q?zAVp5Gbae+kel+oWycrd2sMoBz0vG05BGqq08apA/ZJ0kdJDs40GSdTfcvdEHo0iw?= =?utf-8?q?PByxoTMZwpazrNNVyUtVsUFuhyl1JSTSg10E9qP6uLvP/rbDDLT/JObgoSfU/ZJSR?= =?utf-8?q?2OOwmfjJ0kvaItnxRGkRNtxQnV2zv6Uhrnhju27jUQ9KdozsLOX807eAeExMcd6TV?= =?utf-8?q?en0JSiKzMCzSZWrr?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e4e8c5c-50e7-49ae-20d0-08d97690f286 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:56.7219 (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: hpWrfVaN78eSV95thShGGtUWuZtLyRrE9b/SVXRX7v3U5+3ljw4LdikbBmnqwmbznqyoGKolmdpuS+Za5BcKeQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2717 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30: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: 12488239 X-Patchwork-Delegate: kuba@kernel.org 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 45F54C433F5 for ; Mon, 13 Sep 2021 08:34:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E26660F46 for ; Mon, 13 Sep 2021 08:34:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238688AbhIMIfW (ORCPT ); Mon, 13 Sep 2021 04:35:22 -0400 Received: from mail-mw2nam12on2049.outbound.protection.outlook.com ([40.107.244.49]:21169 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238246AbhIMIe2 (ORCPT ); Mon, 13 Sep 2021 04:34:28 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y++ZtZz1tmTEuP89iaKnhzw60PksckQEiX3l82gKBBCCaoZxjiJkdX7yob7yZbGo4RjhW2T+AP0r+pAqVqz/D+5yjNKaJDh5aUvcXM5V0HrWZ4aXcVybvD6hR9gAQbWy0phLfXvK85jr5EDfQdJKBxUrBiJTwyPrp8GPZDuOeI1cMvryINzMAl8R+TexQfIDebWHt+T1xJFm+b6gaIb6zXB9lz5L5y8+5jBmcUuaDW6TvP3BJZqZnPCxD6VACHhmq2oufMozTCxffhDBSRggvHOT58QKnjK21iAREdt7/j9/eR1T3eUVMMkf5zEcSMUHa1HpfkmP2Puk+lv3Ew33aQ== 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=xsUUtMkFWtWrY3otxSBJQqe+VKNKELAgz0g8V67SD4c=; b=Hr6HIZd8khItYUS6J3+BVkCYH0Rq1pk3DDFaa8iuOgJLl7xsVLAMfLBdt+MfZZKyKNsM96/PtD7RrrvTLpAkEj/y/4ai/pZDsAaGmb4SjyyFK1ZMCjOkYLrM1bLK6V08+/EWR1uaTIIL4EUq7UEQFcD+yXAzUSAC1hSTrQAunN/wrJVp2X9JVadlJaEUNcl6yLKnlYMc6v45IdPkx8j1q+YheQlhLsFXR9By2ycYDqGsYOF+F4W2spkLPbvzcC4O9Xdrdvg6Wz9dLxzs7If3qgiHCoXj+ElfJWiPLziqnL50RNUa59MNC7F2RoDr5M3LP2iepu1tSk5qQHX083+UoA== 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=xsUUtMkFWtWrY3otxSBJQqe+VKNKELAgz0g8V67SD4c=; b=YTU7ACEEaOxENH1ZrP5h4014qAv+i9W1ZVFkjiMOfCWrM6quLzlpkFSOorZYTQz7oITj6VZ5zvqUgw4XmL9jZPrWG8OyWDgIFpY6vtVSXquN18jjaAfA7/aPsjKj0iMpN7/fiSAU3tDKQfYGImFMVRvmFZth2HuQmWoyfLSvV1U= 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 SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Mon, 13 Sep 2021 08:32: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 08:32: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 v2 30/33] staging: wfx: explain the purpose of wfx_send_pds() Date: Mon, 13 Sep 2021 10:30:42 +0200 Message-Id: <20210913083045.1881321-31-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ff3c8dc0-d48e-404e-8687-08d97690f39b X-MS-TrafficTypeDiagnostic: SN6PR11MB2717: 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: ICKRnZWe2yYB9KatO+4kemlvljt7lTQHY/wwA0FcstKXXeY4RxK8BZJk33zoRcbfVaKEssKlhuJqjh1tAS7NtaI2hEESMvaa3CfIL5ER2BUhA7FXBGhJHthlmH5Y/v+sD491zvtMwtpXcIIwyAy20NI+cUa5f2mR2M/E8TsMQ6B1n4TFsdvelQbIFmiwQnSb0NDIiOzLHKqTYejwfx+LyTWJFIDV44BnOZ70/yo9dlHWcJ06rfzpSo5F49pPbGH1t4vgZf06crY8wEvSrT+WdWNrazrqL0us9/WDSqi70ly05jW0P1jh+qOaZMaOFYz4YHcdDcf/KB7EUAu24YWR7/rT1w0o7kiaf3cROD2gYcCKF6TlDGmaKf2thtkJy5JBgmi2ZMMQMuX7ZXwfPPdIyS/pbNlJXj/rYIiv+aOGrtkX/o7suUOUDOPeUjCnkturxgE39ndpMt4yKRNejHadUH4Kxb0wRzIqOVqsVYzmM2lBlJ9JIlHaDHMdlWesNaYbKUQv66OsKFPBB3j0tZKaue5Ju77ilJOPCOOAMeqnBzJB4BMFIlQ/xeWZIjfiRU20rtmjdsU2y0iHlMpp0gNiHp3uUtl0TgS5Y/kxHXGXYgpSIlJjd1VbJrGHw16q1DZSIWY3KXYc+afhbsSoSXYidCwLnKUqof4+7lKALXF4vjhare79C2/c4d6pgub8lQ3JTJxsxVZ3XZAnVg6+81daMA== 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)(4326008)(2906002)(107886003)(26005)(66946007)(38100700002)(52116002)(7696005)(1076003)(956004)(36756003)(316002)(8676002)(38350700002)(186003)(8936002)(83380400001)(54906003)(66556008)(66476007)(508600001)(6486002)(5660300002)(6666004)(86362001)(2616005)(66574015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?CRnSVEy64345SoAnH+5mMyWm4dG5?= =?utf-8?q?qUwx0D+Yj27H9AjuWKsYP8+1mSvVsYaISyNUJBZ+5Zw/XIATARv8juAaOJOvPisNM?= =?utf-8?q?6WNA72bodgHC/a+BQ5uBeqcVh7vcnIGqXaubIdrKrqrRLUCbG5696gwfR1+FR0T+g?= =?utf-8?q?0Tla+O1x3RXz+wykbY46MfCUUf4Zwm1fJMR+ppNfQ3BWepIYBeFQW2CPKAmkpqx79?= =?utf-8?q?3poq8LPmUEojbYw8r+2WhuYrG8BLgcD6IcSS4nMdTUkSyBNnxn6qx76ONv9IYEGEq?= =?utf-8?q?teyUUAfRk9zPfXQw6IeXnYDlNQRGojq/HpkcPhaVhZqlk9mA7IL1TGkAU45oJItkw?= =?utf-8?q?C6K6l/609v/yZzmU9JsokYxRx8yEdzrrK5nM5SRu82AetVS0QTIrOT6WEYaByMQ7p?= =?utf-8?q?G3Smskpjmw/PKApfIEoyMWzBsz2U3PAs139700Hpci6+58NjV2DXra4JdEgXfbToh?= =?utf-8?q?r1Bc3z4Wuvw+8Ge9/q/nqTqmOzP23RXC2fnULLvA7w5LMATXc6hpOVR/pLOJslMKw?= =?utf-8?q?P73V8tIpwWqEf5xkYIQGkzwT0cM9ErJbVlrxPlbzlHPIVwvz3cSRLa5KLMeIsDwOd?= =?utf-8?q?P9B2fuuJUoU88eB8Xx7cS9t5aQA1YNF+fRQ+Ez2PUL5xIQ3yG2AMDspK21k+so/7J?= =?utf-8?q?/C27XIwiLPahMaKhBCYPSyaWQdCCVeCwoCtZzEBYlmgGP/qOSVb1AXndKn1l0TmsO?= =?utf-8?q?6tBtslatCeCdwwWYJq1JZNBwEPPp1kP8MDPfBFY6rfnhds5muitsHXQft2nc/Shhb?= =?utf-8?q?+I/NRkyBN7S+f0CX+OUN3s2bVaZhNMhIJge/WKNB7+7+sJDBZ2sORjIPtEMMFnYSl?= =?utf-8?q?0ZyhJEGVWOPi+5Sws3i5cWJV4YCBk7tcoVAhUNEIRj3gVjjahTcVpHii9AQufnbpT?= =?utf-8?q?U8n+ysgmLkGJqR+eOaT1TUt9q4i+4RMYMlj7Iob49aAb5UghNfbtg7qDup/laAj+C?= =?utf-8?q?ztEF7Jhg3UJtNkmfD0UaFEJoPhWRa86eyfTw8ZKuODZozqf4E1X+3Iy3Qg4JDZVNm?= =?utf-8?q?OSj5GRu75ihkmvLt4FhBqBfgDr36JDAJ3yXcEToHfr1yJzapHT5vCV/QAo7JQrFVG?= =?utf-8?q?2KpAPASl4btRBSgL0RPf+hO9qs03xntuFMw1my0zp8gxd607A3hbyyLlS6sw6JeZ8?= =?utf-8?q?kOxDo7K9jDEOGyPh+Zo1I6JTmMVPvM2be6swVzCKuBYpX57xOfpBWjtJqUmK3qSI7?= =?utf-8?q?/KvLJSmISBeEtLKZhnhsafCuDctEBf7l0QyccmP8hUvXJt0FESMFPd9YGKoa8Rs1e?= =?utf-8?q?wnyEhcmR+6tFURcL?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ff3c8dc0-d48e-404e-8687-08d97690f39b X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:31:58.5469 (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: qfzC51OfaHymXdsvluO1DWZhmGHHa2BfvJSS/XOrW9s/m8PqXUOy2uvycywe4hcmriSKg6K9RJxLVuDURU99TQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2717 Precedence: bulk List-ID: X-Mailing-List: netdev@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 83292544b10a..4386e9957ee6 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 08:30: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: 12488243 X-Patchwork-Delegate: kuba@kernel.org 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 07170C433EF for ; Mon, 13 Sep 2021 08:34:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DB67160F46 for ; Mon, 13 Sep 2021 08:34:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238177AbhIMIfb (ORCPT ); Mon, 13 Sep 2021 04:35:31 -0400 Received: from mail-mw2nam08on2066.outbound.protection.outlook.com ([40.107.101.66]:47168 "EHLO NAM04-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238667AbhIMIeq (ORCPT ); Mon, 13 Sep 2021 04:34:46 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a3w5m9eItJ8a9XOVx7CUOpZMIq/72lAe92GIYUANNvrVNDb+yTLvYY6AwfkTC7ExcFFwCfPdYW8nTh5ipkyybJoFn11UgI5/RZ/QW7VGUt4YaG9XjErXl5EwBfmg6pDg5W2vef+wKE8qw0+DYXVQW9acc3X8G193mVOA0kHI8U32ciN4rfAXBQFRQGjgIg4JLg6/IEKBlyXNVCc1fvdgUWDUfzT1j3ErP5RjsPX8J6kXQL6sq00u6tIEnvYjAzpYC0D6YRbKwexIcWpeLTOVR3DXNpIYWo4EIcM4cVf2xtVxqn/P4NxNMLTYydknNNk0ecPBg6Bfdt44yadi/A1X7w== 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=lXykPrBepxzEcZmXT4vGoGN9U1XxYNuYLt1beErJ1JqdmXgROvUeopHKttIemv+oOHL3Iis6I6FmxmMDGwHcxdsZXkzMo2XJBWwDP6cwzyyqHKDFohtqwcdIk9nnEL88+gPxBKVohH3SEJUyQEJW2BXicB0uRdo3s4OuyMbja0gMHKHivJD3t1S+AADd4aRuiOn4u3eVK2cGDx7M97CnVVypXzr29gno+kpjIIJMDmLYkb4c0MjW22AUFezOxv55RD25JQDDbM80BLJWlR2hdhjEHz/fK9DwIQYX1G790dAjCbg7Fq/dF4tTA9hrjAkkYNb/P1k7Zs5pPeq0P6GD8A== 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=DUDJyvnlC2aodXLrwo5I3/vf9aCPAI4SSaf1MNoDGrn9R0W3NMx5YW8nzAb22Ih1zJR1Up3jAzSqWR84Mjj6Ni9jDCOEJJShMo10CQuVA5W88iS4XGdgUvEynSPpLvCZDzNE/9qk502SUHWL+CYUuI8PZBaBmS2tViUz6P7uVaU= 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 SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Mon, 13 Sep 2021 08:32:32 +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 08:32:32 +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 v2 31/33] staging: wfx: indent functions arguments Date: Mon, 13 Sep 2021 10:30:43 +0200 Message-Id: <20210913083045.1881321-32-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:31:58 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3579c8be-01d2-495f-0ed8-08d97690f4b3 X-MS-TrafficTypeDiagnostic: SN6PR11MB2717: 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: b4gFu4n+YIFqgU58MhwxSNhuEmU+4ehypM6uo5uHavhg/DNovr2LStyYsfhTxCS535sNXhvuXuFjoLXArdWGyQdJmxsHRQNUMPQWmmlAX6XfxmC8EoSntn9A07umFg/+49IC43grWjh5wKKgdXSpYg/dFR6TQDZHXw2Lpa36PBNqoYCdJTkSsBufGMFXUduTw2kDCh6ZJI8nzGt18gz0QXaXc7NNwYvN9Xeo6UvAYtnijONjNbSUeJ4kDTKhr3mOGma9rFJsSZCgpvU0pVNsO0b8CIZaTfeOOvy/nnIvRiabhADpi6I5RlFcYpA1icEjSA2WULY2QLWHUAzlE0K9oqsQ+b7PONYFT8PphitpcpnSVO9WFI8KnXoMDUBC5wYpJhYNcqFu/C6OOCpzf3ipCexcez8/LZXQxBYW7n8Vwuy2iQmyv0pSs/UA5YpkxrMMmWIaBd95EGez8RTMBPFLh7P33w3jD2DULvaiqNii9ZY/g4DuXnK4i4sg5MPFGMGGgBuqxEuiBDNQviT5EDD8wZvt+91QzOlfSJmogCn2oDHdNJ+ZBmsr364//dceVqG5kXy2lEQHKtwAJ+Yx1NdsdmqddO1vqdUc9P14uSYLBWsGhZGr9h9uoyLy4ozTxtD5WyNBNwn/TKm5E3SWSB3YB7X04TK1WHRH5mZvqp1XWLuVBjFaMX/Un6yGteKX96NvfUmTLl2vbPNx9+x7BNDbHw== 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)(4326008)(2906002)(107886003)(26005)(66946007)(38100700002)(52116002)(7696005)(1076003)(956004)(36756003)(316002)(8676002)(38350700002)(186003)(8936002)(83380400001)(54906003)(66556008)(66476007)(508600001)(6486002)(5660300002)(6666004)(86362001)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?pQ7sBfaYshNBgbQ7ODZWfWiUavEd?= =?utf-8?q?rAucnzgJ2Yo+z3zwwoIHavWjGXqa0j7o5LU6w8DBtKnMM7xXADvQa+Z+RUryruI+E?= =?utf-8?q?0hOfOhsjMjcIyhlhSHDxecenCXho5SvOnxNlKZCoydeSKs3eX4Yv3nyNwO9yssNHV?= =?utf-8?q?gmjhu+rU8cH3gL19AWFMjlZpyghCaZisaGB/H69fBJi8CvTfD/PsEtjEvBJq0/Nxi?= =?utf-8?q?uM2Pc3XYtDq2IKFMU9Ek5bVxj0PVFeEZJGy9xkSR25yUHdRtZWvccMuzuuBNlZ7+H?= =?utf-8?q?xTfC0V+DO9Zn4ecYKDJArRljsjcYz1cxH+uwYE72b7OsBJE57lrYOVOfB4/5t4VFM?= =?utf-8?q?FUIRpkDCPvkmCadpFKpLwI5YQO2eM58MRMKMfNzQ5lY3zhDz7ADMCa0kv6gmo2jeq?= =?utf-8?q?K6tJCoE/htFsj0g16y8Uo6BKkyBoug6WLaOCTRynS+bl6QZ5UKgK/Aa+3vrBgT9aP?= =?utf-8?q?znhQH7E1/tzM1dW/6SV/6k5w01bVAdhmeJdOWelxjZI9TgQaG/vEvydRXCvB4o5OZ?= =?utf-8?q?RDE0myuEHCNqP6XDYZ3PnpVpHafCT9tAuWLLmvrYvGRGZTd5OY0JmpxI0JKe77o+c?= =?utf-8?q?SdwUB8+ozjoCF5U09KPgQmYmEpyKv4bv84OMLprMaN7tXWkSTYeiXpwjv8GRMmN/0?= =?utf-8?q?X7kteHjaygvzNbuVYdrEordAWVA79YHJZypYDYkXcAWJm/BiRLJ4UCRgovJ2Axdw3?= =?utf-8?q?9vifNksY7imJJaa1MerBwHCRpYWbox3KTcTZSxU3jRTTyRFyLvH7c2tab0HLeTwHZ?= =?utf-8?q?cCCY9C+NGLniMGWVuHfe0ESA8UXW939PkzPrzzrMlt5RXdil73nJJKsjP9DgbYukd?= =?utf-8?q?I6gRK2J2cbq4RzoO0YD7gX0norLjACamexE/BQ5q+HmzsQDkZJWv0cSJigyYg4jJG?= =?utf-8?q?ZP0ywc3NWBbobk4I7Uapg/KyJ2RVa++nDqqBblFyVpQ34haWkxrvV4Tl5JaIvy3/A?= =?utf-8?q?vPa6tycY+Z3YaiSH7MGIm1IB10UTmAHbc+KiMBqgjyVXIiOOAy5J3EE2kmCjnQFY1?= =?utf-8?q?2dYAfP7UOy6DnpDcfeCy4O2Eh3YMHv/4WuR4RF6ItxqYIRfXYCnxKNmb4wurAfWjs?= =?utf-8?q?spZRjgs8UjmQFchQTxURcATxAMyn0G1BMYA7ql6wwRzEVixzTbVHTBTKYsVCLkYky?= =?utf-8?q?+3IAnN5XDGj4msLmnAomFww3nIa8NDKCxI7whxSD/FoA+Z823kyoS7qlFW3MA8eGh?= =?utf-8?q?9AQy6LrhkmA7yddW2mk2bEk3A3Heag15Ff4vqnIz3saRoHYa+lQLlU2eOENhAwYN/?= =?utf-8?q?9zKt9hOLdLMJGGG3?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3579c8be-01d2-495f-0ed8-08d97690f4b3 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:32:00.3598 (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: r9PDQcj8+yIqWRFA6gBnMkWDbvQddw4LXSQVB1oVh03/tpLkEFKVxmsRRBjlzsFqKIor2YBYcAs/GXU2kHnzoQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2717 Precedence: bulk List-ID: X-Mailing-List: netdev@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 08:30: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: 12488245 X-Patchwork-Delegate: kuba@kernel.org 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 3F7B3C433F5 for ; Mon, 13 Sep 2021 08:34:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2A0F860FBF for ; Mon, 13 Sep 2021 08:34:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238785AbhIMIfh (ORCPT ); Mon, 13 Sep 2021 04:35:37 -0400 Received: from mail-mw2nam12on2084.outbound.protection.outlook.com ([40.107.244.84]:62366 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238678AbhIMIes (ORCPT ); Mon, 13 Sep 2021 04:34:48 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ENfmKONPZBu55mzzdTe74ooYvuk7AG3LqN4tSoFcxXc+0sxDCoINWGHl6/6ah1DamLb4aczTEbvoxf94nxro/0EOw3blz4GBOTCt8gDESaooZ6mz1lZsiYdqFqZLc1hWS8J0hAx0pfclfr2m5+sN+IvsHImLkmGtLKyTUzcv7TPSpt/tUl29TI9hSSHQ1XIiTi0MBaqCcXMx0x69X0cHe0H2hmAW1KSWuGc0xynQ8WttuaZXCejV/or1uOOC6GYHZdQnxwLk8dnHTvXk3GIWOntNQJxjNFqM4M6DBPUDVAXOE2D9p06FtBexiLftbPg6hP0iZb47I9+g8AvkT6ozAA== 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=F3JzMzASmEuT9eHa/L5VoG0qsqc5YjbV10qZ+yjgjQAgoXDRJJ6oNs/bPy4LNl+Vy9w4kYgtB8f1/BKS14rQB9yhmGNHnE8GGNaY2PYxvjAvYPuCV/0YBsOG8qtj597URfdYmQbG6etWh6kUc13zcMxeaAh9rfZLL7x+JtciOA1q6mU5q23o535L9MAJY/vpi4p1h+rYrnztbkXd00dphZmUuKKvlg8KnrRV+8VLxEBiY0Q7nWdd/9cBfHOSGlP7NvNSlDDvSsvJrDUmtfjSsgcUFah3cUro2iy7HlkjTfVeUN/OFmbkkUVsfzDyaaGaDlFbagInjWmUTDrIqjt1Kw== 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=khjoKvghstSIj42tkSR2nW4tA0YmcwEHiWYCoXAKRgnMEzB8KPKrLys4nhaH/JmDXN73o3Hqq0Dq+xgcZfQ4dPCkCnl5WnrH10z5J5Xe/5MYaM0v87cGVNZ/zLGHphdWr7C7IX0l/4P0Yuf8fjDWUD71SfNqC8m/PmX/jSrJq4U= 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 SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Mon, 13 Sep 2021 08:32:32 +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 08:32:32 +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 v2 32/33] staging: wfx: ensure IRQ is ready before enabling it Date: Mon, 13 Sep 2021 10:30:44 +0200 Message-Id: <20210913083045.1881321-33-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:32:00 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8363654b-1e33-49d1-6c37-08d97690f5c3 X-MS-TrafficTypeDiagnostic: SN6PR11MB2717: 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: mbDcXuRDLE64NzRCBXjXgcuqbpz4HbpYfT1ggagFWwcXk83dSNaJ6h6QlveFbx/LNqjE6pHAdjV+MbGz18wHRFAwFyNxWUV+w6q4lAkMQf1il2VVG/RxZmtU2zpfZOwe/VYmRsCwu5Ncbpnt6UPfhU2aJ+lwlelJBvaTsPfyNiIiTdx3G69plpvFR6F48Pbdzt6qzTPxw2R56DKJllOth12CtoyGqmiTQyxqLEOt4GMNld+1igGwMbFlXPj3nsCzZGQZlAk2nJFVk3WYKed/3uGqAjz4FXwvEZ27rCKe9X/GBtw+ItSFWVfVKaaZesjr9JkZ1w2e6ac1vc52SbSCKTOD5pLXOz4mmGiHFcogHgDOeDcdCwi/XYmETWhBoSfaSeKluIjWzTsda+W1/3JDjtFlEWxZ4Dpu56rqPnAUUCkpsGDQiVnaunYTeBji/Lf67EfqsYZhmS1ucTkHZA/XZqL90KMN0Nw9rzT5BzOpK1xQYCvqkrTSh6wGfEx/jWQkl/hI3zRODHOz6Ep3bm2KBcyVC5Od1B2JT1KKm6iqeTYfq7AkwwEO8dc5LoIPxwG/j4xRgZyTjfY/JkGmEIOR102iw8OXPev+RvYnNLsMEAmSlHake0bc9hUWZqHjj73NZ2MfgCGb6Je4vAiSPkUFqG+GZ9UVcc7hZyAwyPLgD1uBE3MZeOEQwAtu8C0tUTP+l9/XelpPiG65vQJJ3CQVfQ== 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)(4326008)(2906002)(107886003)(26005)(66946007)(38100700002)(52116002)(7696005)(1076003)(956004)(36756003)(316002)(8676002)(38350700002)(186003)(8936002)(83380400001)(54906003)(66556008)(66476007)(508600001)(6486002)(5660300002)(45080400002)(6666004)(86362001)(2616005)(66574015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?fvCShd6ZZOqgO2x924Bs88pme3Fk?= =?utf-8?q?LXfPHjII/0c92bopgWVt9ifrrkxA1Q/5wA9THhGYtNiEqaeORxLiBQeORWtQYXSpX?= =?utf-8?q?JPnPXqR3pt+rP3wHa62vxAaXhwAlYrA7Nhmza/qPfY6w5kDEokhvkRe1vtszuv2Uu?= =?utf-8?q?EEMhq2t+832ROCHXyKNGLDOYC/RmTqWwThppzGbD8KCQRAwAd9SnLDFY/Ol2qNqdK?= =?utf-8?q?Lv8cY6H/1gz2rvjmzy2ExCm9P/zcapjzjF9DJUtf5SU2yslhxZNjberQGJZ/HmuGV?= =?utf-8?q?imq4H1vD0dbygTS8AJyZOJNEeqmaFRH9PArusTVNtfE9YZ454tPuK5AV9+WKApOIg?= =?utf-8?q?dNVIyl2znduS0t61QD4KAhGztw8mHXx2PiXZWAInb6OP+V5AAzCwLElpUGwrUfCqF?= =?utf-8?q?E4HUUVBzCr+GYBFTbP/k+8wVEM+n9SdQ9zj4F8/Czqu0qrltoS9C5z8x47UTE3InY?= =?utf-8?q?wDiY8xKB0ORQ7CC/T1iZj9Gej47qhGIfQjORQpOJ0GPJP0mgYFc2MQRUaFCUolZWk?= =?utf-8?q?lfzVhieXjawlG9ttla6+FYhV2qgRjnBFtI3DcAW/qVsfNNNxRJ+qClI/iZum7mcst?= =?utf-8?q?w2pLioU8h1MyK9XUyn6KIsGnZPt594I3db5rbseIYb14AmgigOrnqQTTsfOlkXSFE?= =?utf-8?q?DecMnRwhF5UoFFGMZ9wTnREeDgw3PSqYriwV+sO+OMsbZAf1FTUXfRUaj0wrUDNhA?= =?utf-8?q?iUVxsf90JHvQBBUqt+hC9FNuuCRAFGJXTkKNedUf69ZmH8Yw/DU1r8m7K84EpnHA0?= =?utf-8?q?WQQDKFQmRCxrS+973gxwd7rvZn5xIHS6kyIMwR/lyrY4fiJJPRVrrgCciPz9Glr19?= =?utf-8?q?iPJX17c8UN1F6i6kFOaV39c+SJNxhs4F7CWZ8GczKd18CtnctOFplFJrGlkkXOvjq?= =?utf-8?q?TFZrkMCvoJqpy6xx5fehhGBTtIFM0KBq/6hLLCVeGUZBisNTp9ilDJFZZP3HgNX9r?= =?utf-8?q?mCu6NftXUF6vqli78CnZFXGV/K1YS1DmU68zwmge8O73uEmAyPRaf3mdE4bR+tclJ?= =?utf-8?q?zrn9XHR4ZhGkvAysjUW5xPcYjdBbueXVQm+IDdEHSxDZ+WVueFm2fsVfe8flyirdQ?= =?utf-8?q?SBscj4RR4GOo1IaRIqIQ03HyUQbIvMZWHe73JFYrAcMb2d31ZRqyLf92V+u86Hx30?= =?utf-8?q?9hLIWnPXXn7SI2+7QPOBcs/l4+cQ2aePo+YAq7IRQ0g2iwUiVb3oV+TKOklps1UR5?= =?utf-8?q?Xj6uxALSUo9Ns1tKu/7KRLmkfMW1KZ7lcq3w4+PRMGQMtsA3Ud8T6on7p3STJjCAC?= =?utf-8?q?ojxYE9XlxVly/9Tx?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8363654b-1e33-49d1-6c37-08d97690f5c3 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:32:02.2367 (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: 8klp4O9AFot+eNfoPFOO1kPpH3IGSEEz5YRatSiT9PAUTJBkYBfe3QiffVVOGaBc8qXB33POea1ki8Xi7s/SpQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2717 Precedence: bulk List-ID: X-Mailing-List: netdev@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) From patchwork Mon Sep 13 08:30: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: 12488279 X-Patchwork-Delegate: kuba@kernel.org 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 AB8E2C433F5 for ; Mon, 13 Sep 2021 08:34:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9540F60FBF for ; Mon, 13 Sep 2021 08:34:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238801AbhIMIfm (ORCPT ); Mon, 13 Sep 2021 04:35:42 -0400 Received: from mail-mw2nam12on2049.outbound.protection.outlook.com ([40.107.244.49]:21169 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238018AbhIMIey (ORCPT ); Mon, 13 Sep 2021 04:34:54 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d4oyzP7BkRRnwOLrQ7PyDDbhaDinniZMBd/d0n4/fp8yAbIaBzemsh0wS3akjcY1L9cxxY7VV54oYwPgIyO/0cGwoMKAwPcl8yCg41PxDq0+8clJap1h1cRfhjKfclq121rGR4H9XgQY4ZNWu3aYnAxM9mF8jDQB9X5AcZUcwujCSKhCbnYv3JLdKjtmd+Nypok4VAsiB66W8sI34Ymf1lPHh/i89ZTCM2aKvPEiWoj9Gbb6J0K/DEOHAZ4xJtrKRvpkcrXjra6KJSFGsVooe9yzPLnBVuFaf5qi2T0Sb1ghHnMuVTOIvQbrgqVDwPU9TsoarpJNQs04pWqFahcGww== 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=CL6kGT2QHAhGRM20d/8PBao0Aj6Hch0u2ifyJUm8i/c=; b=IP0zQYJ5RTjoHzT3Cdv0EQGoZJchn6V7p7dSJwMchAoCUzkUbjFW7kUS+sRmc/4BjvCetQ1CWQ/soEDn8ZZh9ANFvtA0x+JYe4YwN4lBMGTtEhZ4wcVLR1PTDmeH/ghscS3UK/wn/aT5NM27Yp3+QIUtDB0XGk1uv/Gtm56Nf6lxWKlQNkg3vafI5kSYOVi+zbS2eNR+slnB/l4jwAqYqPc6ZbzLG9J66/b1VVbwF4q0Br9PQPmogbZnBei0ehjlKFueD0UYXABxxAxsZCp0OyRpJJaSHDcYILSvyYHuVjTK8bKy8nvkVCGqCNkuUR3HGjGPvQ3OVBTa6PttT5TctA== 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=CL6kGT2QHAhGRM20d/8PBao0Aj6Hch0u2ifyJUm8i/c=; b=T3XFEgoebgOCSvCdREtw3bn6pIl78J2CSHXotwf9ZCpTOOugtJ9XjpsZV8eTHbbnzBZcVGXCnmmtDThNDtKK4+wsppVadg3/vGHIaSCzTF2NPa27nb7U0EehY0QQuvRtNNuw1GLlIt7yHF3PwzAvaoFMOsdYd1rayBW1/+dI9p0= 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 SN6PR11MB2717.namprd11.prod.outlook.com (2603:10b6:805:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Mon, 13 Sep 2021 08:32:32 +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 08:32:32 +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 v2 33/33] staging: wfx: early exit of PDS is not correct Date: Mon, 13 Sep 2021 10:30:45 +0200 Message-Id: <20210913083045.1881321-34-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> References: <20210913083045.1881321-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 PAZP264CA0067.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:1fd::10) 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 08:32:02 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5341d9ea-297c-4e04-f3d6-08d97690f6e3 X-MS-TrafficTypeDiagnostic: SN6PR11MB2717: 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: xL50k952gihxJ+N3Av/1sgEHCkg5ssi34qgGJ/4/LwSSM53yPtt6/uhu/ajbmFEGGJIoYFjCr3DUu1qMZLuf9nz3xza9ij6IezV9yCYfGYwNHodMkz4/vXAC6g60ME/UQdsHjzcPkkFsRXlLRJOq7W3k3A2owqS5DJHyHxKzC1Ae4xamdFYH79cV8AVuB/a3/4BHrh8CCu0Xtxj3NhGIAArTKdpHGtNmDweRVou/vtrBqqeAdqNRshDPlVXx5cXijycoQPNkpP2aczEbrR5fNh3RTgs93tbpAZEEEIhcakTuuSo9A+MCjhvNINI1huH8jqjrDL6+isAF0gaZmfo6H+SwFRmM/Ooh+vxyfU17ZvQMQSV/rgoCwwGY0lKyDStOEr/jBkhEMECbNQ21bT0P6+8kmHXfFiEo7EhBrhH6ddyV+6X6Wf1bF9YhHVtTodSr9YrGVOxMJT5zRQGpHYJgy1F1nsB6n/Kb8k6MDvtZZe4D1VVtN/yvP9F99Y27yRKjn+Mag7GWlNpElk/GcSROupqCbKSow1rOUnmrKu2WGhi6wRGynx8jelriqHDEF76nYSLzeBp0PpJcFiQq7Cw5eK/e67GC/1LEyV7EyyiW41DPIQBkNM7B8QHsW+ILVNGq24wD5zYT7nISqLhZQ9W4KELXzcU2inJGsENYKJC/yxYbod1k/usgJHiyyJJHcErJYmJh2wCarWiyrj8yfaUU1w== 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)(4326008)(2906002)(107886003)(26005)(66946007)(38100700002)(52116002)(7696005)(1076003)(956004)(36756003)(316002)(8676002)(38350700002)(186003)(8936002)(83380400001)(54906003)(66556008)(66476007)(508600001)(6486002)(5660300002)(6666004)(86362001)(2616005)(4744005)(66574015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?rIRE/3S+7/IQGDUbHKqNe/TzPB8Q?= =?utf-8?q?2KdeQMGY/tTE8/qCKJ8jn4x0+ynZn8Bsz3rhHjJcvxOPiweaRgb5gF0oh/Xfspxdn?= =?utf-8?q?MqJ6Ym/a8utn6ZVgaFnFrl+hYUADGnTr3ff0NXFxbZCFdfYukkoM3HXcXI4rwTzxB?= =?utf-8?q?KVv9hXCxHD7GnS+vMp65v4buJwnGacw22yYcI/Zjc7E+DvPhZyg2yv/Q5vvUjMR9e?= =?utf-8?q?WIWbZyDJD4JaDwaCu263xSj4VcWA843u5h/Tdcfw0yPV7xqXOOprAMLHaYoWkw2rt?= =?utf-8?q?DpGkx5M+etydC0M60nQlXXGUvMoyUf+TRAm4ageo4gyEub8Wg2oIDu1k9+Pm9WOOK?= =?utf-8?q?sXD/sFM7p0zYR1UCdw5lGvQpXClwBHitme8ZtWhgMaTuAvFmIF2kw0Yv7QHgX4aV/?= =?utf-8?q?mB5GmEuUcSzflNf5MRmNWJckraQw8ThNA5LxMi5VsPdqOmX9ZIK5gNB3ZV6MkqkVQ?= =?utf-8?q?Qr+eNybu4SQHoaKrQGmvDQzrRq3dGdLPbO/8bGIcnxtAXWqkRSoOsldb88r5zzKj/?= =?utf-8?q?gw6ZNgSg5O5aPpMaeaIs3M4jHwrPnQIInodABDo7NWv/DhGUvZyjt71cwNnCkhTPt?= =?utf-8?q?Q5FQBTkoScn/hiXTaqiXl4R/qminiZKwH6wFE5Q0/W2AyVzI0nvIfKdZAjRnrndr1?= =?utf-8?q?xa915j3UjFiHOS0wPUJltJb0mGnIEeJ8viiZdQS5uwZLifUsWROimCXiPT0MHnj40?= =?utf-8?q?kggz5w1VwNm1pGXavBMN/7EBkXCiAzDmy9EmY+srebMKHS7oeRzohqKtFB7vbpJMp?= =?utf-8?q?Z6jLSjNJnoIObZ8j/GLhikAz3T3q1JmHrPy+sQGgjC/BwaWA8Hsk4c/rGXkM8CMon?= =?utf-8?q?neDArFKrDoleIlIlucbDwrhcr4iTOxal6FD/ZCj60QBNlWZvE0BsEjIghc7jSqi+c?= =?utf-8?q?SIDxeuPhGztBuBTnwQgu32MmMUUSh5dQqmvT60p61h/LlsEiy2tx6LCxD1LO77C84?= =?utf-8?q?oakx5tp3DKKUEdz50rjzhfuSd6XuqZKSGeSvOEJL+6FSjB4WTvy9JL1BAcZsNH1sI?= =?utf-8?q?vHzrH9pupm2iWiO/NQrNaz/1kTI6Yg7gCWC7C4uj8HefrmgamCNT7t7rFyTOp/Gku?= =?utf-8?q?SRDsL8Dtv42wyqtPlyam/814GLRWy/cy0KKobIVWa6uA5GNMBlNYZc3ClMKmWptd0?= =?utf-8?q?VdiX8GOCX5N80MTyS5hNud5n5lgJgVbsol8izFTETVXoewzQVE1I4t9RYh3jmuYnL?= =?utf-8?q?SJQPCjGTT5asdi6/EETJc28nqqV3+9eyNdKTHVtf5TOKYWjpEKlScqRfWiuVsn9V7?= =?utf-8?q?Mz5sLeHNMFcYFfjz?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5341d9ea-297c-4e04-f3d6-08d97690f6e3 X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2021 08:32:04.1626 (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: fpRq9wrVS7JpegK6ahcklzLb/Te8UgoGExhnsnjXZ/QDYFE5mr/VJskAyncZrwKEFtKMmYdzQi4BA6t77OyXgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB2717 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jérôme Pouiller If PDS data is not correct, the device is unlikely to work. Worse, the pinmux maybe it misconfigured and it can generate IRQ-storms. Therefore, do not try to start-up the device if PDS is invalid. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 4386e9957ee6..b24ff4b31b72 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -409,7 +409,9 @@ int wfx_probe(struct wfx_dev *wdev) dev_dbg(wdev->dev, "sending configuration file %s\n", wdev->pdata.file_pds); - wfx_send_pdata_pds(wdev); + err = wfx_send_pdata_pds(wdev); + if (err) + goto err0; wdev->poll_irq = false; err = wdev->hwbus_ops->irq_subscribe(wdev->hwbus_priv);