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: 511656 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+?= =?utf-8?q?i53lsgEIFfgjkD/8EWQtLNRo+x4TLZzbTjSdhokEqlE1AHBc9agnqZeu?= =?utf-8?q?AVY7PNHSPvhYQRHXOCGOFGNaILC8bnkmpqQi4ESwngltRqnXZMm55cdM?= =?utf-8?q?dzyM9yxkOntBkdWccBTE0JnXMtZ1Dddulp+Du1mef1kZ5y86t4H5JZ2h?= =?utf-8?q?ecFilwaAI7odmoFRGmt9g6X2P63uQFZ0sjPpwohHTz5UuQLon/JxsZ2k?= =?utf-8?q?5P3aUjzEEpC4J7LVzdgl/uw9bD0zv4LKAt6TFmHZ8jr91IgY6jeVn2af?= =?utf-8?q?d9bwca9y2mN0dvVaE9YR1ZO7jJdf1WG6YqfCpv7QGjTNB6hQ7Yg++uWW?= =?utf-8?q?pGPJckWqa6ztESrs+HtgdzvtOqtN0UF4FTjb/PZGeAcgcpr2uPf/sYKg?= =?utf-8?q?le4DXZoJHsHTtdk+g6NU/HQuq2AYD8lC7v1C+vWhavkcXA+niSHkLuLr?= =?utf-8?q?kYUPUFvKuPaAqqo9vv7y6CzmIOesYK9Wl9zo+ggVmpd0VIH7argldg2g?= =?utf-8?q?BjpS4CrwYT//1URjFFepHS7dr5Ji2Srmu6XS6j4lQ2fbLKdTh7Eo9JAp?= =?utf-8?q?5JeePRUyzuM7sISUgA63aqsOw/8hWNB7EhQOIqJy05dVYLrbry1riqHa?= =?utf-8?q?tvD7L67VnWWA7UqRWi2KPSsGvfbICPuXVtSI5mOMVzlvgIwOYzeVU6Ko?= =?utf-8?q?5i/L62druwDZQJ0Oe7bPG+P03fg6DB8DMz2oKXzxpI9VgLLp2CULro5Y?= =?utf-8?q?XrB6S6WIl7zkx10FAF+3jj1yYaXU8oX3Vrmn3yC94oO75euc5OhinWmS?= =?utf-8?q?SMbhZa2NvrbuBiLG7lwtSpJHV9jPMWoPH/MHXJBV7Cv1pa07qMhbKkfz?= =?utf-8?q?7sAcuUaUaflnl4g+5YdloBC65LgBLSxmH74ODNM7OI2yXyibXYgIzhp+?= =?utf-8?q?dVXPhp5ZdoWc4X8XcZaAfDLlJ+YJMPMHIrxqpimTL1CnvDXCCzRaJB+R?= =?utf-8?q?noYYB7k+YUC/kJbGjZv4Qn8SeUO18cWHNyIK5+jccOXeaV/kzdpIbXCx?= =?utf-8?q?ZcHclGtDNR6gzEmWG1NgcYnCQc+qO79sDpNq2mHk2yc+gj2CrCIQsv6O?= =?utf-8?q?ZERbHd+n3fHaswL/gHN5Y9A9zxKbrT7Coxd7Egh3mtJnr7rbx/AXZ9Lx?= =?utf-8?q?GLKacrBCuc00eUw354hQ7IXT6M70NH4QXvdJJ5iO3gKYvHgvo5TGKwwj?= =?utf-8?q?186z1mn/55oxDfq9DqT6AFccag58u/waUKNfLKMM7GuXnGIrg3O9WR6r?= =?utf-8?q?Q0Gqv0CdlfdGbl6BJFDqELkHxdGcP+hkemUAh6XcU2QYLb/xfqavPQE8?= =?utf-8?q?V8ftSORsmVTkotv88OOHEf8y+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: 510326 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?= =?utf-8?q?+rQJoH2WO5E8h1ESOd+J7TzJ2gvXPPtCQiCM1eUerzt8QKYhRnwgxDV0?= =?utf-8?q?7V6g34UtPPBtsu+R2xF80rjF8RFvhNFoPpQPZbHcRdLb9VFZlLO6pfCN?= =?utf-8?q?+RhtApEDPt6+yhOwRUy6Hq54dFkzDcg/YyQ7l7lE7/2HNN10bmcgFvra?= =?utf-8?q?8LZXMR6DlwP/UnncSYG4xU0k3wA5z1fUKKMC6HQjNZStZ0WS7rlV8r6d?= =?utf-8?q?FnIDmImytdGqkch4ra2YkW9miTBGTDFaSVK/uK71vdTjYs6aeSsBTkvn?= =?utf-8?q?BW9IwXknzJHGcLvo+xhMGPjb8C8KZ/Xewrq9rKrbSjy23Qsx9yVcuXlr?= =?utf-8?q?LquR8rtHj7RFZCKkqgoXEPBion2G9MOthDz0ptYnSoX9yPReSwKUsu1p?= =?utf-8?q?O4M2+gvF8xpmMmUAgbDBqkmH12Vs26huoD4KJ76q8jbsVzXy6nqOhU7g?= =?utf-8?q?xTqLB+WNarmwr/Rc4WInc8XmHpCEZY4XEUubR42I67U8Hhh3rffGs+kF?= =?utf-8?q?rXmL3ju9I9nyd4ql4B7o9OXnZsVk5dYzrUU3El0FnXVoz438SMjrz5UG?= =?utf-8?q?ApJtcVA1c1vu5lbxYGTQaTiu+DJLPeLjEbfHGJeaI6m/pHu3igbuHVgH?= =?utf-8?q?DqRY83tnY79EOYmWYKAtIWwNQOVdumdhFpJw/aOuBPYw9grHt4rp+h/g?= =?utf-8?q?kRe8tQrUNgYhbcQQwLqIQlSkfzcx8N0aYG80MZPyiD3ei7P7zewRnBkx?= =?utf-8?q?VePJE0CGf6tej3nOW7kvsNy5DnBgBbg9Mv6eeX/b/Iobx194Qdlutf5z?= =?utf-8?q?SZ+AHT+qjwTtSRiWIC++CgVUgUf4evHTSNNstMODrIiZh8zk+Ft876D5?= =?utf-8?q?VDW7I2bTzzS9TMXmYpse5XqIoYw4rzIDaGTyPnlAeQvV6wqC9eGSzJet?= =?utf-8?q?qZt/UIqJu6dWMQ/xoONMUwPfvhLrqMQ9f4LX/VhlE/+D/ZyVWJxUNo3Z?= =?utf-8?q?4GPTeLlb6Qxepk7PpObE6cPDVEnuyThXqVAb8QgO7TEEWDKjfV1jn0sz?= =?utf-8?q?1bmTg/1p92dzLdPpKGaiIXuZX3Aijst6TphfdrPdnjdeCkRIW8oRrYX3?= =?utf-8?q?YGuevmkAi3JkJOJujuiGFwTwWTJ6nrwbuP+/azJ/icQoxM5Q8ShFOFPe?= =?utf-8?q?Mix1dxATfwQkuiEf2fCfhxZPFSWuOFxcPN/LQwDBJAkCBnyVOB4inqid?= =?utf-8?q?HcQsfrhnXXuscz5sj5I673aKF/A74aYnHAiVR5iLRwR8xh8RdhJrN8VD?= =?utf-8?q?Md8kmG5bz3cfjc5fqLLI1/tP7lTSKzbn9zCScCLOj/U3jNIH/IuyimV1?= =?utf-8?q?3OlZ7kLqyoImIqI5j5nt6E4szH4suag?= 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: 510325 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/z0?= =?utf-8?q?NJ2XzzRiO4EnabY8f3+irnMrJkip0rUxMJANgV6syz/5sgn6aByEkG9o?= =?utf-8?q?NrVU+U1o+6re59bY8H9obzeOMjlTTUDi6r/g7WSKsJ2ULnQwRsB5Xbbh?= =?utf-8?q?XxTU3Mb1+MyY4hkFrmuMqHVaV5qfe97TQnmxCbJ/fVLRZQh8vybg6oKs?= =?utf-8?q?l5vb6qmkqrdDpSpgM0QaKTSFz/9HbrXBuoVvtpblxgrnDAN1OD5EcA5i?= =?utf-8?q?a6u6e6S30s+xQvMGiCP9EWGsgM7Wtkw+F4XPS6Z4qJgWa4EusJ7td96d?= =?utf-8?q?l3+uVN47ohka60V66/5ftbTk7XmpWpozDO0GhOnGdqA6dZxWunzXqmbj?= =?utf-8?q?AMfqLxZrzZ3y9BPLZthTH4jROGcA31IDrwhv3SN34zbxABFo7m7bpJNe?= =?utf-8?q?4JNIs1dPgEN3ERKB8BTq+RyhToRHaZtP6QaqjIJenPWKdNInoSu05F3b?= =?utf-8?q?1oYT0LE3HWkUzq7A/PXWZ4/qC+KOpEGBaW4Tw6Do0Si64MfFKPGjJ7us?= =?utf-8?q?2AgI3S5QKYq8bNfEZH6JZEprfR3o9SdQhNsOylSGOFPAK4FQs7ZfPDZX?= =?utf-8?q?P8yfk/6c5I6d7dXMlyJP9GiWnDMlMcp2R5cZUESw8hW78gOy8RlbRWcO?= =?utf-8?q?hzrW9OUDGA1/rgSS7wNpxy8iuMDaSmEo+sYAlYRJGeYafwAr6Lq0cA6k?= =?utf-8?q?2PnYKY3otg9tTGnlgJLRMf44U5Y0pQp4YZaoCEjpLEmdUqQASmXsBT1G?= =?utf-8?q?yh1YpbPDL5VQ0iT6i92fTPwQJQ6SYDJtAT/BQW7R7HNreM33liG2tPfq?= =?utf-8?q?0i7Si3S50MNhoFxHe88Yr3S92P19COb2jBKBsK8UHAUf3iA78elN+1XW?= =?utf-8?q?4rPv1YK1EYUSpY9KuA3wOwwY5Lot+fofJomFRAE57xRck2ZLggIoLy5U?= =?utf-8?q?VvtLdTFxr4eRUOS99ip7UkpkmmurW3p1Ic9oU9YME0XswwXqEfIxrNR5?= =?utf-8?q?BtFoNH6fzGO29V5DV7igoSmbhj0sH1ySEU+YNAGe7+zqYozuyb4Z8gIZ?= =?utf-8?q?Jj1oju41rG9KN1dZwDKk2z4qqFJ+KXSJCO8nBAXQMz3OIYgpUNi7gbAq?= =?utf-8?q?JNnTS8B1IdSYGMTXPpo7tLpZet20Hj5u/jZYFlwynKcDudS7GJ9JpKsh?= =?utf-8?q?RPeQ1XBqyTOwuPj40nLuIPPyQmM444VSasPvGlDyvq6GSVtQgD6cQN5j?= =?utf-8?q?20V+MOfW0cp3aVUK+mBBXxarFftHaQzQsNX3pDTTGtXB3Ck8YxQroMl1?= =?utf-8?q?sBa6eBQowoDcx6lzurXoGZz5jRb97fPk/RMj+dI49GXBVITNcD2dq7K8?= =?utf-8?q?6CWbBeMzAmApTntE/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: 511655 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?wGxKi6HORix5ZIsok8XyfDrR3?= =?utf-8?q?QDcQVgNrFEePGaUl41w+vjnu7J/wvlCoamVUKlwwq0InQDh9nSpmCOjL?= =?utf-8?q?U7ILaPUZPHZvAkBX/qB0w1ini72EdI1ql/mwy5g3SNojvRgtzdikBcHN?= =?utf-8?q?/xyiONeHT5Om2FSbXoJMTGBZTRngAMeqBfThyUUnW20GEiw4SrbSkWWe?= =?utf-8?q?H5pcHKdsu8M0MCQeNHyuKhAiKl+d8KnExgkpOky33ieqT1MelHnWkROd?= =?utf-8?q?cMhwAYCTZMMm40IdSiwY8ATW+iEQFTOPkq7vDAEE2mflLoHHbYBTQBKe?= =?utf-8?q?bP9djMD1qIDNtZOAOM+sUD8PAmFcwKl0qV4Tn8PU2Q9nJZk1lAKQnb1n?= =?utf-8?q?9NRw8NB8DRVz4A46pCOfbgKb7N0fuYlNjzyPuX4mqOzo+MFLpGBJDwzh?= =?utf-8?q?F0ZGPp8xi2LXz8O1NHjp2MT+IRXLwifl+Nbuq3OV+cazRceFVZyqh44m?= =?utf-8?q?K4PPWqrUOzpdeMjFaenYLvpq34Po2AZu6JAofM7drFiY7lKXKfTFoAOM?= =?utf-8?q?CU1cnLsp1j5wAXm3IWv0jDCoE8isSO+9gEhUspwwPKYPEQTzwfli81Tz?= =?utf-8?q?g/aVQgLBQ7GSDdQ65qbCwg3gisEbDQQtPCngkq/f4daVL5YNQ+CGt9Ym?= =?utf-8?q?ufkOFh5Gr/clK0rkgZAVV2O5wchuZhbrx0mdnTMBmFfwqqd9t/J9RMod?= =?utf-8?q?dvmUKNmVPsnxgtD96a8RMDQhSSlvRomk5oTRLi3yXBL1j9Jm8GZF0086?= =?utf-8?q?yT4WEz4uMZ+3dKHylDpXHKWe7+irjgIblLPv/HCMS6zVITEDzCmSYC6Y?= =?utf-8?q?icH11VzEa3ptT+HlOqfXUzSwU9HKdGGtPxN57pF5fnqmDR0mferb0i3P?= =?utf-8?q?OjA3Ct5+H75KAJ0WrnQhqy0gHUnAzdstZkmFUqzTQroWWurEKfDdLmoz?= =?utf-8?q?bW81iMpJ6RQ32mIYAlI++SBaW5wlLj+ofBBo0sVu/mOYZQJyv9QYIMoJ?= =?utf-8?q?WxkAqcwC1L4eXyO0JKctFt3euG1MyqNhfhwQPpV528BvqBt+FEuegYyT?= =?utf-8?q?JZ5Jm9SVtoxeQ0k6FJ/A5ZFalNJaDdpv1jWkRLY93eqNWrvvqltd0OYz?= =?utf-8?q?zz/smRsk9QGno6CR4xuO77P56Q37dao4OuW1SImjv1GThkKlTSWvqgS0?= =?utf-8?q?bhqabeUsnDYwq1KDzJ0+C0lWIHgyUEuPy8QZQsZjw031WbJB/kegGgyX?= =?utf-8?q?AmCXMP4724HOfeNt9M5cE7MU1a7qY/RfG8amOix7qL2kl/imAnkOJTAO?= =?utf-8?q?BQbwFfQKpkUl2Mm/Xwj0bQfHDuC3Jg8Hv72eW4tp6cquEx+CZZ6GRc4+?= =?utf-8?q?bMCwncgAZxqqX1SxsGRnddWZRriEwxo?= 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: 511654 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?gzWkiMdJpRLS6kd9RZL5IGbde?= =?utf-8?q?bKzdckhoeWxarsCVWWifaK+ah5X7GSZZlFmopzm6TExVTeGhvl0ytQ48?= =?utf-8?q?D0z9Dg4z3miiHwFFfdJYcwc0aknZ83dq+VxxE5y/1Vk4sdNrLhyYoavl?= =?utf-8?q?bry8cNbI5cdkaI65AhLfH/+CwexKfikfgL/VCMEvLn1K4lXKjFBHFUGT?= =?utf-8?q?CEmFs48sJAlIpx3Xg1KWFpK/Fn0fadSq3WEhY7p9YsQEpsm5uUKajOns?= =?utf-8?q?mgLR1SFNtDgePy8pH33MuoPEaFc7jnu9PHmPHr5zIdk5w62eIq1ClUwZ?= =?utf-8?q?skSIW1BNKwfM4xqFKh7aQPrGATaKMQoIrrL6NUMeV+VYDfa5/JibouAI?= =?utf-8?q?XgzAgg84BVc4xfufKqdm65SmoBuIKExDZLdBB8IpSjHttU2v7PUfFqJz?= =?utf-8?q?WKJIyCfpcl67ehhcaHhLrP2Nmvot8J216S8JjUgvHpZeoMF1t5TTkc04?= =?utf-8?q?27Asv7QiC5bpxhLK0MKCBBf/3atNrpvhN1i1goOezCfk/wRzliQtYqxW?= =?utf-8?q?Q1dtY+Z2JWHIRK4em+QVM3+SLo5zcCV37aWRV0+ImOwA8SSTl3OpqdL9?= =?utf-8?q?H+wWO2LmiksEsBBzZNaC68wDupsydgTz+4XZ2NpJjhRBHygG+CPFQSj9?= =?utf-8?q?CU9eom0AOqRqgF/Nyh90WzshH+tNcIFcRH/Akx8NZJdtrkY6EEO0Y8HR?= =?utf-8?q?u5qwr9gG5DRHc7IPPsHOLe57kIWEXsjn51m1fdLKeye/OHF8xc/yW3IK?= =?utf-8?q?1ojqn0AsNewCcJ+4NDEWb9wIE95YhNqJh18IA4XmPSgH9i/KqA+StJDx?= =?utf-8?q?ZhjVhBu+AeQQyHReJZO9TmGrltn1pdVSO5tshNI5zoSghMRn3LFcsT5O?= =?utf-8?q?i8jyZNOD/DVvKR4mZHRgtlSlxnIl95pb3hq8ubmvPQkF/sX30FgV+eSC?= =?utf-8?q?w15KCV8Yvz1pZGXk0GYLFhHx0YtoZ2WPgJ3uBCblYzwE1x/ntHKkz/nl?= =?utf-8?q?ISSPJbBmGZ74eaU9vlqGrj2B/aQVYIocq09N4MQyNlmQCNc2Re4c3FD4?= =?utf-8?q?6FNrRTiDkC1NEY5R3fL32+J5EqB0/MYquMtNKgjbMSIP7wAOrVbV3TFG?= =?utf-8?q?+2F5HhrL1mLVsTlJv8i/siTVkiGAI/a/O1Zm8zwjk4VODEE7LSDG4S2l?= =?utf-8?q?tumsvI6R2PcefZ/3l9fXwCrSacFSZF/B6BE0lufwisJuKRQ33hm2k8zk?= =?utf-8?q?hRL0Op7FbpvCPHvJXYcmZlNxICxCwn1J6UwgV2zmida/MvaUyRH/30uS?= =?utf-8?q?gxvMNz/n+r3WyHLZphg/R/NB/L96awcjX2zZGn+ELawvndySB+tkqmFh?= =?utf-8?q?kZ1NeUN3BVA7Ffl9HPtLWlslG31qfMH?= 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: 510324 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/?= =?utf-8?q?5jBUZn/acxHUvMaGhni2IZ3KDCoqzM4weLqX/WhzyUOZR1u+YWyGl0+E?= =?utf-8?q?s2XLrKZPhMm3XLUROMnD8wOzSr8uUu2Iwcm7C3MEcgVXLRkckEB8P1kL?= =?utf-8?q?GG16ifn76E/G2Y8oSbhYz6vA2Nj3JAFNy7Hd1Y6A0pANHnJ8QlmMxc7G?= =?utf-8?q?Z8y+BXMVcnIBjDXBN9nLBbK6AXGamP3GCymy1lrlcz7Da3rCpTPMwBbe?= =?utf-8?q?SD+3S9JRPttGMnMO1HkRwkKF1V8N3ULqT+ftwEtT/fj274BC/sk+S2RX?= =?utf-8?q?Xx/YQMTCeHIrWfd/Rm8YYwNC27o09L5LZzVwadX21CEpAWBWBC6pR9EG?= =?utf-8?q?DTuFjUxbO18vbHANYxiuvXMxCDU+72fkrKVbE7DhGfxNb0LfUrvJa62O?= =?utf-8?q?gcR/+zhTzEHUTMKMs7nM7TpCNo9v0tMRMGe3aVB5AiQtTQZy8e1MlD63?= =?utf-8?q?H6k0oHBcQdgNWJpDDl29221gysK7mnrcmEfwXosk/HWB3Qf5NkTW9KxG?= =?utf-8?q?xzz6tWkVL0qUEt5UJSadUgvPBOdcaVnCfYHT9JKAARjZDeoXjh0Xx8jF?= =?utf-8?q?uAm80aLnjuqOAX1/HsOVfOLhMlS1PzoV3wgAO7CR6sei2+3QOWpFh+c4?= =?utf-8?q?nhK5R0xaJ9XpEEWccwbPZ5gStGn3+1XhdeEX/+D3+ka3VBKE88UIj+La?= =?utf-8?q?0kuf/3VU20Qw7Aw7TfE/Wiv3TM8FACcmYxsXHgsqk0YsPREe1XQzi0Zp?= =?utf-8?q?JpnrmPBiuN0MGi78BaIO4pcez0zMf1tF/39XPcHu7hAkphg7Ew1Oafer?= =?utf-8?q?USoRSENzuh9mn1DUM4R3RbefXH0LzKbX+9qsuanxhED/ugLM4bWgt64/?= =?utf-8?q?svFkkbJy0dfYQwHCOjqxG2Xw7bgXa2pRnbrE90H2PkwPvBC2GXlsWqNt?= =?utf-8?q?JbzJvFgeBj7EBNJv+p9RsD9cyTnWUc5aMifCasgDdkunNAkLeo/orC7v?= =?utf-8?q?/ubcWPznmdhceuYQm5NNPeBX9w2J27Zbs9QVWOkkXLeZVTWiEYps5gtC?= =?utf-8?q?Hz0ISB1kjLgzclaC/SMOYA4jY1Tio6JeaDPrdoD4Cqg8JBZXgFKbHlcd?= =?utf-8?q?aQDyzKub3tnaVciAMtUu12iKSEx2xN4cH0i3YMoD9uiHyJGOhv/byziz?= =?utf-8?q?yPDIv4X2iaNeaF69DVC1lB7Ps+Wp9ASiUU7kyIDCjnYU213TD8X8FEfV?= =?utf-8?q?TrboSeNGU5VW0nqPDxlpFvWk0JRbTxzGU/i3MSehbiVxQvVxw1OOAVLY?= =?utf-8?q?5vjLEP+OD7symeuDDAn5sQtOlL4OWyNI97vqJ2Nkipq59lAJGveeMuSs?= =?utf-8?q?ouDKKHJo271VH+/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: 510323 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?ny0hBu9rYw2nioaZ1CXwRFu3N?= =?utf-8?q?Jy1eS1iEGsywXUf7h/PzPN3u7CAa3QNP1ISwt4Vkke/sCTMaT+MYYdqw?= =?utf-8?q?g5vI/OujGhofsVGG6KZC8RNlZvXBGgAfEDpvgVAKr3YYHL69UeQp7JSG?= =?utf-8?q?4dm3IHE1NToXqGugFVol3P1g9phFwGRg1L66S+9ieGCu//Q1Xw5tjgaX?= =?utf-8?q?EFT2a/ecbfSk4GVsTRaL42qipQgtZjTaxf7V8qaK/EAm+eq82SWaxae8?= =?utf-8?q?N5a9ZGepltHkZegSRGauWBaR+KvNjs/EWKHZ6fjJ7B0Qi2M1tbBHMZ+x?= =?utf-8?q?38GMny8/XX9HCEGl8iFZI1GlYb3TRqBy6F/GzZGbFKlgDwHU1FYKajEc?= =?utf-8?q?p4DrAk65Fg1TH5uH9MRz+frr/1xM22w2ekUXJiqU85+zDXHxEuXV+eI3?= =?utf-8?q?Bh47ovUyjQLI3c5TIFBrWLv6cVylOTCHw0l8a2+K7FwuIkGprdALfwiZ?= =?utf-8?q?F6TnOUeK2hAK5vS73qHoo0itzdmA2iVB3G6SYgGAjexOSHPaPxozCcAY?= =?utf-8?q?p4aoJPCHgJGOXSkXj+GvtRQDXZUNtAt/V1NcC+6XpmgwehpzTgTYVmLA?= =?utf-8?q?xK3htYwgPtpO8chjTYS2I95qICnxEuLnkNTFMUd/i4iS0zZ5+bpHWsb8?= =?utf-8?q?rYhgIWrlGHrAcHx/Yvdzeh928Mqb9o+YQQoJ/q6cngxnG9/qpyx25I7S?= =?utf-8?q?tgwyQCjeeHnm9hY7XmvrG+Dua/TiI3IFXIU77g9MmVEq1jdcjPdhJ1ms?= =?utf-8?q?FM7uvahcByG2NlMrZDzDBCyX4GrVp9M1DvLaQ3cj9OSq9MWjs7pSMPnZ?= =?utf-8?q?6p8RtNF5b+WN364b4vgh1pfUijqfVz5lNxtzZ7Wb1fhiLRXw36RX9wMQ?= =?utf-8?q?dgfObUMOD5rJz/lxVMq9hIn1aCUTaiN9r5K6fGgPEFlvjD931lfSSg6B?= =?utf-8?q?aBqbjUVNcl9Fd/HAubI+WuLnPSD3iMMYanKKqkmySM96qCPnb2fAVQgp?= =?utf-8?q?avRli/IjlSiJ7bFZD4EvSLfdBWPfCKY396LmbSxmH57aJbSMHl3MGEBz?= =?utf-8?q?F63o2p+KYcpy5m9wH3ZacugVWeB5t54gzgwSc609H/KDzlC2O6Ksi0m4?= =?utf-8?q?rdcgl7yHa4Ze2yBYNYeM6RqAXIzkTtVokxfqOskVHIFeucHZMq5/v3wy?= =?utf-8?q?2o87MrMhZzYOfDh3pYPkFpJ9qQR5GeeJHpp8WwEgQW+VNAOO8aGQ73dO?= =?utf-8?q?SqWHXYa37twmMlKmSlED4XsK7yVRcVrifjWpyIOVaIuWFDhSe7Dgoqv9?= =?utf-8?q?45k1czirmCqpCf20az3I2ZGnugkICqRiwibDYQKFeXcilgn2MT3LncYw?= =?utf-8?q?17ySfQhRaSaEOFqqekumpSNUMArV4VU?= 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: 511653 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?crkGnC4M6EAKKban7Sn5IYsLB?= =?utf-8?q?Jty1T3uQLOcakVM64B9uTv6dsCDbI6aLrYQ4IUNapj9aMAe5T+zwn/nS?= =?utf-8?q?t7jvN+gHgb8UprcqjvyHyfmEeyaMiWLMhRhZB+3aRvV5ErkpBSOgfQDe?= =?utf-8?q?EWZfQZnSQ2Qi5OOIZY3a5ijFVeMaB3jccatQVFdOl1KR1UmVDza8AKDF?= =?utf-8?q?cI4f4tr6O+B2260pPdbTGvf7DrAKVc7OCuizFNEpbTxSIytzti99UtkA?= =?utf-8?q?CYzJbXBwqZIiTT0GyaGCascbodoLUdLjKYmpOpiqqWSh1kP8z8KV8JkQ?= =?utf-8?q?xqPvnKid7xyCyaV14i26b92RBgz2P1uXFcuDWohnlgMmvpQSyPzAzshb?= =?utf-8?q?V24FfyuStTRCQ7XEp3CLpzaQ60ex5nBuPPFcGhF2Bd+K89NMIVrR63kQ?= =?utf-8?q?eSlnHp4CgNnotq8GtHnnhyAFclkjTU1HkMSoCg/N1eqoxPxs8ZqJVa3k?= =?utf-8?q?aPWJqZTvjWKU5xa+uSYWjONp8BLSeabLx160aZkZtI1LC0jTqNll7IXV?= =?utf-8?q?P519QBjL4pfFhw24dyZZGmviee6TrCwlq8ykikCxRHNUjTYugr4FMhr/?= =?utf-8?q?QHTNjAU0PS2drwull2zlQudv+QfQHeiY74LYQ6vsZXHUpwSyJWXN/fcv?= =?utf-8?q?NjF9jRLxnTjyDEEp9EN7UbZzOm7OOYWX94CusK0vEQ8qj3LyWysOmygr?= =?utf-8?q?VYljDrcFnCQ/NgqQASBS4ULLYNzeKkXizPW7j+JLj9LgHD7laQ618VPS?= =?utf-8?q?sOoW0HwgsP90vxucR0un5QXm2oOxChCv3cVSvTWZjed0GjKqvXa33pIn?= =?utf-8?q?t65W7LvC7yy4ZJV49xVkxxUf799D3NelrA4dAwEKf6dCt51THinyF9lz?= =?utf-8?q?bWiUAFargG7uQYemi4PzsSeQLnkE/+IeT6+b46RroDPJbij1v14it84u?= =?utf-8?q?zJKftsWhCEjJeg8QC989Wzr06SRtPBE7sMhGLRMSIOVQPshZ7tuxjJm2?= =?utf-8?q?WbgGHyJZo3WA3bQmCJtg8G6d2MTC4Qhe5BCtxsaYTl5whCT54bnMbNf7?= =?utf-8?q?ilgqGG2SyImrKKmzK/6LU7kYlz5xX11b15rha89lYOmb8lvlcwNZlb7A?= =?utf-8?q?GvWspx6aTM0Sko3rnE3xQwthrYpnMHDAZmYEnm7hRpQHqyvZIMW9dUh9?= =?utf-8?q?ykPKpaS4lqkmiHhH12zZl8qDl+i5j8gCntGcGVTqZMAXgyXmKs5Mu1s7?= =?utf-8?q?mqQX0p5H9NqVXS2WidfHERWnKd38UYg6D7kEbU5nCbvPd8H0+dvqyLwU?= =?utf-8?q?iYEfP9hq006EQdgl+0hqF/ymItFUI+n27v+xZnmEpm4YBwwP8hx7wQBk?= =?utf-8?q?5GwJ8O2n5defjOsnwrYYnXgqWpq3hQT?= 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: 510321 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+l?= =?utf-8?q?agNDkIlbT+Dn39C0MTJlKt1jjUMx4trL9hSyHJlhXW6eW8zsV876iFQ4?= =?utf-8?q?q4T8a4nMVCWxPZ3JgbYapUlNRuZWl/k9VPp54l4EmbvUMnF9MpjmYV9D?= =?utf-8?q?QrJ3GSbwl+vvI18aPEpOrBGodK89WBbA6LCJTxq+GFOhO4dKG4zUKJmb?= =?utf-8?q?ab/DNc8TAvxhAExhwtz/88VHp6G+Kt806xMNv5kihgGcwaPdSeMXKmFM?= =?utf-8?q?zT4ZPmM/7ggzrvVntveDZSvhTIxGVOWt18i1Pb+0EHFgJR+aLad1MStG?= =?utf-8?q?zWNlsA9DRJs4ve1OS9NqeuG3Jdt/2NMvnA127M+7DHNaS6gCgotLjK9C?= =?utf-8?q?wvnXN5g182Wr/Flu7dmrX2+4/0sgwj0bHGGDYC63mFS/AuH6v8Q5xqTC?= =?utf-8?q?7FARDuY9UP9Bv/6Hmv0UcaysTHTPutxjBQ1gBD8aonvjr+RSMYIsEMAu?= =?utf-8?q?tKm4Z9UQdNaNiwEkxQ7Tb86ghcuCNyulrEGLvzQTagoxvJm9cSZYiT5w?= =?utf-8?q?L+o6WzYUBSMPJZBCoAHr34uV4mDqKJ4HL00EFuTAqM9D6vsrNGc87F/1?= =?utf-8?q?Umj8o4qTUKLDJR9nKhuM8qAlLAXCA0Xzg2cxyl43rSVgdBYKZ1k78vvc?= =?utf-8?q?D8ybW0q4ntbm9m6F5SBGY4bOH6MCMXLj+NiOigRHdu5V0osYddgd4SlX?= =?utf-8?q?M3AD+mZ+Kc8xZJv+XiWGsPG6k0fXF75azYSbp3lmdUIRw5Sw1e1P7JTA?= =?utf-8?q?nksFXI+YhQ71xO7phRzILduV5HJwsgiqc7CIKc8qYFE0mx8R8Pdsndub?= =?utf-8?q?0fGcPNeRU3QiLdLifyh2SY2qPwTFOD2Z7/4FikgPWL9AAZ1S2Jw9p8k+?= =?utf-8?q?6bCI8wkGLrimihxrGgWjJNMxYj1BgTkmv/jy1h/wgln62xTuyxvThL8M?= =?utf-8?q?/zFWqm9ON34flksdDMCBu11q+fxjRhuVhnFcD13pRCiYTS2DJ13lAnGV?= =?utf-8?q?d3SgjiS0j6txecY0rvIeZHceahBmrNpFz2uqMAbPtXxUtZhHT9UFA9Yi?= =?utf-8?q?uibc1H/yZbu2QRv1z94twOAq+AKYS2BVmjNzTUVUkJvCigHCR4tg5WpV?= =?utf-8?q?UHtx44p925kK0GzZ5hSx28XLYfhY8LjrgfyLoL2X2MK72ZYqO/CEj9rh?= =?utf-8?q?jo3qMb+utxmMDQ8/aN+S8W3qosK6NIieDQWK5SfI6hi4YlxPt+Q/wIYI?= =?utf-8?q?s7nrxSfBX7EhpUA8cwCaJqka5UBPu1htOuewuQNW75majmWVqw/DA471?= =?utf-8?q?68VoLyzt3e6WGl4cy7Wvdr40zU8UVyahT14TGUNKQ7H/UCb7us/GRmz2?= =?utf-8?q?zwK7/SsnyKBeEcmBubvZAR52fv3OalN?= 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: 510313 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/uvCE1A?= =?utf-8?q?PDy/RXziDTCIYV15m5hTTOW27EeClOG3khJPUcrqnnlZISZyZ5FYYJOi?= =?utf-8?q?krTy5euQABGkZvvgbJPgGCG9p1YqZuOUudNWed/cEQYzqbM4AYOKyXuF?= =?utf-8?q?KeaUrm38QsRvhL3442xbv6ANtaomxWEWOph6zozN9PvExNEaOYyflv9W?= =?utf-8?q?SbRFgFrcqnb23kmhmT23n7n+QXellz4gBKv4drXcolRdKQEupjagnZ81?= =?utf-8?q?BCs5EzuWhJ6PNf5ICYgRKFS199GiW8NgHLc981bKU4M2xz8cuZRGiv9d?= =?utf-8?q?Tf8iOP3vLnKKBbuqqent4y8X01p52+ZKeArvsVDLh7sIiIAhOHzDg+um?= =?utf-8?q?J4UUg0tS67D+B6iu0lXz6g5svNp6vs7FW9EXGjVfbJtweHF+oOjKrBxp?= =?utf-8?q?X6Fe5dwyxJfVp/rkQelRRzQbTAkSab+PhFyBqde36YVIJOBnMt8RH1s+?= =?utf-8?q?Eou6IgjQhX7tYv1ysOQNDwruZ5ck7XFE9EYHfHlk6lQEhV1OCcmYjJU4?= =?utf-8?q?GVuu+mKCp1PR8/KqlDVWEwhKPKIWs1e+c4b63qvdVQNj2OZT8ggdDdTr?= =?utf-8?q?w+579nc/w6MMn8vh31UkJhqiKQ5SMjHhSl9921VnRCYmCU3kk5SS5h2/?= =?utf-8?q?/FsbpJkwhsiWfDDV1vT8RHyXwqsMCqfMtQSSnHAAUTGiWAFLEKhW8xLQ?= =?utf-8?q?oof54muBusJtgK8aPxb8LeFYEOG9DgFtepUi3d7smaQKNaPbpFsivgx4?= =?utf-8?q?3hCukP5VjZYIaD5Zzlms2iSbDWzwyj6COrvY12Ojt/loTbMvdHLWT7hY?= =?utf-8?q?8vVioJw4j50TiNJDbbV2AVIDkFr+rzEkN9xVnYBih1NolQvDBe7K9042?= =?utf-8?q?GsAQJqTFTGTSkjGz9RaigpwZwxHc+n+0o25upoqg0SKFxMtfo+N6VdDG?= =?utf-8?q?Ln95UQxQx1cgmgEpfG74rlT7ysQH8UoM9qUlqR8ryiFp8sS/H12fFP5d?= =?utf-8?q?MH8zNT3SE7WTe4UcnoPaeuTeATYXakTfpfzdFEhDf1/DzXaGsUSGBjpP?= =?utf-8?q?Gsq4fenTbB4z4+qo8wCEVY0JxaiEjKqZGEj+xTSVZAQo2EJMsluu26ba?= =?utf-8?q?JzkhcovU9JVRLkV0Be2snmCxUIcmlv7ftrEdRKMNhOxPii0FB/O6/rKq?= =?utf-8?q?ZWEUUOi7207aFz47tywOyuTvNQdzE+Ku2KPBzKenqjr70sgB2+43RO17?= =?utf-8?q?4VYXydvG9sSKB6O/iyJmNrhRBEKvG4trTa2lPqPsFkuqZ3WnbVD0nTd3?= =?utf-8?q?9qdJoLj5JFSJqhh7cSQTy48F0ldmB6BiLWcnLjqcDXX6KRqXFcG8/d8w?= =?utf-8?q?DavL2tibsU/sfPax9acUKdC9HJVtvF3?= 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: 511643 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?evkcLzCHBEfsgmQ8tPMdJKFty?= =?utf-8?q?2pv634h1RQ/1BCgtiBii0iftbIctiju2IPIjXS6ewMh6gUKX5QOG+vhE?= =?utf-8?q?+eQh3O7TdaqEQR0zennwie60N7ek+4A0fJCM0naXloN+r7Xh70pnWRIX?= =?utf-8?q?szAwmUVtYHfHNpGsBLOP0OyTTjMZdaItzbXSz2emxzJsEjCTS6IrZ3zl?= =?utf-8?q?sFmK5tOo1tBVyanNyUTWGF7/GI/kLgGtv7Se6mYzF4h+06v3ODSXNigG?= =?utf-8?q?5rk7vhUzLlzJwypvIATxGDF6QL3GU3piwZnExnG8+UEl1ZyV195HaKuN?= =?utf-8?q?f6G3c/rqaGbveSp8ZM72IyvXrTeiMQ35ZP7UT61Qe1fLuVv0k/uBexRP?= =?utf-8?q?pYI0NFpmulsYiglaE0KqKWRC10/pOpGDLjpCEEQYlkfNT9mNZRbf7Roj?= =?utf-8?q?3fi3WpVMIsnuqGZcxggyhs1TYdtHmq5U0igmjF0BlPVQz0zly9tOffUu?= =?utf-8?q?AppFE1CFx6AfUllkmsqBESLm5n3+tQUgQEmBLTQK4y5QJsuWGceQimXX?= =?utf-8?q?sm9iSvwVFXzdcyqPqSc51YnNLDRsw3MKdoXd3SBWXLS1w/ATNGZ5FUPm?= =?utf-8?q?kpwj38XNx1JERqgTjVozt1UC3HBDfhhWHFSROZa5dVmcE3qLQ6HMx5X6?= =?utf-8?q?tFMNH+h1D8paZLFE8IzHjW14k/jqSxvY0vr7x+m99GCvoOdjR7tvN6h4?= =?utf-8?q?iYvDF606LPdYjtKhi1bwZt5h335EtGg1dV4bqR76aBs5/pOkfvMajLVv?= =?utf-8?q?8M0ylxjbtvQadehWscY5jN6WQFU5DSQWWGWIlYYXIRT2DNgol84s22vL?= =?utf-8?q?Oim/sKSnGpxKr7Etpnx7zsoYLGtCfQSYCQNVXqhjou98xkuIyLgeK4AB?= =?utf-8?q?ZJADYI+P+uNp7BRe+xQMmNudO0qU1kplHLOlBD+qETaVpb7wl9p4Vv9V?= =?utf-8?q?CgNcPGxxeU+ZQRCDc9f4u5mxfxvBvL/bHIAXPeVoIp7QH8DLMIkq/2D6?= =?utf-8?q?S+yB5grxXBJO+AJCclLxDvrakPGKuaJCZXl9AIC6VGwMbYy+jZos6buj?= =?utf-8?q?PD/4zEZL1vy9gk9GPTLBbj4PBw/1AjQXX7AY6wgm8zgVuwMo9NxWU/Eu?= =?utf-8?q?1wB60hRihRPq1Q0GaVuR6ah+7S0XTHGJvFNimb/thzlTMYiTYVv/ijyN?= =?utf-8?q?pMewiKybG4o5u+ybeLP1PcJxmC426jekGrpo3oNDemX2whBI+R1AtAWp?= =?utf-8?q?O30ZJ8eKaWOeh2GYM4sdPV1+vVgaEYjr57IfgTCgLBNoyfqv+EWpLOHG?= =?utf-8?q?yfXoVYQuHBH+0jj9luo+Lm43xtUHMOPwcaRr3YiExshRC5uvfuiz62vQ?= =?utf-8?q?ZitsdY0ZfBN8/Lcs4spGC/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: 511651 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?9z5J0V94lIM0fiIBNn3R8DGuw?= =?utf-8?q?maFII19dmAH2/NkCv4IidXgNi3JlYZqOk4RLIrMBDSj5v6p5eTSR803T?= =?utf-8?q?gnzQxWvQx9eGVSZZExTFa+ZJsT/E13nBApDsfSydJEeAyKypMEOZsFRl?= =?utf-8?q?xptfwxmApda8nxHrFwGZXVos8q+htNsMUjgLWFX4TSx0hOfotU34CJz6?= =?utf-8?q?5ZHsWTGhS6ypTJqRnyxrytWwTnBAEY5K0o3Fp1ouwa4n5lk9GRToA3e7?= =?utf-8?q?q4yVd4EkQbKgUKcMz8WFqLyTwMlefdoaCDZrFkZsGDFuucLgRqMu/sSB?= =?utf-8?q?VvzYOK0PgfmtaazNP4sWKO82LvZd4otQqXjudVCRu0BrKZ9973THpttk?= =?utf-8?q?BukC8D8DXx1TnoeTWrOVir8ML4scS1KHiM/ORYBoY3aULX/QLGIjPzmd?= =?utf-8?q?6WyXMgCQVUeLMI4D+a4ApJ84M3+F4HdHT3QVfjUWkOjmKNVjshvB3G9O?= =?utf-8?q?aYh8ext5MF3KrDj88vD9JIYdLfIuv626XNqb+iGhQX/1r6Z17LXTcDY0?= =?utf-8?q?cp343lyka3jdLaKewBwFaZrI9qTnPtc/JrT7iU1YbLJcq2Dkel/Ms59V?= =?utf-8?q?q8SkgEnH5fB2aCfC+Ue+qMqBBC1L3tgLlFh1pwHaoChVsLuYym7kXiZA?= =?utf-8?q?eMAqriAFc/Dk6DOl8koKEEOPMgii4wCoCoW5LS0/J0nrxd5HcWesBtzr?= =?utf-8?q?ZdYzZDGlsZzYMCD+ZpU3UdcU8UnvwYArGjBkpVQ+/rGY+fXWqtB+LztJ?= =?utf-8?q?uB87dUouCZOJ2xITRQDCPPQZVhRBgR84OYA0WQ0u+jxnQeOWUzNhYkoc?= =?utf-8?q?YhiNhyu0R5jrjwR9o1Jce9GYkCpanD1aBXecnsfz/TNpUfxLAXI6F+dG?= =?utf-8?q?2xQEY8qMZyhNxUKTkAxcdtYz/YXQ5+An8XfiomNMuSESq2kdb9ooVd+z?= =?utf-8?q?y/pVm5o67IpFf/nWubetE+DzdfvfbLjVbYcdkcINCTqWNmn2rwoQU2sk?= =?utf-8?q?Y0H9csbFQTuYI2kv382LOenB4xKr6/+kGAX1DQvKdFSuOCa1VRZ5gYVF?= =?utf-8?q?Lqokq6UHCeHuGYL9m46IyCvfR4Bi+D6pqW7EfNGZGJOqdDAbDkOmZjJo?= =?utf-8?q?PhBcIXNTK8TSwkLaYCQT11MDJGDErVwsnhGd3+lSdOoDdoWPg6DbCFcU?= =?utf-8?q?IruxVhC+mv/itGJyRN08y5O9WZrLPEJ7z9UTRGJPtOxnrPMCNndu96ET?= =?utf-8?q?xnsuChuVG5HLYrAgRcD2WkQX7slk/iEc8jd5US9NxSDarxBFmJKGTsQx?= =?utf-8?q?IfRWHgzmQgA1QqYgKFRZs+drpNP80nZqn2MtjYLVnryV3yAUOC2s7WuN?= =?utf-8?q?dbVUyl3CO3GxphgyWZLcwpl8bj93bzn?= 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: 510320 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?djg313ugOCVQkCyjO0tKLtNFI?= =?utf-8?q?L1Cib76OoHAmQ3zTQ5LspFd5T8q1ZtIJ8tOAQDYiJtlFhUAa8mDr3SxS?= =?utf-8?q?tpY1EFpfB0/Xv0/sGud5s8UUKaW3VbD2kNPHXyJjyZ+sLU0jYPVAZ2R1?= =?utf-8?q?GCYIXrnMQqkGl0RAtmavFyJTKjlWXO/13DGDPzzpvtGwcOrNtltFeWMq?= =?utf-8?q?cq5E/JkgnCDHElRckvfoLH1wfZsWTxeJzfe7MKB5AAZoikrDXSRbkPIV?= =?utf-8?q?E1o0WisnOZz8ghmPv49JbK9Dk9Qr9gBhOUm2nVK2zGIE9mRgTorthuL3?= =?utf-8?q?xCDAQzIPcNGfswKk4zq7PGYiwILU7XwwpEZgXfDdWgQiVx54ToWWw7sy?= =?utf-8?q?ZdgFxCSEsikRmaL7vSpRp8rBLco2bymwWbkndAODdUg9qsimccqfbg1F?= =?utf-8?q?+inoqpmD5JYNPP7i09EbL1uvID6oP56VhI+A2BzoQwPera/Ob5BYn46D?= =?utf-8?q?HlaY1DDIO+Ey5Qqp6JvgK1riuEoarphY7HDo4WHzST7jUCQQ8sB3rdgf?= =?utf-8?q?2xJ++mRfihyNotWpiGD3TuXCA+h3Cir9A2eCcxnxlk/09GiVtfMgbRJ1?= =?utf-8?q?JaIxzn3aH9GhzlpdP3rUqP9zXlKdQ0e8Y7TJ5YxFVKblKFhyataCKLUX?= =?utf-8?q?0PTKBxWSEhid5zNjkey66YUyYRg+o9Wlin0OZQ7YEOJWZ3AfpoO5ftwX?= =?utf-8?q?xa/U0gvsLzAE0EG7SeTnOIdkSkoWlGTV1S26IsM+hAOu+7P33OGSAsox?= =?utf-8?q?etRxRRbnsILqAqufp3aRGjdISRPuDMLZZKigl2ZY52up5euOoOq581RB?= =?utf-8?q?A+R6YpgFXSoWCG9y5lkX9zdty/LLPJiHNu83Xk8vY+iysgDkj1H9ISjJ?= =?utf-8?q?zwr9O5cNoiQcCKWwUzbjxAYHEy4m5siHVSvSoEY9aTUC75xtSQzDVq6X?= =?utf-8?q?E9zFfYgwz2OyylK3AY3tSG68jUwi9+Ngfrzdmp49NI3GjsqsHLS1nPqn?= =?utf-8?q?U1hwh3iQXxACNWNcrYdYpPpjZuqykEOO/IkX5lkQzxNUvGowUgO4qoBq?= =?utf-8?q?ciNB/BA7/6D9e4YEA707R4ozO97Hi4PHE4MG90GpA5fCGJqmoXNLwR1c?= =?utf-8?q?w4IHrX0lCjmVQ6LofQXYoZZ8GPSROrUO190GQVoPBp6erTuq+vcjAfw2?= =?utf-8?q?iNjCVsj0xEY6ix9yWmnnI21smSfUeFwV2U0NMqcG7E+uDUgQLzD+bmI7?= =?utf-8?q?6cBiB8Ywk8SuMx6GvYh23e1Yo5d3m5cSc89nXalusM0ADANG0CSUjg/J?= =?utf-8?q?aOoVkYmVgngU00cHMWePxf/bKPeaLZdQTMr3xR0PVonQwovPaueby5A5?= =?utf-8?q?uZlZo4NAxpAh3VDU5w9Eufr0hHBUCQn?= 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: 511641 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?hNp6wJh7jLFiyd4KRwHU23amv?= =?utf-8?q?qdVVucl5x+tqy5mhRRiAH7YRBZ0NaEmLBhYc1je+tW6hWKjreK24SL4Q?= =?utf-8?q?M423lhlgchAa1PhN+dBlBOSEOTZ2Ts9e/Wp/JLWcjya0EmaZyUrbXkWp?= =?utf-8?q?IQvCxfpIq+2+M+johSOsmhOQ+qlt+oGALuqvyiJBarYdNTs55BS7g8j1?= =?utf-8?q?2K//XXOABAjIL7o06H9idDWSAhh9W4JeGwoBi/q4k0EErv+mW8+VNFAa?= =?utf-8?q?9Jm6e+FUr/UUrAqfpbMQxHfAibynwRnF57I8WGm/jNoMnKsGFPt+eH2H?= =?utf-8?q?7LTyNrzwKnnR9kjj7DJou7r94Ln8lDLTXrdPcmJiLy9eM70IYCcp+eSF?= =?utf-8?q?TWujPX+QhZHwn3za4WUOlAHlXXNdpXHlD7SMq6EHMyLJkHt2tc8vyu5y?= =?utf-8?q?LiFSZ8zydUQLGq4lno6VsOpNyWBn+ynHB66n1Gbw1qR2C0avNecZwim/?= =?utf-8?q?G+oqkGhLVxSVJqySZATfto8i1oTdExmJ6WBQLSOxjyysKCxC0ryk82GE?= =?utf-8?q?+tIiFJ1deZS+85l1TbsuZyZqSB6yyEPiJMfItzrs4xnkR08G8qb1L5gc?= =?utf-8?q?Pt/wGIK+IuipGl/pOcHiqlR0AEvAL4ytpjgcP/0SueumhsZp2EIWHWJH?= =?utf-8?q?5RKv2D1e3yCGhClB4dPn/GzVHL3Cd9djfFsKg/khjwtbJwVkLdyTE4ak?= =?utf-8?q?XilMk2OhJehHfyy4TczfyUquTNMruO7Ve1VyCmg9Tcf8AttLisuog3JV?= =?utf-8?q?ktI2D3PMtNXcE20VHYYDae+TpFcpGG9DFCuFa6Rc0/hDJGJ+SsiOVEUc?= =?utf-8?q?6LtOVorpzhXwrbKB0KCV0KnQWVqzTMcWjgXSlrHSNlylRrxSvQZ4nRy7?= =?utf-8?q?gGOySE7W0lnEWNtXLjbz5i1yWR780VyHpAV0KyRqo7w7cvgbWJTZXUzW?= =?utf-8?q?QdppDj8MGAMJRDDUfyi4r4KYqNbvktmKvzkv849wqBF9MY0/3SAM7aNn?= =?utf-8?q?yIAKZh03UvaBByyiISz36EPdjuV/BCbXPMJRgTJm2sHp1ms6aEGeCwlJ?= =?utf-8?q?PiDuspE0lzu/kWGSs3JhjcfIWdqz3ykmJ5k1/ShJ+8AFLJpG6em7JGxy?= =?utf-8?q?uiDQ3KrUgDOtnp0lGnJfm1v/o91yybLMtnpxdS+wR1fUHkLbi/RHowG9?= =?utf-8?q?FUozrzMswv/xpmjeO0xa+z+gQfKMu+KoXRHcDKHHx0fQIoutzDD5QEps?= =?utf-8?q?4Nag3/7Bj/Spe70isYpnFFDKmUMxllfgMvig/K7njyRDg+SonYedjQuh?= =?utf-8?q?jsXKsJAzRATTgFHgotHpnqofAsCzvlBkumtcfQMZS/ExyXAOiwSVUMlp?= =?utf-8?q?Rpvq4ny+RjtnHEdjyx67VKab4viGq9z?= 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: 510319 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/o5BQKCdUkt2OZ?= =?utf-8?q?sFQJr2SOWpCDR2Xd7lszrcv1bDO4M2h2qAE/bV97Tagu1Q5cugf0g2Wo?= =?utf-8?q?byHREx5Ws3QJmtSXDreMZK4kinZJ6bIIj37sj18oU+FJwExhyr14VHaG?= =?utf-8?q?RLcf0+p4hWb5LXfdX5VsEiR34UUzSBPX/N/RUiVKBrwCLuEcv7xxxywM?= =?utf-8?q?RRe8YfMMLfl7vmU1/P3StctIeNi5w+uzW+XEJ16+cJQXyW/9+nUQlO8k?= =?utf-8?q?UDnEv2tV572ZgSQTpeiz6t6EXVGINI4anjgorfsjOVWmReW3+qEE4vtp?= =?utf-8?q?VSGa/KItGxVImgR34mmYOXtKRjB1vWTJ/QsMCZCoEWcNlgHLpkzjZXaJ?= =?utf-8?q?BLZ4/DCEoybz0kSny5vCA8dSb0k5bQzQxHuw4slktNjl9XPb7NpnlH9d?= =?utf-8?q?9iYwDokMAXMtk8N/2wfI+2tYVZbJo/VOhfrTBLGk835ZVXNYyiTWU3kJ?= =?utf-8?q?ndJ4FZgTu92dtn4SDKauvwJUxeGvCLpBbP2rapT0Sue7sC/ibTw3pTyE?= =?utf-8?q?bKAg2+TGxcffEN4pi8lB7hRI4bxr3rdR2tYswHTIDyugdeAxRhXokORL?= =?utf-8?q?yursd4vzUCufYBp7x6ygjekXqVEFvMLkbPQin6lrvkBWLwb1HagwgY5C?= =?utf-8?q?O2Ty9ybHN/hFaClB332h/ynWAmJryDjN4kOGYeM/STgGOsfsDeD3KwCJ?= =?utf-8?q?946DXMyBATd5EP2UEK7ZdHo1iPN00Ie3BCFx772T1xQNUPsNhyJqY+7w?= =?utf-8?q?hiO3Bo9biaKwjB6TSySeT00GI6hzPuwLWCx7Vrjt5fedfLQfKi+/IL1M?= =?utf-8?q?TncyGhkHCjQ01pzE2nARvt/KU0bzdr2GGwQpMR4Uz4V9Z1z3tMN9tqJy?= =?utf-8?q?ovY4MN8uXb59yGHs3F68zVltp3WxU9Oyc9sxY/YKSKDjTpa4YjCJTXA1?= =?utf-8?q?D1CjkHjXh4zUOEnqBlSx+R2C3SUHt8YRXi7uFi4YyoVdrhbC7cRvemSI?= =?utf-8?q?MT+cQSbfvTScXXiBxR8QTC6j5sID/V60L+y1PUWROhuJvegjXMlDsQ2T?= =?utf-8?q?vm1sAOVazIE0gJP2VgEBlc1L9j+8oByhXzrQvPYUVZrJ3p8dK683tiTu?= =?utf-8?q?ro7fmsJk43wNyM1bqMOOQAI4euuiHnCzDIPUwTc9AXq0VX2RS3ULGf2a?= =?utf-8?q?eGoHmMxiwCCCu9lLuL8MCce2AZunlmC300tyc12GXF1idLYYThKbf2Lw?= =?utf-8?q?aV+o8c3v9xaHfGZxD0Mt+JNAT3+ANFRfsZjqhbiODA2/jkJ7SCN4F3nx?= =?utf-8?q?IPzlwRjMpUc+C4eBL49iP0KLnBtm1xKEnREquKKsfsKyYp4bKHOQsv+r?= =?utf-8?q?5eLlabsEX3VB8zNWm/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: 511646 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+?= =?utf-8?q?MUptYxG+KS3M9WowS8UvlLbhhUIaXt/TrzNnjWP5A3WoTfKq8hLzfdqt?= =?utf-8?q?m00bMAFnyyYsymEDLzm/ToKelvVIQN/+Ss7Zt/KFU9N4RlRsjRb3bIQ8?= =?utf-8?q?0tu657Y3o+SpR0EvxQViY1PIGQTiSYKu6E5Dj+2puu8QR9F/y9sc6OwJ?= =?utf-8?q?IX2OPgdmnqa/akqiyu3FAFwCNUZ5Cgss4eOBIV46ffJm03h9gXDkJvjm?= =?utf-8?q?yi0IXbWYozeKz9JcOkhkIjaLX7/5WlwfzUx6ZBhRi168d+60GsR355qB?= =?utf-8?q?6jF1usBQD3Xto+PJw0s6nqDAVRL7YO733mL3z91eIXlGrrTZm1QNVSVq?= =?utf-8?q?sfZElooUQbNYPP0/sEoXVWQmQmGG/DWmOKTgY/uiy+XPR/4powx/lbVx?= =?utf-8?q?m4Os37Cqj9i4hw63Sk1tq27mz78m+XkLuLvIXHjnoyG7Ynzpj/V7F/yS?= =?utf-8?q?RiCVTy5F4MZiyOUbxDTqVoiei7Vh3FggGxvSfUdVy6unAMeJx2tGCxYU?= =?utf-8?q?43rsF1hKtsaQZ++PGVWJSHt5ieG22DAeEtr3uWps1QtbqK9kfF2Ppg+v?= =?utf-8?q?8UvVSVtHIbF+4q5A/wp/rrgJGe7KmDZDc7U7dOaX3c7mtCDZPrqS2QIt?= =?utf-8?q?vGiCX4MeqjDHg7C4hsJWnI3MlJMvARtq5eaVMw9AgAR1b4/b/wp7FvS5?= =?utf-8?q?5Q2U9uP5LobwDOZCb9OKxQkmyy2S4jxm7AjuwUbbDwK9aWYbOUxSRnrd?= =?utf-8?q?RwfVErXeqjK8VT77gtIdLaEtd6qImFcfdY64HZOywrM9BXKXQ5ICXD6w?= =?utf-8?q?xXRkLegwxK6vnAaCNM6NI/F4Md/QqZrxhkoHFmikt3oRcqWurFHXnFRx?= =?utf-8?q?Y/+JnwHrwBfF3butNCUQykhGQN9+BhAXafDUejGhoehVdPJAbXmmkD2X?= =?utf-8?q?qFxPXQOwKpEo4mb0X+X8MFAke1YNY4hi1K/vrYMYVUgyLfd8UEAIIC6Y?= =?utf-8?q?2N2/v+0qjxdotuRfqflxpjvdCrWMfiz6djAgbFqRCU2GkykATpPbN0im?= =?utf-8?q?TnbsmxYNtDjFSU4DkU4PAxvJrGEI2TKieQLQ6nOkqpDtYIyQVY6dcka4?= =?utf-8?q?BQWjFtmFRep4gJ/VtN5GKBlAPQQMsPD5fPBd+4TCDI9XOgJHQzysaRrZ?= =?utf-8?q?yjkMnCo0DF0wBPW/TvZuefSzDjEXmK3HgurMl7OMvBTH+LTMBuAJyL+f?= =?utf-8?q?GGQx0CpeHKx/pCX/0xBaNoZ/VqZkRdO+lDOjM2J2Zjtc9aqsx9v37Ixz?= =?utf-8?q?Z8YpTlcPDAcfhD3KGKlVsSwIXmwuzImiK6VDd8nMSbQmuvh1k0WUPjg9?= =?utf-8?q?nZcbx4g+5VHZA4jXXsBraX84ilCvPj/?= 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: 511644 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?35npqTaKseBwdaYj3L8WwfKJj?= =?utf-8?q?3xIj4Ucu52N6IqMfXqN9+A3amlpmFlo9VeAGhahKErAbZAxtgzD9KVGs?= =?utf-8?q?+ESoNw3ffH+VWgIHyt51T+0ldeEIqqddfzQOQ9UUx0cnR6icdyQCuKXw?= =?utf-8?q?YlA7LHwUyekN/fHo/XbZ9iMZbzjGqYKDRLloG1W6ytr8NIUYQIcL47Ni?= =?utf-8?q?KwwFn6Or454hIj83azUApv0t9QG6kRR64TIMWgH3sXuDRkonROqxgwMZ?= =?utf-8?q?oomjFBkoQwKxgurc3sXx/qxMBp54glDaJR558iWy5c0Y4ML04qL//DL9?= =?utf-8?q?swRIchYUZytMBuiHegMPu9wSBEgc1viISlKRV0KD0l0+NrqiTRDXUMsX?= =?utf-8?q?Zx4W/478AcPYvAHCiRL/0nqK9vB0S4SzHiF6jo0Ak2Aj0NlWPf7Ymw2P?= =?utf-8?q?5IDtUfTOQmZHlzLVedtapMm4+dk2GAg3z/21RmZlOBoH+tMYuR0RLVnH?= =?utf-8?q?w3qPOQJ0nfjEtjYaz+rx+aw+mfOP9x4dIGoSOee+yaovuncwwwRGPMnL?= =?utf-8?q?cekgScX+87gM2HqBKN/JkkLMUqRBVdrtfb9laCs6E/UN2VM3+MSpF9V6?= =?utf-8?q?74zQZQnBhCqCs0AYFkUwK8dyYtrGU40e0msgzNMyY9PztxhQ5LHL9CRW?= =?utf-8?q?eNWwD3AlNd3W1DyxaZLAMF1rVP+ntVfGV4GtJS1lpfBTJG53csni9BXs?= =?utf-8?q?iz3//G0QrDVCzr/n9TuT+asJuw32u9GlnUb3VQsgBRZ5OFsjxvXceJVR?= =?utf-8?q?Ctx3uhBFV77VFu7nTPRpXwzOXXFGpRetXPpD/7UCaN5vB2IND+G8B8rM?= =?utf-8?q?U8F2wABF7eyOfal/Lmk+aJdBW6m01QrNx6bEV4z/6TSKzPg9Q9vKWRDP?= =?utf-8?q?R5vBy9bphIEUnP7w+qN1P8g68yMmXCvOjL+l1wIHB+Y2GgXsp7OqXudP?= =?utf-8?q?dkEn4aEqk0kjsUp0VyDb2Teeqk484oL2CCxZuu6zfvw4+q3Xp1yXBpqj?= =?utf-8?q?LbuPqXGMofZkzpiwN4BnKMAzPhlYCuAJcHS8u/UmiQepONZECFNko0Gy?= =?utf-8?q?IAq05xfkZSXuwEZmql0yH7j8xi2tuEYelh+6s4gMcRPo8yO+luNz7Zhk?= =?utf-8?q?dVg4CtLpTWlMr2JcrGxwcHVMuvpwSFl8bSk8X60M2nL0VomczO96Khw3?= =?utf-8?q?/OOUPv9ixolDKPEnDfUAQfawTTG1IE0itATk7zOpk5esgt1we7v8/0NW?= =?utf-8?q?8VwV/qVGCKS5sPZX9ZA2PBJGgoyNXxZM0ni0LhIUGGsyo3WU5LChAJo+?= =?utf-8?q?hhtM6ELZBp/UaHUPEMCdyXPmGjN75By7EoQlsW5lUrhljpXk2fRRkUic?= =?utf-8?q?HVFrKyb1cMeMtKNkrQIX2sNW8sLFmqM?= 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: 511649 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?v9FtgUrTNX74PNwMnXfbZRHSb?= =?utf-8?q?LH2y18EoS/Ob7CmnSTplRlWG5bNqtBwKFoSU25UdJHd6GB8qRtv6eYpQ?= =?utf-8?q?XwtULceaCQSNLK/Aqsl46TkEnU9uQ3E/l8bf2QI1C11j3HaAa3gColBW?= =?utf-8?q?eyx54eIwA3H0230w8wYnB7hshP5xkIexVEkpQZZVdmSKNFwRsWTA2ksU?= =?utf-8?q?iJRbw5q4gzIbGhOarvCwWpXAk0YdfcREhY7ffCjXB+hOQb2SSnhicPPh?= =?utf-8?q?QZGhi2083TktRkXPog+MWocvP/1puueoJj93NVBYpZYhLMPdFaj/I+Xn?= =?utf-8?q?FNGIYoCab6EWslKbjBeFqfIQRvDJTvPwucnQ45VfTcEGew5zyiGMR8u6?= =?utf-8?q?uqw33aDsFBvzVw5IW3068C7Kgee9D547BSKSG3lplwsWcRPx6Ov9PAfL?= =?utf-8?q?IvgxyjHlmXyCIRy0A+qiVdv11p119E4JLXBkydcWMxVuR7J5uCzSRfEw?= =?utf-8?q?5BFG5dKUmO8o8+9jAqgHhnONdB6cMxA7Th7F6/ZpQYamNoZVRMpbFnBN?= =?utf-8?q?3hkN9jHZ2xcYCFZ4un3UyzWd+pgj9UeBe2cJUjf0FbE4QAwGKIyofYnH?= =?utf-8?q?MB8THtIq8skJuJ8iIDMeh9Uhn2lJYqhntVlXHkuIh920gu6Mn9T6PGqi?= =?utf-8?q?pXvnsEPw5kiLzdbbnbA3VGs/eVvJOiCjNGk0eyVS7/PW56jJfu2rECBZ?= =?utf-8?q?+1o3RgPiZOOuOIrulexkQNVCvS+PI/pys0LWZSh0JwjuOpbM2azV6kf1?= =?utf-8?q?dJdKPOMosFCFYMC99uy/j+2zQ8VJe/K0NUY47IKXXTnJ9Exiue5t8YKn?= =?utf-8?q?RVsQhI4jkvvXZefv9N0TeAaIlHpk5hKHfnKuDn94cmpq8TczHKBXRq+O?= =?utf-8?q?WIXbYph94f1rSTcQORGxuLpAye0OIYJ8pWuU137eZ/ZVanjWeU9XVyOy?= =?utf-8?q?cD/fKA5/m1NQTqByJ8orMLAX5vmzcDNBQdE2lKgGppmU2VR7amDqzlkA?= =?utf-8?q?P/1Bc4P1Q5Ym+Z6/2Mxc8TzfEocufhkCs0aw+4A1a7CTxyDgF7uM1p70?= =?utf-8?q?QM9QADbdHMD2qDQlRRDi7Eswy4aDtLjDnBdqpCpY6LekaDkzX2vz026M?= =?utf-8?q?rDTVZTLOfOm0nwOX+uLLn6LNIuIlXQpwaw/QxoRVQSd3c86+U/z1dbCL?= =?utf-8?q?im3iuEq5bv4qz/wO/WR3Ggdc6Fxl2JMXwqusKmULYSRwjJr0d7v2aZEs?= =?utf-8?q?1wat05Sk6r76tsRRjexetKNepZzrN7wfDrpwKn+PHtLhc9udsqhfGSNa?= =?utf-8?q?mgdarbOBJVNdib2KceOIxQa3Q0jMF3dxF0VPp2etU3bhxSQFn0VuKxqm?= =?utf-8?q?9jYIYfuZfXNSmrCf6Mm0VHjOj+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: 511648 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?lF0qJGvOBIAMjLiRNn1fQCzKt?= =?utf-8?q?mSNoFIGVFBOSJ6oRpOlJbiHw+DkyLeDZu2aG4+jsBDP7lChCGGqjp+EX?= =?utf-8?q?6KTbHuX3nT77eir4k534jANWQUnHC0U9LRfZZDAa1U6z1HFnjiywsS7W?= =?utf-8?q?QLkd7Tbl24tpNtdGWw2J3UJCBAF8MCWM+Wiwzo+pHESRiPRwbz39Xxi8?= =?utf-8?q?N0JeaagJq4/5Bcg8JvWfyVM1LgN3TjrWNvdNSIX8yzql4eBsLWkfKKO2?= =?utf-8?q?GyE4IwtVrkZAxHla3oFBG0htHWNmXT14WmLa7vYd1pUfpa6Jho7cnJR0?= =?utf-8?q?EcdGLWA4QlOmbn8R0SHRd73qcAZWc2ig0BCE7w6XeetAxFTAZbENB2GV?= =?utf-8?q?v1CJs0e6INF0qA5IjMGRL2NtvWtBYMBa8VhPBWy/J4mffiRmWfH//U+9?= =?utf-8?q?NRtztlJiqGCgg/tbCa8QjTj7VFHCY6VIBchFHob1/zrSxQ321t/9luCk?= =?utf-8?q?kgr406uaK6/oxj7O5Q5KUwKvl9axk9upcwqI4ezQRlLbzuEftm8u3pXu?= =?utf-8?q?UWBUvsGdZlw9kijmkPMUktjbvEhXeYcJwGSpoE57rJhBrsAU9eLVch/6?= =?utf-8?q?OIIIbP0KKl7c0y/u150vca9+sSI5uEttqnmr0i8pKxUqQ3nzqyGWTsSi?= =?utf-8?q?fOja4Y0ZAyRrwl940KgvbTrP6e1qzlg9fyRsxRw5Hto0sGdj4vFGycyD?= =?utf-8?q?BYUME0c+xf40PdJGEeu6c7hVNOaDrVvzIvKeCO9OQwfZcubvuF98XaVs?= =?utf-8?q?pRE7wdPlklVVTVHIV9UI6W44DY3LWJCNeyzjxuJbPi7FB7be670mvHGp?= =?utf-8?q?mb0Aoy05niCyvR9XKIUGS7qLRzN6g8nYrucr1aGnGJIRRWGLmNruTLhS?= =?utf-8?q?5+xgbnhvLsI6mwpUdm3ttA2l9nKsfFN/kVPeALMz/qzI9TffqmYf6UxK?= =?utf-8?q?zVv9r0zvfr27Mq6BkAhZECRO9Kr7pTLuUhQCa3onbvEOm1nMybJ/2Ilu?= =?utf-8?q?+5Qujcvj7b2/FKBqe0+AEaQmQtEpER/o658x4R3C9qHcGrPqqhFUHVuw?= =?utf-8?q?lS+ZV2OPA2AMDmUcOozMu00Xd5JPxJbkslASGB2mBAw6ZqLnhhh8zVYg?= =?utf-8?q?oROHTBvm4NKwk/q0gynZpz8LFx/ad0GPHMLZyx/fDjKo3Xntv3GMkdO6?= =?utf-8?q?a1my/+ld5W4DuXdmc64W5tPBCgFpOsmEUPG0TaO/4P+fLFftgHD2Z/j0?= =?utf-8?q?CTDALQs11v9mqKBHnuBklfgAJGp0xOGa/f+0dFbzIDZVu7ZGrss2O3ak?= =?utf-8?q?goQAYk9FGSmi1KQ3Pz1SFEuUeXaJWrhDQRrJfyJ0GAtd1Xeo+VixRYA1?= =?utf-8?q?qp7hNlC3xefRSKqGNV5M9DJDpNqyE6R?= 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: 510312 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+PHF29tihULtQSAnaSfDR?= =?utf-8?q?cy8cT6qCwL9LSHJqkrDghcj4mNTWHKGkVYPY/PyRoipVgDFegXizFBdK?= =?utf-8?q?IadJJRSVLykUjwaTz+ADZ/Xh4BWWBCuCNtXj27U2V3QuASigk41uuzmX?= =?utf-8?q?mr/lWnpeK5xj0ViaGFW8wO8iOQ/r/uPBf+sXFGVn1ks7Ywm/dxw7monB?= =?utf-8?q?eEcBcWrnWR1Uqe46hXTEQwhgwBpPFfgjQLO4ALEioQ0I5gVDJyoKIWz7?= =?utf-8?q?rJWYWp4LR01NScnFaPh8M7fpvuRP3KIeO3fEOL84d7KmJdnjcp1lO1a2?= =?utf-8?q?ctwRZrkmJyOE2ODed7wQdkxGKrAoPtMOh5QYgzXRa5q2q46BjwOdJnXq?= =?utf-8?q?4R/jCE9k9a6GbMqhdAtK7GMe3MMyI1u5JBnWL2oFThpGdm5wEGwHdZSs?= =?utf-8?q?9SL/xlJjCtHazDreIYXb9y9IXJSdKQxWCc2sF0SxFTYo/IGEzUwtH60h?= =?utf-8?q?XFhDr8b7LW1I0c6GDTLEc8A6NRR5LAjeWTa4ZBYfv0kZbn7ehnokLOce?= =?utf-8?q?kArXytS5rJ8JFNFh/8iVD8caG11qjnHcVbujkWxob6UU5vB8cyC+1W8b?= =?utf-8?q?I4GWJrTSO3aAq0uJr3obmnz/nyrWeP5qz6e6T1lJ9v0EqJUS3mb7BNTs?= =?utf-8?q?kvmyEDoscXZL7RsqG5cUBWKLUP5bv6pLIrzCGVEhDSbLcFkF+i6F3AeM?= =?utf-8?q?C9jK0pg714buZViklxr50FlWr/ZyC9YiPImrEvNDbyOQbq2I1cpptGQV?= =?utf-8?q?JLf4IS7JHk/Ok6OQ7IShIuZ15jzUY+7rMWp2Gm+IiJwmHBcJi1clZKtC?= =?utf-8?q?FU0Tr7isSQrXHJ2WxotwxuACGDfzw0+sH1rkpPY2eooNr6e3jpoLwiFB?= =?utf-8?q?FO+io4pR6VlBP8hseOdZvoGexucnlfckzjz8aZRyGBMUqBmdgugBeQo/?= =?utf-8?q?Wd7AGd+OIEzxBJD/bEvq5OSX6oO7HAdJw5hi7lRYmatl/WkpmmNuKspe?= =?utf-8?q?tliHFaXGqL72BlDD6piOgaHYtojld0e5k3KhyzRrontovjgvNTgScXup?= =?utf-8?q?5N3pqQmjOnFuQRYZdvttEmMateLE8R4wO4PjUTinulSRETbv8/9pl/OY?= =?utf-8?q?vryexAbFJGh9DJZ8IVxglWF1NYrnymzsLLShEWGRgBaG3uwN3Sb5Ql0G?= =?utf-8?q?UO/+TqPzGeEDNznVQRK3dxLgITQyE8Jl73ks3z1TKxWT5t7miQg98U5Q?= =?utf-8?q?G9jLSkEbFAiqP09cXVNM7jdtklRqiGh5aZSRc6e3SbJ79J0bYPLgLbxQ?= =?utf-8?q?vq4lQu6JybAy+JFFnC1UxMBirQD0P1RurN6t5dFl7bEL6SnXcqZCF0KD?= =?utf-8?q?pwn09lcE+ZOdwtWRLFGWlLLm6etVcT1?= 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: 510314 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+nX?= =?utf-8?q?VwQjO+qrIsJa40QMDxNtpO40LFjCyb99Op7WaejiFGgzN5Dr7XkOckVu?= =?utf-8?q?Hp2FGIZtH3VxbUgEREzRW2L2L5ZtP+jGufcPb0/1ExAJvtUWc4mHC4yE?= =?utf-8?q?Q679lXvRw46/YNPYoecRSTe/MNBeh2FAOylC8H5T7yWP9i9O+Bc5euuv?= =?utf-8?q?zcmsymNAmlo0BHggeWgDqTp6P2v0CtnVcLDss5xHDsM5lkSDBNuqZpe0?= =?utf-8?q?kMWe2xnn/Pq2eccrmXQvO9c9KFYWFQqXA8orDlrl56wxTf3AK6kjPvi6?= =?utf-8?q?4j0LMWIgeSmNvZ744Cq01Exz+0N4wIKj4MEjiIl5p5FhVXQX4VScwah9?= =?utf-8?q?1Pea9ApApfwhyNklKYMngANRyNx6XW7nQ8K/6EwSoFgTlAfCtGIHvgr+?= =?utf-8?q?DwIuvQLLK0uE1OTG3xL/8+2eNh3TvxMYcO9CQE9QN4cYQXxEcxSRZjVW?= =?utf-8?q?lhJOSpK3fOLE/U+olSRbyzDd3kf2vaRLNELl3U9BXfPkopUD99v+HfA2?= =?utf-8?q?G4IWci2DZdgC+qKVGcL4TM6+nI0S8g+JflrfNY8B5feb2lgR3D9Y9Kyp?= =?utf-8?q?3ll8Yb77NU/MOFRtfYu9SxGzXoY5Q4acH2VL8U5haQj0xgGRjakbTZRB?= =?utf-8?q?eEyrVhA6/u+qFRdN/CTkMubpKFt+gGDEB0igVubZFkHlduRSGU2MHH3d?= =?utf-8?q?a699UbKVApNULzx2YDa9D3sXq5B71rS4RcXwNwraCu0Cp1kPPMz+sPPI?= =?utf-8?q?KAttGcJljXBl/G6epinqkzOHNA//B2Hp2+vNf1LAVrKz+qs355cyWFMm?= =?utf-8?q?FQDr39hQyFNHoTit84rlNAjaJPV6nP13Pk9irMWN3owRL6Gd3OKU2D6W?= =?utf-8?q?SGrn2DmsjHJgXh1dOV5OvQym3u8ObuQ5Oc6spBkZhuyd7NP5/NbbpFb+?= =?utf-8?q?6TDw9Cwl6nFad2EPixabKUGcLHSalQ1lJkFeRNf09NnbahjOSGvCY3yb?= =?utf-8?q?KQlqMBnMgtIIci9mcQaDY1NMmtA6voxkv13N7ckKX5AqSqCQ7M5tOk7i?= =?utf-8?q?paKOrlp3mOqdpsFA3u0mNWy35Nhblw3SPMMvNM8+QaZLPCDt1TPfQZEu?= =?utf-8?q?ctAhHkl2K1f5uLFU1e5NqanSwu97bbI1ntKQu3qlWF39Iby8le7Iu83u?= =?utf-8?q?Xs+tNZOP3MPxK4d3bktfNZFIbPaSqgyNhWvFkdzM+95mqrS2WppZC+Z5?= =?utf-8?q?wP8K5MecjgRuKZsvQtxST8kmjqIoyHjT134fOxQJx4uLssbYS1FwKO2+?= =?utf-8?q?xv1Ki1LUisefnOBmzZdzYTtVaWJpbn/A0gHFUNsMeKgtZ8Nd6x5tR2qO?= =?utf-8?q?J9wfqFilkVpfoqPL9djEHlbkmFb/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: 510322 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?5qu8pCWQTLNOIIXWbC9NrFNO1?= =?utf-8?q?Ue3n9YRgrlZGUSyhDQfO08TZKeSokrplmDak6o0GPL5G5C7W+dTIFQv7?= =?utf-8?q?RCO+d7OkLBGO2X4V/UnE6Ijopd3rSujZITJ3B8se/Umtlu/ds3NMcX8d?= =?utf-8?q?WcLvnisI16SNgM2vwhGeOL2Szb3sW6KjuqRT7OhWO3RjtviY6UM1ADfa?= =?utf-8?q?m5rYFaIxns7zaPURR/KU97HTNiS7ZDX0kLJBFL5Bf4ELOXkPuMltXBYJ?= =?utf-8?q?rlYWkIN7WzKlx+3qDsTZAgXHLXVOY9KUKhQPhNK/rKRCt6QqjcGUWwEn?= =?utf-8?q?y1CiJzMsRkEKTkG4C39kuBFU0bb+Em0CWTMqMPxgoXjUqjktzjFuKI56?= =?utf-8?q?UuIH+rnIbRcKndDcEbtNOpaIkc5GTF8bP7NBPZd1lOfrpA09QgaIwNrt?= =?utf-8?q?tuLhwD9nbDRVki8XSX8JPlZjqz8cCOT7yPItt0Zt73fjlNWI915Ng+TD?= =?utf-8?q?eQkIOP6y9sP67Dh4CBVDcQbZ1eWpERypCFk6tkJ3BjmUjQDX+pcfiflb?= =?utf-8?q?+UaTza98SOhjOEBcd0HiE/8rpucxF3D/wNWk0CivQAUCWYp2etv+erBD?= =?utf-8?q?+cSmm/u+KwPjMWaAuvWraWvxaoCxCDP5L8pHMHgLe3IA1IYalGzI4SeJ?= =?utf-8?q?+7jnYLl4Jq7prrY14hyytINr0gFzBagBhkaWEgdHkoCh6QA/x0WSfw53?= =?utf-8?q?0Apy6a6PRS4zq5UFbXEr0u2rdaXveeWk6vwtkqCBLH2EuG3r48kCnRzn?= =?utf-8?q?UAFqWi9wOWqLzv7m45Pmq9Ct+Gy9dBc573EQ4Owv4G8lcbYpH4zjREgB?= =?utf-8?q?icJggtqryYNN3YzWC5d3zpg24vXrYxpA/e2BdNg7UuXrPntk98Edk+89?= =?utf-8?q?q5ibaqjp7gA7EYXPJgc9rLO61AtNv4e/U0IDkG3Nxgt8VFd8aGXC5n4y?= =?utf-8?q?6cOtwK1s22e4pU+U1VZaeZnohgkk9VKD1O3uoVE4/fSNxjXo2H4zk2lR?= =?utf-8?q?+J6kEVZLA7NBtARKHHh9HYrl2gMGyTgYcGkBRdfDXaZQ05sfRiknpTyI?= =?utf-8?q?oNoON58DvQJ4/rfJnL/2l8rsD1o+2WsgwqvhVG9xKlKD3y2wcp1mHra1?= =?utf-8?q?tdxvf33/9/FWwSb6aNkKD+WF/8N2N0umZwt/86HwRdOgsX1h4jBz8mpj?= =?utf-8?q?qxoPV95VHeL9H340qgekMyV9lIVNDJ9L2a4LtkcDArng3M/nQI3L2lfb?= =?utf-8?q?20cUxfTrehI/w+qdyw5rQt+oUbuzm3frhxpc0cwkWnBcTF3fVBUfHSuz?= =?utf-8?q?6lWj7XHbo6yqpRVcRR5p2+kslHPhAfx0fafJDy0oG46uiI1PiysneGVE?= =?utf-8?q?TrBPSUHivFnBKvixyrKaDX4NYloGeOT?= 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: 511652 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/?= =?utf-8?q?3MC8YtRljXWo46yEkdGDaXbxmWsW/94oEXAIfpGZCvN2BbCIgdCgZkdW?= =?utf-8?q?LgqIM72hmu9hhJv/oziYGCll7WTohP0y9YsJxvFwLDustIv8xaxCpzfI?= =?utf-8?q?0JstYwG7NN+CEOThbS0eazAeNfiE3eiWpEfURt6yFtIcGuMjvCeW6DPz?= =?utf-8?q?vOJEJcqu2typXMGWcVCW6oJSviCcNbKBfZOACQiWCfM5S2cLtBgX9lpM?= =?utf-8?q?ufyD1/ApPbeIlJ2clPMGZs96ruCvaZeKWzk8H+2Tvt021XoubWn7yHjD?= =?utf-8?q?n9ziQX20qEtS4QClpJLpDC7ivwkMLnTy7mNlvrMIWJJu8XJPymkyBjf+?= =?utf-8?q?lj+989L05mVNF31MdOCKLS8kGA17I8q/2Ak52ZBwjYxwiCX7axcI7YZX?= =?utf-8?q?RP09KLfYt0FtYs1Ry8aoFEKWfhDgWhShWoD9e3azW2ToZOtpSSndZ06V?= =?utf-8?q?/FDDTbCJ40fXhxWPJ0K5avfXikeG5UvtwgnVuZH5lYHTCzuNpDZ49ssz?= =?utf-8?q?2DyTAJxW9lpLYzMWNp+Ar/9fS/x6ZJCgWpdui4iqNcg/vQBIIY/qQFmr?= =?utf-8?q?D5SzXdLlQ6qQ27TQk6EjYF8e4Z/QikdVHspTh4tS0E1XZJneDA4jrNdm?= =?utf-8?q?ZqBEZYGPJwpwuZoJLSxt9nZEuxglSZlCS8ZuTwGvdSs9z/sWDJiVI+QE?= =?utf-8?q?oNefPRsTH17GGgl8XBBxFlpsOueBF2ZqMSzDmZnkC38Cm/7WWVwkMDhO?= =?utf-8?q?Ydcnj037m+7Ix+NlSAM1iK2v5BJ7Mv0t9YggWTfYsEDjX9En8p37P+Qa?= =?utf-8?q?DIYu2I4KRLy5+N5wL7SMVb+ItRocgzoFgVbXC6VFynaXxWe3BLA7Q5nm?= =?utf-8?q?QpXOGDUuTsYF37ayShJ6QFsG86FgleBrHeaeS53/0lozdyhzUP2iUmcP?= =?utf-8?q?klNoroC92x0ryaUOJgrQ7hQ+u4/wSFq0909BDhPKfYNLs6VF7lxMjcWo?= =?utf-8?q?9RNtRrLZjhpLB3tl6f2f+p1xEWV1nbV29lkRHlQHJlODHLzrGd3QTAw8?= =?utf-8?q?osN4FcvP1H8Y9qyMppkUqMY9UkdjfBoN+xKeceiplm5a2avoGOBTNoC7?= =?utf-8?q?GWqT3YuUQXB56rp94v62D/tz6XabXAaVah40qodziWOuy2SJUgmb1yRo?= =?utf-8?q?pLIXrrTEXloTqFUXFekukDNSAWog8f1vJwFOjKQhPIQ0mw3l+eAlWsO4?= =?utf-8?q?Vud+zhrTn+YBIf0SX1sa4FszyMMs+HlrKZ5THDHmMwFtBQMkRIHs9H65?= =?utf-8?q?pKFM/9F0JQFpDW8gdWkClKpdeccqbLfMdp6oSgl9Sy6RsEUtriGFZ/Mc?= =?utf-8?q?3g1qr7YjgWKAvhwueLjtQCXCpFuh4rh?= 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: 511642 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/zjfBGh5ZU3WF2lY7?= =?utf-8?q?mnn64H3NBtEhvPcQRVe3dGyKT7vfPNQHu3nEDkqF44nNpx+DvnOy11jh?= =?utf-8?q?Z+/U0ATWv8ZpXrd3xRgvQKN246UHdDe/wlcBmYXa8B5lJENL5D6RQq4V?= =?utf-8?q?jNpYxeZfMgUBJ1hBDtzx1GhKYpODPFiXrJLiaZJ+/VzXKxdINZgssmEn?= =?utf-8?q?bUJQfSxp1oGEEHoHR8BeeghHDBmH5R9pI0iRVczRuTL7xaC4cVa0/p/y?= =?utf-8?q?YMaTPsTHl9SmDtVX+NkNR0RXP86fUhaBgoMstsAIIF/PsJWEyvNnYUjV?= =?utf-8?q?0ciJOb7SECjLRyflj/z9gS4Q7iquICLZUuhxXQINfwkh7MtHcoM9W6RM?= =?utf-8?q?Dp3vP0pMNei7Qp8VZJQMd2qXk/jJdlEqYhswINeWEs7/f6QsSObdqMLR?= =?utf-8?q?DqouFyz4oSHMHL25nOBn7fHYNjnuZij/bilPiCb+0BEWcWSQmPCQ9kHC?= =?utf-8?q?HGOmEC77ScEj42ux0sTU7HTLSUye/qLOBIydz2kEynLfNvopQVOX/G2m?= =?utf-8?q?9xil2d86on6XyzrBlFgLrcDB6B1s5X/1VQsYZyeNNPytEEeUc9cbA1Th?= =?utf-8?q?RQvMUkxTUS6AnDQ6glDIJuBXmwv4jcAlRo3DCfJDWcfpSSmqT06cOJy3?= =?utf-8?q?DEGcvfZm36EptA6rjLZ3i5oFe7k2RvVQFAjn/BwOVgXwtHsN2wD4RMeF?= =?utf-8?q?8IJzkMno4vlmeLVh2gttpe0Se+6LlQMhBYHz/Jm5LrXnwgaD8mbgiaXC?= =?utf-8?q?c6LfaIqlB/nZWjiat9OL8KyIAf+nQZMEFN5Ve6GNmAxLCCcd75MgbptG?= =?utf-8?q?weqQMcgUUuyCf3XXEQ7aLewoNfm4w24SUS6+39imMLWURL4U7ZdAqLQ+?= =?utf-8?q?RG32OL3H+C5TEayte3vkyzNRHU/AEkyiV2J0KqfLZiHENph8WNNNWSyU?= =?utf-8?q?mSQrn8nDYZw1l1k5fHHz0FAPH0xi2DowKjssBL4qhN2i0gEb7FyZKFmc?= =?utf-8?q?e3HOc422XRVPEV2sa9wMhWhzBkbHH2RzTdGL7eYeW1o9jxDL+TzamN9f?= =?utf-8?q?idxNBD2IVSXpgoDn+K/EnCebDTL8zCAJXFGFd3PRyA+N/u5H9/eW+BvK?= =?utf-8?q?HPgJLGPYA6VzTHY/xFu+/nFsYG/gTIbXmBriWy5fiLFmKKZ008D9FSyz?= =?utf-8?q?WWzVrDAvG2QzhtlXKI0vBFOK4dv6X8U8LsUb3kKEW0p4+/ErrE61+qu/?= =?utf-8?q?0BHkNLxWMInMe53ZWIskiFJzeHQk8k9qnEyLWQ+RB3v/0AomOqc5lCpQ?= =?utf-8?q?+Z2KgdiU0ldf0xJqALQUZo3146BNd0QvJf2q+IHVeT9YyeYEuLjU7eaw?= =?utf-8?q?p/dhiNebr+Sbypg0jAsvqH0EGrC1lkX?= 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: 511650 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?DtGClWeK0hP1roYZQiGA4dZ4L?= =?utf-8?q?RbVEHjal4GQpY60j7gF0zizB5+gWUHrIhULyFr+/ULFWVV1pK66h4IUh?= =?utf-8?q?ODyNWsmmH7nrg648Luqv2hwgu600PRPxJHgIPhCT6iXkyZoAU7d9LyiW?= =?utf-8?q?dNjy9l78DSTlxujHWo9mMe47bKR9pJcpCsEh+Vg4+WbmHd7gXWK+IYq0?= =?utf-8?q?gI74QI9cxDUp/hUPz2Qa/eFpFxxXhBCutPg9BiKEt1x6RKZzor6IHkq0?= =?utf-8?q?KT9FopGWjZe+9edgUOMBbCGitvC55rl294Wt5mjzXpA6lSqe585Y+bhP?= =?utf-8?q?dveig0c2ayN+GN7bXZqz4DDaqXQmdlKF/ng/LMttO0EF+rgXnlsOvkuQ?= =?utf-8?q?r1xOwJCfmnyTnAoSUj75X6jte0MpeuIodStYAxF1Q3N1W6MH6Gqx/tr6?= =?utf-8?q?Q6gFsoRVhwWFswnh4vkmICeRsNSiPK5m3RmOqf5u06zO5XSBDGdlqEkQ?= =?utf-8?q?vhA3cybsqVG1Xo30bxN98BLyTnHOUBBjoNIIwNd0iCLvhG/IxYoU2fma?= =?utf-8?q?QZA6hNBUWIW85EW6whHHzFSWWeCQQLazmKxGrKRcFv6vag4G85NDgad9?= =?utf-8?q?CCknUjfFtQVm9JolY71kTuGYeHTLtYkeMyUcG3urbPTyi+TLjBww3Hwv?= =?utf-8?q?nNVrKcBT7jn3FjsW9p/1WYqz6vg0z96etlcyWDTHV0oWmDFKSCt4hAS/?= =?utf-8?q?cb2D5QEvetq2ImmezNtexKMPrrIeVqzOMbmHpkpOZzsmtf7nsCle4GfH?= =?utf-8?q?gPvwtsTNZ+F1OpMVq8ZnyWrfQ7DvjCjTKLatPsXAIlfRmu9LEFAUjHD2?= =?utf-8?q?NcuaXEHOli9lROQtH4hTjio8vIwaYKKaVnIoYvSM2G6Jk6J3WU6uZ8GF?= =?utf-8?q?TpdZbeZTThlyTkbIJhCj5UEC+d/YD0q4VFwtwR3MmEgsuGyJ44yWsmEj?= =?utf-8?q?8FUcEXfOyAZ7KxmAljSqRecLYvqj2juPMvWMkWJSmw+GzRfjjG3IZLNF?= =?utf-8?q?83ihsemfI7D70CZmYMnJOcJHgm3wxGQb1nNW8xsaFCMZZAHMeC9j0yEL?= =?utf-8?q?PLeIBRXnMyC4ZGXImlRC8ZERgWimETzM6iiy1eQqf8Ld1ADEuAc53zTX?= =?utf-8?q?LH4kXLxxKs+TUOAO11f/7oWLTH9LrB2PqU0OXUB8UxWxHj1kIYqanGfF?= =?utf-8?q?UWiyG7r6lSHZTZsOEKncyDDK2MYCFUJw1JKt/yuik9E5M1Osbhx+8SAN?= =?utf-8?q?MtX+NB7VqqbMG6xyypaIqI3X7U/DM6xAatxb+1W+gCqQyoL7iuW0gCW2?= =?utf-8?q?NMazn0SMIvpBTdQ5jD0l5Wvr6OWFRplR/Vlvroy7Fq/sPXu9Eja+A6W3?= =?utf-8?q?Cm+wHik2r0F47y8fVUXPvGdipq+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: 510311 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/iqITJo7TKh6Lt05Sl7R5Kga?= =?utf-8?q?eVo2guFonwvj/1RgHahNVYbCAB6fjGk8pdVx4fFVU3Gg9enAh1Csn5Th?= =?utf-8?q?8YEGDTVwvUFJRWuhS7P8zseN34fEtyxW+vBkqIVM0enR0q0h3rSmqWB1?= =?utf-8?q?JlE+eKUXTdAQDfbslCp8h0xouXXoNpqG9j7VywiygusTfUhdNvJjTsrX?= =?utf-8?q?lCTLmDq45opow7ejxcEXqWjlUg2YcuvGPOf3NjwMyfiNDDSU9Wnk4YvW?= =?utf-8?q?QMd3NOKBiXaAZ1o4Q1Hiosm13QbMwILinuVpti0lDCHqkuqR0cO1OMyA?= =?utf-8?q?hotik8N41KgoHDC422oXGxYbnVtnS0yXraHhYh73/IY/Mm/TY74/NbTr?= =?utf-8?q?86GFADy9Qx9dnhEY6eAp5yMH5tVvUzPM40SbXmbazyp5iOZG1Z755m94?= =?utf-8?q?jPj+KuVXGEWCY9VHr4TkdPlbWtckeLYijo/yD8tifr8sNfPoNn+Q8t93?= =?utf-8?q?L0dyNjb4Az0Rtn1hQlUE5r+D3q7BSQ0ErmlWGM45t5guC//tYThVZrkE?= =?utf-8?q?uE4ezQef4Zr3uhzSDOr3Nbmm0NooXQypBOLK0o2VP17dT3LAGPuygLFb?= =?utf-8?q?iQN3NqiVDCPwclUddO/Ydoc98/uii5CzHMWeKk3o+iK208nzjliqB+O4?= =?utf-8?q?O1t7QvRdk2EPML/Qs4Xw6Vhrreul3jmya1VlqBEG2EXD8gKW8ZQQMS2F?= =?utf-8?q?Te5khHu6eT+O0j1BqOTRkHfI0km3d+95d1u+/5cRvroD1VBSxa+ITmq5?= =?utf-8?q?N2UYvEHGUq34oxUGECdBDCirikr6yoIGPcLea/pPGZWvl6VCH7VtvLzI?= =?utf-8?q?CjufQGe174zYrayJtRkhmuafEaytmSFmdl6hoCRHIcW5FYPYGYLeEXed?= =?utf-8?q?QAwoi9ON6J8b3McupWxCIZGD0k1tHnEXz5m3fzywCuJ7PVQD/5SoZN2l?= =?utf-8?q?1pIF6xcgP3kfUiaKQbDAn+wPzuPLskieDwe/ySH7VjMFoaOLjUi7DSHc?= =?utf-8?q?WfMRTKBShHSdC8ecnOYs9NAYDbks7o956VtAsIQmRJTJSyDLp5LxXQpI?= =?utf-8?q?HfFHt6TqjMI+LQGMHOcSOSNv7xHVVhN+HhfL0t1A2M3nbTB/Ttuj3OPO?= =?utf-8?q?kj2hYTS2gu8k5HFYGxbT8NDjH+a7CdZlMVZpbJDv4Mui3ajadVDOYtOT?= =?utf-8?q?HeYu2XWVLTKnd5CgtrMY2CTfTe7V79TuhglE6yZSxpKGpI+X42LfNXIG?= =?utf-8?q?czC4/Sch4+lS2/pFdor5zrZq7W3pCrqyimQjckriy4FCepM/Q3FT/2Zl?= =?utf-8?q?QLy2mC1/dMLa+/WadCrCRNSSQwEf8K6KDFpNmWv7KmibbVS2gT5A1cdn?= =?utf-8?q?eYEtNKFX9rG+hWOg1ALV3kO/+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: 510315 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+i1eXYnuz?= =?utf-8?q?qABIMHBo9w7kLp7ZebdAPhm/V2hxQKSKsAeZtFsc6Gh+ptAEjBxMYHwA?= =?utf-8?q?zm2WWrfGtFbZOCeAH6yjS03bAEDxF8UNClw3Revw0M9WK/nuhsXlTejq?= =?utf-8?q?ndLw0vKxOk1KNbgsf4liWkIGXQWaSnTcv5uvpkXpH35sESOMF+sMs0X5?= =?utf-8?q?/a+NCSqBzc2XNFy3wIF+zdy2V/tqk9o+T/CfDDTLHqGphuy6FLaoIaKg?= =?utf-8?q?KZ5xHrd35+AAg/9OJBGMeHFvbUTAs52MxXjKA1R0fRcy4P2PosUQLpue?= =?utf-8?q?J6wQz+l6jzBbAvqO2qsceBTF/4P2ppsu4AGPdCiaCFG4USuW+f1l4ADM?= =?utf-8?q?Vpta1JDNhLdstL2c6vIO8bQ/4PG1EYANycNqYD9uhnG0IxFMXI5L5lJi?= =?utf-8?q?PB49nR6Kb6ru3VWb9ME0dw+2rs7bgTG334kYEGApQK9yBvPCU/IUSA+k?= =?utf-8?q?r1J5S0CMEtR72dXBkNdQWgYZqPbidabTmCA/JKJ7pNY9gyFIQ7OQHXpO?= =?utf-8?q?LpYk2YwfPqREDGeup8EnVleQ13yU3ZDoO971gA/GgIDGQKnGpBxtSNUd?= =?utf-8?q?4cx+wrqHRzenEy+BysSVe9FwfHn3t+HXTMxLtMTAgcTFEp/BP8aDSZqR?= =?utf-8?q?dZebStH32M9sAQfOlIzHE+1Ary7D4EwbTVmXQ5LyCwEdpZqsUdMLgJWz?= =?utf-8?q?aNizfP5u3m69OIpdzMVsPyos4Pf+OYXlPJG+UlLA0Zm4TqtzfKELxFNE?= =?utf-8?q?uEP8rW+ejYmQ2JpDLgwlZsWhq6jUzgZWFC6jpdyikCMVFoXMQSepJh3F?= =?utf-8?q?Ga3guMp+mj/aj4zaosxO4c7QmXBoTU6WINw6LPQZR8JeTZTBKXVSXyeY?= =?utf-8?q?Ev62Kv4/d5hxBVExvwDoYyyavuxPCVvXgjLxVDZwOWokpt03QFDOc72l?= =?utf-8?q?eUYq9gYS1oGaQsOybrRXszCTAngxtRqOwwzUBnCkfFlnjkmVDeez6U13?= =?utf-8?q?RUCzjV63BDrN0i5lTpjnu8HbAOoTaoDmw14TdKXzCZtHfpUwdFTwMsNa?= =?utf-8?q?Jwn08BgATzKU6jxUJZg0mDzh8ieq5PXZQroZ+YsjCLV8JbFM3FPjILAX?= =?utf-8?q?iKzCCU/CPCMDkwcyIh9GG3oBi3DLYcWIz9t5dV5nscS0grqcOHuP4VS9?= =?utf-8?q?iQt4rxh8Biu+DEcTv6u0HZzyNTS+Q8cstRrG3gKyYd6zLKh5Obi/7QhA?= =?utf-8?q?hm72MSazXXURrc5qXGFNokN95wvTDJUlyMTgVrKTsjh8koFHr5ZfO6Lk?= =?utf-8?q?bJmkYwPTPIGhFMy0X4dcTvQzrKOLnkE/HOjgkxFqpEatD5WlnlSXnNKM?= =?utf-8?q?9b3/NfXGXM8WbQtkU7T2p+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: 510310 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+X1j4M?= =?utf-8?q?pC5cg8zXLgD0B7ibg8c13DDIcGLQQPWIqdt5pXJI+hp8SDl/Jy/J1lsf?= =?utf-8?q?k5I5wuhMp5bPjeOyWnphTjJp/LDcziubopAGJ11BybrTG5e21Bcq6v5S?= =?utf-8?q?sJTXQ/oaqkjOokHQgKEdzoR8OTwHLAxuAZJmt+eAp8y6SEROOWePr/CP?= =?utf-8?q?CPrJF2GsN0buyDzED0oqJMssBreTDPkDN20RMtjmYwGcZXvg0W+njdXi?= =?utf-8?q?go/Yq766xz1QqICurEJGNcsUiX9op1JQMyi14BDH/0+AK4ixvS5Zy+gp?= =?utf-8?q?JUuEr3G3eiX6vd0fDisK0SlEmy05J+y5WDnp/pgFinYPB+wJgDqOgjvK?= =?utf-8?q?7IA8esVAN1ney24eQwV34FfIHI36/Tg13uUT8nI1WyINzDPg5hn6qtRY?= =?utf-8?q?MAseGlE/FJbvK3whYtNwJoMZ3G0rIlQQCyTcRiALsC/GicA0ceBtznRv?= =?utf-8?q?WO86MM4fjwomtvqJ33X1r++eIC87NtY1pM/16gYCyCNW2EduqgzfIwcv?= =?utf-8?q?kBdtOe1NQ/jfTfnQREVNWxt/nNAAfIIUEIbGaosK4qrypHjDnYM3iFU1?= =?utf-8?q?34yfWlA/0tVQuoCgCHod9HJtNBQXN9/xV7LmEmEQx8lJkYnLTPA5RCof?= =?utf-8?q?rPnqMYGYBco9GD5qiZJ/XIzrXb+PIN1h6CZzAzLeiijV1Kqo/Nj5rLDL?= =?utf-8?q?rdGydjBN+L7yK3I5qhWRAto/6FzAAyj1us1oFJoIm/KPcH03ezSe752v?= =?utf-8?q?wG8YP12BQnEAJ/IxaP0WdSgQ/h777JslO/noU3pPXeTtob91x/6Tytsi?= =?utf-8?q?/XFBYB73o+SrvaAqYDetAApXmNSjUmUNcwZ8U5rFGn+3cHC6rTW1bkni?= =?utf-8?q?1l91C4gh2Zd/RQC+2UxcMm3HF86y5mgw6SWFYpuv68sU1pp/qkhvgYIF?= =?utf-8?q?BVqkaq6ToGqwyxQt2ku2SiPW14Q9a9poMpyz1GapBJPSTPMDRFLAg16i?= =?utf-8?q?R98GY5c88d6HVNlPYtmXKFN3q8DHlA+Ykczdr1kTL8BDmrXs8PNuRCgq?= =?utf-8?q?rQqozCKn1rn/VqTkC7YwIzseJhlzvGfCIGZ8htzv9GmqHott29e40iPq?= =?utf-8?q?DuFgdmbcXxxKpTZTcORGyV7Z+HN5tyRsh1JABMIyOcwXH32ejLJK38uT?= =?utf-8?q?Y+OOmLEhbK+AMxPqYIrbqhbXTvEZu7kDZAXXdYS2iUOkZonDdEgQZyrD?= =?utf-8?q?g4PRHr+jJxYhrNzpzla3qHPkdmORBQLuUTdNCUQ7kBaEz/umFswfU1c1?= =?utf-8?q?BPWfLUYq1ZrX3ykql9CETAFFv0nJe8EYqOT1MRZt0W0zbc8xj7Ul+MJ7?= =?utf-8?q?laD65N2P2tToonb/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: 511645 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?/wn0ZswRVK73maodqwQSmdQ3f?= =?utf-8?q?88mTZB0biV3aXEKoLuoRS95bXSIrmRjWtj5LCmRrC55W/90M2ZyGRQT6?= =?utf-8?q?mkC8NFHb1HmuXCmoX3Mn7hqd0Pqh6+OOYhjGD0UAjAahwrx3q5UK1REN?= =?utf-8?q?UXrwHTpbdDeAVfWihwVdz/FKIgO1ThqZ2Vk0ULw95NBQ4NWG5II6eet9?= =?utf-8?q?zxApxCMfc+O8x7TfpEhrdGeyNrDn55m6SQOi2pUXP0CxOlNlyt2dMTXK?= =?utf-8?q?QDhoWiZODrWA5kcgV4hu5WdOY7SITIcP/TXE6gwsM9o+njK4968gcsqt?= =?utf-8?q?NM7uw+tV4VVp+YxIYTyf/ILCf5wHWWzNBikeNKMePqLc/Wmh6HSV5cmF?= =?utf-8?q?XgBEnqhLpmyrym7gnkwufg6SG9RjKpD/owRIma6WGYsm+LNsQN8OlXBr?= =?utf-8?q?LhU7vcHUBfJxR15JwXrFByV727S26eRLsglXuSFUtywmiFAlvLvftmL/?= =?utf-8?q?5BWE5IHYUnWOVwPhdGQlCUPOU7TO0sNdpUDCSA1l7E3CaAlYeeEGr//H?= =?utf-8?q?hAPm8RxF2bjbgQXDAKLW0w+haGhY3HZ4bsFjjA35WeSgHUfiI1DRSLQS?= =?utf-8?q?BJ29hN+wLwW42V26K3WL0ExkCi6Rndgpjw15eyGmSotRC+Dr8d5nWhQp?= =?utf-8?q?Q7Do67fLgF8xB4MQad0bVLtkjE+gdqOXXH3iybl1jmikVp/OOLt+m/Rc?= =?utf-8?q?dxRZpyPmbcoazX+TE1Mb/HAtnhdnLwkJWlJ/iigqW5vTLqiwjLaW9oMx?= =?utf-8?q?Ra7n2i4JY4a0iE/LQjyfvDdxb/s8OniqXto+Rx7sJ/wks1MbT7QkwkDg?= =?utf-8?q?5GmkEkLbJK937nSYZKs7l1YYHZYqA+iLf96gcTAGgMzrP3IQxrFlGltZ?= =?utf-8?q?Yzq6XKNxb4tCUWQDHxXCBoTNyPR9KxSuUGDrQYUyd4gP6US+JumThjxx?= =?utf-8?q?KkOqetWOCYgQmaWLGLBAzz0lQ8rL4ZirlAsEShKAk8FSaeJ6zn+nJDsa?= =?utf-8?q?aR4jYBI3QzBeetfXq3mg41YjQyBWIXIvANvl7vJFG269rxWvkawWdVOL?= =?utf-8?q?Ojei9FJoPu2u0vMS7jrRyjpgeJtgxMG5e+j37s/5aF3EA7vSziOF6wUt?= =?utf-8?q?B+Q/M/TLoCWwReOWQPFSkZSlPPzaBPaMdp6Z9sFXSslBzAVp5Gbae+ke?= =?utf-8?q?l+oWycrd2sMoBz0vG05BGqq08apA/ZJ0kdJDs40GSdTfcvdEHo0iwPBy?= =?utf-8?q?xoTMZwpazrNNVyUtVsUFuhyl1JSTSg10E9qP6uLvP/rbDDLT/JObgoSf?= =?utf-8?q?U/ZJSR2OOwmfjJ0kvaItnxRGkRNtxQnV2zv6Uhrnhju27jUQ9KdozsLO?= =?utf-8?q?X807eAeExMcd6TVen0JSiKzMCzSZWrr?= 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: 510318 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+5mMyWm4?= =?utf-8?q?dG5qUwx0D+Yj27H9AjuWKsYP8+1mSvVsYaISyNUJBZ+5Zw/XIATARv8j?= =?utf-8?q?uAaOJOvPisNM6WNA72bodgHC/a+BQ5uBeqcVh7vcnIGqXaubIdrKrqrR?= =?utf-8?q?LUCbG5696gwfR1+FR0T+g0Tla+O1x3RXz+wykbY46MfCUUf4Zwm1fJMR?= =?utf-8?q?+ppNfQ3BWepIYBeFQW2CPKAmkpqx793poq8LPmUEojbYw8r+2WhuYrG8?= =?utf-8?q?BLgcD6IcSS4nMdTUkSyBNnxn6qx76ONv9IYEGEqteyUUAfRk9zPfXQw6?= =?utf-8?q?IeXnYDlNQRGojq/HpkcPhaVhZqlk9mA7IL1TGkAU45oJItkwC6K6l/60?= =?utf-8?q?9v/yZzmU9JsokYxRx8yEdzrrK5nM5SRu82AetVS0QTIrOT6WEYaByMQ7?= =?utf-8?q?pG3Smskpjmw/PKApfIEoyMWzBsz2U3PAs139700Hpci6+58NjV2DXra4?= =?utf-8?q?JdEgXfbTohr1Bc3z4Wuvw+8Ge9/q/nqTqmOzP23RXC2fnULLvA7w5LMA?= =?utf-8?q?TXc6hpOVR/pLOJslMKwP73V8tIpwWqEf5xkYIQGkzwT0cM9ErJbVlrxP?= =?utf-8?q?lbzlHPIVwvz3cSRLa5KLMeIsDwOdP9B2fuuJUoU88eB8Xx7cS9t5aQA1?= =?utf-8?q?YNF+fRQ+Ez2PUL5xIQ3yG2AMDspK21k+so/7J/C27XIwiLPahMaKhBCY?= =?utf-8?q?PSyaWQdCCVeCwoCtZzEBYlmgGP/qOSVb1AXndKn1l0TmsO6tBtslatCe?= =?utf-8?q?CdwwWYJq1JZNBwEPPp1kP8MDPfBFY6rfnhds5muitsHXQft2nc/Shhb+?= =?utf-8?q?I/NRkyBN7S+f0CX+OUN3s2bVaZhNMhIJge/WKNB7+7+sJDBZ2sORjIPt?= =?utf-8?q?EMMFnYSl0ZyhJEGVWOPi+5Sws3i5cWJV4YCBk7tcoVAhUNEIRj3gVjja?= =?utf-8?q?hTcVpHii9AQufnbpTU8n+ysgmLkGJqR+eOaT1TUt9q4i+4RMYMlj7Iob?= =?utf-8?q?49aAb5UghNfbtg7qDup/laAj+CztEF7Jhg3UJtNkmfD0UaFEJoPhWRa8?= =?utf-8?q?6eyfTw8ZKuODZozqf4E1X+3Iy3Qg4JDZVNmOSj5GRu75ihkmvLt4FhBq?= =?utf-8?q?BfgDr36JDAJ3yXcEToHfr1yJzapHT5vCV/QAo7JQrFVG2KpAPASl4btR?= =?utf-8?q?BSgL0RPf+hO9qs03xntuFMw1my0zp8gxd607A3hbyyLlS6sw6JeZ8kOx?= =?utf-8?q?Do7K9jDEOGyPh+Zo1I6JTmMVPvM2be6swVzCKuBYpX57xOfpBWjtJqUm?= =?utf-8?q?K3qSI7/KvLJSmISBeEtLKZhnhsafCuDctEBf7l0QyccmP8hUvXJt0FES?= =?utf-8?q?MFPd9YGKoa8Rs1ewnyEhcmR+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: 510317 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?pQ7sBfaYshNBgbQ7ODZWfWiUa?= =?utf-8?q?vEdrAucnzgJ2Yo+z3zwwoIHavWjGXqa0j7o5LU6w8DBtKnMM7xXADvQa?= =?utf-8?q?+Z+RUryruI+E0hOfOhsjMjcIyhlhSHDxecenCXho5SvOnxNlKZCoydeS?= =?utf-8?q?Ks3eX4Yv3nyNwO9yssNHVgmjhu+rU8cH3gL19AWFMjlZpyghCaZisaGB?= =?utf-8?q?/H69fBJi8CvTfD/PsEtjEvBJq0/NxiuM2Pc3XYtDq2IKFMU9Ek5bVxj0?= =?utf-8?q?PVFeEZJGy9xkSR25yUHdRtZWvccMuzuuBNlZ7+HxTfC0V+DO9Zn4ecYK?= =?utf-8?q?DJArRljsjcYz1cxH+uwYE72b7OsBJE57lrYOVOfB4/5t4VFMFUIRpkDC?= =?utf-8?q?PvkmCadpFKpLwI5YQO2eM58MRMKMfNzQ5lY3zhDz7ADMCa0kv6gmo2je?= =?utf-8?q?qK6tJCoE/htFsj0g16y8Uo6BKkyBoug6WLaOCTRynS+bl6QZ5UKgK/Aa?= =?utf-8?q?+3vrBgT9aPznhQH7E1/tzM1dW/6SV/6k5w01bVAdhmeJdOWelxjZI9Tg?= =?utf-8?q?QaG/vEvydRXCvB4o5OZRDE0myuEHCNqP6XDYZ3PnpVpHafCT9tAuWLLm?= =?utf-8?q?vrYvGRGZTd5OY0JmpxI0JKe77o+cSdwUB8+ozjoCF5U09KPgQmYmEpyK?= =?utf-8?q?v4bv84OMLprMaN7tXWkSTYeiXpwjv8GRMmN/0X7kteHjaygvzNbuVYdr?= =?utf-8?q?EordAWVA79YHJZypYDYkXcAWJm/BiRLJ4UCRgovJ2Axdw39vifNksY7i?= =?utf-8?q?mJJaa1MerBwHCRpYWbox3KTcTZSxU3jRTTyRFyLvH7c2tab0HLeTwHZc?= =?utf-8?q?CCY9C+NGLniMGWVuHfe0ESA8UXW939PkzPrzzrMlt5RXdil73nJJKsjP?= =?utf-8?q?9DgbYukdI6gRK2J2cbq4RzoO0YD7gX0norLjACamexE/BQ5q+HmzsQDk?= =?utf-8?q?ZJWv0cSJigyYg4jJGZP0ywc3NWBbobk4I7Uapg/KyJ2RVa++nDqqBblF?= =?utf-8?q?yVpQ34haWkxrvV4Tl5JaIvy3/AvPa6tycY+Z3YaiSH7MGIm1IB10UTmA?= =?utf-8?q?Hbc+KiMBqgjyVXIiOOAy5J3EE2kmCjnQFY12dYAfP7UOy6DnpDcfeCy4?= =?utf-8?q?O2Eh3YMHv/4WuR4RF6ItxqYIRfXYCnxKNmb4wurAfWjsspZRjgs8UjmQ?= =?utf-8?q?FchQTxURcATxAMyn0G1BMYA7ql6wwRzEVixzTbVHTBTKYsVCLkYky+3I?= =?utf-8?q?AnN5XDGj4msLmnAomFww3nIa8NDKCxI7whxSD/FoA+Z823kyoS7qlFW3?= =?utf-8?q?MA8eGh9AQy6LrhkmA7yddW2mk2bEk3A3Heag15Ff4vqnIz3saRoHYa+l?= =?utf-8?q?QLlU2eOENhAwYN/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: 511647 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?fvCShd6ZZOqgO2x924Bs88pme?= =?utf-8?q?3FkLXfPHjII/0c92bopgWVt9ifrrkxA1Q/5wA9THhGYtNiEqaeORxLiB?= =?utf-8?q?QeORWtQYXSpXJPnPXqR3pt+rP3wHa62vxAaXhwAlYrA7Nhmza/qPfY6w?= =?utf-8?q?5kDEokhvkRe1vtszuv2UuEEMhq2t+832ROCHXyKNGLDOYC/RmTqWwThp?= =?utf-8?q?pzGbD8KCQRAwAd9SnLDFY/Ol2qNqdKLv8cY6H/1gz2rvjmzy2ExCm9P/?= =?utf-8?q?zcapjzjF9DJUtf5SU2yslhxZNjberQGJZ/HmuGVimq4H1vD0dbygTS8A?= =?utf-8?q?JyZOJNEeqmaFRH9PArusTVNtfE9YZ454tPuK5AV9+WKApOIgdNVIyl2z?= =?utf-8?q?nduS0t61QD4KAhGztw8mHXx2PiXZWAInb6OP+V5AAzCwLElpUGwrUfCq?= =?utf-8?q?FE4HUUVBzCr+GYBFTbP/k+8wVEM+n9SdQ9zj4F8/Czqu0qrltoS9C5z8?= =?utf-8?q?x47UTE3InYwDiY8xKB0ORQ7CC/T1iZj9Gej47qhGIfQjORQpOJ0GPJP0?= =?utf-8?q?mgYFc2MQRUaFCUolZWklfzVhieXjawlG9ttla6+FYhV2qgRjnBFtI3Dc?= =?utf-8?q?AW/qVsfNNNxRJ+qClI/iZum7mcstw2pLioU8h1MyK9XUyn6KIsGnZPt5?= =?utf-8?q?94I3db5rbseIYb14AmgigOrnqQTTsfOlkXSFEDecMnRwhF5UoFFGMZ9w?= =?utf-8?q?TnREeDgw3PSqYriwV+sO+OMsbZAf1FTUXfRUaj0wrUDNhAiUVxsf90JH?= =?utf-8?q?vQBBUqt+hC9FNuuCRAFGJXTkKNedUf69ZmH8Yw/DU1r8m7K84EpnHA0W?= =?utf-8?q?QQDKFQmRCxrS+973gxwd7rvZn5xIHS6kyIMwR/lyrY4fiJJPRVrrgCci?= =?utf-8?q?Pz9Glr19iPJX17c8UN1F6i6kFOaV39c+SJNxhs4F7CWZ8GczKd18Ctnc?= =?utf-8?q?tOFplFJrGlkkXOvjqTFZrkMCvoJqpy6xx5fehhGBTtIFM0KBq/6hLLCV?= =?utf-8?q?eGUZBisNTp9ilDJFZZP3HgNX9rmCu6NftXUF6vqli78CnZFXGV/K1YS1?= =?utf-8?q?DmU68zwmge8O73uEmAyPRaf3mdE4bR+tclJzrn9XHR4ZhGkvAysjUW5x?= =?utf-8?q?PcYjdBbueXVQm+IDdEHSxDZ+WVueFm2fsVfe8flyirdQSBscj4RR4GOo?= =?utf-8?q?1IaRIqIQ03HyUQbIvMZWHe73JFYrAcMb2d31ZRqyLf92V+u86Hx309hL?= =?utf-8?q?IWnPXXn7SI2+7QPOBcs/l4+cQ2aePo+YAq7IRQ0g2iwUiVb3oV+TKOkl?= =?utf-8?q?ps1UR5Xj6uxALSUo9Ns1tKu/7KRLmkfMW1KZ7lcq3w4+PRMGQMtsA3Ud?= =?utf-8?q?8T6on7p3STJjCACojxYE9XlxVly/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: 510316 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/TzP?= =?utf-8?q?B8Q2KdeQMGY/tTE8/qCKJ8jn4x0+ynZn8Bsz3rhHjJcvxOPiweaRgb5g?= =?utf-8?q?F0oh/XfspxdnMqJ6Ym/a8utn6ZVgaFnFrl+hYUADGnTr3ff0NXFxbZCF?= =?utf-8?q?dfYukkoM3HXcXI4rwTzxBKVv9hXCxHD7GnS+vMp65v4buJwnGacw22yY?= =?utf-8?q?cI/Zjc7E+DvPhZyg2yv/Q5vvUjMR9eWIWbZyDJD4JaDwaCu263xSj4Vc?= =?utf-8?q?WA843u5h/Tdcfw0yPV7xqXOOprAMLHaYoWkw2rtDpGkx5M+etydC0M60?= =?utf-8?q?nQlXXGUvMoyUf+TRAm4ageo4gyEub8Wg2oIDu1k9+Pm9WOOKsXD/sFM7?= =?utf-8?q?p0zYR1UCdw5lGvQpXClwBHitme8ZtWhgMaTuAvFmIF2kw0Yv7QHgX4aV?= =?utf-8?q?/mB5GmEuUcSzflNf5MRmNWJckraQw8ThNA5LxMi5VsPdqOmX9ZIK5gNB?= =?utf-8?q?3ZV6MkqkVQQr+eNybu4SQHoaKrQGmvDQzrRq3dGdLPbO/8bGIcnxtAXW?= =?utf-8?q?qkRSoOsldb88r5zzKj/gw6ZNgSg5O5aPpMaeaIs3M4jHwrPnQIInodAB?= =?utf-8?q?Do7NWv/DhGUvZyjt71cwNnCkhTPtQ5FQBTkoScn/hiXTaqiXl4R/qmin?= =?utf-8?q?iZKwH6wFE5Q0/W2AyVzI0nvIfKdZAjRnrndr1xa915j3UjFiHOS0wPUJ?= =?utf-8?q?ltJb0mGnIEeJ8viiZdQS5uwZLifUsWROimCXiPT0MHnj40kggz5w1VwN?= =?utf-8?q?m1pGXavBMN/7EBkXCiAzDmy9EmY+srebMKHS7oeRzohqKtFB7vbpJMpZ?= =?utf-8?q?6jLSjNJnoIObZ8j/GLhikAz3T3q1JmHrPy+sQGgjC/BwaWA8Hsk4c/rG?= =?utf-8?q?XkM8CMonneDArFKrDoleIlIlucbDwrhcr4iTOxal6FD/ZCj60QBNlWZv?= =?utf-8?q?E0BsEjIghc7jSqi+cSIDxeuPhGztBuBTnwQgu32MmMUUSh5dQqmvT60p?= =?utf-8?q?61h/LlsEiy2tx6LCxD1LO77C84oakx5tp3DKKUEdz50rjzhfuSd6XuqZ?= =?utf-8?q?KSGeSvOEJL+6FSjB4WTvy9JL1BAcZsNH1sIvHzrH9pupm2iWiO/NQrNa?= =?utf-8?q?z/1kTI6Yg7gCWC7C4uj8HefrmgamCNT7t7rFyTOp/GkuSRDsL8Dtv42w?= =?utf-8?q?yqtPlyam/814GLRWy/cy0KKobIVWa6uA5GNMBlNYZc3ClMKmWptd0Vdi?= =?utf-8?q?X8GOCX5N80MTyS5hNud5n5lgJgVbsol8izFTETVXoewzQVE1I4t9RYh3?= =?utf-8?q?jmuYnLSJQPCjGTT5asdi6/EETJc28nqqV3+9eyNdKTHVtf5TOKYWjpEK?= =?utf-8?q?lScqRfWiuVsn9V7Mz5sLeHNMFcYFfjz?= 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);