From patchwork Thu Jan 13 08:54:54 2022 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: 532424 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC5AFC433EF for ; Thu, 13 Jan 2022 08:55:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231193AbiAMIzn (ORCPT ); Thu, 13 Jan 2022 03:55:43 -0500 Received: from mail-co1nam11on2053.outbound.protection.outlook.com ([40.107.220.53]:51425 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230451AbiAMIzl (ORCPT ); Thu, 13 Jan 2022 03:55:41 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VwUTJYmuXTv1rXCuBlLHOdw7Pnh3j7tlQ2b6j3XtSWilFvRWOK6lSczIi4nVco0lW84JxcOHW/iym0qCl5Fl1z6TS9G2APq24mWyip49E+4JbRKqAXPDWTD2PlFNLGUvKBOS7Y5jHGgIzP4BsOk4QbGN3RPz3ztKa/sr1CGD3QLoTWKxbRf93+sCHO/xWAo01QcDe4MUmobv49CE7EWsdnEhhOFfq4X7JXiaj1evWB4HYvc5p66jVkxYPYiXZmFi89NvDDYnV5jlKkD03hn4MRLTt3tWnu4wmq8utXkpmVNxC6VJCcCT10Gl77as0E5dxwxrMSaBAnU3IV3LWEtYzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eD1NMlmq7cmiMho79n84K3B5x4AIEUAhxEv4VKxZHcw=; b=PWzZpqTLEcXE4ksOMBdmIUIUbby7MxMh4r3YIC217GLjvBngiNFUBf6QFTya0SCD3VW/LVkoBh4jIa57OK9xY6QZBktoOq8RDQ3bUxooYGUYY8JhsaJKjg4Lqyo4RE5THH02CoTEC++xRLbGcf/TYN/iGGLQtGQ6QDfO9A94ILqWE+lzVYqB1nXuhU1uwJmUgIktOreX+iCNFCj/rbuRNoktz5n2fdH1dI9wFejnqFTKgZKFBSNYAQwCusQM3iKB7c3MWQpGoPQB9nbuVapfAvmjBiVYK3G8yJTn7fSwGGEWnprxAiLlQOj0KWEG6CAUPD3GwWjjjZEMq/P6R0xBFg== 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=eD1NMlmq7cmiMho79n84K3B5x4AIEUAhxEv4VKxZHcw=; b=DX6HVkCBupgrbuyqxvBixd7Sb2pWNC/DZP/NtgnJXAKJ91lIh2ukDgJ8sbo5q1a7OreTDj2yE4bLGFqF27kgRsEOOv9l8c0S5L8WB8aEjJNBe0AhAk/6ChY4iswO2Dv4z+Bes5g5mf2pWUN85tr+ZIr+AazU7OSb+bstB6OQFbk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by BY5PR11MB4040.namprd11.prod.outlook.com (2603:10b6:a03:186::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Thu, 13 Jan 2022 08:55:40 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:55:40 +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 01/31] staging: wfx: fix Makefile and Kconfig licenses Date: Thu, 13 Jan 2022 09:54:54 +0100 Message-Id: <20220113085524.1110708-2-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e2a64cab-a733-4e0f-54aa-08d9d6727956 X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 25HmAFrCSo8UZU1QgK/5ErImf+e4JWNhCEFVgEYlMcoyksHwUksXxTq8wh6nCY4DHuDomGs7iqM3yPqvvksd7efg19j91zdLgztycBLQhV1ZQmFXSlxtmi6dOB9V9aZ1f7VPcdIjNvj0KH158z0ynxUHiuKp07cvygAjs/GrB93+RXzRwVw2dfVejvMKCgX6PqboUb53B6L+0EjZd5KbE43kYSuHsRGLnZcVLVc/92uBkKVD9RKrQ4Kq3BdMsV+No39OMwdbTmg2MuQZSrJ2gFR2K1x2lymwBNczzcVkF/vrGSg6BNTTNsZnUd4+TNG+bNjvd+Cxp9WBaB67B3h95zrSBkSFPZuDKZwjyxwBw1nk48Ibmm8OgQIybTJaGARsgTmVEMNOklCmloyJpHNsBXPR1kHr/t+3GXSuyq0b1PiwZ7fYRGbiS11bbi33A7bzAArGz1EDWpiwuA5QD8DQQMW0H8Dv9rZ8MIEhIQvCc3J58/kHTmQk9Ji075WFzACs8g2Se1CKneMHQwLuWr29YQwVbiZHxQrhnF/lGndhFOXNgmHehZTAszo+1/peH6WQdXAr9k3O3aeBunqWlmE3KhRezfj+mzn4oMnJCckAcsykpqu9ExWpUHFwBaD5c6z3kwCF6tkNE3CqrKEv7uhywQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6506007)(508600001)(186003)(38100700002)(4326008)(8936002)(6512007)(6666004)(66946007)(83380400001)(1076003)(2616005)(54906003)(86362001)(66556008)(2906002)(66476007)(316002)(52116002)(36756003)(5660300002)(66574015)(8676002)(6486002)(107886003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?04UsDxQHIWTMDnD59qIv4RWOySsz?= =?utf-8?q?T1QS8/l0I3Sce0pm7SUKCW9XBjTfBe0no05LstW0+ZPgIK9cgoTj2M95bFgH/npyB?= =?utf-8?q?cZu2E/KUC8YR8FgYTxfpbtNn3QXLLqtQ4lCHVoRfCqoX87FD0pYPyrlnVivqI0cNi?= =?utf-8?q?EElrGcAW+8qJZlCaiXnKSEsOQ8N7jW04xRux4ou5SXJhGQjmT/GZRZtNwTBs3NSBS?= =?utf-8?q?wL/t9ypvlSQTtoPx5z+a4s76s4R/985ceC1Va6AAci/oqI5xg6T4/0v5uomHwQSMv?= =?utf-8?q?/+k2nqZtL/vOgR/OCqgI+IvCqVNgJsXEp9UiU5FJ/+gdCGUJ9An7LOIWgd9hCCzAX?= =?utf-8?q?riSdn5hE2N3e1R/fR4gTRxwDF9nkdSXHKY9cAEmTZy8clxGb+lO4r8IsuAt51mneb?= =?utf-8?q?oSIM/1LTaxIIEc91I6trTYx/qpPmtt+0EXkMmxXyUq4XGhV6hP8dh3mXr2arJ+aIK?= =?utf-8?q?O5LpTGpNAJ6IXj90tPMT5Z1L2uHuUSs4OpjP3wVEpGXel9gE5EokcADnmDaC0wLIr?= =?utf-8?q?x8FzV6R1HFX6TXxpUVFv8KdVc6W4O72sbL/At5Z++St6BCa88AuF2deR15VI9ysEX?= =?utf-8?q?mkqcugqAnvkbT6MLjRhG7yOVBNPQeISWZH6wRkVBw4FrtwUYJIF+jkZPHUF70qTMO?= =?utf-8?q?UV5F0imk9kmJSwHvQd/Oxv6B8jzXL5ZxfqNGZQsN8W1EPvnINkv0E/VR6yn46ozZj?= =?utf-8?q?ZQWzDXRSa63jbhdRpNTwChuSR61rEb4/AyU6hXkjJJ01HOAWq5PwTpXzH9N6ML2tl?= =?utf-8?q?9V29ZK6X39dEUq1i0OTAZTk9RPXklq4poG4Tf+I5AujrZdsNVQAdSpVNWP0Gyd99k?= =?utf-8?q?9PxzbU7cdRZip2IuAnyvI9sujd6ofXO9okos+8LzYSzWj6mHDhWSXeveQu+pEwIuL?= =?utf-8?q?Db6cPSf6kP+rBrrwIEqVAo6IIvEg7O+aSa6RNK5gMNn/tguSMF1i1rtcf5KJccjVX?= =?utf-8?q?Q8dcmYggAw5I5bD7J1WSgdlnw/7LyOQpe1akvUAbwK1gebjdVDUCDx1CbOFpMw6jY?= =?utf-8?q?5Pdwqy9WBHHaAAyyHzk3pzQYsdiiL6SVSFPh0uD8K/uwXNDTZ3OrPTSfYwJFXIcQ7?= =?utf-8?q?wb92R7VBiYefZUh31lxQu9zOIVjzOZZEUOWAB14+Rgl3YN1E4ItyukQfgJpcvwvOo?= =?utf-8?q?cQ4hvMqc13Qi61r1O0e9ravgRT6yccwRmVx3TwkJNYRuiE/GK2FCEc9AC31lehHW3?= =?utf-8?q?Ivtoxge3yrh0CAjwPacFJr4dRSuwM5zcWbMnu1KRf/sfc4fG94NZCNhaHEStuGLKA?= =?utf-8?q?Xfk56xydj6A2clG0LPfpV8SC6HQIpRDrgSGFO9YOA7LDPOCnfofGjI0CynkJzCI6I?= =?utf-8?q?fo74zH9A4fo7Dft28ppX4CFTVutIYgtzElxOA8h+gXxmhATKzc53HBtauD3mUpp6Q?= =?utf-8?q?I/R+9gHVWOipaAdB8gb1dFjFHKZHpOFsau5yLa2LYEXd8TcMjYT8WYj6hE1fDiPoQ?= =?utf-8?q?tilZRbIj5uMXMF08Wxx56PIfOoD8wiTP/DiUcOWZ/xWc0V3h9qEJaNQvpeBso/aT8?= =?utf-8?q?RBfJip8ZGnonodPT42e4f8o7KERmA5AZjgQWA6eZpsdkvXXpuIxxvmd99ipPXeHCM?= =?utf-8?q?lECHpQY6aPlUHq+FgjH+JDojhdq0a+xauy5k3ZvRmqT3cR4vC4/jEs=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: e2a64cab-a733-4e0f-54aa-08d9d6727956 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:55:40.2139 (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: OqtYSFXlhuUTqCM9XSuLaMxYP7vghthF5sXlQvM/WgOIWgieya92vmYuy4CNEdFikC5XMki8Mh5Y3HEQfHMeGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4040 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller License was missing in Kconfig. Makefile license was GPL-2.0 while rest of the driver use GPL-2.0-only. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Kconfig | 1 + drivers/staging/wfx/Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wfx/Kconfig b/drivers/staging/wfx/Kconfig index 83ee4d0ca8c6..01ea09cb9697 100644 --- a/drivers/staging/wfx/Kconfig +++ b/drivers/staging/wfx/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only config WFX tristate "Silicon Labs wireless chips WF200 and further" depends on MAC80211 diff --git a/drivers/staging/wfx/Makefile b/drivers/staging/wfx/Makefile index 0e0cc982ceab..1e99e6ffe044 100644 --- a/drivers/staging/wfx/Makefile +++ b/drivers/staging/wfx/Makefile @@ -1,4 +1,4 @@ -# SPDX-License-Identifier: GPL-2.0 +# SPDX-License-Identifier: GPL-2.0-only # Necessary for CREATE_TRACE_POINTS CFLAGS_debug.o = -I$(src) From patchwork Thu Jan 13 08:54:55 2022 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: 532423 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24286C433F5 for ; Thu, 13 Jan 2022 08:55:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231324AbiAMIzq (ORCPT ); Thu, 13 Jan 2022 03:55:46 -0500 Received: from mail-co1nam11on2053.outbound.protection.outlook.com ([40.107.220.53]:51425 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231279AbiAMIzo (ORCPT ); Thu, 13 Jan 2022 03:55:44 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lQvgUYl+218BjRMAkbIpt17OGBN0onC33ng+421vOAsWfl+/LT8ARLyjMuN/XTe5wsGtKfOsLrKro32mFqKoAZ5xPD70ArRjaFgX6mniYE5SbhJoShwFrl7y7OJZd0xCMv03/K9jl10FG00izCyggolzmdH2Jh7NbPCJXael1YAo67MLOsfPyz6HJ6LeBJg1K6gH72JAtccr+3Uv27Jm2rx1dZqvXh7pO8U4DlDSEaoAo2NaitWQkPoJfY5GCf6OdzH/IRy77LbqsyFmFYT0JUaGSRR0aiHbudyuBRoSzyFVUsc56Ar6R7yei4OWNNn+SOEKNRaWt7evxoHHsxpZzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=l30U1H71UcMYJ6LwwkDjsO8dH6ApnFIMyzZZREg7NAw=; b=X20NsU1GabZ85I+TpAF9fqSPJGlbg0gY77HLR8oZBslk7wg8h5biqoa0l/FTtBIHSmJyedZy5RD2z3BPOMvaNRomfD3MoI5tUvBLQLyGmwUgmJ+oc2v9LQQ99zdbcc/pF5KHdJnwzpBvHW5cz6Fzycukppmwtg+Dm3oXHgb6PICRurc2HIucT69qCF4szCmsinaOA5qDmz2xLuayG/gH03lSOVsRi8KtluHbM1UsxFMe8sphnjcEl4fl+QBvJn5DvOQezvUvLBbmExxDQeq3ueah/JffFCB4nHVDbELV0UIUIJBp+b7RoEK2ljNCG17fMb3kjJLIpt1bWqetgjy6gg== 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=l30U1H71UcMYJ6LwwkDjsO8dH6ApnFIMyzZZREg7NAw=; b=fc4TRm7mPxhAnGrMoCNTPhimwfIi0Wq222SyEftkkwF9vYQa6BGjCAdkwUqadd4hWtIHife/FhdPEZSq2OdbPCuvzpH02cdBfCaBrWp6qX5TGtet+8PUxrhkp7dgBGCkn6PbIg35z3z9aFprK0x07F2GvE9mYOehZ3imzzyZJOc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by BY5PR11MB4040.namprd11.prod.outlook.com (2603:10b6:a03:186::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Thu, 13 Jan 2022 08:55:42 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:55:42 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 02/31] staging: wfx: fix HIF API license Date: Thu, 13 Jan 2022 09:54:55 +0100 Message-Id: <20220113085524.1110708-3-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 46af4525-a2e3-49d2-c60c-08d9d6727a79 X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AZ3KjFcg+t96yasmM5stP7emdT09hBbUvz4z1GUB/+rZyppn03OGTQQAFP03zPIksFqxaJ4GYp9pBCOFifFodSwK0VbFhLzIOwlVAHTTyfehGH5W+IWeCS7sSYd+suhfEulZDPU9O3hCEQKc9FbLEEnm4xAwCdRw8cCmu4l6iGCJ0h18ttTQv7MlmhangAXK1Qclr0MQWRyXk2QQu8ofTPJL4G2cI+KR95AbIMx1mdACfvoDvPhnM9T3I0/UPUmu1gUuGYp43OQzcMINyYtQMiA4EfaEIQVT5GXpdv15F7aPyoceMMCsVrmhRoarBFMTYmwaLXX2fu5iRtN6Ns7foVGA/tAzgXOCYlEMUS6ITyXx+q06KskztumTj3E0LdUt/u8m3GqMNozymHSVp4SEBAz87+I/iMIJtUdlpVdzY9DY2dxyTCNoTWplh9qhAyXtzFGVPgUzWKOqkVu3Iu5DVWnXQyyE9kVFArMnzo4vC5qRFZ1fUekwhJV2oJJiYyqtEuX8A6o53096at7eoShjIZecco5x5tkn92s0fERYZnS84aQKHYwnoyj2emacTh3eJLxi5Do7q4382yxUIKkvJLDZ5YqIQNqkpP2aK9SJ+x0SyTcMcK9fKnlM7TSskDk5L6tTUSYydiHbIOugO4iD0w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6506007)(508600001)(186003)(38100700002)(4326008)(8936002)(6512007)(6666004)(66946007)(83380400001)(1076003)(2616005)(54906003)(86362001)(66556008)(2906002)(66476007)(316002)(52116002)(36756003)(5660300002)(8676002)(6486002)(107886003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?AERXoEz5R1/LFEBRvFMrow+Lsa0H?= =?utf-8?q?qCcriC38Q+B9Q4bHzoFF72T/5SqqKUHkRrE/tGqejcs5D2WD4xGynIQT3q272/BBb?= =?utf-8?q?5B0od4ViJ/Rmp1xjTBJeZqxWhgGlQpP2AiT4sM7QcbFtZtL93ZlERHqgMF5D8Gybz?= =?utf-8?q?4F9T48UshKE72aWgeVuGwLhApdrsHChs4dZ0vDmX9NBZy8vX9DSUA0owNUUU96LSu?= =?utf-8?q?RsluC+CiqcTokg6WytDkxqVDtaHUwT3XOsGG8wG8f9pURvBm7lkwdypCfKgx2aKDD?= =?utf-8?q?pYODlwrwhEQFze4oRSKJFjONb1OyvdI7WHpACE8AvhTiGyHLE6YZKkmLXXAELfKrp?= =?utf-8?q?JRshEYDX56g3YM3nXiGeNE1Nbji6KpJ3jnDFuXGlGVJjcXaek2McpNXJzQO+h7+2U?= =?utf-8?q?HkYOiAtt8n/frtXa6aEJ4mhPfnhwIkFMhwmoHiuyeW692fRaOHq1GiXZ/HY3L4KGO?= =?utf-8?q?vz9oz5GhKnLIPL03+goxyW4cLBDw857f4ByX2OgJV8ecCLhQ84jw5iHKBTN1cN0lt?= =?utf-8?q?x3K51hYjpu9sgvT+kdg6ZNIue0IuUdUw+R9RmYCb7bSn5OMghcSUp9+yK/VW+O3RE?= =?utf-8?q?fZpgsu/ml1x9bnNqlfrpFRpr7Zp4a0nnTH98ONz5WKZrEJ4rhRXHr/2v90VvySY4w?= =?utf-8?q?vWe18EBY1RIVwuLmHpOUSkHanu5L1GKJvRlX/T3Vp8NqhndYygjlmZZElNdkxarz0?= =?utf-8?q?zRk8uUDeSJyLO9zbq7VHlW8xcl223ohTnfun4K44xuv91GCljml6qNj3NZQL2Azz8?= =?utf-8?q?Xi5hkQOnwq4oWWJRI2VkwnQ8XsBtOlUmDr5IDykTbAvN9Tz/K/6RAKTt3Vdyg9kDe?= =?utf-8?q?0/pj97SQtitHmnXffXUCkHtN+MKjwSkaKq0HqspiiJsOpJACnljI12nXJk+hmrx5w?= =?utf-8?q?+qnfm0Fdz83VhBnfkKdyXFe5nSX/CCI+jEiyCAxrldLvGDYLT3jLN9ffx2L7WbeFW?= =?utf-8?q?gIEcy2D7agU13d5DCkWiBm4eFZlYKGr9IJXh9pfppg8psZiGswt3PB4uGDlIfNa35?= =?utf-8?q?P+wL6stUo6dMDAcXyBFXj8mR6A31mLYZXZ/PQ7nMnCyMtdrZMAggYdqXz+ZRTyjB2?= =?utf-8?q?ACKen0X3svezN4jVf5RYcYEN/SRsDez4FgztmKGEnh4VZ96DtD9fZ0Y5VXzJWxKA5?= =?utf-8?q?9AQUGgbUDLiSmi5lvWIZDXqrRG6kvDDjiOkO7PvpthgF20KT2Tx+Uume2Vf42V4l2?= =?utf-8?q?SNgdXgoQ1iNHLyTO1oQ7IZ2FBd4ZqMtA3smvW3FqmnUo4RTKhoLzL9GVgBWsiYNPg?= =?utf-8?q?3ZXt1Xrgr8PCOYCP52zEyGeerLs9zUEocU0RAUe+vFB6Z94Ojng7uMRNn5YGOAAT0?= =?utf-8?q?LBdWlBiBRxC4CEzlZqHZtrCyNpMniHY565h5WgtGBXjEzaII0kg4RdjNub0oc1Hg+?= =?utf-8?q?AtEBN2jWD5f4LKBSzW2lqaKEiIi1Muk+IlIvCNv/GWTFuX6viQfhvIWf+uYHsshx2?= =?utf-8?q?gUCshh6RmUnHRjA3seuPI28H8zQto94w63xmXbnjJT3Hn/gKGMcb2E8U/BI6xE8cK?= =?utf-8?q?hGWllpK6NdsZElrhe4oelJ55MXn9YdngGVy1KuXDIcpjF+ufTWf2zotnvCfyu0GnU?= =?utf-8?q?P57wcf5pSbzHOgRpFHycKJFbOUnBhN6q8kXfUAqnoVA04YdKRxIb2k=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46af4525-a2e3-49d2-c60c-08d9d6727a79 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:55:42.1396 (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: t42d1sonoPDmrMj9kIDmdI+TNmyuR0mDjU0YJTJM049P5JSXw8DdASouKHJVV+bVLyN9BXikt+NQRbO6L5Mzvw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4040 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Apache-2.0 is not allowed in the kernel. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_cmd.h | 2 +- drivers/staging/wfx/hif_api_general.h | 2 +- drivers/staging/wfx/hif_api_mib.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index b0aa13b23a51..b1829d01a5d9 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: Apache-2.0 */ +/* SPDX-License-Identifier: GPL-2.0-only or Apache-2.0 */ /* * WF200 hardware interface definitions * diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index 5f74f829b7df..3e5c92e12d35 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: Apache-2.0 */ +/* SPDX-License-Identifier: GPL-2.0-only or Apache-2.0 */ /* * WF200 hardware interface definitions * diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index da534f244757..be76e2766880 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: Apache-2.0 */ +/* SPDX-License-Identifier: GPL-2.0-only or Apache-2.0 */ /* * WF200 hardware interface definitions * From patchwork Thu Jan 13 08:54:57 2022 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: 532422 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D982C433FE for ; Thu, 13 Jan 2022 08:55:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231666AbiAMIzz (ORCPT ); Thu, 13 Jan 2022 03:55:55 -0500 Received: from mail-co1nam11on2086.outbound.protection.outlook.com ([40.107.220.86]:28322 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231376AbiAMIzr (ORCPT ); Thu, 13 Jan 2022 03:55:47 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ijvrbe/bQykgFLuodwqhIKJ6HmT8fk7G7HnGex3uZ9ESqEA/5bcZzdXdOoKa3BgP8JPtiVDv5vmEoHmZgA/QPdis4UtRk50hybRLSqSz8JdVjKW8OcGoKSMbQ4qP8xFOLtOSNDL5qnbIuAgicybRUt4R+0GX81ShIwT5lPmAqVGlGlM1q0zObNJ/5Y/rIrAcZQln2F95ofd+Dgl8UVjn9sny/zppq8s/au+tl7SokbW13fUL59ragbABrMdLvKKp2f5EprDxk/MTJxrd7UvMM8rAwFCCU4LioWO8husqaOI2gKrb5KFSLcNs7Ylswjrw8TX102Y1dz1C7ei3L8licQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cvZl16TELr7l4/hx5wQeeZi+e9QX3BFwwPMgJvqTK7I=; b=OPEj3U/tm/A9fUozY+Fi5LTyHjzOQcZ/DbbmY8BmAUvVYJjrpVzloMojGQ0FHdu+LzEB2yqM7CwZPBlH1nKh/VfZzYbXbb2ok+jg44+dqfDtThm0/LS3OsjWXEMqco27XPva8raMYXly9fWqVZi4n/ry1UJNVjttWmvjddYfMre7m6L64X6rWJbioOdW3HsBdAhNqRVQfuX2gqcV/hQKdZ5CaniZAvsuozVtIm98sH/IaVjr5dxs+jsYjsG+l4+AIYLMPZeVd7F5NFkExJyNx9DJb7iwtxMguyCyC0kSDe6mZu1487053qktfe/7Lyy2grVz/c7T5mkxZo3gaDwSQQ== 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=cvZl16TELr7l4/hx5wQeeZi+e9QX3BFwwPMgJvqTK7I=; b=TuTbAr0mvPkzkpTVU3HJKgxeNjV5xzyqTGmjppJYT74YsbWkMCz6DVfZ/3bfN2/dVZcOtWCIKegTkREXavmD2tg1DpJSJmKTbaohl+lzFGRqntLrsR23hM3D9ZlhTa20cnfVqXB/EYPz7zoyXphksScZXWIMUXlaj2q3JIPirp0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by BY5PR11MB4040.namprd11.prod.outlook.com (2603:10b6:a03:186::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Thu, 13 Jan 2022 08:55:46 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:55: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 04/31] staging: wfx: fix comment correctness Date: Thu, 13 Jan 2022 09:54:57 +0100 Message-Id: <20220113085524.1110708-5-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 669b5183-06d1-467a-f444-08d9d6727ce2 X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1pf/6arT+s+eNFYl5bK530mEnN6Cft7qQWG3nUTamDWoEcD8vhrovxc0MvUs/0c4ObXCpBiecxYJzMTI1l/vyZj0SLWI3p8gNYNH7NGmjy3NaUjfJ9UyRkfxRBrO8zZR5ZoR55lyf9XmLENxJkLSet89i47mJNMTFAOArFBBjqm8mMe/YH5fouzevWAXHFHNwcYM+qEAqzRWOW6Uh/RMARxQtmlr4ZhEbTEomBJV+RW8oREFs9OXcccdTgoQzO/5M/0cYRrnX9GejEfcifsKN0H7KN7eh1+SzH3LL9dxK4X5NzRHaDfoKgvVuPgutNK/042yzUZMRo3KCZUj88DSewSOSSotYZFCleQhk6V5nBGcFerhCLswk4FHchaXGF68coYx70mxUfmvR5TZExCktoaY9fOyQzv6FvGd223Uk4LCq9ViX7ib1B2zyvlx0SybzMGhDo6SsJLuZoPfanUYtOjL2VejHSgp/ZLUzQNZkIrSvL4vbdqTirc2MovigrWHxtD+25sCoRJ17IdPpXRaRgZSEPm61dm7M0tlgvbD7f2wB3zBpayDpaP2tuYkw9S0oz1DY0d8MK8bOVQBWBaHBYPNM3GZA/r85UxuGdKX3JkImpUIea1IoU246bLg3shWSZe9GMSIcl/iFNmvFk4CPQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6506007)(508600001)(186003)(38100700002)(4326008)(8936002)(6512007)(6666004)(66946007)(83380400001)(1076003)(2616005)(54906003)(86362001)(66556008)(2906002)(66476007)(316002)(52116002)(36756003)(5660300002)(66574015)(8676002)(6486002)(107886003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?BwVlAECCSo5xYHMbA9y9xINPIeBz?= =?utf-8?q?Yh/QxhjreIjc6l/2vHI3WPOMT5NCDQPAbT2kq+wsNKr5uSfA5PmiNpt+dAqiJwzJK?= =?utf-8?q?lai1lnUfYuHJK9DHxUVQvFb08iqOrVseC9gbU6oqJ65zLjQtN+R3kfRW6CrMrzqpf?= =?utf-8?q?gDXUl5eB+bki7kK5tc10kqwYD83BGQuQVs6cfQApxI0nSk8YBGJ2MQzMm0WfQ6htB?= =?utf-8?q?C2T5GipiDpSTS7IQWRF0oMmzvMg1WIFIAhRGIoBREdKTlnffBRA9Cnc0M2dkejTDw?= =?utf-8?q?miDlu51jK0cTa8ELer4SKnkIsj6IzRKO26OiRnsjzHlA4OygfCnLFNB0llcFMPQKE?= =?utf-8?q?wxoNOc8ILI10ZAsvqky2RG4V+/CXPoIydXwb4oIBx4figDM7iKhMO2TwQqiid2tCj?= =?utf-8?q?o6v3PTUOdf7Ruk/8LvHQIu4Xu2Z/pWZNo9QkYGahddc00M7CtLLRRlzbrqfvE1aQh?= =?utf-8?q?tPGPjFC/wgN8TsnLOV8V/GixooaY+3QSay4J/qI8LC9cjNQZvQ/m8OaPOLdPfp0Ly?= =?utf-8?q?SfQiyHenEDWSQ+JqrQPDZ+NjquDrOW7jyuUoxZciu2DEcSyF4x8QWQj2zSM+jval0?= =?utf-8?q?NuH6XPoTbupl0/0SFUbSZ5p+yplvDtlcEFhsVbbrk0D4gsA9WuA7q0hBihcTFyXFo?= =?utf-8?q?DleTGnraLCTXgTckDKtsJpBnxF3Uh8dYjGdgMLrtq/DGGp6QBlhayARxikNkw+UEQ?= =?utf-8?q?mt8bDPS6CnOGx2taMAcBIPfVNdPd2rTKlBkiK57bR9DZXuy+ZjbuOO42EZxj3oyS5?= =?utf-8?q?8hxLQ9nkN5sqq5/zLBpo83iwxqhzbwyNjAg6Y961a8pRNV65lOkPaTr1Tn/fxIiDW?= =?utf-8?q?mB2DgSwd+DafHBB5G0e8y0cT1TgBTu717I6/mMsoF59/1Uf/wGdKS/otNkemSoq81?= =?utf-8?q?kQgcgXLtimkbOCM7zbH9Sxg1H6K3oNmjiCYIrSa8/IagBfgKLSr/qCB8Fx/X4E2VJ?= =?utf-8?q?qV3MERAxkQrh1iWMDah91qkTCXg3D1jYsHSH4wqW1/FQ8J3jt1VtRBh0/iF6KKqR4?= =?utf-8?q?kS0DB1K/d97ui6OHJ5Y4UKZriSmMJIDs/9LTQHhhbXBn6BXu73X1AgMY0pcTqvKXQ?= =?utf-8?q?d0dOGJM68FrKBfuGpZFK5q1SV4bbiN6lZrcwmjIpdqaLF5djly/b2V485s64a15Rh?= =?utf-8?q?wfuALM6Ni6RUkanra+JYn6y+/OiyYSHvN6cJQsGftjKWF6a7zC+5C516D7L7yeE2/?= =?utf-8?q?5UaMPYdnRqKwURk4uw31bl1NSGwv7HGL8t6ORkXAR5Ip8IKF+cVlV0KWhSrVOxeWL?= =?utf-8?q?trezRMuCgZKoaRnodk3/IoX+F1gaRgXyaFs955GsjL/j7rkXcLUBIjKZrWGk+wwSI?= =?utf-8?q?aBmESEmmgvmaujiL60xgdhdkQXD5vwurnSX98XNj9VlhHF8YMOL2kN7XoAsERcznv?= =?utf-8?q?Rzif2yhRiSP3ZAaZBpdGwkk3JTWMOjPqXJNwTcZJllEklDY/TUmpVQtH51udw2rOC?= =?utf-8?q?Dy1+exus1lH8HW1n0qrSODkJLc+jtOUJ8w2AKFA1TNXK0JnwlS43JFlEXteKdGKSV?= =?utf-8?q?nuolBBo/YVgh+jtnT2ykqHz5EvHR5DtIHinqNTaHtcUolpWljzIL4oLs+ePobJvVe?= =?utf-8?q?AMVWRC/XlcT/SxKcQc3HlFi/2jM5z8QauHP5JVFSXol8mIK0FUNCdI=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 669b5183-06d1-467a-f444-08d9d6727ce2 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:55:46.1843 (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: shKO/srK8sUwrPO1b/pYdtesqHF61Jj6mN/sF88OmuDmBIeBf16XGOvkSgVJ0Nb2wlgWS4kt31WKjxEju6TPow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4040 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Using DMA with stack allocated buffers is not supported, whatever the value of CONFIG_VMAP_STACK. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hwio.c | 12 ------------ drivers/staging/wfx/hwio.h | 4 ++++ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/staging/wfx/hwio.c b/drivers/staging/wfx/hwio.c index 30eb888830d2..393bcb1e2f4e 100644 --- a/drivers/staging/wfx/hwio.c +++ b/drivers/staging/wfx/hwio.c @@ -14,18 +14,6 @@ #include "bus.h" #include "traces.h" -/* - * Internal helpers. - * - * About CONFIG_VMAP_STACK: - * When CONFIG_VMAP_STACK is enabled, it is not possible to run DMA on stack - * allocated data. Functions below that work with registers (aka functions - * ending with "32") automatically reallocate buffers with kmalloc. However, - * functions that work with arbitrary length buffers let's caller to handle - * memory location. In doubt, enable CONFIG_DEBUG_SG to detect badly located - * buffer. - */ - static int read32(struct wfx_dev *wdev, int reg, u32 *val) { int ret; diff --git a/drivers/staging/wfx/hwio.h b/drivers/staging/wfx/hwio.h index ff09575dd1af..d34baae47017 100644 --- a/drivers/staging/wfx/hwio.h +++ b/drivers/staging/wfx/hwio.h @@ -12,6 +12,10 @@ struct wfx_dev; +/* Caution: in the functions below, 'buf' will used with a DMA. So, it must be + * kmalloc'd (do not use stack allocated buffers). In doubt, enable + * CONFIG_DEBUG_SG to detect badly located buffer. + */ int wfx_data_read(struct wfx_dev *wdev, void *buf, size_t buf_len); int wfx_data_write(struct wfx_dev *wdev, const void *buf, size_t buf_len); From patchwork Thu Jan 13 08:54:59 2022 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: 532421 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29162C433F5 for ; Thu, 13 Jan 2022 08:56:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232027AbiAMI4H (ORCPT ); Thu, 13 Jan 2022 03:56:07 -0500 Received: from mail-co1nam11on2086.outbound.protection.outlook.com ([40.107.220.86]:28322 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231735AbiAMIz5 (ORCPT ); Thu, 13 Jan 2022 03:55:57 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OjYudBbbZo41Gjf6bTMptm/REeGteE+wjfW2RCjeGZ2N5OCgUZDew8MwrO07jn3ipm+cjGSDePgnO/VUlg1gYiYPMOJZIUXB3qFrv2hZZkjtLzDTCGNry6e+cpf1n88ZJ2tWmG3RDVmi7B/1fIUMepU6HYRVfSNdHr80pPBc8+pLIj5m9JMAk9iSL1JRjLgPuxaFU07kVIk9RelwZEE6xGWkWXOcbtJt/qi9t8MS50Uf/hA8+YS5XY9By7pUuS9YOiSZxn6TcTN7T+m4VWU6Q91v+YhfMZdSHjyJCHJ8FPjVjJxi4MZrDz3KK73SeMM2KzbP7Esa9sGH+JC+Jp39RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BXntoKDHEKe8j6IFAzofa70DVvtAsRQAIbYKne+fbOg=; b=ADUKQycKTM+LQ3pppvbT6IEnK5D/n1PPeeCGw8qe5tYrlIJaCnIMkLBe8fm3/MrL5EWuCNNHrvw/i2HUj9L8kq9B7OtKVKmlH6HV06d7jnafaJNn3kUBbagUWz4Bp2MNgMxLxXzohi7+Yw7n8WrkMIUuNDumYhWb2kAkR0CquZ8qAWYTPWXE09mwBmAmJv0so8FozKLgkCZtUcL1DZQpaI5fsanRIUPNM7oqhHbh+HPS90AHNfy0CxKHU/IZRo7mDHmpT0diczg93K1KIaejYBpTG4XHIx/JmjkBNhIxspDW9wdUF1/bCATymbm1LyuUYy1blq+ajJmxgojMKsPMAQ== 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=BXntoKDHEKe8j6IFAzofa70DVvtAsRQAIbYKne+fbOg=; b=KN8riYeru3Y+l2V12ID4eRXbUtU70lmKWqPCeS1gOMGKaV4fx0AUh5mq81eAhp6tpPXe3AyR2mfRkOCwhEv59suNUHYc/3AXwGNCxkXJt/k+wTRIBr7C35g26iDn99UtfbvXIYe2nfMrhXcP++jyuLuS12iMkyRnu8fDbFnrT6s= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by BY5PR11MB4040.namprd11.prod.outlook.com (2603:10b6:a03:186::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Thu, 13 Jan 2022 08:55:49 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:55:49 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 06/31] staging: wfx: remove unnecessary braces Date: Thu, 13 Jan 2022 09:54:59 +0100 Message-Id: <20220113085524.1110708-7-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 507bf973-549d-4d86-6dac-08d9d6727f12 X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1388; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4e0GgFUqBJel+ge6+66vI1QM92XgoW4f/fP+X+KvY6q7GbmJLlkaCf4OVRoYaeVkXOGGo1FH1ovd3j7WjNTeqgaK5XKOmpqeampuKfJ+s37UzqGHk/aImgfhob1VVrrCmCXd3nl94yVhJWvc1TeOwGnQsRuPKswWgLPgjajzkm24eANfEk+vLHlH3a6mupmL8ffGPBduns1ovguvkL1zl5reEpftcF7eUOSwgOhIGW3PWwryXum2FuK7dPoql3unnGGDEonrtn2LuOPonMm4xK5jQDguQhcss99WNA+fsev0i5wqEyoPSvks98SZrIwYfDM+2GW3LKyCylqmwON7tYNCnV90M2CwxaF9a5oKiXccoULE3Qm3acooY/yBdNXVUJ+gVua2EUbpeo4ISTb/THN9WFEwVulPHjSAqTgYv+USdaL0mW8WfPn5P36Wktvf02W0V52nJ4GybeqMX/M2Tfd3aG6feXChn8w3KkxUbCBfqePidJhYxaY811KXVtO3sxTLZiopY7k/M4VvnmhafwGtuRAAvgou0gVl9TF6434tQJYgruEYFghhov0DhCZtahE0TtDHXrfVV/JpIAI3w6DwUwRCyeVDeGuhewkJcOyb2zSXFPMw89DldNgoNQUTnYgjlImK68Ft8imT8ZvISQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6506007)(508600001)(186003)(38100700002)(4744005)(4326008)(8936002)(6512007)(6666004)(66946007)(83380400001)(1076003)(2616005)(54906003)(86362001)(66556008)(2906002)(66476007)(316002)(52116002)(36756003)(5660300002)(8676002)(6486002)(107886003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?e+NgJEgJCe+I7Tdzo2/CjEl8fo6f?= =?utf-8?q?3UHZer9oEf0IMJV6zgtPywIVgkSbLIGDIRBtjjoM9HKbswS6FQCHESaoLJ2TdvuXO?= =?utf-8?q?fzQtCNyBrMPyj+n9O/7XuGH1VtwN+b7KUtq1SLupVNeuDwcs32VRCHSBFbSEubbh+?= =?utf-8?q?Qm5jPBHS1vs5t9jfaFIrKbfsTN1wPhLjmfrKJkcErqsEwZ0nlL9JCVrzMxcZB0mY1?= =?utf-8?q?yXJ7vbVPWPMpSsbzXS/josMvB8IBogbQwAKW+ddipDFqYybpKz1uOBzlM9AYUgtmp?= =?utf-8?q?R6YjtG5m2hLy1Cc7tbE5tCOeL3/k9R+GgDAnvUFawSYNmtkYTOZ00Q0vSukYqmawQ?= =?utf-8?q?/1+Ktw3Uw8OU9PhVDQKWCwRdLyQgoOeOxFT/dBaLWJjizJ3TSSl4Bv0pk+IJ0ZRGf?= =?utf-8?q?v9MfWgIibEjYn8C0Tp+XhmzeiYdjKcRQFCdnAkeP1lxWGQeoo+Ojr6xKxlvFyIgi1?= =?utf-8?q?UuYmsWWqJaOSJJTc0NSPe9vQ3foU++tN1Uz98l700LQXwuN1eh9psXNwBqGR9sYqa?= =?utf-8?q?kN/p/iBejRIn29O02cdqueLbrSL4omTtHBNxx4CjLN9/WpeFOaCFuf7jmbn3j+zZL?= =?utf-8?q?hPQha+hWWF7rnw1Pn2KY7egXE0RkMmnlMFFpsQQ71rq+XzhIca3zsILuAneV14QcA?= =?utf-8?q?boUUkQaoTcYMLOhcjDggaZ3yrNqwT4GSvsTOwqPAet65kTdi2TdKScZkf+RDBiQNe?= =?utf-8?q?oZs6nmToN18oMlky95OkQDVb2xXHhCtVkC5Zkegux1EOqNmHPbg69aDxW0FkVd/E7?= =?utf-8?q?CIMMW+oKpfELYAdjAbp929qeumBKHun4kRM14dCByhIlnWCUYKOv0R87RE/vH/xB5?= =?utf-8?q?8xkFpfn6CPT53yYuZzvPW8W7ah7XDJ1B8Ol4g7oZcPlJOhxQxDGSNxLSItBrRzQEp?= =?utf-8?q?VnYfcLjbGHxoT2GeXfwh4JciHfaYLdYC9ayDV0piuKuPw/1+AQu98MNg7NH7r9ZHU?= =?utf-8?q?VC9UzFaW6EsX03sPzarTarS6xcXNWZVWRB7GCvPWdAja3B09Oa+RyUcFtOKlcOx+j?= =?utf-8?q?XiSBBjD8qK1J7GDigKyYgHW95MkBlYX7JM/1zrtuqxyMYwZ1riU2UcyBFyCQESBLn?= =?utf-8?q?T9HE1+ahVAcsHIMZNnXdnuKPPW0+QzOU6XnVanOkD0HA71FA3qJDzfR5navWbtf6C?= =?utf-8?q?2RyIurSl18fEh1Pw+EoznHBJqMMlIiRLvAzsv2Vig3mE1B24TJ5HoZu6ncX7zTTLM?= =?utf-8?q?Y93RXaHsk9CB5k/fJ0D8heCJv+fH1sD8du0H3Cdkn5Ku4gbERhCbO+fu0HCJsneDc?= =?utf-8?q?w4CI+sMeb3aPvFKYCvdvzQvGabeK1Y5iyadXpd8ggc/KfaV2umzDovNl7e8KdiRsm?= =?utf-8?q?v3rBRBhqb4bKcNYEazH8eLkU5vkLoPnxiGe6CWOu3lvhC5X/uYQbR71vT7rRqA1+f?= =?utf-8?q?JWhEHmv/oEGciW5MkEQBIRUoxw9b5/6weHcCegipaUC3gHmtF1EfwMigtGyVUwBUf?= =?utf-8?q?eO588awGe80Urkt0kaoQGgXAjmUSXbRxDqUmtq8IN2j1Doa3KJP3fVIjTwZ9VgdBk?= =?utf-8?q?zDdH9ibDQry3rPdXNYvqcl7aDfEZkMnFl4u1zqLbqac3SOrO+Lz/yL0fUfcPd59eT?= =?utf-8?q?sQIdvhaljZJPPHQAt7VTnAJXIe4j0W/lZcZwMmGgxAMf/eyWkyz7AY=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 507bf973-549d-4d86-6dac-08d9d6727f12 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:55:49.8352 (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: CrpnfjK8PfCG4TBdWch8iHC1vvm1NM1VSD2B+GwBNQ1GcPDjnnME8S2Q2Cm2LcNOxX/M+JWR9RfQAqkKIH/wdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4040 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Braces are not necessary for single statement blocks Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 858d778cc589..ddc95ea16b6d 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -438,12 +438,11 @@ int wfx_probe(struct wfx_dev *wdev) eth_zero_addr(wdev->addresses[i].addr); err = of_get_mac_address(wdev->dev->of_node, wdev->addresses[i].addr); - if (!err) { + if (!err) wdev->addresses[i].addr[ETH_ALEN - 1] += i; - } else { + else ether_addr_copy(wdev->addresses[i].addr, wdev->hw_caps.mac_addr[i]); - } if (!is_valid_ether_addr(wdev->addresses[i].addr)) { dev_warn(wdev->dev, "using random MAC address\n"); eth_random_addr(wdev->addresses[i].addr); From patchwork Thu Jan 13 08:55:01 2022 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: 532416 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2DF3C433F5 for ; Thu, 13 Jan 2022 08:56:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233133AbiAMI4e (ORCPT ); Thu, 13 Jan 2022 03:56:34 -0500 Received: from mail-co1nam11on2086.outbound.protection.outlook.com ([40.107.220.86]:28322 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231709AbiAMI4G (ORCPT ); Thu, 13 Jan 2022 03:56:06 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bNt4Z6bVn2ZeH+6DmZRfqsXB13ei8JOIWT4Wti0K1gnAbAa1YxSNbyq/Vg1gkh7bA18Nz+h7ZcWoGyS0W1G3orRXD/zqRyy5SvDAXHIYszZSvmwweGQmRKuHOtpYcT7F+wam+NqbHysWBjz+aolHxgU/xFCj3MSt2De7NRJY/y7GEdljHz7rj2JYwKBqkBCiKlpYNk3x4mX9RIBARP2Bmlkwf/WUCI2HvllnGK0+nbfPAYOiyvHw2lrXgC/YUvM4Yj3QgSho1mji4NvCjweHQYiVp8O7WCKcGFi6U3Y3PfLdCfD3ZS8FlgIrQMRZWTkXDS8d20DLQgH6Eurw49S+tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nL2ckEzABAEpqhcSpNv/SBV9/l2lXuMeaPOSaepFJzs=; b=jOkMhzlS6UI6hjrxT4kmIQIISTXIfkWCQ1jdsuRfhtNeE4gMXtAnjJ78ZyWtBVopjRtOZnr9Wn2z1h8VptQVlZlyaGrlP+QOBo84rxG4NJZKpgjHgEdNOAUOFgDwG6UgrOOuz2hGm89F4GkOPATbT+wiuAMuMKOzquOP54ZLucz96lU1V9hdRHFZl1n+/7J8NssxQeMPAcA9RsPP1DeFO36NbCGk+GsCBP8j++71OzDLgLW7O3Gsr6A5ypRSG2Xf2Dkp0jhDqsPbQjqwpqBzqIb5d8hw+XtRIfWTuwneB2OJ8N43KT9CjdwF0K9GiGUl7h46ljRM5qP5rxib9ySnLg== 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=nL2ckEzABAEpqhcSpNv/SBV9/l2lXuMeaPOSaepFJzs=; b=ncW4zNi9fa7LzBMIzP+hjHGAo4jsmLO1CPhcfZwvBzNOj0R1GDqNKcDAu0iIP+DtlPn0ClOLCl7K9H4C0ECOJhSyhB8BY+kLUUwY50ws6Vq7JOwALDG+3HdhkN0fkhB1sV025VXMxflWjh3Ruw6gcMHDpucfTabws3IExewNkZ4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by BY5PR11MB4040.namprd11.prod.outlook.com (2603:10b6:a03:186::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Thu, 13 Jan 2022 08:55:54 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:55: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 08/31] staging: wfx: use IS_ALIGNED() Date: Thu, 13 Jan 2022 09:55:01 +0100 Message-Id: <20220113085524.1110708-9-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 42e4d412-aad3-46f7-ce86-08d9d672817b X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:85; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4OFh3JLRDWZqhlZYJ2r/Ytvr0aiTU2DgmXGz3BXoJS3XAOgvJQ4eW1BuEJ3jLi4FoWmuamc3KT4nsD1NKEpyw/TtaKs+yeiw62X72lrngsvOzdCkoUogUONf25TCZRB63WATnUmkFAIQCM/E0bayNYcS2EOd6HfHqGsMFuhEgWU4AV65kkmZ1K5BGn3hvnseDV0S84ZmjpZ5KDqhN4T8oyUFqjFKr2rxo5MrrdNjVJyujZDWeM32Q+dSoX2VIHAaYnzDqjtJDy/6r8tOBBtCF7MCxZ9loHNazRoFOr3UzcNgog57wu5+dx2kZG68unzJ3VLHaB46+Il+/OlVwlpI6QBTXhDUqYHRuRunZ3VzkLEx6NjEbNcQgOY1Q+o45kneQtZtVbguqEiwVbBwApWALSXRfp92hgmy9e5EZMOqK6WGRG1G64X5z05rQl2ehDnYG5YUp6NK5YC4b0Sp3Wg3h0LSuxwDL+AMGjRfNVP4WlUAJioUTamo7kRIxDY8bo5Ja2z+tucZfBcRVbqjQzWUEE0546fDHLeHFOc9RsvxDlUQ2eoLyPP00+IayocuI9F7I4efgjcXkAyVkgLRDLlL5ccUwI6nAvS4DSuKLRJNIEWOCTyssDpSwlPjp2U9MkRkpLGE/oBh+Ehro1/lUn4jmA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6506007)(508600001)(186003)(38100700002)(4326008)(8936002)(6512007)(6666004)(66946007)(83380400001)(1076003)(2616005)(54906003)(86362001)(66556008)(2906002)(66476007)(316002)(52116002)(36756003)(5660300002)(66574015)(8676002)(6486002)(107886003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ss4UQZmg+Nspw3o32Ev44CrafWBb?= =?utf-8?q?opwlhjZzjBNRaVL/WJtNJFm1diNyeh64fG5Es7Ai7SXqe4+Nu5RP1w9FsHG7S1191?= =?utf-8?q?HKFyUYDpTPHbwVJ3xSTGSzarxCqAYZJtfu+RZyAukJz2WeCtTFr/+3iiMcsSSIBce?= =?utf-8?q?9gg2u0wnPi8O44fiiHZph+CoYMpJ1uOGDYZZe2uk2m6ZN3IIwFOh1OUy+ahvaFWOJ?= =?utf-8?q?T3cOLqid8qTEwTdRpfl3kC+QEXo4r5ktyYg2V2/OCC4nQr2TnWhzWaWlgv64tA2zJ?= =?utf-8?q?cFbsbMyZ79iSZYCpn6Fl5csT00suu61YBoJm3cMxWY2e6k5YZYG+F6lsJrooRLt0x?= =?utf-8?q?j8He5jtTtzKaDDkJRc+H16m/tN3xUhyW+/WIiu4LyT9NzEPoiXayrpk902LqDorSM?= =?utf-8?q?cSE2V8Qwy6FqwLGlx/aKeAlp9BI8EPy8s5MVDXkXxiVB1+FUoRipdgIsdON8oT+AW?= =?utf-8?q?OUUf1nVxkCRwdBxz9QPefoeVN/fRUcCFupN2xWGeVerHxT/zrG2x2vPs0OxWRdCYK?= =?utf-8?q?JGlVcNQMJj4+rlWY5sPhueeHYAO7PjbNPf9ktXGHaYxrHts1cDPZ2ip3dN3bd688C?= =?utf-8?q?qDll/jeRowfueXujTtUNMujgoN77AYFhV/XBrgoLzR/6XSqfR54VXVNGPUXGyy/pi?= =?utf-8?q?64TUaASqimaSMibYVLJy95lo2bV9X3X4YBUcV90cHqirR2fGlOOihpRuNMgPrtgNS?= =?utf-8?q?wF7Du4dgMJpQTKiZkaJZxUcX0D4lpkXm1LJM9WVEY+b2+1BHpXAkixSDt+6kQLLAv?= =?utf-8?q?13xwLQloB8erwE6WRQOzY+la03y8gIDk40bNue/o2rgISmCQngcOPeomhI6OTjR0J?= =?utf-8?q?yZJ5BzVWgaSqermcoqdbfH+BRHST6/SczmU9xQsj3rclOj4Djiok3uXB6sFPYBJ6S?= =?utf-8?q?4HVM/bwjbbkHNxqlspy8mL6nQMGAv8aUimwCvOWSpwT8wZYXcFUttvJuHdFoqqr33?= =?utf-8?q?fB9fRwVY19WB7WS/CyE2AKOMYcF2vu1JHm2dfVK5HAf91gXH/o8gQGTkUEYJUqS/a?= =?utf-8?q?/e91fMhcGBkNg/qIIuPNp05g/KDOdNX/bJZWcRFVDOOHKxr/WFu5bzjK+Jf9xdsep?= =?utf-8?q?Fx7b+ktf6mF5sqkis1nGoq6BnIY9I/1CeHqcub5/sgIvfbzesHqYls/rN8rjTm4co?= =?utf-8?q?7PAlzFcuApsFwp38J7zWgZ1QlXrntEHfazedNEiby+aj/xxXwrv12PrHKsKRWsx+b?= =?utf-8?q?T7dWBvzkh96/VeLlmBKskBw8Tu4AyXpmnSGeZa9F/KQZqK8hunemXjptNQ2ECvoxW?= =?utf-8?q?91u0QJwLOIjFXWHctRayJwZeutQlJRaEWDGJFS8R3XMhIzwEnkyOXRPWRQfaMvtTW?= =?utf-8?q?vbCJrHdQxA0SykbRGHOuoVXMpshz+giV0nTve2YZHO+DyPzp8Qnue2wR1jqYidchW?= =?utf-8?q?nSjiQg6OiTDrWpVgLQvG0giY2mhguyTwdljHKx3G8h8LMtu35AzaXroV5+5XsUW6C?= =?utf-8?q?Q/9g23CCThMGov8b6E6H3uB6fhasN8RLGbjPrTynOUx/1r6thZGfo89KMNgjf0jde?= =?utf-8?q?klxBXHoKHRjXi/OfJIFJ5lPRo7CQesagDfGynPWh0jZT+fzfgOtvC5j0xwf3nb8WM?= =?utf-8?q?ZJ6+2n4yghYNQS61fyyJaq+SDZD2iYuZ+UOswumzXfDVqgKQUufff8=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 42e4d412-aad3-46f7-ce86-08d9d672817b X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:55:53.9125 (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: 4Bc3TGifiGnF8+OXqraaWQHWkRNDzN0VFdEafz9baEDxV5qo+UnFM83LgryXzdg4i4+fMBwaqYZzHinfY3pt3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4040 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller It "IS_ALIGNED(ptr, 4)" is more explicit than "ptr & 3". Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus_sdio.c | 9 +++++---- drivers/staging/wfx/hwio.c | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index a670176ba06f..42aeab30bf0a 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "bus.h" #include "wfx.h" @@ -40,8 +41,8 @@ static int wfx_sdio_copy_from_io(void *priv, unsigned int reg_id, int ret; WARN(reg_id > 7, "chip only has 7 registers"); - WARN(((uintptr_t)dst) & 3, "unaligned buffer size"); - WARN(count & 3, "unaligned buffer address"); + WARN(!IS_ALIGNED((uintptr_t)dst, 4), "unaligned buffer address"); + WARN(!IS_ALIGNED(count, 4), "unaligned buffer size"); /* Use queue mode buffers */ if (reg_id == WFX_REG_IN_OUT_QUEUE) @@ -61,8 +62,8 @@ static int wfx_sdio_copy_to_io(void *priv, unsigned int reg_id, int ret; WARN(reg_id > 7, "chip only has 7 registers"); - WARN(((uintptr_t)src) & 3, "unaligned buffer size"); - WARN(count & 3, "unaligned buffer address"); + WARN(!IS_ALIGNED((uintptr_t)src, 4), "unaligned buffer address"); + WARN(!IS_ALIGNED(count, 4), "unaligned buffer size"); /* Use queue mode buffers */ if (reg_id == WFX_REG_IN_OUT_QUEUE) diff --git a/drivers/staging/wfx/hwio.c b/drivers/staging/wfx/hwio.c index 393bcb1e2f4e..a2a37efc51a6 100644 --- a/drivers/staging/wfx/hwio.c +++ b/drivers/staging/wfx/hwio.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "hwio.h" #include "wfx.h" @@ -221,7 +222,7 @@ int wfx_data_read(struct wfx_dev *wdev, void *buf, size_t len) { int ret; - WARN((long)buf & 3, "%s: unaligned buffer", __func__); + WARN(!IS_ALIGNED((uintptr_t)buf, 4), "unaligned buffer"); wdev->hwbus_ops->lock(wdev->hwbus_priv); ret = wdev->hwbus_ops->copy_from_io(wdev->hwbus_priv, WFX_REG_IN_OUT_QUEUE, buf, len); @@ -237,7 +238,7 @@ int wfx_data_write(struct wfx_dev *wdev, const void *buf, size_t len) { int ret; - WARN((long)buf & 3, "%s: unaligned buffer", __func__); + WARN(!IS_ALIGNED((uintptr_t)buf, 4), "unaligned buffer"); wdev->hwbus_ops->lock(wdev->hwbus_priv); ret = wdev->hwbus_ops->copy_to_io(wdev->hwbus_priv, WFX_REG_IN_OUT_QUEUE, buf, len); From patchwork Thu Jan 13 08:55:03 2022 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: 532419 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 749CCC433FE for ; Thu, 13 Jan 2022 08:56:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233085AbiAMI4T (ORCPT ); Thu, 13 Jan 2022 03:56:19 -0500 Received: from mail-co1nam11on2086.outbound.protection.outlook.com ([40.107.220.86]:28322 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231932AbiAMI4N (ORCPT ); Thu, 13 Jan 2022 03:56:13 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kxj9mthRkgJi2evWfwuAd9+uKO4PmTKI6tGHtanohLqB2TR6RSAKmhZb5GmGJ/ts2/yjbYTIl2Ifv63N8MPIEf5Wc/btl6ShdLAAkd/gDW+jhPidirYBqqZEVHF+8ZOQYagW4of+gQbSImcgVMRAor8hIwM7/6t0Qngh0r3udYlINwtqjagAC6DifLu9M83+DOPCErTzD/7oaybkvR71QpDolBB7Xkxk/HPV8nCWCGV4v+Br+ajf3b7YmWLqZ3xGg1IymgUogbf+veglahdF0Igp4Ofq57nuQ+/I6+LO2/+9WgfWu8A/jUf/UWDEvySSfuJwXGqvxcG0szgutiQ5eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ROux8YOXP+rBzV4eXP78mZycZroqTVJCivRcn4Gly7g=; b=aFwYfe+6WrsF2KwZOkmjzdsEJLuM5YKAU1gSvZ4uYHYWblW9Z7x+BrT6U79zOEYefeXRzRO3mi8a03bQ95L18rLPs6ft9BJtx2XY8xzCKrnXI0DSYUx8e9ltDqSM4ZX+jpEsNPh0Lyzr/pNceBWNlw0aRgqIodpTxKgqr5K43vMKxnoI0jqw0y6mBC7KASxv5ydd7f0gyKxpRqrBEHh0ouDCNhzNbXMwar1sh2UQLVzBOHQWK1IFymtb/TryLWp2gMVxwSAjUYhC62FFPq9frwJ+5G9skex4v4RlQtegbGKldDKN4C+Plc3grf09H5WESbgW5ED9ro6rblX6Jc9fwg== 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=ROux8YOXP+rBzV4eXP78mZycZroqTVJCivRcn4Gly7g=; b=bvNx8Mdiyt1C4SvcO4S1B+k3OQlVMJT//rgnNKRY7ocFgdEvq+RA84DXcgw9FQWHrOUHVJrRn9FdgWUneeGCgZha//IfpQ0jfkyN7LwLiA7QvCR4M2LysyRRtfoIWT8AOKiTqkNgz/6ShsVe399qicxmH3hZnHBrj0FWvwST25A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by BY5PR11MB4040.namprd11.prod.outlook.com (2603:10b6:a03:186::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Thu, 13 Jan 2022 08:55:57 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:55: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 10/31] stagigg: wfx: replace magic number by HIF_ID_IS_INDICATION Date: Thu, 13 Jan 2022 09:55:03 +0100 Message-Id: <20220113085524.1110708-11-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 62ff95cf-b803-42d7-ee31-08d9d67283b5 X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:151; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9hvHaP5ZuyODDlEljtxJvYX4dtbSkKQ8p70TiAiROZx2LPsf2/nNgZOF/gmHbAJYxmQb7AUuttTsWjaO/b56E+tSIRMbukOfCuStpC4Z0sxaGYPK1ftCYPgJzaiPTRKy73+DlNvhadJfI31KpsZuIIe0v3hoZ4xhhCEtD29Aet8+pmnzrPjL7AHx/1pxIvC6z4fyq3zXzN99P5huMxJ8nOxCOz6BJQEvoUk9AnH5w2zQ/Qi5xEJUqp2wDrUfempU7DfLw85qDjtx5kY40P70pFeIdEAqzFkUjd6PKyeokR+87hY4Ahq8VgNJw4V91yC6hxTNqfEdyKDk57LFZDtp4yPc7pdVgc0+x5VGZawcTYZdDosZrCouBUu7/moRX4A7UZU+WcqgF1SqK7tDYzTWsIxYjCX04LCQK6/5EjllTxwPclx86odrFB5+wnPd7HfgJznz0Zm5jtqyr1zCACHJIH5tFxNBMW9Z8UFP/AwqIV4sQ+PExsJaxVM8Pf8kqMf3vSEQq9X3y18CIuFvAsoVhsFUx3YLzQShHx12xvEgq7kmzh1IAPhzQQUcPg4oCFymE1VGmtHIxvaLmZ9+yaq7BKC3KTbA7ngFn1Yi9UNHjXx75ssNAyxNe7uMehHVhBeac0nDeprMG87KKaVfKxZFnQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6506007)(508600001)(186003)(38100700002)(4744005)(4326008)(8936002)(6512007)(6666004)(66946007)(83380400001)(1076003)(2616005)(54906003)(86362001)(66556008)(2906002)(66476007)(316002)(52116002)(36756003)(5660300002)(66574015)(8676002)(6486002)(107886003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6Mm47+beVSyUwHS+yYrgRX/2l4gy?= =?utf-8?q?flkMTgqa7PESSVdZqfwfBjHJb6MzkZTFMLmxOUStwn/6TEPL9dxqjZiHmcXAKFWeM?= =?utf-8?q?erWanWYtoJ7Mal2jYki38xn+OiUx/KKuOUCbIU8ScqPFT5Xzt2N5PP0lCBd9havDX?= =?utf-8?q?syQgQEpJcWing9I0nrfjf+oBLRp7+ZcGdkFzZaYu6UN65CzdZRhhZ9/s0e+eS53d/?= =?utf-8?q?tHch56CRh5gsPbuOkEBpEyFRofZiAbaXfs40zKUgFsMdj/p25D2shCFl5ZRNC9L1i?= =?utf-8?q?fRbMk80uvhZdrb0nfO2KGUMR90qIu0Oo70CunGA4r/UIXvZ6PAN8NxY7yMkT1P81G?= =?utf-8?q?vsQVNamgQzsTfIi22Fem+m044I86iNQW36WAnenPfVcO0N4JABFDwW005t4Xx3M0n?= =?utf-8?q?rofAJRXA8tcBViVKuUMWnMETBpmWxO042pcCy88voWfylo7TenhBF/L4g/EmRrxTc?= =?utf-8?q?fOytp7bKNH86xN0QzmDUa8EavkaSqJKBAqacV8HRO+EUS6XPjc270S/ZxYOKivusE?= =?utf-8?q?MMhEXSrIPe1mPtofiCynmjYjueqJ7E9PF+MUI1PbPc+NrlIJgRLRpqWAehQl8dkhq?= =?utf-8?q?PhhhyWdd7qxvFRFX1L3xikrozJHCEX7rdX0BS9rIq12eu3lDEm3HlI/taV+IpKqYx?= =?utf-8?q?FICqZ2sIOdQ/nraNXwZszX4iaode7uB0Ve7cwTxyWBHqcFq32ybNJzhQiVQ1fXk3A?= =?utf-8?q?gaSp0EBUYpBQQyw90P/EqZ9YzwJrKWtcTDfKITc+hY2DWECL9xP+8wvOcNJM1zOla?= =?utf-8?q?i89EMvGZtEBx9ysV5o0vpkpsL6VYPBjtjGgWJ3FgyOqP2OuhhkBwcGsG4PWjLDhYm?= =?utf-8?q?hB3rRc6f95cOs4Ns5myJnp6Dui2ctvBecpDD5xuHvSxO53GjgGh9+a8ORf5/Lw8qV?= =?utf-8?q?fRrJazQZkQswDPfzQykKvuAXwWlGYeahxMwptRN4O2VIoj6n6zbhXm0RCHaH7zD0S?= =?utf-8?q?DO6GZ8tx+kF8d45iRjQ8BRw0CaAkA60QLzKC+7HATmBnx0PSno7tpN9qmFPJhryH7?= =?utf-8?q?6u51y0ndegXazHotejTMFuK1YsrSgRcIiVn7KOX9TyYm9aBGdllK2gtHs2T8ChOeb?= =?utf-8?q?eBxu2/VyDX9bsevNdYeJJoJ5HIA8jeP0tUdUZmMlTgRBPsUETxE5zkse1oJC7yU75?= =?utf-8?q?AjXTstIEepLbv4zNcZhXmb3JW4SoIdCxAc0SNzdwr8z4QrcrGvghyGhWSJ3fkk/R/?= =?utf-8?q?N+BVIFiRqmBKiRCoF47C0pX0mxPK93e3/XvVgjjibL760Dzlt6oa+CDDtFP8su8j7?= =?utf-8?q?96z1ofoTfW0Ah2wiggzyk1wygcCeHeUhCgLrTpZG75VLlKEwm0YNI8syHvxPVvCQ4?= =?utf-8?q?+/mRAMvoV8ksURC8XhDpb12E5ucCrYLnXkWGyJpx93wNeiIcjM90ApTcUrWwTs3uo?= =?utf-8?q?eHJS8LZXMsbRjt1JNf49/F1qqYhx4A2W9j8ZR6zh8sntkljjqqtKdx5O5xDhVS/ia?= =?utf-8?q?6sT7ZgjPRLBo6/zD1hP7hJqnraKedLCpQSt5ccs2imTsQXPQ6x6y37s4lud8pqFTj?= =?utf-8?q?d++pwRLUZEbCp4DiJ0ehFV9/irL4Zxyh9O2tICtTDpwoE5l1WZOJ/K76shGUuiZ0k?= =?utf-8?q?e5soL8slckg62fqA9BcNUprVgzEv29X8AIxFS4dZLIQMYlfVj4mZRs=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62ff95cf-b803-42d7-ee31-08d9d67283b5 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:55:57.6168 (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: a2JCC1ynTGH8bqqi7CloWD8KkWSnUNiqtEqfgw2VO9+/DuZJCprsbfW45AMiriA5PCtfOQjYAiJ1xbQ/44ZL7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4040 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Magic values are not recommended. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 6963b54d5593..5e675d2c3e82 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -405,7 +405,7 @@ void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb) goto free; } } - if (hif_id & 0x80) + if (hif_id & HIF_ID_IS_INDICATION) dev_err(wdev->dev, "unsupported HIF indication: ID %02x\n", hif_id); else From patchwork Thu Jan 13 08:55:05 2022 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: 532420 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92412C43217 for ; Thu, 13 Jan 2022 08:56:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231301AbiAMI4N (ORCPT ); Thu, 13 Jan 2022 03:56:13 -0500 Received: from mail-dm6nam11on2047.outbound.protection.outlook.com ([40.107.223.47]:10080 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231950AbiAMI4E (ORCPT ); Thu, 13 Jan 2022 03:56:04 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AgU9kc+zmcs5G2YCHe5b8qepuiY83IFzTZCvH1AiXfpUxDykoabroFNpnu6ZOCibCHc643a2IdpPWQADj7mr3Wa96NsQlo2rRIkwk2cTGYc3DbB1qQcYh/GATEafIWYUXKT11jHd38qFvq4WhX/lAr9NMsco1YWAIgvfXaluZu+WujVYbwTMR/yuZyE2GmMNTujaVqKgM5vk3cl2UUSvXRn1QJ8CWMgivYbojvX0WpQxCzutp6l/H6cERVHXdl4Ob5yaqNYy5VCs4x7ko1ZQwP7potPz/VBqqQqwLIT9qLJ+VuMn3JacoDs+aDyOxahHp6EJt+qd7q6WCpwTxiK/bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+xvJ0MZ95/evykgq3ZVCecbw8UJnlO4e+q6rZ3V4EpU=; b=fDCdS3fQXMpeP9LDzpXEPTq0POoM6APIy13/6yrLBXICvktjFLMyjvcT4IYQciPfFKv0viV5uKu9I7eBs57fp4QOuEbniVbKqGaUoXfEq3YZXtLdOyl7ZtTQwC8e4bFxbp/ODMEMv3KsV/v4zqmkqAx2GqPpHt8N/SkdFw1BAqFQaxizUQgf/SlTFWG/R4FF/Jo56Rl42dOFPi/ay+AoRLGm84h/Of2HS/wQinhlVT0j1gSQ7TRavHoPZ2lUC8OLg6Cbm0EFIumDGREvBeD/ScbkAzImxVrYrQQfapi9niVuBG8W9TrGDTj6y3dItjLAcae3Trpg3uB+HQ5VKq3dLA== 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=+xvJ0MZ95/evykgq3ZVCecbw8UJnlO4e+q6rZ3V4EpU=; b=ddVhdVoNqpuKjv/XeaUZPbeDG0cYhMONnNbrCL07vCuGaQGME/HVdWI3OT1i93Ak5/oE+mGMCz1zg2WUn2sBdoFWKDE5zSc+17cNjuy9qyvlztcHAHRnCXerAoGbGfnkx1yLzDmLNegeJX1kJ1LFEas7GPwVBsXv9BJ5BK+O03k= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by CY4PR1101MB2071.namprd11.prod.outlook.com (2603:10b6:910:1a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.9; Thu, 13 Jan 2022 08:56:01 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:56: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 12/31] staging: wfx: fix ambiguous function name Date: Thu, 13 Jan 2022 09:55:05 +0100 Message-Id: <20220113085524.1110708-13-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bb03a002-08ee-4f3b-5f0e-08d9d6728605 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ 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: xmLi/05hjIAIFnDnkQWDlHspaDmWbs5bvm+nbCDfE9h4sBM/ULMb1jQPbMcIQ03aYsjT1ti043lRTT1aH54RBHmUqggpKVZWzXmmfdRhym52Y86ivjcS7kxwm/d34RmfObUlSffpO5MhxC5CD6z1N17rOvA0mDaGxRGVdOTCgZ3gyTEY8/w2LfLfCIjgyKMSEJqvxpYSNiOoqr6+2iRRQTZkEnEus5ZNehyQU80dVpu8Ps8gtMJfVEeBaWRP8JDa9wiCW91S1SFI8HAdgaN5VtQBZVL+nZF1j+5LsW0wn9UDD3t47Kuq04BL6lzWkmyOEoTfwEsXWgbc0xUT+wB8OjUGvbVVPrYoKMomSKjgMvagllhrdxePWUrh+O+axqSAWNbbIDUqF/tYQkf4BgqhtYw2QpO9sgpQft6sqRxXyPeXl7FJ6vmAOMv/cpZT05HUuhRhgRFw/9RHqFT4CRdbEqdh5VdHWwsKUj/DRzMJsQLozkKtGZLuETw0V7uSFvpKy6iYGFSZC7FVkkL60+rycA9dXX/KZ/7EByBCvLVJZD0vmcwX3Wbei0lulbzAHNPj8f1j9eQ37WhTRYPwiCQRMMtMDGin/yqknvRaxlMbuqrcACbqbVxCZq0LQcxBSGYz8FcVGLiokcYA2OB4Bko5cg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2616005)(66476007)(52116002)(8676002)(6486002)(4326008)(66574015)(38100700002)(8936002)(83380400001)(6506007)(107886003)(66556008)(36756003)(508600001)(2906002)(5660300002)(6512007)(1076003)(86362001)(186003)(316002)(66946007)(54906003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?PV3eGJatAFQXn87tK9oDi/0clZ4Y?= =?utf-8?q?QLrDGCbKKvrqadoXVkov5MYhs07DUg0oBYbnfu15A7H/FyyB2tca3VlU/mXZo0NiI?= =?utf-8?q?5uRRKXzwUySqBaIfUZyA68bygiAQYGAzJ83dHSdIeckzRwnuoM3RQxhNKG9i/LZVj?= =?utf-8?q?X/Jh+3fGH+JfyCB1GJJ+tkGIoJYxPGKPex/DNS59ECKZmRJjgmuu7iDzq/lc+VzLk?= =?utf-8?q?PiGh2/C4sbkzreG0btIW/C4zPnHDRxwClauv3+n2IM9DNMjYZkUMq8ijctQ7kaNww?= =?utf-8?q?nioFlYUlTO3QzI3H6y+RM5dCQ+1WJY9/Fe/ASou68W1OkWbDOYPNIcb3vo4Td0luS?= =?utf-8?q?dc9GyOk9QuWDj2HogIcUWWZz4ShJZrPSH1bTYfeRwMs1gN7z9/QXHuqTlBUl7Yhrq?= =?utf-8?q?/akQAVk2NW4d3vvlY/2VKqqlE8LgNpSgoovqGcLasHJ2h2PYzV6qfFxGZODzcQj8W?= =?utf-8?q?Idgwo5msZIUkoVWKr8/FwMpWGqijdturxTaUwTYJXOuX3CZRYMxr/Ff0xnwdHRmmV?= =?utf-8?q?I3bAFd2U8EzmyoIsxIn+a/d9sz1xI/v2iu1zlwOitswlLwcrB7p0QFmOt775fhBRx?= =?utf-8?q?ajBy6P5LjqW+gNU2Yv+X4vEpmYc8CS9/KLQHz2IK44XiJA71kfYxKFb89aMmLCkT5?= =?utf-8?q?n+6XE77whiXJM+zJWCi6ckw7eFL9n7UPcNX37GErk59yas5W3iXU5c/cBkoVtmXZl?= =?utf-8?q?PwdFAByRW+wHbbxFXeKbjhnJMz6tzLEcTxP+cEv6P+6IkSOfHRKgKCBXf40+w3PUO?= =?utf-8?q?WAJyXGy6JWPZgoa8vm5zVr4+x0Zu0sOm1ydfbY09Xd3zh2PIKrjJWN4GuCec5e9Hy?= =?utf-8?q?gdjGy8dtnR185VtbI5lZjlRjlYdIJ4UDrHssXGwuifs/z/+xdknBkUKK8W6bUkB1/?= =?utf-8?q?W+dV6saT/2NoPYzfnbsAcCBoNumKlRNwDUZJL96VRH3uIW4IlQrWL7z36BcvptEWP?= =?utf-8?q?gGZxPUsoXcAKi181hJTLomF6GUcMwjpEsLWuLi3qlLAOwq+2FroR1pPW2KFRumYpX?= =?utf-8?q?pje2Zh9aoFDfglFAwUMUsNuyz4yqb6VN+gB+E/4VOtcv2ojCS/ljzlZNNu7dfOnLo?= =?utf-8?q?KC/SKAabh0FvUemf0nSRSASLTB2Ni/DGDy0vYN+ODrdxSHaniftMYM6HlVu9Eiyvy?= =?utf-8?q?Z6efgPZxgyPp6FtC3U33g6ozFbJH6zs3DI/4KyM1G6t8e4jbF65TPayi1apeYei+N?= =?utf-8?q?AIWqrqP0//XEdrniUgffEBvz51v7+U+a02PPM8JCShfZMMPJ2G5j/idepSpEd32SF?= =?utf-8?q?8g9RivxwGneNUlsgiLJa2I3S0yS0C0zINQAU8RRyCJVH3r2E+LDc2XXNljaJ9KQ3p?= =?utf-8?q?kx51d8phBECYKZUh2Us6r72shsnDZzca96y53vKbK++p7pwl2dfsAibJWOKkqO90r?= =?utf-8?q?p90WjUVXKqqNmHwkRNxJlDmWHlMNcvC3gZE9Y/SNuyC8oIjBB1EIE5bDk+sbx3XKS?= =?utf-8?q?udBbYdFFxXwU1jVZoP1wJ16OJ13vAo8IlpZIlf9b8OjMyIILqAllLeqYqb7YX31rh?= =?utf-8?q?J/XOqBTx/L96pf58A5o97mlrqga8ScH7X2vxAfwC6xitbE96q+NZ1J/Rf+V1f8nYp?= =?utf-8?q?LYh9cT/wEQsgcunR1K874B1P7ebG0sxafJ2+aav3yynfonka4Luqdk=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: bb03a002-08ee-4f3b-5f0e-08d9d6728605 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:56:01.4794 (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: p0OIZJx240U1DLZzdUJWWrBqyTOTgDRzLFy8Fp8ZYrc/ZVg6TK1TwuSg7QeAlFRo2qhMKz2hsu/Vsm5tG/scDw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The prefix 'ieee80211' is reserved for mac80211. It should not been used. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/scan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c index 668ef2c60837..a1fd0f850481 100644 --- a/drivers/staging/wfx/scan.c +++ b/drivers/staging/wfx/scan.c @@ -12,8 +12,8 @@ #include "sta.h" #include "hif_tx_mib.h" -static void __ieee80211_scan_completed_compat(struct ieee80211_hw *hw, - bool aborted) +static void wfx_ieee80211_scan_completed_compat(struct ieee80211_hw *hw, + bool aborted) { struct cfg80211_scan_info info = { .aborted = aborted, @@ -120,7 +120,7 @@ void wfx_hw_scan_work(struct work_struct *work) } 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); + wfx_ieee80211_scan_completed_compat(wvif->wdev->hw, ret < 0); } int wfx_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, From patchwork Thu Jan 13 08:55:07 2022 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: 532418 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33C37C433EF for ; Thu, 13 Jan 2022 08:56:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233179AbiAMI4Y (ORCPT ); Thu, 13 Jan 2022 03:56:24 -0500 Received: from mail-co1nam11on2086.outbound.protection.outlook.com ([40.107.220.86]:28322 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231853AbiAMI4R (ORCPT ); Thu, 13 Jan 2022 03:56:17 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QWLQywJJpAz6LC0VXQW/sASyaix6Dz+MID5zatn4COwfYAYs5um/7I1O8N1rid2nftrIXxvbvoYxGQcU+tN40W9ow88zxOSsybIR19eVo07psppwNOdhiazN/HdWtpKEEncvw+pbARDA25puIDsulNNgMegTjZBAR59ELat2m+AqrRbH2aZSAFRfMvkxNQl9Z4iVZh5jsEc4NRugp5U79dw6kbcNu5lyXlH29SX6wWEYfv7UIman05KcpZ/H0zeRvStP2Ol7TnDZMTWEPfBy9N4yfHI309l+VNejqe74Fn2j5PqIoB05Li0k694n2WJbw3Ndb+gb4c/KwThI5J6JWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AhoMa+qKUdTLLWGtJiak6+0cbIxssJb92W/+xQDb1VI=; b=QFsjdJLOZYgLbjyfnMjOp2I+pS3MLwkAhBS7R0SWvCehL7qv6gNrq0XS0NZunq63oBAIGZhlM8bFrFCJi59ls7dP8+AJbef6uAoqMfRMiYf1Rdp/zA8VoNc4SUnQImuErQ047LPWmBZsFdeo6i0Q+e6PWzDJsjAucR+VdIZKLS5dOZT538BFa8fR6oAfKSojvbt1HcmTbxAqKDQEYqGRvjTZz7XgsY3vxSjZAtRSY6XoOZry/tlHAy8PfF5od7ca69ntlO28pHG6N+7kj3jmqGF/dzyzQ/8dYmD5n6C5wwO4VjT8Gw9alb7WI2+11iwJua00RJxq9upB1oCc4nKedA== 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=AhoMa+qKUdTLLWGtJiak6+0cbIxssJb92W/+xQDb1VI=; b=AWrcjtK1c+SCiDhr4cgZ5p5Ds/yJXrqyMM0iqDUrwF58UI90F7bBe2NXMJmk1YxxiiZzx983YB02Mb+3+cPeNprafsFPK+qeka1GNVy9hNj9rQiDgadknaf5QN/0jBPRYSPo/2NSFBKYpqbHChs7Qla7ykrB/90u+Dq6ZaizIWo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by BY5PR11MB4040.namprd11.prod.outlook.com (2603:10b6:a03:186::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Thu, 13 Jan 2022 08:56:05 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:56: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 14/31] staging: wfx: prefix functions from hif_*.h with wfx_ Date: Thu, 13 Jan 2022 09:55:07 +0100 Message-Id: <20220113085524.1110708-15-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ffc0467a-f323-429b-4b68-08d9d6728844 X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:109; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NK0Hf9RC1HBcXn2ZzPtIKunD6kQwXyJSBZ7WUcVKFvoPRXPSg7AeHMi4Q6xB56uiQjSLrQiZzBLmtx+DPADlSnEQy8g5MjRpYdC1rfH4huxXhwedMpOeAfEykPodCmCPJuV4VXGtOD5si3Bs4CsxOd8lWntkd4UmTT4X6Cvd9IWtm8AaUUVy8wgK/IuCQ3rYmWHRtZ1FklGOcF0yvBzU99934GQy4qNWFrA2jovK27jRCU9lVeMqE4iKhkYl3Ow1UlPs9p4R1zOiuL65OmNhzKsmGvmpi7AjzhrR7fSJjVinoikqV5CUPtSf140fcWOcf+TiFR1/FVAcETl2ZFMjfRgEcjeZtwLgzjbCpgTK3b9+r7k5zr/A3yUmW3Zpt83pg+d+MlSbEgerbeeaCBnQUQqmG/noThI74dbXzjDgOtwi8u0i1aNnzBc5bMhF1wx6b734Oj63x3rVAnB69oSwNV0GpZQuLOKBwqcafoRC4VK6JpOWRbtDhOPoVr765VibyRMIs14u96qTNDqkh6TzQVLKZs8+MoZ6p6oCtJhmB0cdVi7Kb7KyrnOFnOj7jwzCz5ViUF/fftIP5Tj/Oci11yzMQBebyYDi5rnpsaDvxXE8fTLI/LfH1cWcSILkwIs0qumUHSiWPcGiKSSDfyo+NA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6506007)(508600001)(186003)(38100700002)(30864003)(4326008)(8936002)(6512007)(66946007)(83380400001)(1076003)(2616005)(54906003)(86362001)(66556008)(2906002)(66476007)(316002)(52116002)(36756003)(5660300002)(66574015)(8676002)(6486002)(107886003)(559001)(579004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?HdAuHwls5MJaSQhxhRH/2OjiEppM?= =?utf-8?q?PRdWZYYCTFX85LmflSfvrFrNU9cmupCZ+ND6FXWNiYVvkbygzGHcT4/sHNkQJ0r/1?= =?utf-8?q?Q5nlHq8q+PYrJ4f6Wn9iTIfefGZqHZCNF9dG61MqE81wjvnxCjr1h5ULBa2MF6FXz?= =?utf-8?q?y6LdGn+3t050aRZ/9jhcCQrNpyILj8PQRzIlIl9v+b//kH2nUPYXMTMXiYARiymOR?= =?utf-8?q?MAMXss5MhH3y/HPDHFr46doDClF24Y1sToRon+QypupO1mB/vaTcGdlUqbw9HCpgb?= =?utf-8?q?sksD3brUlZJKFrASylyalfA5aZvLGdnwsxZC9tpXqIcuewKV/nRx9WGVvVE3Oq6Kp?= =?utf-8?q?RVQwZ/NWUZ151wJTHw6Py5Elzn4lwMIgwYaTnr3tVxYv4KVTFRUrUO6/81BuoIFx1?= =?utf-8?q?3PT9zf70gc5drhRbeHcoOF7lFrqa8oKHmzGBxLNjzI9iTFfc5gOnrHAlXll4L76UE?= =?utf-8?q?cYZauTByHKNrtE6y0lfeh0n0YbKt7ySKTww+oBVG/DaGXaxdss4qYl7uMW6apOs2a?= =?utf-8?q?sg0f/tSrMdcw3rcKyAzBtrlHtAjMwVY4VsdH0lbe04BRivpIPShVXso9Pij9WzETl?= =?utf-8?q?8Lu4RCmI7qOYCedrtznX4D0nXrkdUnzMblhlHjrCNuhobcx3/rc755bMk/plQ+9Nu?= =?utf-8?q?TP0jGItjODPlzXjzYtmk7vd4Zd0AEwyKtovSlQVbYwOSdXfzkVRoxOq0nX5CGs2qN?= =?utf-8?q?KzjdvgR+71UFHbj4aqSmUDxirbWQrxiu2EZE1W6YU6xewldaRXsYWM9y27HX3GUgW?= =?utf-8?q?iWRWTylTBy+LteC6V59WXRlofFAzX8tA8Dop6hUuiYeQafuS13Ojr8upk0rmKXXBX?= =?utf-8?q?SNMG4Uig2zHyuIKLiOtiSm8w+uUlttWPphcmpaa6CkunFAZhnH/5caDU69i616f4m?= =?utf-8?q?0o+tJQhqi6JSJCdHK8mJY1t40r3avGV/3nuC+cvdtwAbY4ygKQK0gWbijvxTip6XN?= =?utf-8?q?5t3RYPuzfV6zW0U6K9Xsax6qOkko8G3UNkBIuQFI6UDk2twrhoD2tDN1VrLb0xS9k?= =?utf-8?q?zE+yySvCwVfg+YJ8Uki9rmXtYQpNJyjZVv4Y4LWNT3u1qw5Nlh1HNiCigK/pq3lle?= =?utf-8?q?i3LctSB+yfv+x5bXngEzzJtEHFvaS6o2a8mofUDbADJM+KY/tFzNLj0zWPbzs7Kly?= =?utf-8?q?7iditWUQ8PQULHdY+8lrEFG4oz/lknwdRKEPogvEFKs8o081GCvZK20LbLwwzSs6h?= =?utf-8?q?7Yk2mbzR4AzLNs57jx+BNIHqxIp3v4CE3RPallJfoFm9Q0UHErvcDwsqjkditBcUa?= =?utf-8?q?VT5X467eIzBoHx7rhEfka/pE4MWeRJQLicq7d5Q9M1EQsCti1ZbvnKpM/ZTvU9le4?= =?utf-8?q?nC71AF+T/QAcHfhiOp9H77ja5DQCT7nK29ltQiLV835rEdLrk+nunj7myCtxx/t2l?= =?utf-8?q?hQogpLWeLdFBE7l5MlniJoXc5m6fOTVnIGBIvifDvgIc4VTDb1ZCoRZUE7Yj3bevn?= =?utf-8?q?ii0BWJt13tVgEbisX77nsaU/MUjFiIuoAxZ1EhrnVXbELxiUwY/5EpWhvsjRxc1Ss?= =?utf-8?q?IRUsRYOTUwHe61udERG7WNMbFw3uvQpm8LkyO+FtPF8UKAvKsIXJ7YF/w/cRR92wF?= =?utf-8?q?LqoLWzFsgp7JiieN4b+a9poC18ZpsukAISWvY5TDwU9itEWTrAtJgk=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ffc0467a-f323-429b-4b68-08d9d6728844 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:56:05.5271 (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: OYHjO80VnaJn/hp8/KkAf6JHiCdBwOGZ7kibDVdo7eQgLM3IqzUchbWNwfMwcif4PsO5yUEP20j52fxWAL1Buw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4040 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller All the functions related to a driver should use the same prefix. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 2 +- drivers/staging/wfx/debug.c | 2 +- drivers/staging/wfx/hif_rx.c | 103 +++++++++--------- drivers/staging/wfx/hif_tx.c | 48 +++++---- drivers/staging/wfx/hif_tx.h | 48 ++++----- drivers/staging/wfx/hif_tx_mib.c | 177 ++++++++++++++++--------------- drivers/staging/wfx/hif_tx_mib.h | 67 ++++++------ drivers/staging/wfx/key.c | 4 +- drivers/staging/wfx/main.c | 12 +-- drivers/staging/wfx/scan.c | 10 +- drivers/staging/wfx/sta.c | 92 ++++++++-------- 11 files changed, 291 insertions(+), 274 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 9ff9cca5eb66..54ff9bca78d6 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -173,7 +173,7 @@ static int wfx_tx_policy_upload(struct wfx_vif *wvif) policies[i].uploaded = true; memcpy(tmp_rates, policies[i].rates, sizeof(tmp_rates)); spin_unlock_bh(&wvif->tx_policy_cache.lock); - hif_set_tx_rate_retry_policy(wvif, i, tmp_rates); + wfx_hif_set_tx_rate_retry_policy(wvif, i, tmp_rates); } else { spin_unlock_bh(&wvif->tx_policy_cache.lock); } diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c index 9f93268a3202..e5f940f19bbe 100644 --- a/drivers/staging/wfx/debug.c +++ b/drivers/staging/wfx/debug.c @@ -66,7 +66,7 @@ static int wfx_counters_show(struct seq_file *seq, void *v) struct hif_mib_extended_count_table counters[3]; for (i = 0; i < ARRAY_SIZE(counters); i++) { - ret = hif_get_counters_table(wdev, i, counters + i); + ret = wfx_hif_get_counters_table(wdev, i, counters + i); if (ret < 0) return ret; if (ret > 0) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index ea6d192ce28c..7a2a32e3ceb9 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -16,8 +16,8 @@ #include "data_rx.h" #include "hif_api_cmd.h" -static int hif_generic_confirm(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_generic_confirm(struct wfx_dev *wdev, + const struct hif_msg *hif, const void *buf) { /* All confirm messages start with status */ int status = le32_to_cpup((__le32 *)buf); @@ -50,8 +50,8 @@ static int hif_generic_confirm(struct wfx_dev *wdev, return status; } -static int hif_tx_confirm(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_tx_confirm(struct wfx_dev *wdev, + const struct hif_msg *hif, const void *buf) { const struct hif_cnf_tx *body = buf; @@ -59,8 +59,8 @@ static int hif_tx_confirm(struct wfx_dev *wdev, return 0; } -static int hif_multi_tx_confirm(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_multi_tx_confirm(struct wfx_dev *wdev, + const struct hif_msg *hif, const void *buf) { const struct hif_cnf_multi_transmit *body = buf; int i; @@ -71,8 +71,9 @@ static int hif_multi_tx_confirm(struct wfx_dev *wdev, return 0; } -static int hif_startup_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_startup_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf) { const struct hif_ind_startup *body = buf; @@ -85,8 +86,8 @@ static int hif_startup_indication(struct wfx_dev *wdev, return 0; } -static int hif_wakeup_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_wakeup_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, const void *buf) { if (!wdev->pdata.gpio_wakeup || gpiod_get_value(wdev->pdata.gpio_wakeup) == 0) { @@ -96,9 +97,9 @@ static int hif_wakeup_indication(struct wfx_dev *wdev, return 0; } -static int hif_receive_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, - const void *buf, struct sk_buff *skb) +static int wfx_hif_receive_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf, struct sk_buff *skb) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); const struct hif_ind_rx *body = buf; @@ -114,8 +115,8 @@ static int hif_receive_indication(struct wfx_dev *wdev, return 0; } -static int hif_event_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_event_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, const void *buf) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); const struct hif_ind_event *body = buf; @@ -149,9 +150,9 @@ static int hif_event_indication(struct wfx_dev *wdev, return 0; } -static int hif_pm_mode_complete_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, - const void *buf) +static int wfx_hif_pm_mode_complete_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); @@ -164,9 +165,9 @@ static int hif_pm_mode_complete_indication(struct wfx_dev *wdev, return 0; } -static int hif_scan_complete_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, - const void *buf) +static int wfx_hif_scan_complete_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); const struct hif_ind_scan_cmpl *body = buf; @@ -181,9 +182,9 @@ static int hif_scan_complete_indication(struct wfx_dev *wdev, return 0; } -static int hif_join_complete_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, - const void *buf) +static int wfx_hif_join_complete_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); @@ -196,9 +197,9 @@ static int hif_join_complete_indication(struct wfx_dev *wdev, return 0; } -static int hif_suspend_resume_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, - const void *buf) +static int wfx_hif_suspend_resume_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf) { const struct hif_ind_suspend_resume_tx *body = buf; struct wfx_vif *wvif; @@ -225,8 +226,9 @@ static int hif_suspend_resume_indication(struct wfx_dev *wdev, return 0; } -static int hif_generic_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_generic_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf) { const struct hif_ind_generic *body = buf; int type = le32_to_cpu(body->type); @@ -305,8 +307,8 @@ static const struct { "secure link params (nonce or tag) mismatch" }, }; -static int hif_error_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_error_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, const void *buf) { const struct hif_ind_error *body = buf; int type = le32_to_cpu(body->type); @@ -332,8 +334,9 @@ static int hif_error_indication(struct wfx_dev *wdev, return 0; }; -static int hif_exception_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) +static int wfx_hif_exception_indication(struct wfx_dev *wdev, + const struct hif_msg *hif, + const void *buf) { const struct hif_ind_exception *body = buf; int type = le32_to_cpu(body->type); @@ -356,21 +359,21 @@ static const struct { const struct hif_msg *hif, const void *buf); } hif_handlers[] = { /* Confirmations */ - { HIF_CNF_ID_TX, hif_tx_confirm }, - { HIF_CNF_ID_MULTI_TRANSMIT, hif_multi_tx_confirm }, + { HIF_CNF_ID_TX, wfx_hif_tx_confirm }, + { HIF_CNF_ID_MULTI_TRANSMIT, wfx_hif_multi_tx_confirm }, /* Indications */ - { HIF_IND_ID_STARTUP, hif_startup_indication }, - { HIF_IND_ID_WAKEUP, hif_wakeup_indication }, - { HIF_IND_ID_JOIN_COMPLETE, hif_join_complete_indication }, - { HIF_IND_ID_SET_PM_MODE_CMPL, hif_pm_mode_complete_indication }, - { HIF_IND_ID_SCAN_CMPL, hif_scan_complete_indication }, - { HIF_IND_ID_SUSPEND_RESUME_TX, hif_suspend_resume_indication }, - { HIF_IND_ID_EVENT, hif_event_indication }, - { 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 */ - //{ HIF_IND_ID_RX, hif_receive_indication }, + { HIF_IND_ID_STARTUP, wfx_hif_startup_indication }, + { HIF_IND_ID_WAKEUP, wfx_hif_wakeup_indication }, + { HIF_IND_ID_JOIN_COMPLETE, wfx_hif_join_complete_indication }, + { HIF_IND_ID_SET_PM_MODE_CMPL, wfx_hif_pm_mode_complete_indication }, + { HIF_IND_ID_SCAN_CMPL, wfx_hif_scan_complete_indication }, + { HIF_IND_ID_SUSPEND_RESUME_TX, wfx_hif_suspend_resume_indication }, + { HIF_IND_ID_EVENT, wfx_hif_event_indication }, + { HIF_IND_ID_GENERIC, wfx_hif_generic_indication }, + { HIF_IND_ID_ERROR, wfx_hif_error_indication }, + { HIF_IND_ID_EXCEPTION, wfx_hif_exception_indication }, + /* FIXME: allocate skb_p from wfx_hif_receive_indication and make it generic */ + //{ HIF_IND_ID_RX, wfx_hif_receive_indication }, }; void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb) @@ -380,8 +383,8 @@ 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(wdev, hif, hif->body, skb); + /* wfx_hif_receive_indication take care of skb lifetime */ + wfx_hif_receive_indication(wdev, hif, hif->body, skb); return; } /* Note: mutex_is_lock cause an implicit memory barrier that protect @@ -390,7 +393,7 @@ void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb) if (mutex_is_locked(&wdev->hif_cmd.lock) && wdev->hif_cmd.buf_send && wdev->hif_cmd.buf_send->id == hif_id) { - hif_generic_confirm(wdev, hif, hif->body); + wfx_hif_generic_confirm(wdev, hif, hif->body); goto free; } for (i = 0; i < ARRAY_SIZE(hif_handlers); i++) { diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 2fd8bbd36e25..7c9d3d86c22e 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -122,7 +122,7 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, /* 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 wfx_hif_shutdown(struct wfx_dev *wdev) { int ret; struct hif_msg *hif; @@ -140,7 +140,7 @@ int hif_shutdown(struct wfx_dev *wdev) return ret; } -int hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len) +int wfx_hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len) { int ret; size_t buf_len = sizeof(struct hif_req_configuration) + len; @@ -157,7 +157,7 @@ int hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len) return ret; } -int hif_reset(struct wfx_vif *wvif, bool reset_stat) +int wfx_hif_reset(struct wfx_vif *wvif, bool reset_stat) { int ret; struct hif_msg *hif; @@ -172,8 +172,8 @@ int hif_reset(struct wfx_vif *wvif, bool reset_stat) return ret; } -int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, - void *val, size_t val_len) +int wfx_hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, + void *val, size_t val_len) { int ret; struct hif_msg *hif; @@ -208,8 +208,8 @@ int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, return ret; } -int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, - void *val, size_t val_len) +int wfx_hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, + void *val, size_t val_len) { int ret; struct hif_msg *hif; @@ -227,8 +227,8 @@ int hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, return ret; } -int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, - int chan_start_idx, int chan_num) +int wfx_hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, + int chan_start_idx, int chan_num) { int ret, i; struct hif_msg *hif; @@ -276,7 +276,7 @@ int hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, return ret; } -int hif_stop_scan(struct wfx_vif *wvif) +int wfx_hif_stop_scan(struct wfx_vif *wvif) { int ret; struct hif_msg *hif; @@ -291,8 +291,8 @@ int hif_stop_scan(struct wfx_vif *wvif) return ret; } -int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, - struct ieee80211_channel *channel, const u8 *ssid, int ssidlen) +int wfx_hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, + struct ieee80211_channel *channel, const u8 *ssid, int ssidlen) { int ret; struct hif_msg *hif; @@ -322,7 +322,7 @@ int hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, return ret; } -int hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count) +int wfx_hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count) { int ret; struct hif_msg *hif; @@ -340,7 +340,7 @@ int hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count) return ret; } -int hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg) +int wfx_hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg) { int ret; struct hif_msg *hif; @@ -364,7 +364,7 @@ int hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg) return ret; } -int hif_remove_key(struct wfx_dev *wdev, int idx) +int wfx_hif_remove_key(struct wfx_dev *wdev, int idx) { int ret; struct hif_msg *hif; @@ -379,8 +379,8 @@ int hif_remove_key(struct wfx_dev *wdev, int idx) return ret; } -int hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, - const struct ieee80211_tx_queue_params *arg) +int wfx_hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, + const struct ieee80211_tx_queue_params *arg) { int ret; struct hif_msg *hif; @@ -410,7 +410,7 @@ int hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, return ret; } -int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout) +int wfx_hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout) { int ret; struct hif_msg *hif; @@ -434,8 +434,8 @@ int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout) return ret; } -int hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, - const struct ieee80211_channel *channel) +int wfx_hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, + const struct ieee80211_channel *channel) { int ret; struct hif_msg *hif; @@ -458,7 +458,7 @@ int hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, return ret; } -int hif_beacon_transmit(struct wfx_vif *wvif, bool enable) +int wfx_hif_beacon_transmit(struct wfx_vif *wvif, bool enable) { int ret; struct hif_msg *hif; @@ -475,7 +475,8 @@ int hif_beacon_transmit(struct wfx_vif *wvif, bool enable) return ret; } -int hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, bool mfp) +int wfx_hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, + bool mfp) { int ret; struct hif_msg *hif; @@ -494,7 +495,8 @@ int hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, boo return ret; } -int hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len) +int wfx_hif_update_ie_beacon(struct wfx_vif *wvif, + const u8 *ies, size_t ies_len) { int ret; struct hif_msg *hif; diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h index f7895845686f..b28a2ee5350a 100644 --- a/drivers/staging/wfx/hif_tx.h +++ b/drivers/staging/wfx/hif_tx.h @@ -36,29 +36,29 @@ void wfx_init_hif_cmd(struct wfx_hif_cmd *wfx_hif_cmd); int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, void *reply, size_t reply_len, bool async); -int hif_shutdown(struct wfx_dev *wdev); -int hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len); -int hif_reset(struct wfx_vif *wvif, bool reset_stat); -int hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, - void *buf, size_t buf_size); -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 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); -int hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout); -int hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count); -int hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg); -int hif_remove_key(struct wfx_dev *wdev, int idx); -int hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, - const struct ieee80211_tx_queue_params *arg); -int hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, - const struct ieee80211_channel *channel); -int hif_beacon_transmit(struct wfx_vif *wvif, bool enable); -int hif_map_link(struct wfx_vif *wvif, - bool unmap, u8 *mac_addr, int sta_id, bool mfp); -int hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len); +int wfx_hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, + void *buf, size_t buf_size); +int wfx_hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, + void *buf, size_t buf_size); +int wfx_hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, + const struct ieee80211_channel *channel); +int wfx_hif_reset(struct wfx_vif *wvif, bool reset_stat); +int wfx_hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, + struct ieee80211_channel *channel, const u8 *ssid, int ssidlen); +int wfx_hif_map_link(struct wfx_vif *wvif, + bool unmap, u8 *mac_addr, int sta_id, bool mfp); +int wfx_hif_add_key(struct wfx_dev *wdev, const struct hif_req_add_key *arg); +int wfx_hif_remove_key(struct wfx_dev *wdev, int idx); +int wfx_hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout); +int wfx_hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count); +int wfx_hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, + const struct ieee80211_tx_queue_params *arg); +int wfx_hif_beacon_transmit(struct wfx_vif *wvif, bool enable); +int wfx_hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len); +int wfx_hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req80211, + int chan_start, int chan_num); +int wfx_hif_stop_scan(struct wfx_vif *wvif); +int wfx_hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len); +int wfx_hif_shutdown(struct wfx_dev *wdev); #endif diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index 97e961e6bcf6..b79ffdf6fcd2 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -14,20 +14,20 @@ #include "hif_tx_mib.h" #include "hif_api_mib.h" -int hif_set_output_power(struct wfx_vif *wvif, int val) +int wfx_hif_set_output_power(struct wfx_vif *wvif, int val) { struct hif_mib_current_tx_power_level arg = { .power_level = cpu_to_le32(val * 10), }; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_CURRENT_TX_POWER_LEVEL, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_CURRENT_TX_POWER_LEVEL, + &arg, sizeof(arg)); } -int hif_set_beacon_wakeup_period(struct wfx_vif *wvif, - unsigned int dtim_interval, - unsigned int listen_interval) +int wfx_hif_set_beacon_wakeup_period(struct wfx_vif *wvif, + unsigned int dtim_interval, + unsigned int listen_interval) { struct hif_mib_beacon_wake_up_period arg = { .wakeup_period_min = dtim_interval, @@ -37,13 +37,13 @@ int hif_set_beacon_wakeup_period(struct wfx_vif *wvif, if (dtim_interval > 0xFF || listen_interval > 0xFFFF) return -EINVAL; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_BEACON_WAKEUP_PERIOD, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_BEACON_WAKEUP_PERIOD, + &arg, sizeof(arg)); } -int hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, - int rssi_thold, int rssi_hyst) +int wfx_hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, + int rssi_thold, int rssi_hyst) { struct hif_mib_rcpi_rssi_threshold arg = { .rolling_average_count = 8, @@ -60,37 +60,39 @@ int hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, arg.lower_threshold = (arg.lower_threshold + 110) * 2; } - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_RCPI_RSSI_THRESHOLD, &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_RCPI_RSSI_THRESHOLD, + &arg, sizeof(arg)); } -int hif_get_counters_table(struct wfx_dev *wdev, int vif_id, - struct hif_mib_extended_count_table *arg) +int wfx_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 */ memset(arg, 0xFF, sizeof(*arg)); - return hif_read_mib(wdev, vif_id, HIF_MIB_ID_COUNTERS_TABLE, + return wfx_hif_read_mib(wdev, vif_id, HIF_MIB_ID_COUNTERS_TABLE, arg, sizeof(struct hif_mib_count_table)); } else { - return hif_read_mib(wdev, vif_id, + return wfx_hif_read_mib(wdev, vif_id, HIF_MIB_ID_EXTENDED_COUNTERS_TABLE, arg, sizeof(struct hif_mib_extended_count_table)); } } -int hif_set_macaddr(struct wfx_vif *wvif, u8 *mac) +int wfx_hif_set_macaddr(struct wfx_vif *wvif, u8 *mac) { struct hif_mib_mac_address arg = { }; if (mac) ether_addr_copy(arg.mac_addr, mac); - return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_DOT11_MAC_ADDRESS, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_DOT11_MAC_ADDRESS, + &arg, sizeof(arg)); } -int hif_set_rx_filter(struct wfx_vif *wvif, - bool filter_bssid, bool filter_prbreq) +int wfx_hif_set_rx_filter(struct wfx_vif *wvif, + bool filter_bssid, bool filter_prbreq) { struct hif_mib_rx_filter arg = { }; @@ -98,12 +100,12 @@ int hif_set_rx_filter(struct wfx_vif *wvif, arg.bssid_filter = 1; if (!filter_prbreq) arg.fwd_probe_req = 1; - return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_RX_FILTER, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_RX_FILTER, + &arg, sizeof(arg)); } -int hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, - const struct hif_ie_table_entry *tbl) +int wfx_hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, + const struct hif_ie_table_entry *tbl) { int ret; struct hif_mib_bcn_filter_table *arg; @@ -114,37 +116,38 @@ int hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, return -ENOMEM; arg->num_of_info_elmts = cpu_to_le32(tbl_len); memcpy(arg->ie_table, tbl, flex_array_size(arg, ie_table, tbl_len)); - ret = hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_BEACON_FILTER_TABLE, arg, buf_len); + ret = wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_BEACON_FILTER_TABLE, arg, buf_len); kfree(arg); return ret; } -int hif_beacon_filter_control(struct wfx_vif *wvif, - int enable, int beacon_count) +int wfx_hif_beacon_filter_control(struct wfx_vif *wvif, + int enable, int beacon_count) { struct hif_mib_bcn_filter_enable arg = { .enable = cpu_to_le32(enable), .bcn_count = cpu_to_le32(beacon_count), }; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_BEACON_FILTER_ENABLE, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_BEACON_FILTER_ENABLE, + &arg, sizeof(arg)); } -int hif_set_operational_mode(struct wfx_dev *wdev, enum hif_op_power_mode mode) +int wfx_hif_set_operational_mode(struct wfx_dev *wdev, + enum hif_op_power_mode mode) { struct hif_mib_gl_operational_power_mode arg = { .power_mode = mode, .wup_ind_activation = 1, }; - return hif_write_mib(wdev, -1, HIF_MIB_ID_GL_OPERATIONAL_POWER_MODE, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wdev, -1, HIF_MIB_ID_GL_OPERATIONAL_POWER_MODE, + &arg, sizeof(arg)); } -int hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb, - u8 frame_type, int init_rate) +int wfx_hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb, + u8 frame_type, int init_rate) { struct hif_mib_template_frame *arg; @@ -155,11 +158,11 @@ int hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb, arg->init_rate = init_rate; arg->frame_type = frame_type; arg->frame_length = cpu_to_le16(skb->len); - return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_TEMPLATE_FRAME, - arg, sizeof(*arg) + skb->len); + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_TEMPLATE_FRAME, + arg, sizeof(*arg) + skb->len); } -int hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required) +int wfx_hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required) { struct hif_mib_protected_mgmt_policy arg = { }; @@ -170,25 +173,26 @@ int hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required) } if (!required) arg.unpmf_allowed = 1; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_PROTECTED_MGMT_POLICY, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_PROTECTED_MGMT_POLICY, + &arg, sizeof(arg)); } -int hif_set_block_ack_policy(struct wfx_vif *wvif, - u8 tx_tid_policy, u8 rx_tid_policy) +int wfx_hif_set_block_ack_policy(struct wfx_vif *wvif, + u8 tx_tid_policy, u8 rx_tid_policy) { struct hif_mib_block_ack_policy arg = { .block_ack_tx_tid_policy = tx_tid_policy, .block_ack_rx_tid_policy = rx_tid_policy, }; - return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_BLOCK_ACK_POLICY, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_BLOCK_ACK_POLICY, + &arg, sizeof(arg)); } -int hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, - bool greenfield, bool short_preamble) +int wfx_hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, + bool greenfield, bool short_preamble) { struct hif_mib_set_association_mode arg = { .preambtype_use = 1, @@ -199,12 +203,13 @@ int hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, .mpdu_start_spacing = ampdu_density, }; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_SET_ASSOCIATION_MODE, &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_SET_ASSOCIATION_MODE, + &arg, sizeof(arg)); } -int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, - int policy_index, u8 *rates) +int wfx_hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, + int policy_index, u8 *rates) { struct hif_mib_set_tx_rate_retry_policy *arg; size_t size = struct_size(arg, tx_rate_retry_policy, 1); @@ -222,23 +227,25 @@ int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, arg->tx_rate_retry_policy[0].count_init = 1; memcpy(&arg->tx_rate_retry_policy[0].rates, rates, sizeof(arg->tx_rate_retry_policy[0].rates)); - ret = hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_SET_TX_RATE_RETRY_POLICY, arg, size); + ret = wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_SET_TX_RATE_RETRY_POLICY, + arg, size); kfree(arg); return ret; } -int hif_keep_alive_period(struct wfx_vif *wvif, int period) +int wfx_hif_keep_alive_period(struct wfx_vif *wvif, int period) { struct hif_mib_keep_alive_period arg = { .keep_alive_period = cpu_to_le16(period), }; - return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_KEEP_ALIVE_PERIOD, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_KEEP_ALIVE_PERIOD, + &arg, sizeof(arg)); }; -int hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr) +int wfx_hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr) { struct hif_mib_arp_ip_addr_table arg = { .condition_idx = idx, @@ -250,22 +257,22 @@ int hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr) memcpy(arg.ipv4_address, addr, sizeof(arg.ipv4_address)); arg.arp_enable = HIF_ARP_NS_FILTERING_ENABLE; } - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_ARP_IP_ADDRESSES_TABLE, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_ARP_IP_ADDRESSES_TABLE, + &arg, sizeof(arg)); } -int hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable) +int wfx_hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable) { struct hif_mib_gl_set_multi_msg arg = { .enable_multi_tx_conf = enable, }; - return hif_write_mib(wdev, -1, HIF_MIB_ID_GL_SET_MULTI_MSG, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wdev, -1, HIF_MIB_ID_GL_SET_MULTI_MSG, + &arg, sizeof(arg)); } -int hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val) +int wfx_hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val) { struct hif_mib_set_uapsd_information arg = { }; @@ -277,48 +284,50 @@ int hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val) arg.trig_be = 1; if (val & BIT(IEEE80211_AC_BK)) arg.trig_bckgrnd = 1; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_SET_UAPSD_INFORMATION, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_SET_UAPSD_INFORMATION, + &arg, sizeof(arg)); } -int hif_erp_use_protection(struct wfx_vif *wvif, bool enable) +int wfx_hif_erp_use_protection(struct wfx_vif *wvif, bool enable) { struct hif_mib_non_erp_protection arg = { .use_cts_to_self = enable, }; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_NON_ERP_PROTECTION, &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_NON_ERP_PROTECTION, + &arg, sizeof(arg)); } -int hif_slot_time(struct wfx_vif *wvif, int val) +int wfx_hif_slot_time(struct wfx_vif *wvif, int val) { struct hif_mib_slot_time arg = { .slot_time = cpu_to_le32(val), }; - return hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_SLOT_TIME, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_SLOT_TIME, + &arg, sizeof(arg)); } -int hif_wep_default_key_id(struct wfx_vif *wvif, int val) +int wfx_hif_wep_default_key_id(struct wfx_vif *wvif, int val) { struct hif_mib_wep_default_key_id arg = { .wep_default_key_id = val, }; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_DOT11_WEP_DEFAULT_KEY_ID, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_DOT11_WEP_DEFAULT_KEY_ID, + &arg, sizeof(arg)); } -int hif_rts_threshold(struct wfx_vif *wvif, int val) +int wfx_hif_rts_threshold(struct wfx_vif *wvif, int val) { struct hif_mib_dot11_rts_threshold arg = { .threshold = cpu_to_le32(val >= 0 ? val : 0xFFFF), }; - return hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_DOT11_RTS_THRESHOLD, &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, + HIF_MIB_ID_DOT11_RTS_THRESHOLD, + &arg, sizeof(arg)); } diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h index fe08a69412ab..9b4c16ad5ecf 100644 --- a/drivers/staging/wfx/hif_tx_mib.h +++ b/drivers/staging/wfx/hif_tx_mib.h @@ -17,38 +17,39 @@ struct wfx_dev; struct hif_ie_table_entry; struct hif_mib_extended_count_table; -int hif_set_output_power(struct wfx_vif *wvif, int val); -int hif_set_beacon_wakeup_period(struct wfx_vif *wvif, - unsigned int dtim_interval, - unsigned int listen_interval); -int hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, - int rssi_thold, int rssi_hyst); -int hif_get_counters_table(struct wfx_dev *wdev, int vif_id, - struct hif_mib_extended_count_table *arg); -int hif_set_macaddr(struct wfx_vif *wvif, u8 *mac); -int hif_set_rx_filter(struct wfx_vif *wvif, - bool filter_bssid, bool fwd_probe_req); -int hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, - const struct hif_ie_table_entry *tbl); -int hif_beacon_filter_control(struct wfx_vif *wvif, - int enable, int beacon_count); -int hif_set_operational_mode(struct wfx_dev *wdev, enum hif_op_power_mode mode); -int hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb, - u8 frame_type, int init_rate); -int hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required); -int hif_set_block_ack_policy(struct wfx_vif *wvif, - u8 tx_tid_policy, u8 rx_tid_policy); -int hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, - bool greenfield, bool short_preamble); -int hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, - int policy_index, u8 *rates); -int hif_keep_alive_period(struct wfx_vif *wvif, int period); -int hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr); -int hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable); -int hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val); -int hif_erp_use_protection(struct wfx_vif *wvif, bool enable); -int hif_slot_time(struct wfx_vif *wvif, int val); -int hif_wep_default_key_id(struct wfx_vif *wvif, int val); -int hif_rts_threshold(struct wfx_vif *wvif, int val); +int wfx_hif_set_output_power(struct wfx_vif *wvif, int val); +int wfx_hif_set_beacon_wakeup_period(struct wfx_vif *wvif, + unsigned int dtim_interval, + unsigned int listen_interval); +int wfx_hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, + int rssi_thold, int rssi_hyst); +int wfx_hif_get_counters_table(struct wfx_dev *wdev, int vif_id, + struct hif_mib_extended_count_table *arg); +int wfx_hif_set_macaddr(struct wfx_vif *wvif, u8 *mac); +int wfx_hif_set_rx_filter(struct wfx_vif *wvif, + bool filter_bssid, bool fwd_probe_req); +int wfx_hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, + const struct hif_ie_table_entry *tbl); +int wfx_hif_beacon_filter_control(struct wfx_vif *wvif, + int enable, int beacon_count); +int wfx_hif_set_operational_mode(struct wfx_dev *wdev, + enum hif_op_power_mode mode); +int wfx_hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb, + u8 frame_type, int init_rate); +int wfx_hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required); +int wfx_hif_set_block_ack_policy(struct wfx_vif *wvif, + u8 tx_tid_policy, u8 rx_tid_policy); +int wfx_hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, + bool greenfield, bool short_preamble); +int wfx_hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, + int policy_index, u8 *rates); +int wfx_hif_keep_alive_period(struct wfx_vif *wvif, int period); +int wfx_hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr); +int wfx_hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable); +int wfx_hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val); +int wfx_hif_erp_use_protection(struct wfx_vif *wvif, bool enable); +int wfx_hif_slot_time(struct wfx_vif *wvif, int val); +int wfx_hif_wep_default_key_id(struct wfx_vif *wvif, int val); +int wfx_hif_rts_threshold(struct wfx_vif *wvif, int val); #endif diff --git a/drivers/staging/wfx/key.c b/drivers/staging/wfx/key.c index 65134a174683..6069be161154 100644 --- a/drivers/staging/wfx/key.c +++ b/drivers/staging/wfx/key.c @@ -205,7 +205,7 @@ static int wfx_add_key(struct wfx_vif *wvif, struct ieee80211_sta *sta, wfx_free_key(wdev, idx); return -EOPNOTSUPP; } - ret = hif_add_key(wdev, &k); + ret = wfx_hif_add_key(wdev, &k); if (ret) { wfx_free_key(wdev, idx); return -EOPNOTSUPP; @@ -220,7 +220,7 @@ static int wfx_remove_key(struct wfx_vif *wvif, struct ieee80211_key_conf *key) { WARN(key->hw_key_idx >= MAX_KEY_ENTRIES, "corrupted hw_key_idx"); wfx_free_key(wvif->wdev, key->hw_key_idx); - return hif_remove_key(wvif->wdev, key->hw_key_idx); + return wfx_hif_remove_key(wvif->wdev, key->hw_key_idx); } int wfx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index ddc95ea16b6d..abc1a6d43300 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -201,8 +201,8 @@ int wfx_send_pds(struct wfx_dev *wdev, u8 *buf, size_t len) buf[i] = 0; dev_dbg(wdev->dev, "send PDS '%s}'\n", buf + start); buf[i] = '}'; - ret = hif_configuration(wdev, buf + start, - i - start + 1); + ret = wfx_hif_configuration(wdev, buf + start, + i - start + 1); if (ret > 0) { dev_err(wdev->dev, "PDS bytes %d to %d: invalid data (unsupported options?)\n", start, i); @@ -418,7 +418,7 @@ int wfx_probe(struct wfx_dev *wdev) if (err) goto err0; - err = hif_use_multi_tx_conf(wdev, true); + err = wfx_hif_use_multi_tx_conf(wdev, true); if (err) dev_err(wdev->dev, "misconfigured IRQ?\n"); @@ -429,9 +429,9 @@ int wfx_probe(struct wfx_dev *wdev) wdev->pdata.file_pds); gpiod_set_value_cansleep(wdev->pdata.gpio_wakeup, 1); control_reg_write(wdev, 0); - hif_set_operational_mode(wdev, HIF_OP_POWER_MODE_QUIESCENT); + wfx_hif_set_operational_mode(wdev, HIF_OP_POWER_MODE_QUIESCENT); } else { - hif_set_operational_mode(wdev, HIF_OP_POWER_MODE_DOZE); + wfx_hif_set_operational_mode(wdev, HIF_OP_POWER_MODE_DOZE); } for (i = 0; i < ARRAY_SIZE(wdev->addresses); i++) { @@ -478,7 +478,7 @@ int wfx_probe(struct wfx_dev *wdev) void wfx_release(struct wfx_dev *wdev) { ieee80211_unregister_hw(wdev->hw); - hif_shutdown(wdev); + wfx_hif_shutdown(wdev); wdev->hwbus_ops->irq_unsubscribe(wdev->hwbus_priv); wfx_bh_unregister(wdev); } diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c index a1fd0f850481..f61c6b2db352 100644 --- a/drivers/staging/wfx/scan.c +++ b/drivers/staging/wfx/scan.c @@ -33,7 +33,7 @@ static int update_probe_tmpl(struct wfx_vif *wvif, return -ENOMEM; skb_put_data(skb, req->ie, req->ie_len); - hif_set_template_frame(wvif, skb, HIF_TMPLT_PRBREQ, 0); + wfx_hif_set_template_frame(wvif, skb, HIF_TMPLT_PRBREQ, 0); dev_kfree_skb(skb); return 0; } @@ -56,14 +56,14 @@ 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); + ret = wfx_hif_scan(wvif, req, start_idx, i - start_idx); if (ret) { wfx_tx_unlock(wvif->wdev); return -EIO; } ret = wait_for_completion_timeout(&wvif->scan_complete, 1 * HZ); if (!ret) { - hif_stop_scan(wvif); + wfx_hif_stop_scan(wvif); ret = wait_for_completion_timeout(&wvif->scan_complete, 1 * HZ); dev_dbg(wvif->wdev->dev, "scan timeout (%d channels done)\n", wvif->scan_nb_chan_done); @@ -80,7 +80,7 @@ static int send_scan_req(struct wfx_vif *wvif, ret = wvif->scan_nb_chan_done; } if (req->channels[start_idx]->max_power != wvif->vif->bss_conf.txpower) - hif_set_output_power(wvif, wvif->vif->bss_conf.txpower); + wfx_hif_set_output_power(wvif, wvif->vif->bss_conf.txpower); wfx_tx_unlock(wvif->wdev); return ret; } @@ -139,7 +139,7 @@ void wfx_cancel_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif) struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; wvif->scan_abort = true; - hif_stop_scan(wvif); + wfx_hif_stop_scan(wvif); } void wfx_scan_complete(struct wfx_vif *wvif, int nb_chan_done) diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 23c0425e3929..d384f2df329c 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -89,10 +89,12 @@ static void wfx_filter_beacon(struct wfx_vif *wvif, bool filter_beacon) }; if (!filter_beacon) { - hif_beacon_filter_control(wvif, 0, 1); + wfx_hif_beacon_filter_control(wvif, 0, 1); } else { - hif_set_beacon_filter_table(wvif, ARRAY_SIZE(filter_ies), filter_ies); - hif_beacon_filter_control(wvif, HIF_BEACON_FILTER_ENABLE, 0); + wfx_hif_set_beacon_filter_table(wvif, ARRAY_SIZE(filter_ies), + filter_ies); + wfx_hif_beacon_filter_control(wvif, + HIF_BEACON_FILTER_ENABLE, 0); } } @@ -143,7 +145,7 @@ void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, filter_prbreq = false; else filter_prbreq = true; - hif_set_rx_filter(wvif, filter_bssid, filter_prbreq); + wfx_hif_set_rx_filter(wvif, filter_bssid, filter_prbreq); mutex_unlock(&wvif->scan_lock); } @@ -210,7 +212,7 @@ int wfx_update_pm(struct wfx_vif *wvif) TU_TO_JIFFIES(512))) dev_warn(wvif->wdev->dev, "timeout while waiting of set_pm_mode_complete\n"); - return hif_set_pm(wvif, ps, ps_timeout); + return wfx_hif_set_pm(wvif, ps, ps_timeout); } int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, @@ -224,10 +226,10 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, mutex_lock(&wdev->conf_mutex); assign_bit(queue, &wvif->uapsd_mask, params->uapsd); - hif_set_edca_queue_params(wvif, queue, params); + wfx_hif_set_edca_queue_params(wvif, queue, params); if (wvif->vif->type == NL80211_IFTYPE_STATION && old_uapsd != wvif->uapsd_mask) { - hif_set_uapsd_info(wvif, wvif->uapsd_mask); + wfx_hif_set_uapsd_info(wvif, wvif->uapsd_mask); wfx_update_pm(wvif); } mutex_unlock(&wdev->conf_mutex); @@ -240,7 +242,7 @@ int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value) struct wfx_vif *wvif = NULL; while ((wvif = wvif_iterate(wdev, wvif)) != NULL) - hif_rts_threshold(wvif, value); + wfx_hif_rts_threshold(wvif, value); return 0; } @@ -276,7 +278,7 @@ void wfx_set_default_unicast_key(struct ieee80211_hw *hw, { struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; - hif_wep_default_key_id(wvif, idx); + wfx_hif_wep_default_key_id(wvif, idx); } void wfx_reset(struct wfx_vif *wvif) @@ -284,10 +286,10 @@ void wfx_reset(struct wfx_vif *wvif) struct wfx_dev *wdev = wvif->wdev; wfx_tx_lock_flush(wdev); - hif_reset(wvif, false); + wfx_hif_reset(wvif, false); wfx_tx_policy_init(wvif); if (wvif_count(wdev) <= 1) - hif_set_block_ack_policy(wvif, 0xFF, 0xFF); + wfx_hif_set_block_ack_policy(wvif, 0xFF, 0xFF); wfx_tx_unlock(wdev); wvif->join_in_progress = false; cancel_delayed_work_sync(&wvif->beacon_loss_work); @@ -305,7 +307,7 @@ int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, sta_priv->vif_id = wvif->id; if (vif->type == NL80211_IFTYPE_STATION) - hif_set_mfp(wvif, sta->mfp, sta->mfp); + wfx_hif_set_mfp(wvif, sta->mfp, sta->mfp); /* In station mode, the firmware interprets new link-id as a TDLS peer */ if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) @@ -314,7 +316,7 @@ int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, wvif->link_id_map |= BIT(sta_priv->link_id); WARN_ON(!sta_priv->link_id); WARN_ON(sta_priv->link_id >= HIF_LINK_ID_MAX); - hif_map_link(wvif, false, sta->addr, sta_priv->link_id, sta->mfp); + wfx_hif_map_link(wvif, false, sta->addr, sta_priv->link_id, sta->mfp); return 0; } @@ -329,7 +331,7 @@ int wfx_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (!sta_priv->link_id) return 0; /* FIXME add a mutex? */ - hif_map_link(wvif, true, sta->addr, sta_priv->link_id, false); + wfx_hif_map_link(wvif, true, sta->addr, sta_priv->link_id, false); wvif->link_id_map &= ~BIT(sta_priv->link_id); return 0; } @@ -341,15 +343,15 @@ static int wfx_upload_ap_templates(struct wfx_vif *wvif) skb = ieee80211_beacon_get(wvif->wdev->hw, wvif->vif); if (!skb) return -ENOMEM; - hif_set_template_frame(wvif, skb, HIF_TMPLT_BCN, - API_RATE_INDEX_B_1MBPS); + wfx_hif_set_template_frame(wvif, skb, HIF_TMPLT_BCN, + API_RATE_INDEX_B_1MBPS); dev_kfree_skb(skb); skb = ieee80211_proberesp_get(wvif->wdev->hw, wvif->vif); if (!skb) return -ENOMEM; - hif_set_template_frame(wvif, skb, HIF_TMPLT_PRBRES, - API_RATE_INDEX_B_1MBPS); + wfx_hif_set_template_frame(wvif, skb, HIF_TMPLT_PRBRES, + API_RATE_INDEX_B_1MBPS); dev_kfree_skb(skb); return 0; } @@ -375,7 +377,7 @@ static void wfx_set_mfp_ap(struct wfx_vif *wvif) ptr += 1 + akm_suite_size * *ptr; if (WARN_ON(ptr > (u16 *)skb_tail_pointer(skb))) return; - hif_set_mfp(wvif, *ptr & BIT(7), *ptr & BIT(6)); + wfx_hif_set_mfp(wvif, *ptr & BIT(7), *ptr & BIT(6)); } } @@ -390,7 +392,7 @@ int wfx_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) wfx_update_pm(wvif); wvif = (struct wfx_vif *)vif->drv_priv; wfx_upload_ap_templates(wvif); - ret = hif_start(wvif, &vif->bss_conf, wvif->channel); + ret = wfx_hif_start(wvif, &vif->bss_conf, wvif->channel); if (ret > 0) return -EIO; wfx_set_mfp_ap(wvif); @@ -437,7 +439,7 @@ static void wfx_join(struct wfx_vif *wvif) cfg80211_put_bss(wvif->wdev->hw->wiphy, bss); wvif->join_in_progress = true; - ret = hif_join(wvif, conf, wvif->channel, ssid, ssidlen); + ret = wfx_hif_join(wvif, conf, wvif->channel, ssid, ssidlen); if (ret) { ieee80211_connection_loss(wvif->vif); wfx_reset(wvif); @@ -470,14 +472,14 @@ static void wfx_join_finalize(struct wfx_vif *wvif, rcu_read_unlock(); wvif->join_in_progress = false; - hif_set_association_mode(wvif, ampdu_density, greenfield, - info->use_short_preamble); - hif_keep_alive_period(wvif, 0); + wfx_hif_set_association_mode(wvif, ampdu_density, greenfield, + info->use_short_preamble); + wfx_hif_keep_alive_period(wvif, 0); /* 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_hif_set_bss_params(wvif, info->aid, 7); + wfx_hif_set_beacon_wakeup_period(wvif, 1, 1); wfx_update_pm(wvif); } @@ -508,7 +510,7 @@ static void wfx_enable_beacon(struct wfx_vif *wvif, bool enable) wvif->after_dtim_tx_allowed = true; wfx_bh_request_tx(wvif->wdev); } - hif_beacon_transmit(wvif, enable); + wfx_hif_beacon_transmit(wvif, enable); } void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, @@ -541,8 +543,8 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (vif->type != NL80211_IFTYPE_STATION) dev_warn(wdev->dev, "%s: misunderstood change: BEACON_INFO\n", __func__); - hif_set_beacon_wakeup_period(wvif, info->dtim_period, - info->dtim_period); + wfx_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. */ @@ -557,7 +559,7 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, arp_addr = NULL; if (i >= info->arp_addr_cnt) arp_addr = NULL; - hif_set_arp_ipv4_filter(wvif, i, arp_addr); + wfx_hif_set_arp_ipv4_filter(wvif, i, arp_addr); } } @@ -569,21 +571,21 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, wfx_enable_beacon(wvif, info->enable_beacon); if (changed & BSS_CHANGED_KEEP_ALIVE) - hif_keep_alive_period(wvif, info->max_idle_period * - USEC_PER_TU / USEC_PER_MSEC); + wfx_hif_keep_alive_period(wvif, info->max_idle_period * + USEC_PER_TU / USEC_PER_MSEC); if (changed & BSS_CHANGED_ERP_CTS_PROT) - hif_erp_use_protection(wvif, info->use_cts_prot); + wfx_hif_erp_use_protection(wvif, info->use_cts_prot); if (changed & BSS_CHANGED_ERP_SLOT) - hif_slot_time(wvif, info->use_short_slot ? 9 : 20); + wfx_hif_slot_time(wvif, info->use_short_slot ? 9 : 20); if (changed & BSS_CHANGED_CQM) - hif_set_rcpi_rssi_threshold(wvif, info->cqm_rssi_thold, - info->cqm_rssi_hyst); + wfx_hif_set_rcpi_rssi_threshold(wvif, info->cqm_rssi_thold, + info->cqm_rssi_hyst); if (changed & BSS_CHANGED_TXPOWER) - hif_set_output_power(wvif, info->txpower); + wfx_hif_set_output_power(wvif, info->txpower); if (changed & BSS_CHANGED_PS) wfx_update_pm(wvif); @@ -614,7 +616,7 @@ static int wfx_update_tim(struct wfx_vif *wvif) tim_ptr[4] &= ~1; } - hif_update_ie_beacon(wvif, tim_ptr, tim_length); + wfx_hif_update_ie_beacon(wvif, tim_ptr, tim_length); dev_kfree_skb(skb); return 0; @@ -774,7 +776,7 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) } WARN(i == ARRAY_SIZE(wdev->vif), "try to instantiate more vif than supported"); - hif_set_macaddr(wvif, vif->addr); + wfx_hif_set_macaddr(wvif, vif->addr); mutex_unlock(&wdev->conf_mutex); @@ -782,9 +784,9 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) while ((wvif = wvif_iterate(wdev, wvif)) != NULL) { /* 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); + wfx_hif_set_block_ack_policy(wvif, 0xFF, 0xFF); else - hif_set_block_ack_policy(wvif, 0x00, 0x00); + wfx_hif_set_block_ack_policy(wvif, 0x00, 0x00); } return ret; } @@ -800,8 +802,8 @@ void wfx_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) mutex_lock(&wdev->conf_mutex); WARN(wvif->link_id_map != 1, "corrupted state"); - hif_reset(wvif, false); - hif_set_macaddr(wvif, NULL); + wfx_hif_reset(wvif, false); + wfx_hif_set_macaddr(wvif, NULL); wfx_tx_policy_init(wvif); cancel_delayed_work_sync(&wvif->beacon_loss_work); @@ -814,9 +816,9 @@ void wfx_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) while ((wvif = wvif_iterate(wdev, wvif)) != NULL) { /* 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); + wfx_hif_set_block_ack_policy(wvif, 0xFF, 0xFF); else - hif_set_block_ack_policy(wvif, 0x00, 0x00); + wfx_hif_set_block_ack_policy(wvif, 0x00, 0x00); } } From patchwork Thu Jan 13 08:55:09 2022 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: 532415 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70FB6C433F5 for ; Thu, 13 Jan 2022 08:56:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233251AbiAMI4k (ORCPT ); Thu, 13 Jan 2022 03:56:40 -0500 Received: from mail-co1nam11on2086.outbound.protection.outlook.com ([40.107.220.86]:28322 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233137AbiAMI4T (ORCPT ); Thu, 13 Jan 2022 03:56:19 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L8rHHY+r3CL2CiebgJMxGThPKAW6t7NaZkmirOahmavH9pa2DlzflPmOfMI46s+cguyo55udj3Z26fy8JAK7/snDKzkFSVvysar7KfY5Ra8aeD7X2SSG02OzMlSTLHt6WDdHTkJSGImHIY3jAjwfhqoOEaqs+hGZeO2wS7l8ejueNTofHaOZup4Gf+Of+XWdd6PNdQBvTwrVNSf5CX3+vNlFJ6g3S1nQAFyjSOWl7C3SOsTWcJGfnKKXdFC9J62RDCKLNOFw3rHJFixdILDo20t21E5vnE/G2YIEopDRlmQuCKmIU93NklTQff6vhVEomJWcANNIShGu/ufRRUSZCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HpAOB4jPiwFwFBf9z7IRPkeyewY+ZAvGsFdxxTP7PvQ=; b=YS64Gubhb+ric0Z0XwhCmrxzsHIa2IwdxKNdJr1dKxdgM6VNjpfA6zXO4h0rrKwt0qoEIy5bgWJeGgm8I5IYaJaMLnB9uceey1s4Fml6U7HAx356Z1jn/AXptOXd7t1WFyGI37bTNXBuPDocmWstYu5ngr9bNlYGoqKO/hdgr4iKNtQh78QRcM27ObMeEZ9x5IY4ax/2E+qntmh3nqQe5dEsi+SI3Fj0gVEiwO2FvDXp7cqMiDMtflrJ1QSLX9kF6N/9sqrWBXUmac1vzfDPRfc5QebTKaFPm/+oDmTkETdzWGLzgLFBENgy/0qnp72ZPJejL/hHWqJ8UXlb6kRnnw== 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=HpAOB4jPiwFwFBf9z7IRPkeyewY+ZAvGsFdxxTP7PvQ=; b=bpwVHPwqXHywQVxXMaAlTst3zDewyEb0z+BmwAvLNjmxqSZboEBULwtL8OjPkOVBgdmV+9CdJdVll0cwEeiFavAn0QMqJ0AXg77TmZ/GF5DRC9K5n4FmwU8VDP2CPjSe83or426aHDAbzMVPQihtdFo6Uen08tKgRV4p3o9fY34= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by BY5PR11MB4040.namprd11.prod.outlook.com (2603:10b6:a03:186::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.10; Thu, 13 Jan 2022 08:56:09 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:56: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 16/31] staging: wfx: prefix functions from debug.h with wfx_ Date: Thu, 13 Jan 2022 09:55:09 +0100 Message-Id: <20220113085524.1110708-17-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 048bb83d-65d3-4ade-7914-08d9d6728ae4 X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:229; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oc3iBh0XeOG64m2kHbbzDvpOjnbWTa2FwGPaFKgiUcFCzh1K+Iy0+Kn1AZmtvNY4aBibG4TVnO6jGuqjl/wKzoOvXtuToxrwNoRaQRMbdz01GV4Jet1YuK16RGpA0BQoAVnE8UCseq9y7ljok5G45gR6G1z9lRsq4JpmkftwfbfkAE3Vczr/UZH3vS301CVv2O6ufk04kWoigCK3ri3DKc6/LoD7dtHdAorPTETGLPkhaMeMeEa0a7B6QhTW07JnLAMlplOG2c/UJTkCK6xY24Mcl/5X5lTs0q8HsyGAUTWGUkaXbqiWa2Lg7jW2qEHTPHuPYRGPSw2rC7UhPOy/fIqyytjG9ePWHUrkzlYNACE8iHtF2Jcvu5WNW7tZidpLx3YCLqTIYENTlftOhsMIl+A15EFsBid8/sDOvAZWg+IJHciIhI9QTVhJlHbX8/AeS9w/QZlN8CHj7XMuMqIYpw1NbhWANhgtWZ5439wjrsRBat/2EOGxAjEbIXrreSyjx1SKzyg0i4t6HegzhUARfj1p6SVcuC1OJqLKfvJFnS15YLTGMTLqccCVdQZcPSq6FzEHDQaSFY1CPT/7Tt7SNim6Ne4toFth4nPz5Mzqbiq/MIy0eLnF39+v8W+yPriGeP5LG9at6CKze0li7GunTQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(6506007)(508600001)(186003)(38100700002)(4326008)(8936002)(6512007)(66946007)(83380400001)(1076003)(2616005)(54906003)(86362001)(66556008)(2906002)(66476007)(316002)(52116002)(36756003)(5660300002)(66574015)(8676002)(6486002)(107886003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?CejwAAXG8+ndoJOAakbUXPlEpbNC?= =?utf-8?q?CGB0LiOhEr97h5SxYWKDa8COSMiPdNjNUisw155e4act1GkloCUj/5rQJmuFuHtcw?= =?utf-8?q?sUeEyWpBwMTMjdZcUzFzRTdR6JM+PF5tqOAbUecX1SkyK44hU3U5GxXjHI2uG38Xh?= =?utf-8?q?5E+MNio1Mi73P1kI3CM2e8Ab2GufCIakYo/C39TQ3VTjbQdr/jnl2+qV+Hm9NZOOD?= =?utf-8?q?I8xnHBWmCzCBs23hYqwPp9qgRi7Yglwsm+qekBm8cRv4lUyNscfUX3CsoT92J9te7?= =?utf-8?q?6tYKm6NILKfd6ff3Xz4aPowOZENABucxesPeYz5SKzvZ3QG0H3s0DrL7/dhwzRp7D?= =?utf-8?q?w9fYJFRgxjk6iBUrY09rxQCsIaIRNzhPBIoY3IJ27EIHK9mX6R4e2T+lSqQ2jD5pY?= =?utf-8?q?IIoy6zD6YAvoatBrYgiIZehE0w9HSYR+el/sAMHdKCbY/nb3RuE8ohVW6DtHp7QSt?= =?utf-8?q?e38IV41nXkkxF2N8d+zASmrs+uwe8Rj368yy+eljgj8y7LMTXsMecaIJI0DScaHyo?= =?utf-8?q?7XdTI0UkqXtXG6B3x+r6X0DlnU7RR716eFbxkTITQeKJSbhIgRt+XEJqjOFReixIv?= =?utf-8?q?//tMJKgRjVvpmknafOX5dChfDkvEKpEHHoqX4jFEgO2OyXfGuTkOrSJCp4U0PgrdU?= =?utf-8?q?UlbV0dC+LOgm4yZ152fPDF0A02GxTZsCxX14c42V1Y/oCj3GrYcR8WIpWC5mcImBj?= =?utf-8?q?SM2UDaizw/Iux8P8tpauEWxCsWavboqYYMPLOshE0euR61lnc3QFnNzdKnr0wgHDo?= =?utf-8?q?247wQWSWVn71rrPhYNgTqwWV7GBcz7xTyyEhx+n84VUQg8UwsvVXQtSZ4cKcgpIzP?= =?utf-8?q?lhUD5nnWZYOjXKTxN+kvzaJ61D5VgjGu22CE8Sr0GNA4zGCqsVq6m7CFvACfYobYl?= =?utf-8?q?wHbs5U9Xsp5CKPLYPWceyVwIY+og+M+gXEMKhgUmnPe5qAfbXBTMK328sKHcjALrU?= =?utf-8?q?QeTqduVMbUf+F/2qlgvO4zEv4I6FEByjwa1GHMRTCSuLfTeB32r545aJI4xHBwZWU?= =?utf-8?q?AjTJHU0EFykhmxAZBhddP137gDsdIZDCrjFf7P+gMp1T8UJydxv7F56Wd/cN+Ug91?= =?utf-8?q?0AxcYNo5tLQrSkvZEgvDnBbbgHrY73uM7J2m7kAVykl/D3au3lZJD3QtE9u0RRUJK?= =?utf-8?q?O0VM2/HUg00SMejb/FSN2oI46rQrnKpua5hKwWahBhoarhOuIEdyNUPZIk+EUKrXU?= =?utf-8?q?sEy/d/em93FlkD1Row1PkJkk7GRYG35j14XwLxzCb8t2lYiYfsQaevUa4K2LJ2lXo?= =?utf-8?q?I7pIkt08HxKoG8hBuU4tgMwYjFGiUmLNVMh4GwXYtn24/xjxdSKOE/17GKuWEjsBs?= =?utf-8?q?bSfkCQRJIqJNw9suC7Thnd8ojhZ8JgF6gFHjRpTgQviTS6Y2mZubMYZx+gh/Da92S?= =?utf-8?q?haQTxB4qb3kGagpWuIrpaoTHD6XR5kn0+7tIH2bIsskx/ZjlVPZ1hKI/Qun4+L0Tk?= =?utf-8?q?nPklI9kYvQVWDajuO3Qf+DMzlkTwVkeuI0QM4tP4VHSNRhJlXkezgW/UmKBj7jvyx?= =?utf-8?q?iKwLjp0psZ2N6yAZsSGb3uDPIHxZVLCcVfZAwX6dJ775OZjOczAa151J+o13Pss/J?= =?utf-8?q?GrZtnQ+7WOTmlEibCAOQtpD4FKJajRDOVqKpSy0X13B9AxwzcRVXNM=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 048bb83d-65d3-4ade-7914-08d9d6728ae4 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:56:09.6980 (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: Bkmw5iBWUHFgF1HUm1Mbp0e4YRYSIL4oof/0525Vdy1HQHdxv/P9uAmlE/EIneG/Wls3NGxXeaURVgpkbBakxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4040 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller All the functions related to a driver should use the same prefix. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 6 +++--- drivers/staging/wfx/debug.h | 6 +++--- drivers/staging/wfx/hif_tx.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c index e5f940f19bbe..9324248b1d20 100644 --- a/drivers/staging/wfx/debug.c +++ b/drivers/staging/wfx/debug.c @@ -44,17 +44,17 @@ static const char *get_symbol(unsigned long val, return "unknown"; } -const char *get_hif_name(unsigned long id) +const char *wfx_get_hif_name(unsigned long id) { return get_symbol(id, hif_msg_print_map); } -const char *get_mib_name(unsigned long id) +const char *wfx_get_mib_name(unsigned long id) { return get_symbol(id, hif_mib_print_map); } -const char *get_reg_name(unsigned long id) +const char *wfx_get_reg_name(unsigned long id) { return get_symbol(id, wfx_reg_print_map); } diff --git a/drivers/staging/wfx/debug.h b/drivers/staging/wfx/debug.h index 4b9c49a9fffb..3840575e5e28 100644 --- a/drivers/staging/wfx/debug.h +++ b/drivers/staging/wfx/debug.h @@ -12,8 +12,8 @@ struct wfx_dev; int wfx_debug_init(struct wfx_dev *wdev); -const char *get_hif_name(unsigned long id); -const char *get_mib_name(unsigned long id); -const char *get_reg_name(unsigned long id); +const char *wfx_get_hif_name(unsigned long id); +const char *wfx_get_mib_name(unsigned long id); +const char *wfx_get_reg_name(unsigned long id); #endif diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 9899e7b62203..67f1847c1fc1 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -106,15 +106,15 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, if (ret && (cmd == HIF_REQ_ID_READ_MIB || cmd == HIF_REQ_ID_WRITE_MIB)) { - mib_name = get_mib_name(((u16 *)request)[2]); + mib_name = wfx_get_mib_name(((u16 *)request)[2]); mib_sep = "/"; } if (ret < 0) 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); + wfx_get_hif_name(cmd), mib_sep, mib_name, cmd, vif, ret); if (ret > 0) 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); + wfx_get_hif_name(cmd), mib_sep, mib_name, cmd, vif, ret); return ret; } @@ -196,7 +196,7 @@ int wfx_hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, } if (ret == -ENOMEM) dev_err(wdev->dev, "buffer is too small to receive %s (%zu < %d)\n", - get_mib_name(mib_id), val_len, + wfx_get_mib_name(mib_id), val_len, le16_to_cpu(reply->length)); if (!ret) memcpy(val, &reply->mib_data, le16_to_cpu(reply->length)); From patchwork Thu Jan 13 08:55:10 2022 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: 532417 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC454C433EF for ; Thu, 13 Jan 2022 08:56:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232031AbiAMI43 (ORCPT ); Thu, 13 Jan 2022 03:56:29 -0500 Received: from mail-dm6nam11on2047.outbound.protection.outlook.com ([40.107.223.47]:10080 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233100AbiAMI4Q (ORCPT ); Thu, 13 Jan 2022 03:56:16 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jdzoOA/0ZmqzJvpuE6PJppbK/OHoUTcKD4+Fqv+5iJnjHTCxKHAa5pmGYgUzPpxPfLvILd5l8L1G2vdbyAdAsGTTEn87t3LQJhPf9QIgeewQbeuFGmh4M8tKMZW2nbOF30xGEo2fgVMLhFOA6IFDUIv968+p3C2xzyh7WtpWsB24MmhjPZQSH0yyKp4g1rhnZT59O6vwy6e8CGXAzR/9UpBS5Xlig02K62HbxdMxMdKF2Jw6IG/Cnx19fNl1+Mee2s6jlA5ItJ5n6fuJXOR/HnkgN+tvPEBVkRa/o3ltMktlj9mzEJTy7M6ZnYPJpo90nuCJKlFoIFWa1NTH7wN1Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QQSaVvzV1eIIDCtdl1lThLOPAXga4ycquPHAuRYACvA=; b=YgLXcu+6pVYDeuffJFSJ5aC0czx1obFHMEVR34E/T3NFcZz7ji0gOWrZ8MraI2wPmFICgBRLGDmI9Ea2TLTJmozD3SnBquR6cKt6pPJC59LgK+MToT9PLU3/nPmLpAXWg26sHyvYs45Fn7q8Q/Ra6uL6OSp10qa6aUgViegls0pjOCoAdqnaPunfjWnR/6x3VtSGi7hQySbQ+7eLmFlipbW2L1s1Pz2+A7rd4thk3DQLdAwp7xPb0bdbbZWXDJO8xZ3ZRyfyjxYGzts+qG465W6iuH07QeLP4psv3V9BOCH586m9oaw0oBLc/uFVbnM4N93udw98eYyvzC60V81tlA== 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=QQSaVvzV1eIIDCtdl1lThLOPAXga4ycquPHAuRYACvA=; b=bxm3zykJbU5v82YNwpqyiQ4XaNuJaBd0GC6ngsOLwKz6iqCtILYb2w6QtIA98DDo8kt2JE4hYt/3QIKs4QbEzdluwst0CbGCudWcVG6j9k7TrkvPaGpQynOXW7Ko3aIqRr5jQVDva0OI7c7ju8IFVaMhdPpUz1uDZdsN3CLQOtU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by CY4PR1101MB2071.namprd11.prod.outlook.com (2603:10b6:910:1a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.9; Thu, 13 Jan 2022 08:56:11 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:56: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 17/31] staging: wfx: prefix tx_policy_is_equal() with wfx_ Date: Thu, 13 Jan 2022 09:55:10 +0100 Message-Id: <20220113085524.1110708-18-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e44efd5e-585d-4d12-17f9-08d9d6728c05 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XnGQAPp8DbjiqJWYUP6dIfWbSJydqnrDageWwfC6Bt0A+GzmaD2t8YNTnrBNl/JOENXTco/5m4cS4ylBEa4Xd0SGdFhXYfQHG9JSj2tPI6w5BzywF8/YqdJE/mfVq/0QpWIZ5qlYUGSmrquRz6jJGuqN1lMdcLtjrHnXu5BQI4RUAXT+4/oH3KlJtzn63duFPMcGjf8A2bqkj07HfqtIDdRqt2AlxwQouoP4onUcDr2bdG4Vjs/opndCJoD6MTBKjceGEVVlh19i0PSqTu+IHxgIuVyvOmOl7bnqQRtEUKpcJzmPvIm5CxAbGlzhZX2HhBu95yfynd8LU4113B+DTOKOG/6eaSnP5mtZZxIRpsEYg5mkDi6MawWxeTuPI4EEtDCDbf3+yXJ3JelwUj5DVnTXzO6z2iD2GfVDRZyNUY6+rk1Ng6I9xYOiBt1iz+jkSCyTMCUqk37kz3FUjCjnNt53zozF8vVNPoadhktRZievH3Nm/MC6Qgj/+ulKDcIZQrRX9VAnxTeO7q6gaZ3gKPfPfH9tx2I6lZqxYGmj/jkh77AWj1nwfSE62bplmB9YDVGBdb9QezVX1TKMaaIhVJSXhmbmfiq+kB+/8zAfa+cEHdpiptC9RJwNe6BE/+E6gkPGcJuY+pR/iDZVOHF6ng== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2616005)(66476007)(52116002)(8676002)(6486002)(4326008)(38100700002)(8936002)(83380400001)(6506007)(107886003)(66556008)(36756003)(508600001)(2906002)(5660300002)(6512007)(1076003)(86362001)(186003)(316002)(66946007)(54906003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?HaofEGOB48ASQCMH1CPJGkbsOgYu?= =?utf-8?q?Du3VwZHGwUHRLHxpN5jnLVveNbpLQjoRFfK5TO4rYJj87rWsXHbfGSLM+Po1Ff2mK?= =?utf-8?q?HQ6u2vLJhoua1ve4scSAn8CK8XK68Ag4HhTK0BRYhex4I+U2J6CoYdi1jE3/Psesc?= =?utf-8?q?G1Q+mHwaiuzDUpUZhEt6al1PO31ugIV0HvYRCyf15TTLMFveEY8Ho1AbfBBJfUINe?= =?utf-8?q?lRwxXCVZt/SuvIJOulnL15LmCmE7Q1khsoy9UCbJ/Lh0kMHzs01AjBE5mo7Eo7gAv?= =?utf-8?q?XjAhCSja3HPOjt7jHmSa6lrQnQQm7FT0Wa4FkUw5Y4QwAUgnLYy8M9UlkwRhPgGB+?= =?utf-8?q?5re3GNkFtNG7WbuAlEZ31aZCnUqaE+0IcwlanfR5icIzoCiM7oXOyYoqgKgtxD5CX?= =?utf-8?q?2W55YOpp8UX4Enzn8E6+a0akpirHpriQ+0ECO8/LiCp1+Lqznp6VeRYHvpiqTsXcq?= =?utf-8?q?CGpWVxXDSYeZ7xl2A88is3D8pdKaLrf8Jvv8HJ18p0hTVOA3b5CunL5lGDZRrtHfx?= =?utf-8?q?VpV7fd32OWpYGQSwcy6+s6/6pmo78Cl5Zwiu9GokSJXf/3bw7ColYKXW0fsiardKu?= =?utf-8?q?gvGEGWhkH4m8HAnuZfCTOFT2WGSvfFSiE0yDN1dggpleeQy3DyciS/iW7H6+fuaBM?= =?utf-8?q?vMcp6Hv+mYLLJ68esd/EtSshyAOiVfec2IFJeAB+gYuAPMiz7TNmNlIZViIedBYK9?= =?utf-8?q?PX+Azm9re4u5oBpXMwbE2d5EZh1KbYvf2h0IZVnMR5wpos4C+e+CttTodrQKItT6X?= =?utf-8?q?cD/QyBroHv6IAfTSTbfCp74OSxktlPpG2vmCt68N72BJrm4RpnDo/ao4DwpN1TvmJ?= =?utf-8?q?xenHTFntcvZnFpyR6jM/8zflRXATPUouvwVnQV5O4mfVm3pKE1xjk2IwODuD3LZ9k?= =?utf-8?q?WFBFW3p0wRW7SDascB+Mh2f/guCKN0MXfKBz5BSFR7DHdZFBvLH8b2pA+Ju4/ybWh?= =?utf-8?q?UDdAzDMlWhkM01WZHq219NHbAARRk5quCxNC/1DhkHZqe2FKD6BKbPYAIXWIoMG/i?= =?utf-8?q?TX8vUl1HFggW0pJa36v7se1evpULyOKJZ5qhJ7Vh/3XS8R+i3JM3R6NCPkZgb/8fZ?= =?utf-8?q?+nZbCeUdGoprRs16SNmiEbi+amz40n+ytWkoiZmjPHLUlQ1N2HpaYPz7NPhfC3LrZ?= =?utf-8?q?rsqGA3BNtVCCArAuGrpMQrPSY3KzhEgnAB7aU0sUQGxxaPPUEO7Nk2X/IOlY+pnHm?= =?utf-8?q?7xxxfwebmCcAncAQ0OKZqaF8rUo/s0i7CcIHgjeHjpn20Oiypz/a23SqMDVyCkHxP?= =?utf-8?q?YKV2GBI3Tirl7x5tmR622LyoiTTzN4GCg6emathPx8gZZL9d0iEfIGODIrJ4RYMuT?= =?utf-8?q?suTGQnYwtQpZiWeoxkQysd0ALt+s71Jh18kumAPdyRkL5WY62aIiaKPdk6BnT9lf5?= =?utf-8?q?WgHydjDs2/D7Qe9QqOZWjh6hdg5PIm8mJSClEQcHqkqFFuDttGei3S5maznDUHiQO?= =?utf-8?q?pvMQyOEINb4vX+Y9ZqwWduDRiEOPc/0FOktnzMyoe8YXY4Fw5Qi+LoUNWlJ9/udTa?= =?utf-8?q?0u2UDoNH5XYVxX3dQbnffpEDy5kEAWqmoskquhAULVUhWiz5Qcpa6i1B+LKxuBAAl?= =?utf-8?q?CO2EidT1b3JL9UELoaHA99f5dHLldH7UQPDe/tkl2pQuqiYWjFurZk=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: e44efd5e-585d-4d12-17f9-08d9d6728c05 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:56:11.5594 (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: gIp8TVxR6Krt7E4Q8IwY/HeFeo8TNv7n7SAt/jY1OVzMsWGv1YH+/fu7BllSmS5+vw21r5Kid8+uxBQMPu/clA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller tx_policy_is_equal() was the only function from data_tx.c without the prefix wfx_. 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 54ff9bca78d6..c3efbcdcc8c3 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -66,8 +66,8 @@ static void wfx_tx_policy_build(struct wfx_vif *wvif, struct tx_policy *policy, } } -static bool tx_policy_is_equal(const struct tx_policy *a, - const struct tx_policy *b) +static bool wfx_tx_policy_is_equal(const struct tx_policy *a, + const struct tx_policy *b) { return !memcmp(a->rates, b->rates, sizeof(a->rates)); } @@ -78,10 +78,10 @@ static int wfx_tx_policy_find(struct tx_policy_cache *cache, struct tx_policy *it; list_for_each_entry(it, &cache->used, link) - if (tx_policy_is_equal(wanted, it)) + if (wfx_tx_policy_is_equal(wanted, it)) return it - cache->cache; list_for_each_entry(it, &cache->free, link) - if (tx_policy_is_equal(wanted, it)) + if (wfx_tx_policy_is_equal(wanted, it)) return it - cache->cache; return -1; } From patchwork Thu Jan 13 08:55:13 2022 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: 532414 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82F51C433EF for ; Thu, 13 Jan 2022 08:57:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232396AbiAMI5A (ORCPT ); Thu, 13 Jan 2022 03:57:00 -0500 Received: from mail-dm6nam11on2047.outbound.protection.outlook.com ([40.107.223.47]:10080 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232165AbiAMI4h (ORCPT ); Thu, 13 Jan 2022 03:56:37 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XbovGewolGf0oAY50G/rkGkZCxQ9BMQj7WABDi02hF1kLzOl5a9jj9LzpSMn2p6VMwsqOnx4HOE86iS14N9Z845ZKsgPz52i0umIcU1phOR0Yqeir4NcalMSPp8u3r6q3z6IlR64222X9q0zGWZ3lD81szjgtMbqJF8AwdHs11q63TWUK8pO3LJQnOOamjRRY3pboJFG9Du2YJyLMsr+GMtOPrDJW5DK7Oi+Bv0gy/l9JFsUe44SaXzcpbCwPhb2+z50paaGWVptC1WSp/jv3J+tU4AYkVQepVwfV+AD7zKcMiy5WA+CQdnaCgtmxdVFxZaoyFBwmlHC5M1mqLG/dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ri7pLd37JUQopau0sC4Z8DR/N6PptqvoJP9jQbfQQ1o=; b=jspO87mgV1E9mFtWqUfjAR+374I+gn4hojGSF6ML8xwrowCDkULqOiVvEXNIG1Ld/0WgF7lyEx5wEmTo+wXSde1c33sZR4zlTwdu+QrRUVQcZWC5AKMi4zR+hMFlgMKVC2HpaBUUXFPXEH3vP4dRzAbsOmwMJMA9+Dc5XNrvvFac3htt4nLROj8ByWizR2ktqWFUEWuqvgzeTQlqs8q1+F6+Bx8omhX0pAThaoi7HM726kA/n1BCSOwm/QBvV3QgaVcLi/SphJteN69pYyIJTOqwOG4xEP8ha0Ie1n9DHFzym4UIIlW6ryffNatqhvWoWJruBm3x7L9ZkaN8quel3A== 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=Ri7pLd37JUQopau0sC4Z8DR/N6PptqvoJP9jQbfQQ1o=; b=StI27lIik4u0Pj2ClOoBL6u1thivUsI2mUjr61cOt6yagq8OF5fOZXIMUdFsU5apWreeR+ow78J9c3DtLzbPG2BPD5+Wzs+3CvMVW5l+TqamXdRT6TSDX1UKByb+URFR0QcjBC9IQQSkhOMlN1qEPOAd7vdq3pmAoRoM6OqPiuY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by CY4PR1101MB2071.namprd11.prod.outlook.com (2603:10b6:910:1a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.9; Thu, 13 Jan 2022 08:56:17 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:56:17 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 20/31] staging: wfx: reformat code on 100 columns Date: Thu, 13 Jan 2022 09:55:13 +0100 Message-Id: <20220113085524.1110708-21-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 617a74e6-850c-4594-40b4-08d9d6728f81 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ 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: 8k7szEklvLZelFg/0iXo3KN4C+XSpSbMRgdTIymFq2FEeRKc42sw5Ed5Znj/IOc+EjxD/fEZ6cNCKS3AAg5F+PBB2bK0MyWv9lmvX0I3oLw7n5/kv3st6IBwBbUXcZMh9dwXqCd0fZ64tSAtnEV+ZjxzFlb0ttcI1ruXlJcIF3ba16uL2l+3gVOdwHQKWoq9nhFXsJR1zOjtpy5itczeuXL8F50xQHF8Y1DuHwsC0a47ft1P5RVUjY+yF6rq85rv8571I3IhcI06ZuLUcIydtGIrDe10vFFCNyiF0wS7vGWiddmdjsjgiyUCpabp5vkTKvPuQd5ChS3UhTuuG+2t7+muArb7+gUZQkUlKjMzmCMCopddRG3kNcZfd9ZMyEvG2+R1NYQgheBvDaEV56V3M00OhocOgY7W1Osd3DX5X4f2lwBGwuEs53wxINyNpRi04zKQ07/t77kmPMDyVfp1A1sf75PKlKTKS5d/lNESMM4PO/XZAAv0m8RcxBwTR1EGTgq2qm6R0OlQ7Qh814uBGtoEUJvqIdiY1xIPHt5RIhtkUyh+liBGUSebltalOuaC+mPF1eJK9NclX9sBJqrmOhus5cS0NNmZSyjLgq6cQGj6DhvhcmY7kYIbK6jmmDR4gvK5D20uWdG/VpRQlE7zBA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2616005)(66476007)(52116002)(8676002)(6486002)(4326008)(66574015)(38100700002)(8936002)(83380400001)(6506007)(107886003)(66556008)(6666004)(36756003)(508600001)(2906002)(30864003)(5660300002)(6512007)(1076003)(86362001)(186003)(316002)(66946007)(54906003)(559001)(579004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?vE+yLDSuHw61YcrXuuHkWcyDYCAV?= =?utf-8?q?9CfqjTMsm7YWzb0FXsBAb+DyO3zBKvp6F/QjJoyw79gMLBAowDqJ2PzJEEYnvHRmq?= =?utf-8?q?5U4MnfXmrWgp2hMfBL9wb8VGr7cjlR/Pm3UXdQxGTQFAR2T1GEd9wNEb/+9kenaUv?= =?utf-8?q?MKo8GvLpB7ZFfP/nIr0GT3tfPX4x7ToVArdBf1bVDKCj9h/03Xg/Y2Fkcpp1y7262?= =?utf-8?q?GN2TAqOChMBL6rBw7x9lNiV43A50S3zaZeqnSxbG+kMW3HdAvqPUSDHgUaoRf66NP?= =?utf-8?q?Q5+wADGZesajs9JgbeHD6UbXWc3UWlglG/cXafSeSHCZJEEEAQqQJEw6DAoHsNORb?= =?utf-8?q?2CyqyGQJH0+9Mt1efLGsgJbfI324xfYUdhPgX002fNofjDTU0kKTStgv+56P7JxgZ?= =?utf-8?q?GRcgFD1py00sqfNi4RpCU55Fs/Pq2uWjJciYKZD3gSJ/AdHd14vbB9i87DlDGamgk?= =?utf-8?q?kgAdS0Mk7dOm8/RDA4FKX2URUA2lTCB7ZD7xShZ+gqF6shrHqP2BUlWM2Ug5L2YBl?= =?utf-8?q?65Wj3iA8iccckhCDfuG02oYHa2StPN1d/MQlt+94d+GFk94pM3CLyZdikMDIGxHVF?= =?utf-8?q?NTHNj6Hc2Y/dUYljKh/3wkCOYffHQfnZaHqKRkUVs8T92gFVk1PeA1pBIDXz/CdNo?= =?utf-8?q?WWfey1aHRk7AzfQHaulN4isQIWRv93QyREp9OQBSRSuxh8VlAjuDEKjeTqiwzglkO?= =?utf-8?q?z9UPpOzYtv3KWzTbziHlxEFHWHsndkk40XNfH7T/bOqYkmArJogJyOQ4BjLXkVeZE?= =?utf-8?q?T33J8iDmXnc2yEzAH/I6Ft/4McSgFwDHBOS/CC2U0UmEcmAM4oygIyPttiDL0D05c?= =?utf-8?q?qaTw11uIxUoidEdA073B1wrphHOH44vWonZbo9KudkLpVrmgG2EJGmWT32WTwCkfj?= =?utf-8?q?Kd2x7xLVt29+Hu28x9trHiOb67a3wV08dM5riAVi0MxQ0BJtfdrU9bOUH8UsfsTPh?= =?utf-8?q?CPRlM4eEokcEL0rF03npZz7OOQoqtZXtHBOn4txo7gtV6lB+OuDWIrhO6BNMbGXDm?= =?utf-8?q?wn/d93jcAU6lIWlSI57HfwklugLxdngN0S1ChUrUgexha74yLG21q3Wxblm0XZ3t3?= =?utf-8?q?JpUiq4Q+2pH8RbZGYfPy5Nk3yB7qIx+m04fh+fk0JevDsfK9Uy7GfPJTY0gBqFFPr?= =?utf-8?q?NvgB2Yvmb1A1pDlIPHZuHifUsTSLRLxP8oR9BKY8xO2qToNo+TcdsmTTGXPRLJqJk?= =?utf-8?q?vLuboQOUoaAGZs8+/uAbKtRjB00eUaChaK7LZYyEd8qtsYphET3uYPRx2iBAn+9Hj?= =?utf-8?q?X5xcsQtwwlDF0Uc2Dl2zW/XlmXSjj8tWvPS3UxFYdD0pN1G2AQYEIsrXxToeYcCVG?= =?utf-8?q?Na1d+rCI60aXUwe8+WBYQsZUTemon0IyOylKF/MrHFWVgB6GnSgJTuzdE/osBQ7t0?= =?utf-8?q?KiJzUlYK9BAxJIauQOHmvhbIZO9aoGtfK7Ey07PQCL8puR/dU74pVIpqdJ60Vkox7?= =?utf-8?q?v2+HsS8dtvmrNZSyb+N6nRZ5ny4zzBf7WUrKcoi+WgOJJv+nXd0RIO36T1yTVI3pt?= =?utf-8?q?0yPtuqtYwRihted3xTw0RGfd49Tye0QvPSYxtpq0Y6/H/0SgbrUQjIH57DBAoHSh1?= =?utf-8?q?y3cDXK0ZAW7urCF1CQoA+Se7bYuJUdkt0IMI5LTc8SmB256gMcJ+rQ=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 617a74e6-850c-4594-40b4-08d9d6728f81 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:56:17.5687 (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: C2WrvO6pOx3vN2T+KQUEevTx1EatUixCjz3Lw26UfGS2ZPA9bzWz5fW2FMAAytB2CbTlfv10YjClW0XzrqcWaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Until now, this driver was written in 80 columns style. However, since all the functions are prefixed with "wfx_", this constraint is no more respected in the last patches. >From the perspective of kernel Coding Style, it is not a problem since it is now allowed to write code on 100 columns. This patch just unify the code to use 100 columns. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 12 ++--- drivers/staging/wfx/bus.h | 6 +-- drivers/staging/wfx/bus_sdio.c | 12 ++--- drivers/staging/wfx/bus_spi.c | 24 +++------ drivers/staging/wfx/data_rx.c | 6 +-- drivers/staging/wfx/data_rx.h | 3 +- drivers/staging/wfx/data_tx.c | 71 +++++++++------------------ drivers/staging/wfx/data_tx.h | 6 +-- drivers/staging/wfx/debug.c | 27 ++++------- drivers/staging/wfx/fwio.c | 33 +++++-------- drivers/staging/wfx/hif_rx.c | 60 ++++++++--------------- drivers/staging/wfx/hif_tx.c | 63 ++++++++---------------- drivers/staging/wfx/hif_tx.h | 9 ++-- drivers/staging/wfx/hif_tx_mib.c | 81 +++++++++++-------------------- drivers/staging/wfx/hif_tx_mib.h | 21 +++----- drivers/staging/wfx/hwio.c | 51 +++++++------------- drivers/staging/wfx/key.c | 62 +++++++++--------------- drivers/staging/wfx/key.h | 5 +- drivers/staging/wfx/main.c | 56 +++++++++------------ drivers/staging/wfx/main.h | 6 +-- drivers/staging/wfx/queue.c | 24 +++------ drivers/staging/wfx/queue.h | 3 +- drivers/staging/wfx/scan.c | 12 ++--- drivers/staging/wfx/sta.c | 83 +++++++++++--------------------- drivers/staging/wfx/sta.h | 22 +++------ drivers/staging/wfx/traces.h | 14 ++---- drivers/staging/wfx/wfx.h | 3 +- 27 files changed, 269 insertions(+), 506 deletions(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index 872f3298dc87..b9a351913868 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -37,8 +37,7 @@ static void device_wakeup(struct wfx_dev *wdev) * wait_for_completion_done_timeout()). So we have to emulate * it. */ - if (wait_for_completion_timeout(&wdev->hif.ctrl_ready, - msecs_to_jiffies(2))) { + if (wait_for_completion_timeout(&wdev->hif.ctrl_ready, msecs_to_jiffies(2))) { complete(&wdev->hif.ctrl_ready); return; } else if (max_retry-- > 0) { @@ -105,7 +104,8 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) if (!(hif->id & HIF_ID_IS_INDICATION)) { (*is_cnf)++; if (hif->id == HIF_CNF_ID_MULTI_TRANSMIT) - release_count = ((struct wfx_hif_cnf_multi_transmit *)hif->body)->num_tx_confs; + release_count = + ((struct wfx_hif_cnf_multi_transmit *)hif->body)->num_tx_confs; else release_count = 1; WARN(wdev->hif.tx_buffers_used < release_count, "corrupted buffer counter"); @@ -229,8 +229,7 @@ static void ack_sdio_data(struct wfx_dev *wdev) wfx_config_reg_read(wdev, &cfg_reg); if (cfg_reg & 0xFF) { - dev_warn(wdev->dev, "chip reports errors: %02x\n", - cfg_reg & 0xFF); + dev_warn(wdev->dev, "chip reports errors: %02x\n", cfg_reg & 0xFF); wfx_config_reg_write_bits(wdev, 0xFF, 0x00); } } @@ -261,8 +260,7 @@ static void bh_work(struct work_struct *work) device_release(wdev); release_chip = true; } - _trace_bh_stats(stats_ind, stats_req, stats_cnf, - wdev->hif.tx_buffers_used, release_chip); + _trace_bh_stats(stats_ind, stats_req, stats_cnf, wdev->hif.tx_buffers_used, release_chip); } /* An IRQ from chip did occur */ diff --git a/drivers/staging/wfx/bus.h b/drivers/staging/wfx/bus.h index 91b5a545b8ff..ccadfdd6873c 100644 --- a/drivers/staging/wfx/bus.h +++ b/drivers/staging/wfx/bus.h @@ -21,10 +21,8 @@ #define WFX_REG_FRAME_OUT 0x7 struct wfx_hwbus_ops { - int (*copy_from_io)(void *bus_priv, unsigned int addr, - void *dst, size_t count); - int (*copy_to_io)(void *bus_priv, unsigned int addr, - const void *src, size_t count); + int (*copy_from_io)(void *bus_priv, unsigned int addr, void *dst, size_t count); + int (*copy_to_io)(void *bus_priv, unsigned int addr, const void *src, size_t count); int (*irq_subscribe)(void *bus_priv); int (*irq_unsubscribe)(void *bus_priv); void (*lock)(void *bus_priv); diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index abcb507a48b3..a3da661e355c 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -33,8 +33,7 @@ struct wfx_sdio_priv { int of_irq; }; -static int wfx_sdio_copy_from_io(void *priv, unsigned int reg_id, - void *dst, size_t count) +static int wfx_sdio_copy_from_io(void *priv, unsigned int reg_id, void *dst, size_t count) { struct wfx_sdio_priv *bus = priv; unsigned int sdio_addr = reg_id << 2; @@ -54,8 +53,7 @@ static int wfx_sdio_copy_from_io(void *priv, unsigned int reg_id, return ret; } -static int wfx_sdio_copy_to_io(void *priv, unsigned int reg_id, - const void *src, size_t count) +static int wfx_sdio_copy_to_io(void *priv, unsigned int reg_id, const void *src, size_t count) { struct wfx_sdio_priv *bus = priv; unsigned int sdio_addr = reg_id << 2; @@ -126,8 +124,7 @@ static int wfx_sdio_irq_subscribe(void *priv) flags = IRQF_TRIGGER_HIGH; flags |= IRQF_ONESHOT; ret = devm_request_threaded_irq(&bus->func->dev, bus->of_irq, NULL, - wfx_sdio_irq_handler_ext, flags, - "wfx", bus); + wfx_sdio_irq_handler_ext, flags, "wfx", bus); if (ret) return ret; sdio_claim_host(bus->func); @@ -176,8 +173,7 @@ static const struct of_device_id wfx_sdio_of_match[] = { }; MODULE_DEVICE_TABLE(of, wfx_sdio_of_match); -static int wfx_sdio_probe(struct sdio_func *func, - const struct sdio_device_id *id) +static int wfx_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id) { struct device_node *np = func->dev.of_node; struct wfx_sdio_priv *bus; diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index 99d33a128830..43bc6e147d5f 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -46,8 +46,7 @@ struct wfx_spi_priv { * natively. The code below to support big endian host and commonly used SPI * 8bits. */ -static int wfx_spi_copy_from_io(void *priv, unsigned int addr, - void *dst, size_t count) +static int wfx_spi_copy_from_io(void *priv, unsigned int addr, void *dst, size_t count) { struct wfx_spi_priv *bus = priv; u16 regaddr = (addr << 12) | (count / 2) | SET_READ; @@ -80,8 +79,7 @@ static int wfx_spi_copy_from_io(void *priv, unsigned int addr, return ret; } -static int wfx_spi_copy_to_io(void *priv, unsigned int addr, - const void *src, size_t count) +static int wfx_spi_copy_to_io(void *priv, unsigned int addr, const void *src, size_t count) { struct wfx_spi_priv *bus = priv; u16 regaddr = (addr << 12) | (count / 2); @@ -149,8 +147,7 @@ static int wfx_spi_irq_subscribe(void *priv) flags = IRQF_TRIGGER_HIGH; flags |= IRQF_ONESHOT; return devm_request_threaded_irq(&bus->func->dev, bus->func->irq, NULL, - wfx_spi_irq_handler, IRQF_ONESHOT, - "wfx", bus); + wfx_spi_irq_handler, IRQF_ONESHOT, "wfx", bus); } static int wfx_spi_irq_unsubscribe(void *priv) @@ -190,14 +187,11 @@ static int wfx_spi_probe(struct spi_device *func) return ret; /* 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); + func->chip_select, func->mode, func->bits_per_word, func->max_speed_hz); if (func->bits_per_word != 16 && func->bits_per_word != 8) - dev_warn(&func->dev, "unusual bits/word value: %d\n", - func->bits_per_word); + dev_warn(&func->dev, "unusual bits/word value: %d\n", func->bits_per_word); if (func->max_speed_hz > 50000000) - dev_warn(&func->dev, "%dHz is a very high speed\n", - func->max_speed_hz); + dev_warn(&func->dev, "%dHz is a very high speed\n", func->max_speed_hz); bus = devm_kzalloc(&func->dev, sizeof(*bus), GFP_KERNEL); if (!bus) @@ -207,13 +201,11 @@ static int wfx_spi_probe(struct spi_device *func) bus->need_swab = true; spi_set_drvdata(func, bus); - bus->gpio_reset = devm_gpiod_get_optional(&func->dev, "reset", - GPIOD_OUT_LOW); + bus->gpio_reset = devm_gpiod_get_optional(&func->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(bus->gpio_reset)) return PTR_ERR(bus->gpio_reset); if (!bus->gpio_reset) { - dev_warn(&func->dev, - "gpio reset is not defined, trying to load firmware anyway\n"); + dev_warn(&func->dev, "gpio reset is not defined, trying to load firmware anyway\n"); } else { gpiod_set_consumer_name(bus->gpio_reset, "wfx reset"); if (spi_get_device_id(func)->driver_data & WFX_RESET_INVERTED) diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c index 3fe67c4815e7..4beee2624998 100644 --- a/drivers/staging/wfx/data_rx.c +++ b/drivers/staging/wfx/data_rx.c @@ -34,8 +34,7 @@ static void wfx_rx_handle_ba(struct wfx_vif *wvif, struct ieee80211_mgmt *mgmt) } } -void wfx_rx_cb(struct wfx_vif *wvif, - const struct wfx_hif_ind_rx *arg, struct sk_buff *skb) +void wfx_rx_cb(struct wfx_vif *wvif, const struct wfx_hif_ind_rx *arg, struct sk_buff *skb) { struct ieee80211_rx_status *hdr = IEEE80211_SKB_RXCB(skb); struct ieee80211_hdr *frame = (struct ieee80211_hdr *)skb->data; @@ -54,8 +53,7 @@ void wfx_rx_cb(struct wfx_vif *wvif, } hdr->band = NL80211_BAND_2GHZ; - hdr->freq = ieee80211_channel_to_frequency(arg->channel_number, - hdr->band); + hdr->freq = ieee80211_channel_to_frequency(arg->channel_number, hdr->band); if (arg->rxed_rate >= 14) { hdr->encoding = RX_ENC_HT; diff --git a/drivers/staging/wfx/data_rx.h b/drivers/staging/wfx/data_rx.h index 7d77cdbbc31b..cf708f16d602 100644 --- a/drivers/staging/wfx/data_rx.h +++ b/drivers/staging/wfx/data_rx.h @@ -12,7 +12,6 @@ struct wfx_vif; struct sk_buff; struct wfx_hif_ind_rx; -void wfx_rx_cb(struct wfx_vif *wvif, - const struct wfx_hif_ind_rx *arg, struct sk_buff *skb); +void wfx_rx_cb(struct wfx_vif *wvif, const struct wfx_hif_ind_rx *arg, struct sk_buff *skb); #endif diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index fec30d773e62..0bfbf57cc035 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -17,8 +17,7 @@ #include "traces.h" #include "hif_tx_mib.h" -static int wfx_get_hw_rate(struct wfx_dev *wdev, - const struct ieee80211_tx_rate *rate) +static int wfx_get_hw_rate(struct wfx_dev *wdev, const struct ieee80211_tx_rate *rate) { struct ieee80211_supported_band *band; @@ -66,14 +65,12 @@ static void wfx_tx_policy_build(struct wfx_vif *wvif, struct wfx_tx_policy *poli } } -static bool wfx_tx_policy_is_equal(const struct wfx_tx_policy *a, - const struct wfx_tx_policy *b) +static bool wfx_tx_policy_is_equal(const struct wfx_tx_policy *a, const struct wfx_tx_policy *b) { return !memcmp(a->rates, b->rates, sizeof(a->rates)); } -static int wfx_tx_policy_find(struct wfx_tx_policy_cache *cache, - struct wfx_tx_policy *wanted) +static int wfx_tx_policy_find(struct wfx_tx_policy_cache *cache, struct wfx_tx_policy *wanted) { struct wfx_tx_policy *it; @@ -86,15 +83,13 @@ static int wfx_tx_policy_find(struct wfx_tx_policy_cache *cache, return -1; } -static void wfx_tx_policy_use(struct wfx_tx_policy_cache *cache, - struct wfx_tx_policy *entry) +static void wfx_tx_policy_use(struct wfx_tx_policy_cache *cache, struct wfx_tx_policy *entry) { ++entry->usage_count; list_move(&entry->link, &cache->used); } -static int wfx_tx_policy_release(struct wfx_tx_policy_cache *cache, - struct wfx_tx_policy *entry) +static int wfx_tx_policy_release(struct wfx_tx_policy_cache *cache, struct wfx_tx_policy *entry) { int ret = --entry->usage_count; @@ -103,8 +98,7 @@ static int wfx_tx_policy_release(struct wfx_tx_policy_cache *cache, return ret; } -static int wfx_tx_policy_get(struct wfx_vif *wvif, - struct ieee80211_tx_rate *rates, bool *renew) +static int wfx_tx_policy_get(struct wfx_vif *wvif, struct ieee80211_tx_rate *rates, bool *renew) { int idx; struct wfx_tx_policy_cache *cache = &wvif->tx_policy_cache; @@ -164,8 +158,7 @@ static int wfx_tx_policy_upload(struct wfx_vif *wvif) do { spin_lock_bh(&wvif->tx_policy_cache.lock); for (i = 0; i < ARRAY_SIZE(wvif->tx_policy_cache.cache); ++i) { - is_used = memzcmp(policies[i].rates, - sizeof(policies[i].rates)); + is_used = memzcmp(policies[i].rates, sizeof(policies[i].rates)); if (!policies[i].uploaded && is_used) break; } @@ -183,8 +176,7 @@ static int wfx_tx_policy_upload(struct wfx_vif *wvif) void wfx_tx_policy_upload_work(struct work_struct *work) { - struct wfx_vif *wvif = - container_of(work, struct wfx_vif, tx_policy_upload_work); + struct wfx_vif *wvif = container_of(work, struct wfx_vif, tx_policy_upload_work); wfx_tx_policy_upload(wvif); wfx_tx_unlock(wvif->wdev); @@ -221,8 +213,7 @@ static bool wfx_is_action_back(struct ieee80211_hdr *hdr) static u8 wfx_tx_get_link_id(struct wfx_vif *wvif, struct ieee80211_sta *sta, struct ieee80211_hdr *hdr) { - struct wfx_sta_priv *sta_priv = - sta ? (struct wfx_sta_priv *)&sta->drv_priv : NULL; + struct wfx_sta_priv *sta_priv = sta ? (struct wfx_sta_priv *)&sta->drv_priv : NULL; const u8 *da = ieee80211_get_DA(hdr); if (sta_priv && sta_priv->link_id) @@ -276,8 +267,7 @@ static void wfx_tx_fixup_rates(struct ieee80211_tx_rate *rates) if (rates[i].idx == -1) { rates[i].idx = 0; rates[i].count = 8; /* == hw->max_rate_tries */ - rates[i].flags = rates[i - 1].flags & - IEEE80211_TX_RC_MCS; + rates[i].flags = rates[i - 1].flags & IEEE80211_TX_RC_MCS; break; } } @@ -286,8 +276,7 @@ static void wfx_tx_fixup_rates(struct ieee80211_tx_rate *rates) rates[i].flags &= ~IEEE80211_TX_RC_SHORT_GI; } -static u8 wfx_tx_get_retry_policy_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 ret; @@ -326,8 +315,7 @@ static int wfx_tx_get_icv_len(struct ieee80211_key_conf *hw_key) return hw_key->icv_len + mic_space; } -static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, - struct sk_buff *skb) +static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, struct sk_buff *skb) { struct wfx_hif_msg *hif_msg; struct wfx_hif_req_tx *req; @@ -337,8 +325,7 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; int queue_id = skb_get_queue_mapping(skb); size_t offset = (size_t)skb->data & 3; - int wmsg_len = sizeof(struct wfx_hif_msg) + - sizeof(struct wfx_hif_req_tx) + offset; + int wmsg_len = sizeof(struct wfx_hif_msg) + sizeof(struct wfx_hif_req_tx) + offset; WARN(queue_id >= IEEE80211_NUM_ACS, "unsupported queue_id"); wfx_tx_fixup_rates(tx_info->driver_rates); @@ -396,16 +383,14 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, return 0; } -void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, - struct sk_buff *skb) +void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, struct sk_buff *skb) { struct wfx_dev *wdev = hw->priv; struct wfx_vif *wvif; struct ieee80211_sta *sta = control ? control->sta : NULL; struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; - size_t driver_data_room = sizeof_field(struct ieee80211_tx_info, - rate_driver_data); + size_t driver_data_room = sizeof_field(struct ieee80211_tx_info, rate_driver_data); compiletime_assert(sizeof(struct wfx_tx_priv) <= driver_data_room, "struct tx_priv is too large"); @@ -437,8 +422,7 @@ static void wfx_skb_dtor(struct wfx_vif *wvif, struct sk_buff *skb) { struct wfx_hif_msg *hif = (struct wfx_hif_msg *)skb->data; struct wfx_hif_req_tx *req = (struct wfx_hif_req_tx *)hif->body; - unsigned int offset = sizeof(struct wfx_hif_msg) + - sizeof(struct wfx_hif_req_tx) + + unsigned int offset = sizeof(struct wfx_hif_msg) + sizeof(struct wfx_hif_req_tx) + req->fc_offset; if (!wvif) { @@ -450,8 +434,7 @@ static void wfx_skb_dtor(struct wfx_vif *wvif, struct sk_buff *skb) ieee80211_tx_status_irqsafe(wvif->wdev->hw, skb); } -static void wfx_tx_fill_rates(struct wfx_dev *wdev, - struct ieee80211_tx_info *tx_info, +static void wfx_tx_fill_rates(struct wfx_dev *wdev, struct ieee80211_tx_info *tx_info, const struct wfx_hif_cnf_tx *arg) { struct ieee80211_tx_rate *rate; @@ -465,8 +448,7 @@ static void wfx_tx_fill_rates(struct wfx_dev *wdev, rate = &tx_info->status.rates[i]; if (rate->idx < 0) break; - if (tx_count < rate->count && - arg->status == HIF_STATUS_TX_FAIL_RETRIES && + if (tx_count < rate->count && arg->status == HIF_STATUS_TX_FAIL_RETRIES && arg->ack_failures) dev_dbg(wdev->dev, "all retries were not consumed: %d != %d\n", rate->count, tx_count); @@ -521,9 +503,8 @@ void wfx_tx_confirm_cb(struct wfx_dev *wdev, const struct wfx_hif_cnf_tx *arg) memset(tx_info->pad, 0, sizeof(tx_info->pad)); if (!arg->status) { - tx_info->status.tx_time = - le32_to_cpu(arg->media_delay) - - le32_to_cpu(arg->tx_queue_delay); + tx_info->status.tx_time = le32_to_cpu(arg->media_delay) - + le32_to_cpu(arg->tx_queue_delay); if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK) tx_info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED; else @@ -539,8 +520,7 @@ void wfx_tx_confirm_cb(struct wfx_dev *wdev, const struct wfx_hif_cnf_tx *arg) wfx_skb_dtor(wvif, skb); } -static void wfx_flush_vif(struct wfx_vif *wvif, u32 queues, - struct sk_buff_head *dropped) +static void wfx_flush_vif(struct wfx_vif *wvif, u32 queues, struct sk_buff_head *dropped) { struct wfx_queue *queue; int i; @@ -558,16 +538,13 @@ static void wfx_flush_vif(struct wfx_vif *wvif, u32 queues, if (!(BIT(i) & queues)) continue; queue = &wvif->tx_queue[i]; - if (wait_event_timeout(wvif->wdev->tx_dequeue, - wfx_tx_queue_empty(wvif, queue), + if (wait_event_timeout(wvif->wdev->tx_dequeue, wfx_tx_queue_empty(wvif, queue), msecs_to_jiffies(1000)) <= 0) - dev_warn(wvif->wdev->dev, - "frames queued while flushing tx queues?"); + dev_warn(wvif->wdev->dev, "frames queued while flushing tx queues?"); } } -void wfx_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - u32 queues, bool drop) +void wfx_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u32 queues, bool drop) { struct wfx_dev *wdev = hw->priv; struct sk_buff_head dropped; diff --git a/drivers/staging/wfx/data_tx.h b/drivers/staging/wfx/data_tx.h index 040f731e62ae..983470705e4b 100644 --- a/drivers/staging/wfx/data_tx.h +++ b/drivers/staging/wfx/data_tx.h @@ -41,11 +41,9 @@ struct wfx_tx_priv { void wfx_tx_policy_init(struct wfx_vif *wvif); void wfx_tx_policy_upload_work(struct work_struct *work); -void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, - struct sk_buff *skb); +void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, struct sk_buff *skb); void wfx_tx_confirm_cb(struct wfx_dev *wdev, const struct wfx_hif_cnf_tx *arg); -void wfx_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - u32 queues, bool drop); +void wfx_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u32 queues, bool drop); static inline struct wfx_tx_priv *wfx_skb_tx_priv(struct sk_buff *skb) { diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c index f0796eb2afff..210e2336d43a 100644 --- a/drivers/staging/wfx/debug.c +++ b/drivers/staging/wfx/debug.c @@ -31,8 +31,7 @@ static const struct trace_print_flags wfx_reg_print_map[] = { wfx_reg_list, }; -static const char *get_symbol(unsigned long val, - const struct trace_print_flags *symbol_array) +static const char *get_symbol(unsigned long val, const struct trace_print_flags *symbol_array) { int i; @@ -73,8 +72,7 @@ static int wfx_counters_show(struct seq_file *seq, void *v) return -EIO; } - seq_printf(seq, "%-24s %12s %12s %12s\n", - "", "global", "iface 0", "iface 1"); + seq_printf(seq, "%-24s %12s %12s %12s\n", "", "global", "iface 0", "iface 1"); #define PUT_COUNTER(name) \ seq_printf(seq, "%-24s %12d %12d %12d\n", #name, \ @@ -159,10 +157,8 @@ static int wfx_rx_stats_show(struct seq_file *seq, void *v) mutex_lock(&wdev->rx_stats_lock); seq_printf(seq, "Timestamp: %dus\n", st->date); seq_printf(seq, "Low power clock: frequency %uHz, external %s\n", - le32_to_cpu(st->pwr_clk_freq), - st->is_ext_pwr_clk ? "yes" : "no"); - seq_printf(seq, - "Num. of frames: %d, PER (x10e4): %d, Throughput: %dKbps/s\n", + le32_to_cpu(st->pwr_clk_freq), st->is_ext_pwr_clk ? "yes" : "no"); + seq_printf(seq, "Num. of frames: %d, PER (x10e4): %d, Throughput: %dKbps/s\n", st->nb_rx_frame, st->per_total, st->throughput); seq_puts(seq, " Num. of PER RSSI SNR CFO\n"); seq_puts(seq, " frames (x10e4) (dBm) (dB) (kHz)\n"); @@ -206,8 +202,7 @@ static int wfx_tx_power_loop_show(struct seq_file *seq, void *v) } DEFINE_SHOW_ATTRIBUTE(wfx_tx_power_loop); -static ssize_t wfx_send_pds_write(struct file *file, - const char __user *user_buf, +static ssize_t wfx_send_pds_write(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) { struct wfx_dev *wdev = file->private_data; @@ -241,8 +236,7 @@ struct dbgfs_hif_msg { int ret; }; -static ssize_t wfx_send_hif_msg_write(struct file *file, - const char __user *user_buf, +static ssize_t wfx_send_hif_msg_write(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) { struct dbgfs_hif_msg *context = file->private_data; @@ -268,8 +262,7 @@ static ssize_t wfx_send_hif_msg_write(struct file *file, kfree(request); return -EINVAL; } - context->ret = wfx_cmd_send(wdev, request, context->reply, - sizeof(context->reply), false); + context->ret = wfx_cmd_send(wdev, request, context->reply, sizeof(context->reply), false); kfree(request); complete(&context->complete); @@ -354,11 +347,9 @@ int wfx_debug_init(struct wfx_dev *wdev) d = debugfs_create_dir("wfx", wdev->hw->wiphy->debugfsdir); debugfs_create_file("counters", 0444, d, wdev, &wfx_counters_fops); debugfs_create_file("rx_stats", 0444, d, wdev, &wfx_rx_stats_fops); - debugfs_create_file("tx_power_loop", 0444, d, wdev, - &wfx_tx_power_loop_fops); + debugfs_create_file("tx_power_loop", 0444, d, wdev, &wfx_tx_power_loop_fops); debugfs_create_file("send_pds", 0200, d, wdev, &wfx_send_pds_fops); - debugfs_create_file("send_hif_msg", 0600, d, wdev, - &wfx_send_hif_msg_fops); + debugfs_create_file("send_hif_msg", 0600, d, wdev, &wfx_send_hif_msg_fops); debugfs_create_file("ps_timeout", 0600, d, wdev, &wfx_ps_timeout_fops); return 0; diff --git a/drivers/staging/wfx/fwio.c b/drivers/staging/wfx/fwio.c index c9a54c519e8a..89a46fb0e789 100644 --- a/drivers/staging/wfx/fwio.c +++ b/drivers/staging/wfx/fwio.c @@ -79,8 +79,7 @@ static const char * const fwio_errors[] = { * NOTE: it may also be possible to use 'pages' from struct firmware and avoid * bounce buffer */ -static int wfx_sram_write_dma_safe(struct wfx_dev *wdev, u32 addr, - const u8 *buf, size_t len) +static int wfx_sram_write_dma_safe(struct wfx_dev *wdev, u32 addr, const u8 *buf, size_t len) { int ret; const u8 *tmp; @@ -112,8 +111,7 @@ static int get_firmware(struct wfx_dev *wdev, u32 keyset_chip, if (ret) { dev_info(wdev->dev, "can't load %s, falling back to %s.sec\n", filename, wdev->pdata.file_fw); - snprintf(filename, sizeof(filename), "%s.sec", - wdev->pdata.file_fw); + snprintf(filename, sizeof(filename), "%s.sec", wdev->pdata.file_fw); ret = request_firmware(fw, filename, wdev->dev); if (ret) { dev_err(wdev->dev, "can't load %s\n", filename); @@ -166,8 +164,7 @@ static int wait_ncp_status(struct wfx_dev *wdev, u32 status) return -ETIMEDOUT; } if (ktime_compare(now, start)) - dev_dbg(wdev->dev, "chip answer after %lldus\n", - ktime_us_delta(now, start)); + dev_dbg(wdev->dev, "chip answer after %lldus\n", ktime_us_delta(now, start)); else dev_dbg(wdev->dev, "chip answer immediately\n"); return 0; @@ -200,8 +197,7 @@ static int upload_firmware(struct wfx_dev *wdev, const u8 *data, size_t len) dev_dbg(wdev->dev, "answer after %lldus\n", ktime_us_delta(now, start)); - ret = wfx_sram_write_dma_safe(wdev, - WFX_DNLD_FIFO + (offs % DNLD_FIFO_SIZE), + ret = wfx_sram_write_dma_safe(wdev, WFX_DNLD_FIFO + (offs % DNLD_FIFO_SIZE), data + offs, DNLD_BLOCK_SIZE); if (ret < 0) return ret; @@ -266,12 +262,10 @@ static int load_firmware_secure(struct wfx_dev *wdev) goto error; wfx_sram_reg_write(wdev, WFX_DNLD_FIFO, 0xFFFFFFFF); /* Fifo init */ - wfx_sram_write_dma_safe(wdev, WFX_DCA_FW_VERSION, "\x01\x00\x00\x00", - FW_VERSION_SIZE); + wfx_sram_write_dma_safe(wdev, WFX_DCA_FW_VERSION, "\x01\x00\x00\x00", FW_VERSION_SIZE); wfx_sram_write_dma_safe(wdev, WFX_DCA_FW_SIGNATURE, fw->data + fw_offset, FW_SIGNATURE_SIZE); - wfx_sram_write_dma_safe(wdev, WFX_DCA_FW_HASH, - fw->data + fw_offset + FW_SIGNATURE_SIZE, + wfx_sram_write_dma_safe(wdev, WFX_DCA_FW_HASH, fw->data + fw_offset + FW_SIGNATURE_SIZE, FW_HASH_SIZE); wfx_sram_reg_write(wdev, WFX_DCA_IMAGE_SIZE, fw->size - header_size); wfx_sram_reg_write(wdev, WFX_DCA_HOST_STATUS, HOST_UPLOAD_PENDING); @@ -280,8 +274,7 @@ static int load_firmware_secure(struct wfx_dev *wdev) goto error; start = ktime_get(); - ret = upload_firmware(wdev, fw->data + header_size, - fw->size - header_size); + ret = upload_firmware(wdev, fw->data + header_size, fw->size - header_size); if (ret) goto error; dev_dbg(wdev->dev, "firmware load after %lldus\n", @@ -320,12 +313,10 @@ static int init_gpr(struct wfx_dev *wdev) }; for (i = 0; i < ARRAY_SIZE(gpr_init); i++) { - ret = wfx_igpr_reg_write(wdev, gpr_init[i].index, - gpr_init[i].value); + ret = wfx_igpr_reg_write(wdev, gpr_init[i].index, gpr_init[i].value); if (ret < 0) return ret; - dev_dbg(wdev->dev, " index %02x: %08x\n", - gpr_init[i].index, gpr_init[i].value); + dev_dbg(wdev->dev, " index %02x: %08x\n", gpr_init[i].index, gpr_init[i].value); } return 0; } @@ -360,8 +351,7 @@ int wfx_init_device(struct wfx_dev *wdev) hw_revision = FIELD_GET(CFG_DEVICE_ID_MAJOR, reg); if (hw_revision == 0) { - dev_err(wdev->dev, "bad hardware revision number: %d\n", - hw_revision); + dev_err(wdev->dev, "bad hardware revision number: %d\n", hw_revision); return -ENODEV; } hw_type = FIELD_GET(CFG_DEVICE_ID_TYPE, reg); @@ -388,8 +378,7 @@ int wfx_init_device(struct wfx_dev *wdev) return -ETIMEDOUT; } } - dev_dbg(wdev->dev, "chip wake up after %lldus\n", - ktime_us_delta(now, start)); + dev_dbg(wdev->dev, "chip wake up after %lldus\n", ktime_us_delta(now, start)); ret = wfx_config_reg_write_bits(wdev, CFG_CPU_RESET, 0); if (ret < 0) diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 2073ac43bebd..1ddf8c51c303 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -32,8 +32,7 @@ static int wfx_hif_generic_confirm(struct wfx_dev *wdev, } if (cmd != wdev->hif_cmd.buf_send->id) { - dev_warn(wdev->dev, - "chip response mismatch request: 0x%.2x vs 0x%.2x\n", + dev_warn(wdev->dev, "chip response mismatch request: 0x%.2x vs 0x%.2x\n", cmd, wdev->hif_cmd.buf_send->id); return -EINVAL; } @@ -72,8 +71,7 @@ static int wfx_hif_multi_tx_confirm(struct wfx_dev *wdev, } static int wfx_hif_startup_indication(struct wfx_dev *wdev, - const struct wfx_hif_msg *hif, - const void *buf) + const struct wfx_hif_msg *hif, const void *buf) { const struct wfx_hif_ind_startup *body = buf; @@ -87,19 +85,16 @@ static int wfx_hif_startup_indication(struct wfx_dev *wdev, } static int wfx_hif_wakeup_indication(struct wfx_dev *wdev, - const struct wfx_hif_msg *hif, - const void *buf) + const struct wfx_hif_msg *hif, const void *buf) { - if (!wdev->pdata.gpio_wakeup || - gpiod_get_value(wdev->pdata.gpio_wakeup) == 0) { + if (!wdev->pdata.gpio_wakeup || gpiod_get_value(wdev->pdata.gpio_wakeup) == 0) { dev_warn(wdev->dev, "unexpected wake-up indication\n"); return -EIO; } return 0; } -static int wfx_hif_receive_indication(struct wfx_dev *wdev, - const struct wfx_hif_msg *hif, +static int wfx_hif_receive_indication(struct wfx_dev *wdev, const struct wfx_hif_msg *hif, const void *buf, struct sk_buff *skb) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); @@ -144,16 +139,14 @@ static int wfx_hif_event_indication(struct wfx_dev *wdev, le32_to_cpu(body->event_data.ps_mode_error)); break; default: - dev_warn(wdev->dev, "unhandled event indication: %.2x\n", - type); + dev_warn(wdev->dev, "unhandled event indication: %.2x\n", type); break; } return 0; } static int wfx_hif_pm_mode_complete_indication(struct wfx_dev *wdev, - const struct wfx_hif_msg *hif, - const void *buf) + const struct wfx_hif_msg *hif, const void *buf) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); @@ -167,8 +160,7 @@ static int wfx_hif_pm_mode_complete_indication(struct wfx_dev *wdev, } static int wfx_hif_scan_complete_indication(struct wfx_dev *wdev, - const struct wfx_hif_msg *hif, - const void *buf) + const struct wfx_hif_msg *hif, const void *buf) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); const struct wfx_hif_ind_scan_cmpl *body = buf; @@ -184,8 +176,7 @@ static int wfx_hif_scan_complete_indication(struct wfx_dev *wdev, } static int wfx_hif_join_complete_indication(struct wfx_dev *wdev, - const struct wfx_hif_msg *hif, - const void *buf) + const struct wfx_hif_msg *hif, const void *buf) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); @@ -199,8 +190,7 @@ static int wfx_hif_join_complete_indication(struct wfx_dev *wdev, } static int wfx_hif_suspend_resume_indication(struct wfx_dev *wdev, - const struct wfx_hif_msg *hif, - const void *buf) + const struct wfx_hif_msg *hif, const void *buf) { const struct wfx_hif_ind_suspend_resume_tx *body = buf; struct wfx_vif *wvif; @@ -228,8 +218,7 @@ static int wfx_hif_suspend_resume_indication(struct wfx_dev *wdev, } static int wfx_hif_generic_indication(struct wfx_dev *wdev, - const struct wfx_hif_msg *hif, - const void *buf) + const struct wfx_hif_msg *hif, const void *buf) { const struct wfx_hif_ind_generic *body = buf; int type = le32_to_cpu(body->type); @@ -246,14 +235,12 @@ static int wfx_hif_generic_indication(struct wfx_dev *wdev, 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); - memcpy(&wdev->rx_stats, &body->data.rx_stats, - sizeof(wdev->rx_stats)); + memcpy(&wdev->rx_stats, &body->data.rx_stats, sizeof(wdev->rx_stats)); mutex_unlock(&wdev->rx_stats_lock); return 0; case HIF_GENERIC_INDICATION_TYPE_TX_POWER_LOOP_INFO: mutex_lock(&wdev->tx_power_loop_info_lock); - memcpy(&wdev->tx_power_loop_info, - &body->data.tx_power_loop_info, + memcpy(&wdev->tx_power_loop_info, &body->data.tx_power_loop_info, sizeof(wdev->tx_power_loop_info)); mutex_unlock(&wdev->tx_power_loop_info_lock); return 0; @@ -324,8 +311,7 @@ static int wfx_hif_error_indication(struct wfx_dev *wdev, dev_err(wdev->dev, "asynchronous error: %s: %d\n", hif_errors[i].str, param); else - dev_err(wdev->dev, "asynchronous error: %s\n", - hif_errors[i].str); + dev_err(wdev->dev, "asynchronous error: %s\n", hif_errors[i].str); else dev_err(wdev->dev, "asynchronous error: unknown: %08x\n", type); print_hex_dump(KERN_INFO, "hif: ", DUMP_PREFIX_OFFSET, @@ -336,15 +322,13 @@ static int wfx_hif_error_indication(struct wfx_dev *wdev, }; static int wfx_hif_exception_indication(struct wfx_dev *wdev, - const struct wfx_hif_msg *hif, - const void *buf) + const struct wfx_hif_msg *hif, const void *buf) { const struct wfx_hif_ind_exception *body = buf; int type = le32_to_cpu(body->type); if (type == 4) - dev_err(wdev->dev, "firmware assert %d\n", - le32_to_cpup((__le32 *)body->data)); + dev_err(wdev->dev, "firmware assert %d\n", le32_to_cpup((__le32 *)body->data)); else dev_err(wdev->dev, "firmware exception\n"); print_hex_dump(KERN_INFO, "hif: ", DUMP_PREFIX_OFFSET, @@ -356,8 +340,7 @@ static int wfx_hif_exception_indication(struct wfx_dev *wdev, static const struct { int msg_id; - int (*handler)(struct wfx_dev *wdev, - const struct wfx_hif_msg *hif, const void *buf); + int (*handler)(struct wfx_dev *wdev, const struct wfx_hif_msg *hif, const void *buf); } hif_handlers[] = { /* Confirmations */ { HIF_CNF_ID_TX, wfx_hif_tx_confirm }, @@ -392,8 +375,7 @@ void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb) * buf_send */ if (mutex_is_locked(&wdev->hif_cmd.lock) && - wdev->hif_cmd.buf_send && - wdev->hif_cmd.buf_send->id == hif_id) { + wdev->hif_cmd.buf_send && wdev->hif_cmd.buf_send->id == hif_id) { wfx_hif_generic_confirm(wdev, hif, hif->body); goto free; } @@ -405,11 +387,9 @@ void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb) } } if (hif_id & HIF_ID_IS_INDICATION) - dev_err(wdev->dev, "unsupported HIF indication: ID %02x\n", - hif_id); + dev_err(wdev->dev, "unsupported HIF indication: ID %02x\n", hif_id); else - dev_err(wdev->dev, "unexpected HIF confirmation: ID %02x\n", - hif_id); + dev_err(wdev->dev, "unexpected HIF confirmation: ID %02x\n", hif_id); free: dev_kfree_skb(skb); } diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 429c70b991e1..b88a73077b48 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -22,8 +22,7 @@ void wfx_init_hif_cmd(struct wfx_hif_cmd *hif_cmd) mutex_init(&hif_cmd->lock); } -static void wfx_fill_header(struct wfx_hif_msg *hif, int if_id, - unsigned int cmd, size_t size) +static void wfx_fill_header(struct wfx_hif_msg *hif, int if_id, unsigned int cmd, size_t size) { if (if_id == -1) if_id = 2; @@ -190,14 +189,12 @@ int wfx_hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, ret = wfx_cmd_send(wdev, hif, reply, buf_len, false); if (!ret && mib_id != le16_to_cpu(reply->mib_id)) { - dev_warn(wdev->dev, "%s: confirmation mismatch request\n", - __func__); + dev_warn(wdev->dev, "%s: confirmation mismatch request\n", __func__); ret = -EIO; } if (ret == -ENOMEM) dev_err(wdev->dev, "buffer is too small to receive %s (%zu < %d)\n", - wfx_get_mib_name(mib_id), val_len, - le16_to_cpu(reply->length)); + wfx_get_mib_name(mib_id), val_len, le16_to_cpu(reply->length)); if (!ret) memcpy(val, &reply->mib_data, le16_to_cpu(reply->length)); else @@ -208,8 +205,7 @@ int wfx_hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, return ret; } -int wfx_hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, - void *val, size_t val_len) +int wfx_hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, void *val, size_t val_len) { int ret; struct wfx_hif_msg *hif; @@ -232,8 +228,7 @@ int wfx_hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, { int ret, i; struct wfx_hif_msg *hif; - size_t buf_len = sizeof(struct wfx_hif_req_start_scan_alt) + - chan_num * sizeof(u8); + size_t buf_len = sizeof(struct wfx_hif_req_start_scan_alt) + chan_num * sizeof(u8); struct wfx_hif_req_start_scan_alt *body = wfx_alloc_hif(buf_len, &hif); WARN(chan_num > HIF_API_MAX_NB_CHANNELS, "invalid params"); @@ -242,20 +237,16 @@ int wfx_hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, if (!hif) return -ENOMEM; for (i = 0; i < req->n_ssids; i++) { - memcpy(body->ssid_def[i].ssid, req->ssids[i].ssid, - IEEE80211_MAX_SSID_LEN); - body->ssid_def[i].ssid_length = - cpu_to_le32(req->ssids[i].ssid_len); + memcpy(body->ssid_def[i].ssid, req->ssids[i].ssid, IEEE80211_MAX_SSID_LEN); + body->ssid_def[i].ssid_length = cpu_to_le32(req->ssids[i].ssid_len); } body->num_of_ssids = HIF_API_MAX_NB_SSIDS; body->maintain_current_bss = 1; body->disallow_ps = 1; - body->tx_power_level = - cpu_to_le32(req->channels[chan_start_idx]->max_power); + body->tx_power_level = cpu_to_le32(req->channels[chan_start_idx]->max_power); body->num_of_channels = chan_num; for (i = 0; i < chan_num; i++) - body->channel_list[i] = - req->channels[i + chan_start_idx]->hw_value; + body->channel_list[i] = req->channels[i + chan_start_idx]->hw_value; if (req->no_cck) body->max_transmit_rate = API_RATE_INDEX_G_6MBPS; else @@ -309,8 +300,7 @@ int wfx_hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, 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 = - cpu_to_le32(wfx_rate_mask_to_hw(wvif->wdev, conf->basic_rates)); + body->basic_rate_set = cpu_to_le32(wfx_rate_mask_to_hw(wvif->wdev, conf->basic_rates)); memcpy(body->bssid, conf->bssid, sizeof(body->bssid)); if (ssid) { body->ssid_length = cpu_to_le32(ssidlen); @@ -326,15 +316,13 @@ int wfx_hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count) { int ret; struct wfx_hif_msg *hif; - struct wfx_hif_req_set_bss_params *body = wfx_alloc_hif(sizeof(*body), - &hif); + struct wfx_hif_req_set_bss_params *body = wfx_alloc_hif(sizeof(*body), &hif); if (!hif) return -ENOMEM; body->aid = cpu_to_le16(aid); body->beacon_lost_count = beacon_lost_count; - wfx_fill_header(hif, wvif->id, HIF_REQ_ID_SET_BSS_PARAMS, - sizeof(*body)); + wfx_fill_header(hif, wvif->id, HIF_REQ_ID_SET_BSS_PARAMS, sizeof(*body)); ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false); kfree(hif); return ret; @@ -355,8 +343,7 @@ int wfx_hif_add_key(struct wfx_dev *wdev, const struct wfx_hif_req_add_key *arg) /* 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)); + wfx_fill_header(hif, arg->int_id, HIF_REQ_ID_ADD_KEY, sizeof(*body)); else wfx_fill_header(hif, -1, HIF_REQ_ID_ADD_KEY, sizeof(*body)); ret = wfx_cmd_send(wdev, hif, NULL, 0, false); @@ -384,8 +371,7 @@ int wfx_hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, { int ret; struct wfx_hif_msg *hif; - struct wfx_hif_req_edca_queue_params *body = wfx_alloc_hif(sizeof(*body), - &hif); + struct wfx_hif_req_edca_queue_params *body = wfx_alloc_hif(sizeof(*body), &hif); if (!body) return -ENOMEM; @@ -403,8 +389,7 @@ int wfx_hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, body->queue_id = HIF_QUEUE_ID_BACKGROUND; if (wfx_api_older_than(wvif->wdev, 2, 0) && queue == IEEE80211_AC_BK) body->queue_id = HIF_QUEUE_ID_BESTEFFORT; - wfx_fill_header(hif, wvif->id, HIF_REQ_ID_EDCA_QUEUE_PARAMS, - sizeof(*body)); + wfx_fill_header(hif, wvif->id, HIF_REQ_ID_EDCA_QUEUE_PARAMS, sizeof(*body)); ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false); kfree(hif); return ret; @@ -414,8 +399,7 @@ int wfx_hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout) { int ret; struct wfx_hif_msg *hif; - struct wfx_hif_req_set_pm_mode *body = wfx_alloc_hif(sizeof(*body), - &hif); + struct wfx_hif_req_set_pm_mode *body = wfx_alloc_hif(sizeof(*body), &hif); if (!body) return -ENOMEM; @@ -449,8 +433,7 @@ int wfx_hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, body->short_preamble = conf->use_short_preamble; body->channel_number = channel->hw_value; body->beacon_interval = cpu_to_le32(conf->beacon_int); - body->basic_rate_set = - cpu_to_le32(wfx_rate_mask_to_hw(wvif->wdev, conf->basic_rates)); + body->basic_rate_set = cpu_to_le32(wfx_rate_mask_to_hw(wvif->wdev, conf->basic_rates)); body->ssid_length = conf->ssid_len; memcpy(body->ssid, conf->ssid, conf->ssid_len); wfx_fill_header(hif, wvif->id, HIF_REQ_ID_START, sizeof(*body)); @@ -463,21 +446,18 @@ int wfx_hif_beacon_transmit(struct wfx_vif *wvif, bool enable) { int ret; struct wfx_hif_msg *hif; - struct wfx_hif_req_beacon_transmit *body = wfx_alloc_hif(sizeof(*body), - &hif); + struct wfx_hif_req_beacon_transmit *body = wfx_alloc_hif(sizeof(*body), &hif); if (!hif) return -ENOMEM; body->enable_beaconing = enable ? 1 : 0; - wfx_fill_header(hif, wvif->id, HIF_REQ_ID_BEACON_TRANSMIT, - sizeof(*body)); + wfx_fill_header(hif, wvif->id, HIF_REQ_ID_BEACON_TRANSMIT, sizeof(*body)); ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false); kfree(hif); return ret; } -int wfx_hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, - bool mfp) +int wfx_hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, bool mfp) { int ret; struct wfx_hif_msg *hif; @@ -496,8 +476,7 @@ int wfx_hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, return ret; } -int wfx_hif_update_ie_beacon(struct wfx_vif *wvif, - const u8 *ies, size_t ies_len) +int wfx_hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len) { int ret; struct wfx_hif_msg *hif; diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h index 36caffa4d1eb..71817a6571f0 100644 --- a/drivers/staging/wfx/hif_tx.h +++ b/drivers/staging/wfx/hif_tx.h @@ -36,17 +36,14 @@ void wfx_init_hif_cmd(struct wfx_hif_cmd *wfx_hif_cmd); int wfx_cmd_send(struct wfx_dev *wdev, struct wfx_hif_msg *request, void *reply, size_t reply_len, bool async); -int wfx_hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, - void *buf, size_t buf_size); -int wfx_hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, - void *buf, size_t buf_size); +int wfx_hif_read_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, void *buf, size_t buf_size); +int wfx_hif_write_mib(struct wfx_dev *wdev, int vif_id, u16 mib_id, void *buf, size_t buf_size); int wfx_hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, const struct ieee80211_channel *channel); int wfx_hif_reset(struct wfx_vif *wvif, bool reset_stat); int wfx_hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, struct ieee80211_channel *channel, const u8 *ssid, int ssidlen); -int wfx_hif_map_link(struct wfx_vif *wvif, - bool unmap, u8 *mac_addr, int sta_id, bool mfp); +int wfx_hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, bool mfp); int wfx_hif_add_key(struct wfx_dev *wdev, const struct wfx_hif_req_add_key *arg); int wfx_hif_remove_key(struct wfx_dev *wdev, int idx); int wfx_hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout); diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index daf966693f67..1c57dd2b697c 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -20,14 +20,12 @@ int wfx_hif_set_output_power(struct wfx_vif *wvif, int val) .power_level = cpu_to_le32(val * 10), }; - return wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_CURRENT_TX_POWER_LEVEL, + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_CURRENT_TX_POWER_LEVEL, &arg, sizeof(arg)); } int wfx_hif_set_beacon_wakeup_period(struct wfx_vif *wvif, - unsigned int dtim_interval, - unsigned int listen_interval) + unsigned int dtim_interval, unsigned int listen_interval) { struct wfx_hif_mib_beacon_wake_up_period arg = { .wakeup_period_min = dtim_interval, @@ -37,13 +35,11 @@ int wfx_hif_set_beacon_wakeup_period(struct wfx_vif *wvif, if (dtim_interval > 0xFF || listen_interval > 0xFFFF) return -EINVAL; - return wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_BEACON_WAKEUP_PERIOD, + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_BEACON_WAKEUP_PERIOD, &arg, sizeof(arg)); } -int wfx_hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, - int rssi_thold, int rssi_hyst) +int wfx_hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, int rssi_thold, int rssi_hyst) { struct wfx_hif_mib_rcpi_rssi_threshold arg = { .rolling_average_count = 8, @@ -60,8 +56,7 @@ int wfx_hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, arg.lower_threshold = (arg.lower_threshold + 110) * 2; } - return wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_RCPI_RSSI_THRESHOLD, + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_RCPI_RSSI_THRESHOLD, &arg, sizeof(arg)); } @@ -74,9 +69,8 @@ int wfx_hif_get_counters_table(struct wfx_dev *wdev, int vif_id, return wfx_hif_read_mib(wdev, vif_id, HIF_MIB_ID_COUNTERS_TABLE, arg, sizeof(struct wfx_hif_mib_count_table)); } else { - return wfx_hif_read_mib(wdev, vif_id, - HIF_MIB_ID_EXTENDED_COUNTERS_TABLE, arg, - sizeof(struct wfx_hif_mib_extended_count_table)); + return wfx_hif_read_mib(wdev, vif_id, HIF_MIB_ID_EXTENDED_COUNTERS_TABLE, + arg, sizeof(struct wfx_hif_mib_extended_count_table)); } } @@ -86,8 +80,7 @@ int wfx_hif_set_macaddr(struct wfx_vif *wvif, u8 *mac) if (mac) ether_addr_copy(arg.mac_addr, mac); - return wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_DOT11_MAC_ADDRESS, + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_DOT11_MAC_ADDRESS, &arg, sizeof(arg)); } @@ -100,8 +93,7 @@ int wfx_hif_set_rx_filter(struct wfx_vif *wvif, arg.bssid_filter = 1; if (!filter_prbreq) arg.fwd_probe_req = 1; - return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_RX_FILTER, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_RX_FILTER, &arg, sizeof(arg)); } int wfx_hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, @@ -116,26 +108,23 @@ int wfx_hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, return -ENOMEM; arg->num_of_info_elmts = cpu_to_le32(tbl_len); memcpy(arg->ie_table, tbl, flex_array_size(arg, ie_table, tbl_len)); - ret = wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_BEACON_FILTER_TABLE, arg, buf_len); + ret = wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_BEACON_FILTER_TABLE, + arg, buf_len); kfree(arg); return ret; } -int wfx_hif_beacon_filter_control(struct wfx_vif *wvif, - int enable, int beacon_count) +int wfx_hif_beacon_filter_control(struct wfx_vif *wvif, int enable, int beacon_count) { struct wfx_hif_mib_bcn_filter_enable arg = { .enable = cpu_to_le32(enable), .bcn_count = cpu_to_le32(beacon_count), }; - return wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_BEACON_FILTER_ENABLE, + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_BEACON_FILTER_ENABLE, &arg, sizeof(arg)); } -int wfx_hif_set_operational_mode(struct wfx_dev *wdev, - enum wfx_hif_op_power_mode mode) +int wfx_hif_set_operational_mode(struct wfx_dev *wdev, enum wfx_hif_op_power_mode mode) { struct wfx_hif_mib_gl_operational_power_mode arg = { .power_mode = mode, @@ -173,21 +162,18 @@ int wfx_hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required) } if (!required) arg.unpmf_allowed = 1; - return wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_PROTECTED_MGMT_POLICY, + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_PROTECTED_MGMT_POLICY, &arg, sizeof(arg)); } -int wfx_hif_set_block_ack_policy(struct wfx_vif *wvif, - u8 tx_tid_policy, u8 rx_tid_policy) +int wfx_hif_set_block_ack_policy(struct wfx_vif *wvif, u8 tx_tid_policy, u8 rx_tid_policy) { struct wfx_hif_mib_block_ack_policy arg = { .block_ack_tx_tid_policy = tx_tid_policy, .block_ack_rx_tid_policy = rx_tid_policy, }; - return wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_BLOCK_ACK_POLICY, + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_BLOCK_ACK_POLICY, &arg, sizeof(arg)); } @@ -203,13 +189,11 @@ int wfx_hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, .mpdu_start_spacing = ampdu_density, }; - return wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_SET_ASSOCIATION_MODE, + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_SET_ASSOCIATION_MODE, &arg, sizeof(arg)); } -int wfx_hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, - int policy_index, u8 *rates) +int wfx_hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, int policy_index, u8 *rates) { struct wfx_hif_mib_set_tx_rate_retry_policy *arg; size_t size = struct_size(arg, tx_rate_retry_policy, 1); @@ -227,8 +211,7 @@ int wfx_hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, arg->tx_rate_retry_policy[0].count_init = 1; memcpy(&arg->tx_rate_retry_policy[0].rates, rates, sizeof(arg->tx_rate_retry_policy[0].rates)); - ret = wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_SET_TX_RATE_RETRY_POLICY, + ret = wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_SET_TX_RATE_RETRY_POLICY, arg, size); kfree(arg); return ret; @@ -240,8 +223,7 @@ int wfx_hif_keep_alive_period(struct wfx_vif *wvif, int period) .keep_alive_period = cpu_to_le16(period), }; - return wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_KEEP_ALIVE_PERIOD, + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_KEEP_ALIVE_PERIOD, &arg, sizeof(arg)); }; @@ -257,8 +239,7 @@ int wfx_hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr) memcpy(arg.ipv4_address, addr, sizeof(arg.ipv4_address)); arg.arp_enable = HIF_ARP_NS_FILTERING_ENABLE; } - return wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_ARP_IP_ADDRESSES_TABLE, + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_ARP_IP_ADDRESSES_TABLE, &arg, sizeof(arg)); } @@ -268,8 +249,7 @@ int wfx_hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable) .enable_multi_tx_conf = enable, }; - return wfx_hif_write_mib(wdev, -1, HIF_MIB_ID_GL_SET_MULTI_MSG, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wdev, -1, HIF_MIB_ID_GL_SET_MULTI_MSG, &arg, sizeof(arg)); } int wfx_hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val) @@ -284,8 +264,7 @@ int wfx_hif_set_uapsd_info(struct wfx_vif *wvif, unsigned long val) arg.trig_be = 1; if (val & BIT(IEEE80211_AC_BK)) arg.trig_bckgrnd = 1; - return wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_SET_UAPSD_INFORMATION, + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_SET_UAPSD_INFORMATION, &arg, sizeof(arg)); } @@ -295,8 +274,7 @@ int wfx_hif_erp_use_protection(struct wfx_vif *wvif, bool enable) .use_cts_to_self = enable, }; - return wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_NON_ERP_PROTECTION, + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_NON_ERP_PROTECTION, &arg, sizeof(arg)); } @@ -306,8 +284,7 @@ int wfx_hif_slot_time(struct wfx_vif *wvif, int val) .slot_time = cpu_to_le32(val), }; - return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_SLOT_TIME, - &arg, sizeof(arg)); + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_SLOT_TIME, &arg, sizeof(arg)); } int wfx_hif_wep_default_key_id(struct wfx_vif *wvif, int val) @@ -316,8 +293,7 @@ int wfx_hif_wep_default_key_id(struct wfx_vif *wvif, int val) .wep_default_key_id = val, }; - return wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_DOT11_WEP_DEFAULT_KEY_ID, + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_DOT11_WEP_DEFAULT_KEY_ID, &arg, sizeof(arg)); } @@ -327,7 +303,6 @@ int wfx_hif_rts_threshold(struct wfx_vif *wvif, int val) .threshold = cpu_to_le32(val >= 0 ? val : 0xFFFF), }; - return wfx_hif_write_mib(wvif->wdev, wvif->id, - HIF_MIB_ID_DOT11_RTS_THRESHOLD, + return wfx_hif_write_mib(wvif->wdev, wvif->id, HIF_MIB_ID_DOT11_RTS_THRESHOLD, &arg, sizeof(arg)); } diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h index e7e556b05c9a..bcd4ef6a8497 100644 --- a/drivers/staging/wfx/hif_tx_mib.h +++ b/drivers/staging/wfx/hif_tx_mib.h @@ -19,30 +19,23 @@ struct wfx_hif_mib_extended_count_table; int wfx_hif_set_output_power(struct wfx_vif *wvif, int val); int wfx_hif_set_beacon_wakeup_period(struct wfx_vif *wvif, - unsigned int dtim_interval, - unsigned int listen_interval); -int wfx_hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, - int rssi_thold, int rssi_hyst); + unsigned int dtim_interval, unsigned int listen_interval); +int wfx_hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, int rssi_thold, int rssi_hyst); int wfx_hif_get_counters_table(struct wfx_dev *wdev, int vif_id, struct wfx_hif_mib_extended_count_table *arg); int wfx_hif_set_macaddr(struct wfx_vif *wvif, u8 *mac); -int wfx_hif_set_rx_filter(struct wfx_vif *wvif, - bool filter_bssid, bool fwd_probe_req); +int wfx_hif_set_rx_filter(struct wfx_vif *wvif, bool filter_bssid, bool fwd_probe_req); int wfx_hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, const struct wfx_hif_ie_table_entry *tbl); -int wfx_hif_beacon_filter_control(struct wfx_vif *wvif, - int enable, int beacon_count); -int wfx_hif_set_operational_mode(struct wfx_dev *wdev, - enum wfx_hif_op_power_mode mode); +int wfx_hif_beacon_filter_control(struct wfx_vif *wvif, int enable, int beacon_count); +int wfx_hif_set_operational_mode(struct wfx_dev *wdev, enum wfx_hif_op_power_mode mode); int wfx_hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb, u8 frame_type, int init_rate); int wfx_hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required); -int wfx_hif_set_block_ack_policy(struct wfx_vif *wvif, - u8 tx_tid_policy, u8 rx_tid_policy); +int wfx_hif_set_block_ack_policy(struct wfx_vif *wvif, u8 tx_tid_policy, u8 rx_tid_policy); int wfx_hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, bool greenfield, bool short_preamble); -int wfx_hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, - int policy_index, u8 *rates); +int wfx_hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, int policy_index, u8 *rates); int wfx_hif_keep_alive_period(struct wfx_vif *wvif, int period); int wfx_hif_set_arp_ipv4_filter(struct wfx_vif *wvif, int idx, __be32 *addr); int wfx_hif_use_multi_tx_conf(struct wfx_dev *wdev, bool enable); diff --git a/drivers/staging/wfx/hwio.c b/drivers/staging/wfx/hwio.c index c53b36d36687..c15810bdaecb 100644 --- a/drivers/staging/wfx/hwio.c +++ b/drivers/staging/wfx/hwio.c @@ -25,14 +25,12 @@ static int wfx_read32(struct wfx_dev *wdev, int reg, u32 *val) *val = ~0; /* Never return undefined value */ if (!tmp) return -ENOMEM; - ret = wdev->hwbus_ops->copy_from_io(wdev->hwbus_priv, reg, tmp, - sizeof(u32)); + ret = wdev->hwbus_ops->copy_from_io(wdev->hwbus_priv, reg, tmp, sizeof(u32)); if (ret >= 0) *val = le32_to_cpu(*tmp); kfree(tmp); if (ret) - dev_err(wdev->dev, "%s: bus communication error: %d\n", - __func__, ret); + dev_err(wdev->dev, "%s: bus communication error: %d\n", __func__, ret); return ret; } @@ -44,12 +42,10 @@ static int wfx_write32(struct wfx_dev *wdev, int reg, u32 val) if (!tmp) return -ENOMEM; *tmp = cpu_to_le32(val); - ret = wdev->hwbus_ops->copy_to_io(wdev->hwbus_priv, reg, tmp, - sizeof(u32)); + ret = wdev->hwbus_ops->copy_to_io(wdev->hwbus_priv, reg, tmp, sizeof(u32)); kfree(tmp); if (ret) - dev_err(wdev->dev, "%s: bus communication error: %d\n", - __func__, ret); + dev_err(wdev->dev, "%s: bus communication error: %d\n", __func__, ret); return ret; } @@ -187,8 +183,7 @@ static int wfx_indirect_write_locked(struct wfx_dev *wdev, int reg, u32 addr, return ret; } -static int wfx_indirect_read32_locked(struct wfx_dev *wdev, int reg, - u32 addr, u32 *val) +static int wfx_indirect_read32_locked(struct wfx_dev *wdev, int reg, u32 addr, u32 *val) { int ret; __le32 *tmp = kmalloc(sizeof(u32), GFP_KERNEL); @@ -227,13 +222,11 @@ int wfx_data_read(struct wfx_dev *wdev, void *buf, size_t len) WARN(!IS_ALIGNED((uintptr_t)buf, 4), "unaligned buffer"); wdev->hwbus_ops->lock(wdev->hwbus_priv); - ret = wdev->hwbus_ops->copy_from_io(wdev->hwbus_priv, - WFX_REG_IN_OUT_QUEUE, buf, len); + ret = wdev->hwbus_ops->copy_from_io(wdev->hwbus_priv, WFX_REG_IN_OUT_QUEUE, buf, len); _trace_io_read(WFX_REG_IN_OUT_QUEUE, buf, len); wdev->hwbus_ops->unlock(wdev->hwbus_priv); if (ret) - dev_err(wdev->dev, "%s: bus communication error: %d\n", - __func__, ret); + dev_err(wdev->dev, "%s: bus communication error: %d\n", __func__, ret); return ret; } @@ -243,52 +236,42 @@ int wfx_data_write(struct wfx_dev *wdev, const void *buf, size_t len) WARN(!IS_ALIGNED((uintptr_t)buf, 4), "unaligned buffer"); wdev->hwbus_ops->lock(wdev->hwbus_priv); - ret = wdev->hwbus_ops->copy_to_io(wdev->hwbus_priv, - WFX_REG_IN_OUT_QUEUE, buf, len); + ret = wdev->hwbus_ops->copy_to_io(wdev->hwbus_priv, WFX_REG_IN_OUT_QUEUE, buf, len); _trace_io_write(WFX_REG_IN_OUT_QUEUE, buf, len); wdev->hwbus_ops->unlock(wdev->hwbus_priv); if (ret) - dev_err(wdev->dev, "%s: bus communication error: %d\n", - __func__, ret); + dev_err(wdev->dev, "%s: bus communication error: %d\n", __func__, ret); return ret; } int wfx_sram_buf_read(struct wfx_dev *wdev, u32 addr, void *buf, size_t len) { - return wfx_indirect_read_locked(wdev, WFX_REG_SRAM_DPORT, - addr, buf, len); + return wfx_indirect_read_locked(wdev, WFX_REG_SRAM_DPORT, addr, buf, len); } int wfx_ahb_buf_read(struct wfx_dev *wdev, u32 addr, void *buf, size_t len) { - return wfx_indirect_read_locked(wdev, WFX_REG_AHB_DPORT, - addr, buf, len); + return wfx_indirect_read_locked(wdev, WFX_REG_AHB_DPORT, addr, buf, len); } -int wfx_sram_buf_write(struct wfx_dev *wdev, u32 addr, - const void *buf, size_t len) +int wfx_sram_buf_write(struct wfx_dev *wdev, u32 addr, const void *buf, size_t len) { - return wfx_indirect_write_locked(wdev, WFX_REG_SRAM_DPORT, - addr, buf, len); + return wfx_indirect_write_locked(wdev, WFX_REG_SRAM_DPORT, addr, buf, len); } -int wfx_ahb_buf_write(struct wfx_dev *wdev, u32 addr, - const void *buf, size_t len) +int wfx_ahb_buf_write(struct wfx_dev *wdev, u32 addr, const void *buf, size_t len) { - return wfx_indirect_write_locked(wdev, WFX_REG_AHB_DPORT, - addr, buf, len); + return wfx_indirect_write_locked(wdev, WFX_REG_AHB_DPORT, addr, buf, len); } int wfx_sram_reg_read(struct wfx_dev *wdev, u32 addr, u32 *val) { - return wfx_indirect_read32_locked(wdev, WFX_REG_SRAM_DPORT, - addr, val); + return wfx_indirect_read32_locked(wdev, WFX_REG_SRAM_DPORT, addr, val); } int wfx_ahb_reg_read(struct wfx_dev *wdev, u32 addr, u32 *val) { - return wfx_indirect_read32_locked(wdev, WFX_REG_AHB_DPORT, - addr, val); + return wfx_indirect_read32_locked(wdev, WFX_REG_AHB_DPORT, addr, val); } int wfx_sram_reg_write(struct wfx_dev *wdev, u32 addr, u32 val) diff --git a/drivers/staging/wfx/key.c b/drivers/staging/wfx/key.c index dea8238f9916..8f23e8d42bd4 100644 --- a/drivers/staging/wfx/key.c +++ b/drivers/staging/wfx/key.c @@ -55,9 +55,8 @@ static u8 fill_tkip_pair(struct wfx_hif_tkip_pairwise_key *msg, { u8 *keybuf = key->key; - WARN(key->keylen != sizeof(msg->tkip_key_data) - + sizeof(msg->tx_mic_key) - + sizeof(msg->rx_mic_key), "inconsistent data"); + WARN(key->keylen != sizeof(msg->tkip_key_data) + sizeof(msg->tx_mic_key) + + sizeof(msg->rx_mic_key), "inconsistent data"); memcpy(msg->tkip_key_data, keybuf, sizeof(msg->tkip_key_data)); keybuf += sizeof(msg->tkip_key_data); memcpy(msg->tx_mic_key, keybuf, sizeof(msg->tx_mic_key)); @@ -67,20 +66,16 @@ static u8 fill_tkip_pair(struct wfx_hif_tkip_pairwise_key *msg, return HIF_KEY_TYPE_TKIP_PAIRWISE; } -static u8 fill_tkip_group(struct wfx_hif_tkip_group_key *msg, - struct ieee80211_key_conf *key, - struct ieee80211_key_seq *seq, - enum nl80211_iftype iftype) +static u8 fill_tkip_group(struct wfx_hif_tkip_group_key *msg, struct ieee80211_key_conf *key, + struct ieee80211_key_seq *seq, enum nl80211_iftype iftype) { u8 *keybuf = key->key; - WARN(key->keylen != sizeof(msg->tkip_key_data) - + 2 * sizeof(msg->rx_mic_key), "inconsistent data"); + WARN(key->keylen != sizeof(msg->tkip_key_data) + 2 * sizeof(msg->rx_mic_key), + "inconsistent data"); msg->key_id = key->keyidx; - memcpy(msg->rx_sequence_counter, - &seq->tkip.iv16, sizeof(seq->tkip.iv16)); - memcpy(msg->rx_sequence_counter + sizeof(u16), - &seq->tkip.iv32, sizeof(seq->tkip.iv32)); + memcpy(msg->rx_sequence_counter, &seq->tkip.iv16, sizeof(seq->tkip.iv16)); + memcpy(msg->rx_sequence_counter + sizeof(u16), &seq->tkip.iv32, sizeof(seq->tkip.iv32)); memcpy(msg->tkip_key_data, keybuf, sizeof(msg->tkip_key_data)); keybuf += sizeof(msg->tkip_key_data); if (iftype == NL80211_IFTYPE_AP) @@ -102,8 +97,7 @@ static u8 fill_ccmp_pair(struct wfx_hif_aes_pairwise_key *msg, } static u8 fill_ccmp_group(struct wfx_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); @@ -118,8 +112,8 @@ static u8 fill_sms4_pair(struct wfx_hif_wapi_pairwise_key *msg, { u8 *keybuf = key->key; - WARN(key->keylen != sizeof(msg->wapi_key_data) - + sizeof(msg->mic_key_data), "inconsistent data"); + WARN(key->keylen != sizeof(msg->wapi_key_data) + sizeof(msg->mic_key_data), + "inconsistent data"); ether_addr_copy(msg->peer_address, peer_addr); memcpy(msg->wapi_key_data, keybuf, sizeof(msg->wapi_key_data)); keybuf += sizeof(msg->wapi_key_data); @@ -133,8 +127,8 @@ static u8 fill_sms4_group(struct wfx_hif_wapi_group_key *msg, { u8 *keybuf = key->key; - WARN(key->keylen != sizeof(msg->wapi_key_data) - + sizeof(msg->mic_key_data), "inconsistent data"); + WARN(key->keylen != sizeof(msg->wapi_key_data) + sizeof(msg->mic_key_data), + "inconsistent data"); memcpy(msg->wapi_key_data, keybuf, sizeof(msg->wapi_key_data)); keybuf += sizeof(msg->wapi_key_data); memcpy(msg->mic_key_data, keybuf, sizeof(msg->mic_key_data)); @@ -143,8 +137,7 @@ static u8 fill_sms4_group(struct wfx_hif_wapi_group_key *msg, } static u8 fill_aes_cmac_group(struct wfx_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); @@ -173,28 +166,23 @@ static int wfx_add_key(struct wfx_vif *wvif, struct ieee80211_sta *sta, if (key->cipher == WLAN_CIPHER_SUITE_WEP40 || key->cipher == WLAN_CIPHER_SUITE_WEP104) { if (pairwise) - k.type = fill_wep_pair(&k.key.wep_pairwise_key, key, - sta->addr); + k.type = fill_wep_pair(&k.key.wep_pairwise_key, key, sta->addr); else k.type = fill_wep_group(&k.key.wep_group_key, key); } else if (key->cipher == WLAN_CIPHER_SUITE_TKIP) { if (pairwise) - k.type = fill_tkip_pair(&k.key.tkip_pairwise_key, key, - sta->addr); + k.type = fill_tkip_pair(&k.key.tkip_pairwise_key, key, sta->addr); else - k.type = fill_tkip_group(&k.key.tkip_group_key, key, - &seq, wvif->vif->type); + k.type = fill_tkip_group(&k.key.tkip_group_key, key, &seq, + wvif->vif->type); } else if (key->cipher == WLAN_CIPHER_SUITE_CCMP) { if (pairwise) - k.type = fill_ccmp_pair(&k.key.aes_pairwise_key, key, - sta->addr); + k.type = fill_ccmp_pair(&k.key.aes_pairwise_key, key, sta->addr); else - k.type = fill_ccmp_group(&k.key.aes_group_key, key, - &seq); + k.type = fill_ccmp_group(&k.key.aes_group_key, key, &seq); } else if (key->cipher == WLAN_CIPHER_SUITE_SMS4) { if (pairwise) - k.type = fill_sms4_pair(&k.key.wapi_pairwise_key, key, - sta->addr); + k.type = fill_sms4_pair(&k.key.wapi_pairwise_key, key, sta->addr); else k.type = fill_sms4_group(&k.key.wapi_group_key, key); } else if (key->cipher == WLAN_CIPHER_SUITE_AES_CMAC) { @@ -210,8 +198,7 @@ static int wfx_add_key(struct wfx_vif *wvif, struct ieee80211_sta *sta, wfx_free_key(wdev, idx); return -EOPNOTSUPP; } - key->flags |= IEEE80211_KEY_FLAG_PUT_IV_SPACE | - IEEE80211_KEY_FLAG_RESERVE_TAILROOM; + key->flags |= IEEE80211_KEY_FLAG_PUT_IV_SPACE | IEEE80211_KEY_FLAG_RESERVE_TAILROOM; key->hw_key_idx = idx; return 0; } @@ -223,9 +210,8 @@ static int wfx_remove_key(struct wfx_vif *wvif, struct ieee80211_key_conf *key) return wfx_hif_remove_key(wvif->wdev, key->hw_key_idx); } -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) +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) { int ret = -EOPNOTSUPP; struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; diff --git a/drivers/staging/wfx/key.h b/drivers/staging/wfx/key.h index 2d135eff7af2..2234e36dbbcd 100644 --- a/drivers/staging/wfx/key.h +++ b/drivers/staging/wfx/key.h @@ -13,8 +13,7 @@ struct wfx_dev; struct wfx_vif; -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); +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 diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 7b9d75f219fb..6b9ae67da286 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -94,8 +94,7 @@ static const struct ieee80211_supported_band wfx_band_2ghz = { .ht_cap = { /* 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), + IEEE80211_HT_CAP_MAX_AMSDU | (1 << IEEE80211_HT_CAP_RX_STBC_SHIFT), .ht_supported = 1, .ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K, .ampdu_density = IEEE80211_HT_MPDU_DENSITY_NONE, @@ -260,10 +259,8 @@ static void wfx_free_common(void *data) ieee80211_free_hw(wdev->hw); } -struct wfx_dev *wfx_init_common(struct device *dev, - const struct wfx_platform_data *pdata, - const struct wfx_hwbus_ops *hwbus_ops, - void *hwbus_priv) +struct wfx_dev *wfx_init_common(struct device *dev, const struct wfx_platform_data *pdata, + const struct wfx_hwbus_ops *hwbus_ops, void *hwbus_priv) { struct ieee80211_hw *hw; struct wfx_dev *wdev; @@ -288,9 +285,8 @@ struct wfx_dev *wfx_init_common(struct device *dev, hw->queues = 4; hw->max_rates = 8; hw->max_rate_tries = 8; - hw->extra_tx_headroom = sizeof(struct wfx_hif_msg) - + sizeof(struct wfx_hif_req_tx) - + 4 /* alignment */ + 8 /* TKIP IV */; + hw->extra_tx_headroom = sizeof(struct wfx_hif_msg) + sizeof(struct wfx_hif_req_tx) + + 4 /* alignment */ + 8 /* TKIP IV */; hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC) | BIT(NL80211_IFTYPE_AP); @@ -308,8 +304,7 @@ struct wfx_dev *wfx_init_common(struct device *dev, 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 */ - memcpy(hw->wiphy->bands[NL80211_BAND_2GHZ], &wfx_band_2ghz, - sizeof(wfx_band_2ghz)); + memcpy(hw->wiphy->bands[NL80211_BAND_2GHZ], &wfx_band_2ghz, sizeof(wfx_band_2ghz)); wdev = hw->priv; wdev->hw = hw; @@ -317,10 +312,8 @@ struct wfx_dev *wfx_init_common(struct device *dev, wdev->hwbus_ops = hwbus_ops; wdev->hwbus_priv = hwbus_priv; memcpy(&wdev->pdata, pdata, sizeof(*pdata)); - of_property_read_string(dev->of_node, "config-file", - &wdev->pdata.file_pds); - wdev->pdata.gpio_wakeup = devm_gpiod_get_optional(dev, "wakeup", - GPIOD_OUT_LOW); + of_property_read_string(dev->of_node, "config-file", &wdev->pdata.file_pds); + wdev->pdata.gpio_wakeup = devm_gpiod_get_optional(dev, "wakeup", GPIOD_OUT_LOW); if (IS_ERR(wdev->pdata.gpio_wakeup)) return NULL; if (wdev->pdata.gpio_wakeup) @@ -330,8 +323,7 @@ struct wfx_dev *wfx_init_common(struct device *dev, mutex_init(&wdev->rx_stats_lock); mutex_init(&wdev->tx_power_loop_info_lock); init_completion(&wdev->firmware_ready); - INIT_DELAYED_WORK(&wdev->cooling_timeout_work, - wfx_cooling_timeout_work); + INIT_DELAYED_WORK(&wdev->cooling_timeout_work, wfx_cooling_timeout_work); skb_queue_head_init(&wdev->tx_pending); init_waitqueue_head(&wdev->tx_dequeue); wfx_init_hif_cmd(&wdev->hif_cmd); @@ -388,27 +380,27 @@ int wfx_probe(struct wfx_dev *wdev) wdev->hw_caps.firmware_build); if (wfx_api_older_than(wdev, 1, 0)) { - dev_err(wdev->dev, - "unsupported firmware API version (expect 1 while firmware returns %d)\n", + dev_err(wdev->dev, "unsupported firmware API version (expect 1 while firmware returns %d)\n", wdev->hw_caps.api_version_major); err = -ENOTSUPP; goto err0; } if (wdev->hw_caps.link_mode == SEC_LINK_ENFORCED) { - dev_err(wdev->dev, - "chip require secure_link, but can't negotiate it\n"); + dev_err(wdev->dev, "chip require secure_link, but can't negotiate it\n"); goto err0; } if (wdev->hw_caps.region_sel_mode) { - wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[11].flags |= IEEE80211_CHAN_NO_IR; - wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[12].flags |= IEEE80211_CHAN_NO_IR; - wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[13].flags |= IEEE80211_CHAN_DISABLED; + wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[11].flags |= + IEEE80211_CHAN_NO_IR; + wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[12].flags |= + IEEE80211_CHAN_NO_IR; + wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[13].flags |= + IEEE80211_CHAN_DISABLED; } - dev_dbg(wdev->dev, "sending configuration file %s\n", - wdev->pdata.file_pds); + dev_dbg(wdev->dev, "sending configuration file %s\n", wdev->pdata.file_pds); err = wfx_send_pdata_pds(wdev); if (err < 0 && err != -ENOENT) goto err0; @@ -424,8 +416,7 @@ int wfx_probe(struct wfx_dev *wdev) wdev->pdata.gpio_wakeup = gpio_saved; if (wdev->pdata.gpio_wakeup) { - dev_dbg(wdev->dev, - "enable 'quiescent' power mode with wakeup GPIO and PDS file %s\n", + dev_dbg(wdev->dev, "enable 'quiescent' power mode with wakeup GPIO and PDS file %s\n", wdev->pdata.file_pds); gpiod_set_value_cansleep(wdev->pdata.gpio_wakeup, 1); wfx_control_reg_write(wdev, 0); @@ -436,19 +427,16 @@ int wfx_probe(struct wfx_dev *wdev) for (i = 0; i < ARRAY_SIZE(wdev->addresses); i++) { eth_zero_addr(wdev->addresses[i].addr); - err = of_get_mac_address(wdev->dev->of_node, - wdev->addresses[i].addr); + err = of_get_mac_address(wdev->dev->of_node, wdev->addresses[i].addr); if (!err) wdev->addresses[i].addr[ETH_ALEN - 1] += i; else - ether_addr_copy(wdev->addresses[i].addr, - wdev->hw_caps.mac_addr[i]); + ether_addr_copy(wdev->addresses[i].addr, wdev->hw_caps.mac_addr[i]); if (!is_valid_ether_addr(wdev->addresses[i].addr)) { dev_warn(wdev->dev, "using random MAC address\n"); eth_random_addr(wdev->addresses[i].addr); } - dev_info(wdev->dev, "MAC address %d: %pM\n", i, - wdev->addresses[i].addr); + dev_info(wdev->dev, "MAC address %d: %pM\n", i, wdev->addresses[i].addr); } wdev->hw->wiphy->n_addresses = ARRAY_SIZE(wdev->addresses); wdev->hw->wiphy->addresses = wdev->addresses; diff --git a/drivers/staging/wfx/main.h b/drivers/staging/wfx/main.h index 68a7807c5fb6..def6270bf10d 100644 --- a/drivers/staging/wfx/main.h +++ b/drivers/staging/wfx/main.h @@ -29,10 +29,8 @@ struct wfx_platform_data { bool use_rising_clk; }; -struct wfx_dev *wfx_init_common(struct device *dev, - const struct wfx_platform_data *pdata, - const struct wfx_hwbus_ops *hwbus_ops, - void *hwbus_priv); +struct wfx_dev *wfx_init_common(struct device *dev, const struct wfx_platform_data *pdata, + const struct wfx_hwbus_ops *hwbus_ops, void *hwbus_priv); int wfx_probe(struct wfx_dev *wdev); void wfx_release(struct wfx_dev *wdev); diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c index 71c6ef94a904..9b49e41f06ce 100644 --- a/drivers/staging/wfx/queue.c +++ b/drivers/staging/wfx/queue.c @@ -38,8 +38,7 @@ void wfx_tx_flush(struct wfx_dev *wdev) wfx_tx_lock(wdev); mutex_lock(&wdev->hif_cmd.lock); - ret = wait_event_timeout(wdev->hif.tx_buffers_empty, - !wdev->hif.tx_buffers_used, + ret = wait_event_timeout(wdev->hif.tx_buffers_empty, !wdev->hif.tx_buffers_used, msecs_to_jiffies(3000)); if (!ret) { dev_warn(wdev->dev, "cannot flush tx buffers (%d still busy)\n", @@ -76,8 +75,7 @@ void wfx_tx_queues_init(struct wfx_vif *wvif) 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); + return skb_queue_empty_lockless(&queue->normal) && skb_queue_empty_lockless(&queue->cab); } void wfx_tx_queues_check_empty(struct wfx_vif *wvif) @@ -91,8 +89,7 @@ void wfx_tx_queues_check_empty(struct wfx_vif *wvif) } static void __wfx_tx_queue_drop(struct wfx_vif *wvif, - struct sk_buff_head *skb_queue, - struct sk_buff_head *dropped) + struct sk_buff_head *skb_queue, struct sk_buff_head *dropped) { struct sk_buff *skb, *tmp; @@ -130,8 +127,7 @@ void wfx_pending_drop(struct wfx_dev *wdev, struct sk_buff_head *dropped) struct wfx_hif_msg *hif; struct sk_buff *skb; - WARN(!wdev->chip_frozen, "%s should only be used to recover a frozen device", - __func__); + WARN(!wdev->chip_frozen, "%s should only be used to recover a frozen device", __func__); while ((skb = skb_dequeue(&wdev->tx_pending)) != NULL) { hif = (struct wfx_hif_msg *)skb->data; wvif = wdev_to_wvif(wdev, hif->interface); @@ -187,23 +183,20 @@ void wfx_pending_dump_old_frames(struct wfx_dev *wdev, unsigned int limit_ms) skb_queue_walk(&wdev->tx_pending, skb) { tx_priv = wfx_skb_tx_priv(skb); req = wfx_skb_txreq(skb); - if (ktime_after(now, ktime_add_ms(tx_priv->xmit_timestamp, - limit_ms))) { + if (ktime_after(now, ktime_add_ms(tx_priv->xmit_timestamp, limit_ms))) { if (first) { dev_info(wdev->dev, "frames stuck in firmware since %dms or more:\n", limit_ms); first = false; } dev_info(wdev->dev, " id %08x sent %lldms ago\n", - req->packet_id, - ktime_ms_delta(now, tx_priv->xmit_timestamp)); + req->packet_id, ktime_ms_delta(now, tx_priv->xmit_timestamp)); } } spin_unlock_bh(&wdev->tx_pending.lock); } -unsigned int wfx_pending_get_pkt_us_delay(struct wfx_dev *wdev, - struct sk_buff *skb) +unsigned int wfx_pending_get_pkt_us_delay(struct wfx_dev *wdev, struct sk_buff *skb) { ktime_t now = ktime_get(); struct wfx_tx_priv *tx_priv = wfx_skb_tx_priv(skb); @@ -267,8 +260,7 @@ static struct sk_buff *wfx_tx_queues_get_skb(struct wfx_dev *wdev) */ hif = (struct wfx_hif_msg *)skb->data; WARN_ON(hif->interface != wvif->id); - WARN_ON(queues[i] != - &wvif->tx_queue[skb_get_queue_mapping(skb)]); + WARN_ON(queues[i] != &wvif->tx_queue[skb_get_queue_mapping(skb)]); atomic_inc(&queues[i]->pending_frames); trace_queues_stats(wdev, queues[i]); return skb; diff --git a/drivers/staging/wfx/queue.h b/drivers/staging/wfx/queue.h index 66596a9abe30..2860c56fb933 100644 --- a/drivers/staging/wfx/queue.h +++ b/drivers/staging/wfx/queue.h @@ -38,8 +38,7 @@ void wfx_tx_queue_drop(struct wfx_vif *wvif, struct wfx_queue *queue, struct sk_buff *wfx_pending_get(struct wfx_dev *wdev, u32 packet_id); void wfx_pending_drop(struct wfx_dev *wdev, struct sk_buff_head *dropped); -unsigned int wfx_pending_get_pkt_us_delay(struct wfx_dev *wdev, - struct sk_buff *skb); +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 diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c index f61c6b2db352..ce0ae4c91190 100644 --- a/drivers/staging/wfx/scan.c +++ b/drivers/staging/wfx/scan.c @@ -12,8 +12,7 @@ #include "sta.h" #include "hif_tx_mib.h" -static void wfx_ieee80211_scan_completed_compat(struct ieee80211_hw *hw, - bool aborted) +static void wfx_ieee80211_scan_completed_compat(struct ieee80211_hw *hw, bool aborted) { struct cfg80211_scan_info info = { .aborted = aborted, @@ -22,13 +21,11 @@ static void wfx_ieee80211_scan_completed_compat(struct ieee80211_hw *hw, ieee80211_scan_completed(hw, &info); } -static int update_probe_tmpl(struct wfx_vif *wvif, - struct cfg80211_scan_request *req) +static int update_probe_tmpl(struct wfx_vif *wvif, struct cfg80211_scan_request *req) { struct sk_buff *skb; - skb = ieee80211_probereq_get(wvif->wdev->hw, wvif->vif->addr, - NULL, 0, req->ie_len); + skb = ieee80211_probereq_get(wvif->wdev->hw, wvif->vif->addr, NULL, 0, req->ie_len); if (!skb) return -ENOMEM; @@ -38,8 +35,7 @@ static int update_probe_tmpl(struct wfx_vif *wvif, return 0; } -static int send_scan_req(struct wfx_vif *wvif, - struct cfg80211_scan_request *req, int start_idx) +static int send_scan_req(struct wfx_vif *wvif, struct cfg80211_scan_request *req, int start_idx) { int i, ret; struct ieee80211_channel *ch_start, *ch_cur; diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 620d8c912f95..07054666fe76 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -40,8 +40,7 @@ u32 wfx_rate_mask_to_hw(struct wfx_dev *wdev, u32 rates) void wfx_cooling_timeout_work(struct work_struct *work) { - struct wfx_dev *wdev = container_of(to_delayed_work(work), - struct wfx_dev, + struct wfx_dev *wdev = container_of(to_delayed_work(work), struct wfx_dev, cooling_timeout_work); wdev->chip_frozen = true; @@ -91,10 +90,8 @@ static void wfx_filter_beacon(struct wfx_vif *wvif, bool filter_beacon) if (!filter_beacon) { wfx_hif_beacon_filter_control(wvif, 0, 1); } else { - wfx_hif_set_beacon_filter_table(wvif, ARRAY_SIZE(filter_ies), - filter_ies); - wfx_hif_beacon_filter_control(wvif, - HIF_BEACON_FILTER_ENABLE, 0); + wfx_hif_set_beacon_filter_table(wvif, ARRAY_SIZE(filter_ies), filter_ies); + wfx_hif_beacon_filter_control(wvif, HIF_BEACON_FILTER_ENABLE, 0); } } @@ -135,8 +132,7 @@ void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, filter_bssid = true; /* In AP mode, chip can reply to probe request itself */ - if (*total_flags & FIF_PROBE_REQ && - wvif->vif->type == NL80211_IFTYPE_AP) { + 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"); *total_flags &= ~FIF_PROBE_REQ; } @@ -208,10 +204,8 @@ int wfx_update_pm(struct wfx_vif *wvif) if (wvif->uapsd_mask) ps_timeout = 0; - if (!wait_for_completion_timeout(&wvif->set_pm_mode_complete, - TU_TO_JIFFIES(512))) - dev_warn(wvif->wdev->dev, - "timeout while waiting of set_pm_mode_complete\n"); + if (!wait_for_completion_timeout(&wvif->set_pm_mode_complete, TU_TO_JIFFIES(512))) + dev_warn(wvif->wdev->dev, "timeout while waiting of set_pm_mode_complete\n"); return wfx_hif_set_pm(wvif, ps, ps_timeout); } @@ -227,8 +221,7 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, mutex_lock(&wdev->conf_mutex); assign_bit(queue, &wvif->uapsd_mask, params->uapsd); wfx_hif_set_edca_queue_params(wvif, queue, params); - if (wvif->vif->type == NL80211_IFTYPE_STATION && - old_uapsd != wvif->uapsd_mask) { + if (wvif->vif->type == NL80211_IFTYPE_STATION && old_uapsd != wvif->uapsd_mask) { wfx_hif_set_uapsd_info(wvif, wvif->uapsd_mask); wfx_update_pm(wvif); } @@ -264,17 +257,15 @@ void wfx_event_report_rssi(struct wfx_vif *wvif, u8 raw_rcpi_rssi) static void wfx_beacon_loss_work(struct work_struct *work) { - struct wfx_vif *wvif = container_of(to_delayed_work(work), - struct wfx_vif, beacon_loss_work); + struct wfx_vif *wvif = container_of(to_delayed_work(work), struct wfx_vif, + beacon_loss_work); struct ieee80211_bss_conf *bss_conf = &wvif->vif->bss_conf; ieee80211_beacon_loss(wvif->vif); - schedule_delayed_work(to_delayed_work(work), - msecs_to_jiffies(bss_conf->beacon_int)); + schedule_delayed_work(to_delayed_work(work), msecs_to_jiffies(bss_conf->beacon_int)); } -void wfx_set_default_unicast_key(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, int idx) +void wfx_set_default_unicast_key(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int idx) { struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; @@ -298,8 +289,7 @@ void wfx_reset(struct wfx_vif *wvif) wfx_update_pm(wvif); } -int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_sta *sta) +int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta) { struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; struct wfx_sta_priv *sta_priv = (struct wfx_sta_priv *)&sta->drv_priv; @@ -321,8 +311,7 @@ int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, return 0; } -int wfx_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_sta *sta) +int wfx_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta) { struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; struct wfx_sta_priv *sta_priv = (struct wfx_sta_priv *)&sta->drv_priv; @@ -343,15 +332,13 @@ static int wfx_upload_ap_templates(struct wfx_vif *wvif) skb = ieee80211_beacon_get(wvif->wdev->hw, wvif->vif); if (!skb) return -ENOMEM; - wfx_hif_set_template_frame(wvif, skb, HIF_TMPLT_BCN, - API_RATE_INDEX_B_1MBPS); + wfx_hif_set_template_frame(wvif, skb, HIF_TMPLT_BCN, API_RATE_INDEX_B_1MBPS); dev_kfree_skb(skb); skb = ieee80211_proberesp_get(wvif->wdev->hw, wvif->vif); if (!skb) return -ENOMEM; - wfx_hif_set_template_frame(wvif, skb, HIF_TMPLT_PRBRES, - API_RATE_INDEX_B_1MBPS); + wfx_hif_set_template_frame(wvif, skb, HIF_TMPLT_PRBRES, API_RATE_INDEX_B_1MBPS); dev_kfree_skb(skb); return 0; } @@ -360,8 +347,7 @@ static void wfx_set_mfp_ap(struct wfx_vif *wvif) { struct sk_buff *skb = ieee80211_beacon_get(wvif->wdev->hw, wvif->vif); const int ieoffset = offsetof(struct ieee80211_mgmt, u.beacon.variable); - const u16 *ptr = (u16 *)cfg80211_find_ie(WLAN_EID_RSN, - skb->data + ieoffset, + const u16 *ptr = (u16 *)cfg80211_find_ie(WLAN_EID_RSN, skb->data + ieoffset, skb->len - ieoffset); const int pairwise_cipher_suite_count_offset = 8 / sizeof(u16); const int pairwise_cipher_suite_size = 4 / sizeof(u16); @@ -417,8 +403,7 @@ static void wfx_join(struct wfx_vif *wvif) wfx_tx_lock_flush(wvif->wdev); - bss = cfg80211_get_bss(wvif->wdev->hw->wiphy, wvif->channel, - conf->bssid, NULL, 0, + bss = cfg80211_get_bss(wvif->wdev->hw->wiphy, wvif->channel, conf->bssid, NULL, 0, IEEE80211_BSS_TYPE_ANY, IEEE80211_PRIVACY_ANY); if (!bss && !conf->ibss_joined) { wfx_tx_unlock(wvif->wdev); @@ -472,8 +457,7 @@ static void wfx_join_finalize(struct wfx_vif *wvif, rcu_read_unlock(); wvif->join_in_progress = false; - wfx_hif_set_association_mode(wvif, ampdu_density, greenfield, - info->use_short_preamble); + wfx_hif_set_association_mode(wvif, ampdu_density, greenfield, info->use_short_preamble); wfx_hif_keep_alive_period(wvif, 0); /* beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use * the same value. @@ -541,10 +525,8 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (changed & BSS_CHANGED_BEACON_INFO) { if (vif->type != NL80211_IFTYPE_STATION) - dev_warn(wdev->dev, "%s: misunderstood change: BEACON_INFO\n", - __func__); - wfx_hif_set_beacon_wakeup_period(wvif, info->dtim_period, - info->dtim_period); + dev_warn(wdev->dev, "%s: misunderstood change: BEACON_INFO\n", __func__); + wfx_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. */ @@ -563,8 +545,7 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, } } - if (changed & BSS_CHANGED_AP_PROBE_RESP || - changed & BSS_CHANGED_BEACON) + if (changed & BSS_CHANGED_AP_PROBE_RESP || changed & BSS_CHANGED_BEACON) wfx_upload_ap_templates(wvif); if (changed & BSS_CHANGED_BEACON_ENABLED) @@ -581,8 +562,7 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, wfx_hif_slot_time(wvif, info->use_short_slot ? 9 : 20); if (changed & BSS_CHANGED_CQM) - wfx_hif_set_rcpi_rssi_threshold(wvif, info->cqm_rssi_thold, - info->cqm_rssi_hyst); + wfx_hif_set_rcpi_rssi_threshold(wvif, info->cqm_rssi_thold, info->cqm_rssi_hyst); if (changed & BSS_CHANGED_TXPOWER) wfx_hif_set_output_power(wvif, info->txpower); @@ -599,8 +579,7 @@ static int wfx_update_tim(struct wfx_vif *wvif) u16 tim_offset, tim_length; u8 *tim_ptr; - skb = ieee80211_beacon_get_tim(wvif->wdev->hw, wvif->vif, - &tim_offset, &tim_length); + skb = ieee80211_beacon_get_tim(wvif->wdev->hw, wvif->vif, &tim_offset, &tim_length); if (!skb) return -ENOENT; tim_ptr = skb->data + tim_offset; @@ -665,8 +644,7 @@ void wfx_suspend_resume_mc(struct wfx_vif *wvif, enum sta_notify_cmd notify_cmd) wfx_bh_request_tx(wvif->wdev); } -int wfx_ampdu_action(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, +int wfx_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_ampdu_params *params) { /* Aggregation is implemented fully in firmware */ @@ -681,20 +659,16 @@ int wfx_ampdu_action(struct ieee80211_hw *hw, } } -int wfx_add_chanctx(struct ieee80211_hw *hw, - struct ieee80211_chanctx_conf *conf) +int wfx_add_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *conf) { return 0; } -void wfx_remove_chanctx(struct ieee80211_hw *hw, - struct ieee80211_chanctx_conf *conf) +void wfx_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *conf) { } -void wfx_change_chanctx(struct ieee80211_hw *hw, - struct ieee80211_chanctx_conf *conf, - u32 changed) +void wfx_change_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *conf, u32 changed) { } @@ -710,8 +684,7 @@ int wfx_assign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, return 0; } -void wfx_unassign_vif_chanctx(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, +void wfx_unassign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_chanctx_conf *conf) { struct wfx_vif *wvif = (struct wfx_vif *)vif->drv_priv; diff --git a/drivers/staging/wfx/sta.h b/drivers/staging/wfx/sta.h index 4d7e38be4235..082329d7bbcd 100644 --- a/drivers/staging/wfx/sta.h +++ b/drivers/staging/wfx/sta.h @@ -23,8 +23,7 @@ int wfx_start(struct ieee80211_hw *hw); void wfx_stop(struct ieee80211_hw *hw); int wfx_config(struct ieee80211_hw *hw, u32 changed); int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value); -void wfx_set_default_unicast_key(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, int idx); +void wfx_set_default_unicast_key(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int idx); void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, unsigned int *total_flags, u64 unused); @@ -38,25 +37,20 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue, const struct ieee80211_tx_queue_params *params); void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_bss_conf *info, u32 changed); -int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_sta *sta); -int wfx_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_sta *sta); +int wfx_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta); +int wfx_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta); void wfx_sta_notify(struct ieee80211_hw *hw, struct ieee80211_vif *vif, enum sta_notify_cmd cmd, struct ieee80211_sta *sta); int wfx_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set); int wfx_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_ampdu_params *params); -int wfx_add_chanctx(struct ieee80211_hw *hw, - struct ieee80211_chanctx_conf *conf); -void wfx_remove_chanctx(struct ieee80211_hw *hw, - struct ieee80211_chanctx_conf *conf); -void wfx_change_chanctx(struct ieee80211_hw *hw, - struct ieee80211_chanctx_conf *conf, u32 changed); +int wfx_add_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *conf); +void wfx_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *conf); +void wfx_change_chanctx(struct ieee80211_hw *hw, struct ieee80211_chanctx_conf *conf, + u32 changed); int wfx_assign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_chanctx_conf *conf); -void wfx_unassign_vif_chanctx(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, +void wfx_unassign_vif_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_chanctx_conf *conf); /* Hardware API Callbacks */ diff --git a/drivers/staging/wfx/traces.h b/drivers/staging/wfx/traces.h index 99bd1808111e..9fbf0081dbf7 100644 --- a/drivers/staging/wfx/traces.h +++ b/drivers/staging/wfx/traces.h @@ -190,8 +190,7 @@ DECLARE_EVENT_CLASS(hif_data, __entry->mib = -1; header_len = 0; } - __entry->buf_len = min_t(int, __entry->msg_len, - sizeof(__entry->buf)) + __entry->buf_len = min_t(int, __entry->msg_len, sizeof(__entry->buf)) - sizeof(struct wfx_hif_msg) - header_len; memcpy(__entry->buf, hif->body + header_len, __entry->buf_len); ), @@ -250,8 +249,7 @@ DECLARE_EVENT_CLASS(io_data, __entry->reg = reg; __entry->addr = addr; __entry->msg_len = len; - __entry->buf_len = min_t(int, sizeof(__entry->buf), - __entry->msg_len); + __entry->buf_len = min_t(int, sizeof(__entry->buf), __entry->msg_len); memcpy(__entry->buf, io_buf, __entry->buf_len); if (addr >= 0) snprintf(__entry->addr_str, 10, "/%08x", addr); @@ -379,8 +377,7 @@ TRACE_EVENT(tx_stats, ), TP_fast_assign( /* 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 }; + static const int hw_rate[] = { 0, 1, 2, 3, 6, 7, 8, 9, 10, 11, 12, 13 }; const struct ieee80211_tx_info *tx_info = (const struct ieee80211_tx_info *)skb->cb; const struct ieee80211_tx_rate *rates = tx_info->driver_rates; @@ -420,9 +417,8 @@ TRACE_EVENT(tx_stats, TP_printk("packet ID: %08x, rate policy: %s %d|%d %d|%d %d|%d %d|%d -> %d attempt, Delays media/queue/total: %4dus/%4dus/%4dus", __entry->pkt_id, __print_flags(__entry->flags, NULL, - { 0x01, "M" }, { 0x02, "S" }, { 0x04, "G" }, - { 0x08, "R" }, { 0x10, "D" }, { 0x20, "F" }, - { 0x40, "Q" }), + { 0x01, "M" }, { 0x02, "S" }, { 0x04, "G" }, { 0x08, "R" }, + { 0x10, "D" }, { 0x20, "F" }, { 0x40, "Q" }), __entry->rate[0], __entry->tx_count[0], __entry->rate[1], diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 189b96cd3d13..565874815aa8 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -104,8 +104,7 @@ static inline struct wfx_vif *wdev_to_wvif(struct wfx_dev *wdev, int vif_id) return (struct wfx_vif *)wdev->vif[vif_id]->drv_priv; } -static inline struct wfx_vif *wvif_iterate(struct wfx_dev *wdev, - struct wfx_vif *cur) +static inline struct wfx_vif *wvif_iterate(struct wfx_dev *wdev, struct wfx_vif *cur) { int i; int mark = 0; From patchwork Thu Jan 13 08:55:15 2022 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: 532413 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4433BC433EF for ; Thu, 13 Jan 2022 08:57:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232214AbiAMI5n (ORCPT ); Thu, 13 Jan 2022 03:57:43 -0500 Received: from mail-dm6nam11on2085.outbound.protection.outlook.com ([40.107.223.85]:34208 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233271AbiAMI4r (ORCPT ); Thu, 13 Jan 2022 03:56:47 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P4rIxq8Lzuq86duQhiQztXdbLHGhlZlqjyVFHI4t6n2v7bCB2/sF8Pdvgm7UdgUzE6JgK7Z5TKA/rVy+0kJ/OSPEakwdKU4r6lT44h723jKsguZ0onA2p8WFj2PnjFbCZnzmYu4FGdflRUDLedKrmnh28ROnoyzUaoki+zD5/f9USVKt5AsoR+RxNrWqcuTQ8Ap/BdYNb1sHw+LL+xiAP3tFp5kD8BI6ZOynPP92bHYuAQqo9HvhFxfhPpjiiUj4rElVDd1pcBZNsKGIW5e1qQlKWYc0cEuZ/GOL6KXoz7PcHxY4Fll0xbzks7MBiKi1y4WAze1qfoL4AL3jcc2BuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=riCHAqmFIsZO9jrKc2jOkwHPJnV61THtwsBYYgA/Scc=; b=Ih+oRF+f+u36PNIRu5NGF5PdNsemzWv95/D3ACVkL8Vy7377ewJcmIAqUhHSh4VM/LNBo1oSFO+/OM7vndp+pVAWWmVWEn4fvAQ4ke7zY6GumWBMJSb/TWumGQK4rX04OboiNKOejXv6iTE4g6/yeg6gJ76Ho5WwzfB5uGRxF/yamBu45Dxpp1Mwemur1td+0DkVtHb8daTTpFCFrdrxD9g2FIGMHoxB+AqHuhXF2MSD34ohnSmlN0UibJYhSlk4u28fWKdknI+VGX1kt+9726zcQbDLCpg2DjMkQSC+1tzQC8PwYA2TReveotjB2AXC0EGjObmB5JRD9nX32+wfmQ== 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=riCHAqmFIsZO9jrKc2jOkwHPJnV61THtwsBYYgA/Scc=; b=hAogCuqfluO8fW1EFGJ0T8LzfEqfcNtgqXjpJksai0okuFgMkiPF7QqQ9U7YEZsbl0dBPhSUhe65uclFTe8ql8G/WJpf4mnlFLj1q87AeOcGibiZ1KMOrI5WDHtiePZPCjgOk5LZafQdhfbpCzyvElvCimH+66bep2FJgplr9ck= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by CY4PR1101MB2071.namprd11.prod.outlook.com (2603:10b6:910:1a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.9; Thu, 13 Jan 2022 08:56:22 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:56:22 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 22/31] staging: wfx: fix structs alignments Date: Thu, 13 Jan 2022 09:55:15 +0100 Message-Id: <20220113085524.1110708-23-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5fe06267-ad99-4db0-d62d-08d9d6729207 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:164; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vfy4/UAQcY46wi414uoVPeCUsj/rTiETyO6t44O8VDfQePbwwqow7h2+BtoDJjENxFNs1UTNuogeVTMIb5KCpsZB9Z/mQQgJh7NmenHP8fOymk059wGlAcIkXktLxqW0S4xGNeUHB9TbxGl2hfYaAGK1/7HYIkrSArkZwTP0Y3m/c3or2GdtNvZ9ZfvKx9SU1OwPgFzGgvkoP3jDoOGHHPfkMXYz3zvOHZFg34VNXC3SK1jP05gZru6uH/FC1xZNqOMcgi6NqNmGkZ217xCxNIvnabHhwbWFpgRPltc2J6n6xMylvM93uO6zqVxqQRC+KjkEi2qRv6GxWEPLnjQOtDp6OJ2ZW/qeY567a9VrA3dHb7y44U//2U8wbnvpUbr/VD54ZSnBuFPula24IywK+zhPGUJdP+Em+OjRn16LbzLhRZT8oLKqWBcumJNWTuwvr0G2SbkNGxvnjVwZ1JlxxGi2C7kpY4BkceeX5wBv87A+pUSeEPE/UAisODn5apVpzOPt1VGfqpsm0gLR0NfAg8+crlUm6tqwJoirPGzKoDJN+TgNeHRy0OZc4c9Q9zPTTRa3ebsSSerb1KBDce4Xe/HVQECVnJT8giWUfRLnETffFhr8ZM7J6CY9Y6E4pakYFsAZEN9xarAngWrVEuOkOQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2616005)(66476007)(52116002)(8676002)(6486002)(4326008)(66574015)(38100700002)(8936002)(83380400001)(6506007)(107886003)(66556008)(6666004)(36756003)(508600001)(2906002)(5660300002)(6512007)(1076003)(86362001)(186003)(316002)(66946007)(54906003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?8VYXzoySESLCi3NQbz1Ulsj9qDxJ?= =?utf-8?q?QXpYP37gX9UgBM7PQmGMFkhMj3GkMat1/olcC2luIwwIZ8hC1AOqcN1pHA18qD16N?= =?utf-8?q?aZCI8fBs4Ir5W0fZqCILnEYv8tHdoK8kgu77mJqH2pJLPm8ZO+bGReQKyrOM58/hJ?= =?utf-8?q?CDOfa5n0L0zxAAkf+osiRjMrLbAoI5tE1jwx5czmEO927ysIzAfB93iKEJEIr6P3T?= =?utf-8?q?v5GDp/djdo8QcBvPSeEdTkqmjOjAXvRxPet++PyHq8yLLS3Ig5EMabYe/r3w7uqZo?= =?utf-8?q?lH9QSpZQ+xKqk6VyjTXBrDtte7hm2qRxa8jBSwxwNbzuoaZaBkvoTs25EERUJubMy?= =?utf-8?q?vk2tOsBc5xDvHXaaaZ2ZH3r/cKYmFZqD9F818rLFtmTYYF/BjyR5dp1MsfuWzAuq/?= =?utf-8?q?Q9ToqfFo57VDDv188Bh9RwxN0VbfIpeAxsoUK/03ixM0G8HUkN2J1HlFb9IT2ipRj?= =?utf-8?q?USBJOHUoD6Zm7Ff+PLcB/nGVnZVXKQLnmuMHFHMuEnxEZr9eDOHDqIFHtyLNM18ik?= =?utf-8?q?X257ZQK1bmlthgepo2nMW4Iug8BXhDbvypqc8i5sIHWjfu+4yluTC7ZxULhVPl7Ut?= =?utf-8?q?+3UIrmwf7ZR5MjRqj6slNqQ+/mxh8VRp9FHko9A11F6cxaG6Oi9aTiW2PrFbJs79i?= =?utf-8?q?7BtRkxCRgqEEnD954SHSWYZKPk2n4XuMJMx8xM+zo4nK4tY9OmdHA8Lp4BqdwRpjX?= =?utf-8?q?OhtKBX2cMEalnxAXdGnipiDUkgRukSru23QHx57EIxHTNq7iSo5FGu1byeHDMIMJS?= =?utf-8?q?NUU5n4Jo90oJmUXAnl6iMBo+uYOuyE3P2ZPVV71JFktmb44ESwGTqe2HN4BEObyTq?= =?utf-8?q?SE9raEp+TnB1d/TRZOU3u9lIquMcuTRiCshTqHICDR/u3c9S+5qk6HJIkUcjSjIka?= =?utf-8?q?wADwNO35QKN/oG+iFgE+xBzF0kj2/igA6iJyKl814Rt6kx3QtPacYbk8gbE+SMByT?= =?utf-8?q?nngeY0Ww53Db0oSQRwpJLC0oTj0+Qi3winUCpDxWxxM6MPnRxaJHUKoaFNeNY4WUK?= =?utf-8?q?ZhjLGrSRG/QsOKuMTYDLPEZTwjEbBVVp7lLsAuuPxf6WrSsNwpAOlCaDdFkpZWEig?= =?utf-8?q?woIZZb7+y3a6dM+IXdBL+bMASFAX0QRARViKEwrOdjoVxEVcgETt/Nv6eNfoYbWAQ?= =?utf-8?q?sQnjd+Q3uwVY75823EMA77nWCRrMYodi7uDBBVIc/DC91COiXDLxjUaxc49KiFzHi?= =?utf-8?q?Jx+EgDILIfSfDP6LnItYQo/RyVvIr3NVNgo4XR1JGoMOCdO4tH8MSHbW8lSXpsxts?= =?utf-8?q?uu6pguhv1c2QWKxGaIKEhCohgquet3PlGCbnafrsHVlOoTtwoLWQVT9LL8klwIY4/?= =?utf-8?q?302SaOz0vdq+OTeHlwxtq6scA/XOCrjqlX87ESQZLG9uGLe9hFtURQ7TrNnVOa7qi?= =?utf-8?q?dZ5l+W/Ky5TtVWtqJ7dOQvoe5W35rb2bJBr1o5ghTrY1o3AA0QUjuSA5s9c0VRIGQ?= =?utf-8?q?B2vGc4z5scjBIkH8SmxdZtsejYPZ+lZrs2oaDxFVPQFlK6VfuqRrdhHhgr1YcWAeC?= =?utf-8?q?Hd1Z2IGk8lxEC6CzgC8sXLdeqQ+6QfatXbApPnFEPbZNX3vBPAN/+qphQYGIGqcpg?= =?utf-8?q?Ezb46DttA6eclAq/G3/jDXlakvQ/u28GHKBjaQny9oERxJ4Grd5EqQ=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5fe06267-ad99-4db0-d62d-08d9d6729207 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:56:21.8769 (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: fKA0d57vyQl12PlDQ8QWtjG7TWMyqXdElDZHRWA3Vv2A22/A4cPxKJCjT5br2ol8eeTV5q8C6+9ejsVanBPo7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Some structs members were not properly aligned. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus_sdio.c | 12 ++--- drivers/staging/wfx/bus_spi.c | 12 ++--- drivers/staging/wfx/debug.c | 2 +- drivers/staging/wfx/fwio.c | 6 +-- drivers/staging/wfx/main.c | 54 +++++++++++------------ drivers/staging/wfx/queue.h | 8 ++-- drivers/staging/wfx/wfx.h | 80 +++++++++++++++++----------------- 7 files changed, 87 insertions(+), 87 deletions(-) diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index a3da661e355c..4b77df2f463e 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -157,13 +157,13 @@ static size_t wfx_sdio_align_size(void *priv, size_t size) } static const struct wfx_hwbus_ops wfx_sdio_hwbus_ops = { - .copy_from_io = wfx_sdio_copy_from_io, - .copy_to_io = wfx_sdio_copy_to_io, - .irq_subscribe = wfx_sdio_irq_subscribe, + .copy_from_io = wfx_sdio_copy_from_io, + .copy_to_io = wfx_sdio_copy_to_io, + .irq_subscribe = wfx_sdio_irq_subscribe, .irq_unsubscribe = wfx_sdio_irq_unsubscribe, - .lock = wfx_sdio_lock, - .unlock = wfx_sdio_unlock, - .align_size = wfx_sdio_align_size, + .lock = wfx_sdio_lock, + .unlock = wfx_sdio_unlock, + .align_size = wfx_sdio_align_size, }; static const struct of_device_id wfx_sdio_of_match[] = { diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index fe39b4cb8194..417bb74c88b9 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -164,13 +164,13 @@ static size_t wfx_spi_align_size(void *priv, size_t size) } static const struct wfx_hwbus_ops wfx_spi_hwbus_ops = { - .copy_from_io = wfx_spi_copy_from_io, - .copy_to_io = wfx_spi_copy_to_io, - .irq_subscribe = wfx_spi_irq_subscribe, + .copy_from_io = wfx_spi_copy_from_io, + .copy_to_io = wfx_spi_copy_to_io, + .irq_subscribe = wfx_spi_irq_subscribe, .irq_unsubscribe = wfx_spi_irq_unsubscribe, - .lock = wfx_spi_lock, - .unlock = wfx_spi_unlock, - .align_size = wfx_spi_align_size, + .lock = wfx_spi_lock, + .unlock = wfx_spi_unlock, + .align_size = wfx_spi_align_size, }; static int wfx_spi_probe(struct spi_device *func) diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c index c62cb5fea4eb..ae7895ea36d9 100644 --- a/drivers/staging/wfx/debug.c +++ b/drivers/staging/wfx/debug.c @@ -75,7 +75,7 @@ static int wfx_counters_show(struct seq_file *seq, void *v) seq_printf(seq, "%-24s %12s %12s %12s\n", "", "global", "iface 0", "iface 1"); #define PUT_COUNTER(name) \ - seq_printf(seq, "%-24s %12d %12d %12d\n", #name, \ + seq_printf(seq, "%-24s %12d %12d %12d\n", #name, \ le32_to_cpu(counters[2].count_##name), \ le32_to_cpu(counters[0].count_##name), \ le32_to_cpu(counters[1].count_##name)) diff --git a/drivers/staging/wfx/fwio.c b/drivers/staging/wfx/fwio.c index 24c314b10b95..9005a6fe48c8 100644 --- a/drivers/staging/wfx/fwio.c +++ b/drivers/staging/wfx/fwio.c @@ -64,9 +64,9 @@ static const char * const fwio_errors[] = { [ERR_INVALID_SEC_TYPE] = "Invalid section type or wrong encryption", [ERR_SIG_VERIF_FAILED] = "Signature verification failed", - [ERR_AES_CTRL_KEY] = "AES control key not initialized", - [ERR_ECC_PUB_KEY] = "ECC public key not initialized", - [ERR_MAC_KEY] = "MAC key not initialized", + [ERR_AES_CTRL_KEY] = "AES control key not initialized", + [ERR_ECC_PUB_KEY] = "ECC public key not initialized", + [ERR_MAC_KEY] = "MAC key not initialized", }; /* request_firmware() allocate data using vmalloc(). It is not compatible with underlying hardware diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 028d7e53d66e..217c0c5c60d1 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -121,34 +121,34 @@ static const struct ieee80211_iface_combination wfx_iface_combinations[] = { }; static const struct ieee80211_ops wfx_ops = { - .start = wfx_start, - .stop = wfx_stop, - .add_interface = wfx_add_interface, - .remove_interface = wfx_remove_interface, - .config = wfx_config, - .tx = wfx_tx, - .join_ibss = wfx_join_ibss, - .leave_ibss = wfx_leave_ibss, - .conf_tx = wfx_conf_tx, - .hw_scan = wfx_hw_scan, - .cancel_hw_scan = wfx_cancel_hw_scan, - .start_ap = wfx_start_ap, - .stop_ap = wfx_stop_ap, - .sta_add = wfx_sta_add, - .sta_remove = wfx_sta_remove, - .set_tim = wfx_set_tim, - .set_key = wfx_set_key, - .set_rts_threshold = wfx_set_rts_threshold, + .start = wfx_start, + .stop = wfx_stop, + .add_interface = wfx_add_interface, + .remove_interface = wfx_remove_interface, + .config = wfx_config, + .tx = wfx_tx, + .join_ibss = wfx_join_ibss, + .leave_ibss = wfx_leave_ibss, + .conf_tx = wfx_conf_tx, + .hw_scan = wfx_hw_scan, + .cancel_hw_scan = wfx_cancel_hw_scan, + .start_ap = wfx_start_ap, + .stop_ap = wfx_stop_ap, + .sta_add = wfx_sta_add, + .sta_remove = wfx_sta_remove, + .set_tim = wfx_set_tim, + .set_key = wfx_set_key, + .set_rts_threshold = wfx_set_rts_threshold, .set_default_unicast_key = wfx_set_default_unicast_key, - .bss_info_changed = wfx_bss_info_changed, - .configure_filter = wfx_configure_filter, - .ampdu_action = wfx_ampdu_action, - .flush = wfx_flush, - .add_chanctx = wfx_add_chanctx, - .remove_chanctx = wfx_remove_chanctx, - .change_chanctx = wfx_change_chanctx, - .assign_vif_chanctx = wfx_assign_vif_chanctx, - .unassign_vif_chanctx = wfx_unassign_vif_chanctx, + .bss_info_changed = wfx_bss_info_changed, + .configure_filter = wfx_configure_filter, + .ampdu_action = wfx_ampdu_action, + .flush = wfx_flush, + .add_chanctx = wfx_add_chanctx, + .remove_chanctx = wfx_remove_chanctx, + .change_chanctx = wfx_change_chanctx, + .assign_vif_chanctx = wfx_assign_vif_chanctx, + .unassign_vif_chanctx = wfx_unassign_vif_chanctx, }; bool wfx_api_older_than(struct wfx_dev *wdev, int major, int minor) diff --git a/drivers/staging/wfx/queue.h b/drivers/staging/wfx/queue.h index 2860c56fb933..4731debca93d 100644 --- a/drivers/staging/wfx/queue.h +++ b/drivers/staging/wfx/queue.h @@ -15,10 +15,10 @@ struct wfx_dev; struct wfx_vif; struct wfx_queue { - struct sk_buff_head normal; - struct sk_buff_head cab; /* Content After (DTIM) Beacon */ - atomic_t pending_frames; - int priority; + struct sk_buff_head normal; + struct sk_buff_head cab; /* Content After (DTIM) Beacon */ + atomic_t pending_frames; + int priority; }; void wfx_tx_lock(struct wfx_dev *wdev); diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 565874815aa8..0fc8366d9fb3 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -28,68 +28,68 @@ struct wfx_hwbus_ops; struct wfx_dev { - struct wfx_platform_data pdata; - struct device *dev; - struct ieee80211_hw *hw; - struct ieee80211_vif *vif[2]; - struct mac_address addresses[2]; + struct wfx_platform_data pdata; + struct device *dev; + struct ieee80211_hw *hw; + struct ieee80211_vif *vif[2]; + struct mac_address addresses[2]; const struct wfx_hwbus_ops *hwbus_ops; - void *hwbus_priv; + void *hwbus_priv; - u8 keyset; - struct completion firmware_ready; + u8 keyset; + struct completion firmware_ready; struct wfx_hif_ind_startup hw_caps; - struct wfx_hif hif; - struct delayed_work cooling_timeout_work; - bool poll_irq; - bool chip_frozen; - struct mutex conf_mutex; + struct wfx_hif hif; + struct delayed_work cooling_timeout_work; + bool poll_irq; + bool chip_frozen; + struct mutex conf_mutex; - struct wfx_hif_cmd hif_cmd; - struct sk_buff_head tx_pending; - wait_queue_head_t tx_dequeue; - atomic_t tx_lock; + struct wfx_hif_cmd hif_cmd; + struct sk_buff_head tx_pending; + wait_queue_head_t tx_dequeue; + atomic_t tx_lock; - atomic_t packet_id; - u32 key_map; + atomic_t packet_id; + u32 key_map; - struct wfx_hif_rx_stats rx_stats; - struct mutex rx_stats_lock; + struct wfx_hif_rx_stats rx_stats; + struct mutex rx_stats_lock; struct wfx_hif_tx_power_loop_info tx_power_loop_info; - struct mutex tx_power_loop_info_lock; + struct mutex tx_power_loop_info_lock; int force_ps_timeout; }; struct wfx_vif { - struct wfx_dev *wdev; - struct ieee80211_vif *vif; - struct ieee80211_channel *channel; - int id; + struct wfx_dev *wdev; + struct ieee80211_vif *vif; + struct ieee80211_channel *channel; + int id; - u32 link_id_map; + u32 link_id_map; - bool after_dtim_tx_allowed; - bool join_in_progress; + bool after_dtim_tx_allowed; + bool join_in_progress; - struct delayed_work beacon_loss_work; + struct delayed_work beacon_loss_work; - struct wfx_queue tx_queue[4]; + struct wfx_queue tx_queue[4]; struct wfx_tx_policy_cache tx_policy_cache; - struct work_struct tx_policy_upload_work; + struct work_struct tx_policy_upload_work; - struct work_struct update_tim_work; + struct work_struct update_tim_work; - unsigned long uapsd_mask; + unsigned long uapsd_mask; /* avoid some operations in parallel with scan */ - struct mutex scan_lock; - struct work_struct scan_work; - struct completion scan_complete; - int scan_nb_chan_done; - bool scan_abort; + 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; - struct completion set_pm_mode_complete; + struct completion set_pm_mode_complete; }; static inline struct wfx_vif *wdev_to_wvif(struct wfx_dev *wdev, int vif_id) From patchwork Thu Jan 13 08:55:17 2022 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: 532412 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4EE0C433F5 for ; Thu, 13 Jan 2022 08:58:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233378AbiAMI6O (ORCPT ); Thu, 13 Jan 2022 03:58:14 -0500 Received: from mail-dm6nam11on2067.outbound.protection.outlook.com ([40.107.223.67]:58624 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233422AbiAMI5a (ORCPT ); Thu, 13 Jan 2022 03:57:30 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OOpxyhhfsHfF8iV+FF5mgYaTOiJqdJnicOX9JSiPUMKx7WNtc8J8Gs4pb2ivgEhTwknKtWoefh09M/xeGE3aAxnD3Ds62G/t6cs+MtveFgWEFRC8Wa41ZDSmNPE7JauNpw4UG10+SB+oA/pATpBHBTzgLe7VwSF0lUbz+1V/Zh/TT0cw1UAKYqKS+ulPNqWtLG4t+ihM88geovCT2lQCkDrM/4CeK3uA/vYrO2VZbr8hcmIMSoi7PXFFzNx4CN3/Pjt6MmkZ28GaXYm8X4MiPd6pp8CLgZ9MEeB1CScayqsQ7IS1gsZLDuesAViyJMzcx9TVOBISMGFTMxPx/SGFyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pG21vyC3xFQoCuo6lUwFIbPoAQR3xI8/mNdq+O8nT/c=; b=MPLfVhhO7FECaLzWTWKqqBD+mU6UKDjAUClofWqDxx/ATXU7BNVSuKSR9cR5uNmoPHbu0aHnQkFxV8lLg6OTPS6dle9yS12sG5px9L3ad+D3RK6QDjoFGIA50m1OuqPG0Pwfj7wmge3IW/hNc9OLxscPUS1w2TUfbpHAfLe5pa9nqXdp8sskIVXmcfsbh4HFCkVk4ziLk/cP5kHq1hOuY0q1Lp25KN4D5/gO1aTJlGhdnfcPDqjEqNlx1KoWpmAkawfrEhBuwNxGVPuEWomiFn6bl7Aa3VdDMDIqVk/hMEj0EL0fFtxIXjd6pfCtkRXCatRYdF1dIv4tMZ1R7jJiDQ== 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=pG21vyC3xFQoCuo6lUwFIbPoAQR3xI8/mNdq+O8nT/c=; b=LVM1o/0nq7TVnVbfMAtWxC/1Lwgo9ka3KnEFCYMyhwqaAvtcXD38PZQD1nHxtm6PnV5lCacw0njRdrqJil73RDnp8OBtjXiGb5dGqgfDV8pP14UoY71gC8AhTuJfxm8JI1Qr8FP1ks84QQnPR7q225lLMQWtg0wzD4iPt2RwDas= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by CY4PR1101MB2071.namprd11.prod.outlook.com (2603:10b6:910:1a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.9; Thu, 13 Jan 2022 08:56:26 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:56:26 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 24/31] staging: wfx: replace compiletime_assert() by BUILD_BUG_ON_MSG() Date: Thu, 13 Jan 2022 09:55:17 +0100 Message-Id: <20220113085524.1110708-25-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fe5f0037-45f6-4e9e-e0f7-08d9d67294d0 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ 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: XXQNQm7RvCQmVuFZynaP+dfeRtc0NudZVkT0DWuYoIwYKc9tY9aZ8eRWkWsvbDbzJtJXXO72iVyySqZoPAavNnXbg1+py4RNiNuc8O9hjTqYIh4SJ82uQbrUGVpzV39HccpAr1Aua2hW3So5sc2KodhFofe3FGjV+XmM8ONzSP8qZi/J1wDctIAw2SNsrQyN9coAA9cTxgiwreNpCd+AydLwdAotSHIWz/SeglTmxx4sQ5PzvxHT+VGx4TsU0t1HMWhyK3arzv9LkK1aqV2oXF5J12gxepqVM9TakSS2WFo2rizKQ/URTc/Q5+i0l9t8rXHUHyK0x93P2cNEKngnyXGvO+LusvkLJpbchDQda4MBaPyTXVci0dF7CJXFgNYtpHLq6dIhZprb2uHB30d2b5ZDq4xJQeMoPi0ZcUPkvR9w7efS6+rDALrOWSKkSPzNAYEXX9H66HtK3PtwSsEN16VI0YYUcN1ZmfCi6b0vxclvTVrGb/T7HVCNQFQR2LMqtqwVfK50VZpm7ipqKtcSFeGJgdOUp9VCMxfqc/I2ECKXp9aWC3xq68FnRua/N9dGiVm20lrALkyU5QzNE/p7hlyMBLIUbiDZhoaZZ4Hc6Oi/Z65pi9T2lXvPCxi4e5xyugnQHPux4zIaHitYOAXMxg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2616005)(66476007)(52116002)(8676002)(6486002)(4326008)(38100700002)(8936002)(83380400001)(6506007)(107886003)(66556008)(6666004)(36756003)(508600001)(2906002)(5660300002)(6512007)(1076003)(86362001)(186003)(316002)(66946007)(54906003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?AKcALdLaIjWkkKRAVy/N66qf39ph?= =?utf-8?q?Fu/h6q2m2CKDgSCzCOt8soPoIZVRIBR2DlaeG0XN8gsmqE6ZQjtFBfJY7djZ1A2Ym?= =?utf-8?q?V6SPyDd07t7ka2WnCv91mPZNenukMCD1XjJlx7I5mRMkWYNkN/T37EZ/lAd+WGmOR?= =?utf-8?q?VWYFHpCpWOnG9QskPgmAEYlHssrQbiOhSrQfXMSv53a+L2ZUgUPLJujLU3AYpIQ9k?= =?utf-8?q?xzfGv0c0/0XeGEljOjFBal2vZ9A6HgQZImp+ff+hhpZKv3MJVZTqWEXZUzWoQkK9W?= =?utf-8?q?HkjjlwhX5FG+lKX9U66UVS59au1i1mqowSrwloEG6eRCoIyTIVf//YxNb8wDsTctu?= =?utf-8?q?9ociDMPDrTWhrkuWMWDAcAWPkWW83U4k9zjOmvHCdrsr4+yCyTSuV9CdD9kIEykKq?= =?utf-8?q?Hl6rF+bXqUFR26SeQiAFqvv+mzgQkQx8mpCJzweGg848Q1l7WU9V3kjJjgQVT9IzV?= =?utf-8?q?/cd6aVaj9d/K73VZPvCszgYrIfS1CzHs0yRy8nvRNZTYKoX2EZKNqOn5x92cGCPNT?= =?utf-8?q?V4DSfJEcAnfdZBpcZDZg499Lk5cTVj0sJ/5wYi+ytczt5fgOzdRbwJPZFgRv34ywD?= =?utf-8?q?jnw1GxHLYgLsvj3HwzuG4CZYc2b9/55NJYZfIWTbyC2/uYEeHE5Gdiu+g4DB1A/HX?= =?utf-8?q?Xf/yahl2kS16qwD/Akl9yZ/vL/AYZH9KO0LcWHa18cQZNJWSFkb7JEqxmyNVshHVo?= =?utf-8?q?kF4xSK+qOi3Uup6P75e+gIeyyRRif1vK6YkxW723cldzT/Aa5PpEG+W56431X3ClY?= =?utf-8?q?Pam+qFj0YuZxJnaznnY3FVh7wSYAJducJ7+IDNymWBoJuIdhFsR3m/ywk5wbtoCvL?= =?utf-8?q?BaetvfsrpwVL9WlIixN1EFsAgEpV8GrWpaG3B6xRN+BnALwHvNfMHWTb5/rJE+Hax?= =?utf-8?q?Aio6DlD8TgpnYUGYhASp65IDRc0qypSjoGvtFWLdhWN+zOdzdUX/jeiOiviWXubKv?= =?utf-8?q?MHyHrOIi5/6GhsQQ/HUbW3vkDzkM0J7HruWQtGtuDkZh8HeFFc/82I+e5nTfRiNRp?= =?utf-8?q?Wsxe/Oe/mLX0Mu+3lW2x2qcT/+Z5sERzb55UKvuETDfPecrlluhIL17eK+ibx4PRu?= =?utf-8?q?WmzLMnDXD1qzZl6nHaTT/amFT8KNZTod/+45m8Z384mkQq8KzHllFR2ZmBegxHfh2?= =?utf-8?q?ajiy44o7p9Yw411yiAgb5yZ6B7VgaJeqACzdD6a85yX1IY3+qnAtp/C+lklE+JKra?= =?utf-8?q?UACT4cxAWpHVdGxJEfjSddQw/UsI6oOqz+joUWVINmRp0xkH9u3IVtLFwopik55Nm?= =?utf-8?q?KenOAHYlg9nSDsJtb4mTppt+MCawGlZTfnxbOE24Y+42XX49mlB31PzUeAUuDhtH+?= =?utf-8?q?hkqDZekIP6SCVJCrPznVmzK3T/TBfl02o+QhDhybEQMwxkqj0hEq78HXLgKndB77v?= =?utf-8?q?Q7bzatJqEWQ0SBaKjOfV/S/7lUiCagPJmyeq6J6m52ktJccfGNgWlzxOlJhDw4uq6?= =?utf-8?q?X3vRdY8FPFhmNo2mKuPxb98EZecQ5Nr1XkCLGEJjv2KPhvqAhjh+OIL022cJlV1QH?= =?utf-8?q?ezW3JWRqtFmlTJkpUpymz787M9JWyDQdYnbDAKUe4QSYtmwn+E5n7Jie4FuboJKqr?= =?utf-8?q?Qmja8NcxXGN/XX6YKXMTLaDtjtAuQKdXrSoU0Y/+6eeDcn3+Pbp6g0=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe5f0037-45f6-4e9e-e0f7-08d9d67294d0 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:56:26.3156 (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: N1DAGF4U2NOiFKHoEGJ9IEk0HFtPmmhwP10rd86i/I4bW0JptZIYjlt/ennYef4cl90GIfeZa4ka64iVbJP/Lw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller It seems that BUILD_BUG_ON_MSG() is a bit more popular. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/data_tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index ca2f24b92d24..bfc3d4412ac6 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -391,8 +391,8 @@ void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, struc struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; size_t driver_data_room = sizeof_field(struct ieee80211_tx_info, rate_driver_data); - compiletime_assert(sizeof(struct wfx_tx_priv) <= driver_data_room, - "struct tx_priv is too large"); + BUILD_BUG_ON_MSG(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 */ if (tx_info->control.vif) From patchwork Thu Jan 13 08:55:19 2022 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: 532411 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BD6AC433EF for ; Thu, 13 Jan 2022 08:58:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233485AbiAMI6Z (ORCPT ); Thu, 13 Jan 2022 03:58:25 -0500 Received: from mail-dm6nam11on2085.outbound.protection.outlook.com ([40.107.223.85]:34208 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233451AbiAMI5f (ORCPT ); Thu, 13 Jan 2022 03:57:35 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fC652Ts07GlJdedmizfA/TNirWD2yFP+6HwLwV3b22LDzI4Oy9VrxN2l6QKNK3VV/hpnZMEAmV1GmSKHFCUhPhuG/vBpJiJtNtyUg9+aYqL6WGa+HklGDPCiCBS7SBjilHdFlUyEX2M8TeBmkP9hOhCxJeq9aiad94RznfQQViNMefINe8981z3kz0CDTr2lOS6ieBzz4IfkVRU4sV3WqBILAk41ZlARyTFugFwnsG++r8ufIBOZQW2sgwi8MQA1kfLsvxHxpw+hDj8ewYSXY9K58xcprE7WPB3MR57bM2MNfc9lrF1K+Zc/WEiNCAp7TfPJwvLkaeCBgrcGsYxaUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dg4CGuc2nBytV62h3DFwdZV0CKyHJG+AG38cTB1YZVo=; b=HQle/gQhQ8iBQNJT1ZrGRaytlqBeTHNkR6dyhwEZcN8gOeYTa6ptE/1ZIQOs1AOYw2bypj9l9O7PVHSjG4vPdD7L8vulpBqTsr2WaWQLNciyITK/eNlUCrC/xwvObbxrcGoLax12Xjhf/aiEH5Ee5j53LWufsPrFJOnS2mTTf+82GoHQHQdZTOsFCaXDmy+pqY+3hCyTA5T2YVRwQgnSPfCW3imMnfzf/zSQAQXpXkvClPUDkN7KIX2Z8dFmFao7d8zfhBA4qRa3HeVXaCoIIgDK5bE1vVhSLMhzvZWlwaKtavVoluu/GYIfY0t2nFBBKabkYiNOrwUV8KITiAPzEw== 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=dg4CGuc2nBytV62h3DFwdZV0CKyHJG+AG38cTB1YZVo=; b=bSFfTNOhONyJvgKCtF4xCCcm1VlS2IJa3Dvu7O2RAcS7n0HM7OdnL+bbLPlwRh3f2SPpT18VEzSxs96b7o/f/M2RFYIjKAM5rOnkwv8KoTADEwT81I0FtOs2lODhRKDdXcwnWHU8/aSYAs5KwAddNAjCQMauFlPnIhbvlwkr8O4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by CY4PR1101MB2071.namprd11.prod.outlook.com (2603:10b6:910:1a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.9; Thu, 13 Jan 2022 08:56:30 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:56:30 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 26/31] staging: wfx: remove force_ps_timeout Date: Thu, 13 Jan 2022 09:55:19 +0100 Message-Id: <20220113085524.1110708-27-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a55299d7-24df-4827-e9d6-08d9d6729769 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2201; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t11hr28O5GYoK4hRX6VUlLX53HNMqAsNwjajp/gehn0Is2TSfpjNUpWiN7Bwg4g8gsfXhx8vKz9SO76fg6lcb4bgS13RLarLqHKjbK+tEiHTri2mu6ptb8OJLmu2a6SKaOxIWR/siHNEtHbkrWjuMzPvEnrTx7byiTDLdk4R6ILwSN2IpxaUK86ujZ5/F5x0tM5DEbwNwhA73XcGTNAt7iM31EN6ZGhNF+vtumc3OnX87W49HZW8+O7tBRubzCciGcYBBi9R67qUWbn2NepsDuQR/yifK7QsAqwFvflo2HbjGXVsIwMammfij8eWcWVWnUf0Ud1+kDlsQL8neUzq1Zi0OsShiV56MKGOAsWcQOqDjYpKnQeVloGxWup8v7HAgMB11ybDEfXd8MsnjxTL7HHlnY7cBLS+NdeSfaR8ww2jmvKe4HI97fm6H7kRBdO1WUSEvDiBBf9pQg21m4ivboa0i53XTzObHJz8bmW50T+iVe4yz5tNAtmeE9UtNZPBpbREWluSHPTvbR9T57eOn6sYMxHu3MdsJSDXNQxRLIK6LvIdm0uz+D6ESNHzadeEytaMMFKThsycvFpHJkKQhs28QKP50OCfkSBiOz9OwgsbEvSY+hPdwsjE2mmOZZ8JjB0Jg3U1J0egLBo5qjMYlA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2616005)(66476007)(52116002)(8676002)(6486002)(4326008)(66574015)(38100700002)(8936002)(83380400001)(6506007)(107886003)(66556008)(6666004)(36756003)(508600001)(2906002)(5660300002)(6512007)(1076003)(86362001)(186003)(316002)(66946007)(54906003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?4bkgQOPaVXYHd+KUewJRAZW12MfN?= =?utf-8?q?vizPwqRFAVDmM8HsUQ9aaAZgUbFhDm72HNSJ6mWStfZV+DaGwN9yJu+j7ifgyLc6l?= =?utf-8?q?4DPnbqwpTMruf/zDAFAjEBR/OyAAAa27yb6uJLKk3jxraI6qM4+jjuJh2uEp6TROu?= =?utf-8?q?21ZbMtk0ab/4oHfzWHRhzb8oE0I6SS+7kKRlvxDwxUzTLdsjTEYmGuKmHun8raY+H?= =?utf-8?q?BpT+07r/ryDkIQ4uC/hvuAZwQsrem6yB4pDiYwxxYtVxrBzuG7r+poGlDKXUYlu3Y?= =?utf-8?q?TTViBvFWPYybXZqd5ifSSNIWpI0VYmXWseIwihv+1LOS+w8VF2/ULvZtxwb4E/3Oi?= =?utf-8?q?mhztODw2/pVMPi7rff1fSDBs04nnenwnVf+T9Ord3B6QG+cT3pMh4Sx0IdXsk6BR3?= =?utf-8?q?PhcZ9Jk11gzYqMjI6rZwnLEmKnyO3eCiqCbGT0jvupsFUwLM80c+OepdAyRdqZxCE?= =?utf-8?q?k6n0yt5TepENQp9E4m9q9MGOJB6FDrwAu3yRTzgnXuuj9vrrj0T9jsPbiX2DvTxLs?= =?utf-8?q?7wy0bgXMWgz+fN7WVlZCBDamjYiOLY6LQDI+wx7bwANJxtyIWLBgiss0TaqJxKnqX?= =?utf-8?q?VX8Zi3da6GJ+PM0yBD3KeZUKG3sbTaRYS3NlBE1T/GBU+Lb2/8WDLMJ563D1F0jjZ?= =?utf-8?q?Kmt/RT/KrLOj4EPmMj6bD9taq76gZdW8DlocHYHyvXs5mG051KevHil3nawBxN4pe?= =?utf-8?q?i+48qjc36wAtFLEZOJN4Cez8LFFG5s2rSDoSPjYJksf4ZE0yyxtlSstyZjExkIEAJ?= =?utf-8?q?HxI8NdjA5MpYHHUDfYVWixIDD3li0XbGLDb7uxtP9mQvTHb6TLPJhqBr5MSKmZXWR?= =?utf-8?q?B4Wk8rUhYtiCf7CSY8bGZwn+1XesDJidyJQlPzqVuF8k1/1YzcOx5gLVB/Zx7J7wK?= =?utf-8?q?zBmZcYCb4fQisBlOmkiu6Eq2JtT2uKXJ9QKUTIj6DC5uQOnwXdtlaLARBorLPbcuk?= =?utf-8?q?lERVjvcqrNS6qJUGgf/SBFiVk8JhL98uU5IHgkQZvOPFuZ7PSnIf7viREsgqXUKqg?= =?utf-8?q?h2t3+N39xqcK7+2Pfk4BWWERG3c97zid7oO++l7LJlbK7nB1IUmTYot6oGZjx1FmZ?= =?utf-8?q?zVHc1TB/xuYS4lt4fC2WxLUFaBmFPZvi87WodfKX1H+xI3hfHb9rw7UjcrCdeWFlh?= =?utf-8?q?nflhCNMWeTnKMNltY7svhO4IdefUQopm2kQZRZGvbYGCjXt8D1Dd+JU1i9dtqwqlQ?= =?utf-8?q?WPjAFqb874oETy8pcY2CdWFmimDAD7RzMh0zt1VOQScKnfzTYivDrvSW04YBCKlka?= =?utf-8?q?W7GxtzeyxIebJetUMeNCGSHzOr+uxzINAVURk4dW49zxjO7sWTZn/onKNVuMkJ+ff?= =?utf-8?q?NCJUbZmJ/yt1BTuVIEGuQbNMwgLz5s5/qSYbImJCbbdbbrwP/NsSl/URUDdqwdkH7?= =?utf-8?q?8DhJ7pQqB6C5KJY5B0uZk0d9Dys2BnPd8jqqF9sw4k5Hddhq1Kk3UL6BFeURJ0eLk?= =?utf-8?q?uVRmmNcWFzvKuKrT7VF5o54xxe5otOAZrk8Gh9KOzkcfS3dWnHbTxp+yDNNj1J7QU?= =?utf-8?q?28c9GxTMNmCY4N6nalGYinhk0WaWA3PSPlILiNH07tUnALX2eejTCWp7nFh9hKVEW?= =?utf-8?q?OGdtCrREIT72DENX3MlEezhg32nrBcCaC7YBVJeG9cjkF5oXEL70Hg=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a55299d7-24df-4827-e9d6-08d9d6729769 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:56:30.6583 (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: RBBSlHOSZ0ABtDBEGkJ4YcVY+b5ghsrOVX/Y5+1UGxVsygjqpN+F2yGXBfpJ1yLH4ebRrF6NoIKIghRFrcWIdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller ps_timeout should be in nl80211, not in debugfs. Let's remove it until the driver is accepted. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/debug.c | 23 ----------------------- drivers/staging/wfx/main.c | 1 - drivers/staging/wfx/sta.c | 8 ++------ drivers/staging/wfx/wfx.h | 1 - 4 files changed, 2 insertions(+), 31 deletions(-) diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c index ae7895ea36d9..e8265208f9a5 100644 --- a/drivers/staging/wfx/debug.c +++ b/drivers/staging/wfx/debug.c @@ -316,28 +316,6 @@ static const struct file_operations wfx_send_hif_msg_fops = { .read = wfx_send_hif_msg_read, }; -static int wfx_ps_timeout_set(void *data, u64 val) -{ - struct wfx_dev *wdev = (struct wfx_dev *)data; - struct wfx_vif *wvif; - - wdev->force_ps_timeout = val; - wvif = NULL; - while ((wvif = wvif_iterate(wdev, wvif)) != NULL) - wfx_update_pm(wvif); - return 0; -} - -static int wfx_ps_timeout_get(void *data, u64 *val) -{ - struct wfx_dev *wdev = (struct wfx_dev *)data; - - *val = wdev->force_ps_timeout; - return 0; -} - -DEFINE_DEBUGFS_ATTRIBUTE(wfx_ps_timeout_fops, wfx_ps_timeout_get, wfx_ps_timeout_set, "%lld\n"); - int wfx_debug_init(struct wfx_dev *wdev) { struct dentry *d; @@ -348,7 +326,6 @@ int wfx_debug_init(struct wfx_dev *wdev) debugfs_create_file("tx_power_loop", 0444, d, wdev, &wfx_tx_power_loop_fops); debugfs_create_file("send_pds", 0200, d, wdev, &wfx_send_pds_fops); debugfs_create_file("send_hif_msg", 0600, d, wdev, &wfx_send_hif_msg_fops); - debugfs_create_file("ps_timeout", 0600, d, wdev, &wfx_ps_timeout_fops); return 0; } diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 46fd5702e471..a98a261f6d76 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -324,7 +324,6 @@ struct wfx_dev *wfx_init_common(struct device *dev, const struct wfx_platform_da skb_queue_head_init(&wdev->tx_pending); init_waitqueue_head(&wdev->tx_dequeue); wfx_init_hif_cmd(&wdev->hif_cmd); - wdev->force_ps_timeout = -1; if (devm_add_action_or_reset(dev, wfx_free_common, wdev)) return NULL; diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 83f1ac87e0f2..ba53e4d70c4f 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -171,18 +171,14 @@ static int wfx_get_ps_timeout(struct wfx_vif *wvif, bool *enable_ps) /* 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)) + if (wfx_api_older_than(wvif->wdev, 3, 2)) return 0; else return 30; } if (enable_ps) *enable_ps = wvif->vif->bss_conf.ps; - if (wvif->wdev->force_ps_timeout > -1) - return wvif->wdev->force_ps_timeout; - else if (wvif->vif->bss_conf.assoc && wvif->vif->bss_conf.ps) + if (wvif->vif->bss_conf.assoc && wvif->vif->bss_conf.ps) return conf->dynamic_ps_timeout; else return -1; diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 0fc8366d9fb3..6594cc647c2f 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -57,7 +57,6 @@ struct wfx_dev { struct mutex rx_stats_lock; struct wfx_hif_tx_power_loop_info tx_power_loop_info; struct mutex tx_power_loop_info_lock; - int force_ps_timeout; }; struct wfx_vif { From patchwork Thu Jan 13 08:55:21 2022 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: 532410 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F68CC433EF for ; Thu, 13 Jan 2022 08:58:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233593AbiAMI6v (ORCPT ); Thu, 13 Jan 2022 03:58:51 -0500 Received: from mail-dm6nam11on2067.outbound.protection.outlook.com ([40.107.223.67]:58624 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233316AbiAMI6N (ORCPT ); Thu, 13 Jan 2022 03:58:13 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HzHHX0TBdlgcBX5pY0upSTyWx9O6U44IeQGrIY8cUYgizpDbWrWfOV2j9YMWWQ388u4cQ3bhJVmr0f1Ge3whzD4fZr8BJYX66otC9txV/ZP8ty4NL1Nxl5DWxfkIqqTHrHfE88jpoX9ItzgfC95KPwXGCypO8vA43McNRgPg1KQ4CNi4f+xvR4H5TmoKwp0PgP9xAoctxBw5VaSyg/TPsOLvGFzbh/cDlkS2gZbCt7ZAbBTi5BlyVorJJnDkizVtopPPmZqhxOkXOuKu9WXRA2l7irrpqctCSV5X0V8jdHzDMM4iwrwL48s3VlJ+PgVddfQM/aE8EQzTh0BJ54ZvfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1aK6ov8zRbVG8S/MtvHDM7CeICXT7XcnjPMy+BeWdfc=; b=Yanhdu8j9v3YBSxbXohpaUMiu67Fag4PwvC7X6Kemt812mhOX6K8z1TtNy5h5dDP1d5mGrSfAhREZXlBFNRzLp1qPVfJfsYVVqv/AsAD1XBTmjY3tc4GzHVeA9Unb+HPcaKLwtXUDbJ5k6fpTfe1U3723xxeTUSpc0V3NwtMI7nqIS4sm4bPr9QanDRAVjptAiHCLuQww0lWjUqjhD91NS/rOCx4j2B/kVv7X4WIs0y1mmP4RtExy295p1Wj2oHzYLCWMi6y7c198efO1zHjWLLm9xURJKDPwTGhrNcZHcxjuzIEeDecHcu2UsS7Xecxl+1XqHvi/gciFbRhC9OJ8A== 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=1aK6ov8zRbVG8S/MtvHDM7CeICXT7XcnjPMy+BeWdfc=; b=KmCW71rWmEs5vjH5hcg27mIuBwUuIXrdZ7jf9RiHhJNHZyC7VGQ1Xpf691n5O6ScEeWJ8jJPo83IZmi7efHuDVDjnKEvm0RyEEH+wuFDrpZom7g3OUsZNHk/0Jl3y1Hda82syLAy3OfLkc04gbjI28ijpJFQW456I4MgdWN9Y2Y= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by CY4PR1101MB2071.namprd11.prod.outlook.com (2603:10b6:910:1a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.9; Thu, 13 Jan 2022 08:56:34 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:56:34 +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 28/31] staging: wfx: fix firmware location Date: Thu, 13 Jan 2022 09:55:21 +0100 Message-Id: <20220113085524.1110708-29-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d4e8539d-cd57-4abe-b40e-08d9d67299a8 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: t8jgKQIQxM69nJSHVx7+rtasFF+rzAmx47gj1JQSqj0ku9/qYPuKOPNA8qEMD7dPeU8U9aAekmV0NLysOgOIiOxXTGar/5pwKvs2IuzuhH4XgtApSHqnf98xgok+TbriGcj53Kl5R/yoXC+5zejteMIZQ50pIeEsrfZkGT++oaYciqSkWCqXsUC6kCQIlTuXdmHDregKRVwB/IuKkzfU7nc3MBDe1hjY9GKIShI6nnpNUhIWGoPEni9CFCcQNhwzZqEGbEqx79Vk1qBZYsNzfNinXGEj8ZmZi4PJb8mqPjTxhWV/rKoGamT9xfHOULGRa1cubi4X053qfAUf/2ZRG0CNWH6R1HzX/SO8hrMudpln8UxhZJVkdhTqvUWpbgkLfwHaKifOrtWzBHjgB938jNDPFkxRu5wMqM9tbqPRnJIIt/LtH9IzD3OuTllDAqyPSGFKo3VKm+V/WiI5Nmuosf60Ja9Z95FVnriv74mfsCkDeCoZltnO4zEv8q0LSAhL2YwDLTFA5gqPUDJW8GAYYgGu2Nwsoe2USz+CsOx/pXWYtgqa9rFf7t5vOpJNIYzKTmA2TuONc1hJZ/pwMJKe6eiaT33q02D2cC2cZ42L2SqzesP9VVwCq/soIkBy4X6yZamofItrG6y/0R/TNuJwKA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2616005)(66476007)(52116002)(8676002)(6486002)(4326008)(38100700002)(8936002)(83380400001)(6506007)(107886003)(66556008)(6666004)(36756003)(508600001)(2906002)(5660300002)(6512007)(1076003)(86362001)(186003)(316002)(66946007)(54906003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?no7foEAeN3upfOjeLUVcJP54IY6Y?= =?utf-8?q?XgJ+e2ObMWiwzAzrO9WyhwxdkNuaSjj/jzZbJT6G9jjOVx6vnu97oRX6NcEf9Ke10?= =?utf-8?q?yC7Z5Wt/KJw5uv4603oBAta90FCF1aKklruFG3Lt+MwuFBGnkrfBkBq4o5njRwTFN?= =?utf-8?q?Er2D6QVWtVs0l+p5oRNc71BPae0HMNvZUwUlFNe6VnkEPSiPqRRd56yzAsv7NrR03?= =?utf-8?q?lruwHJkkGRxoljUNr035LnyffGmlD71aEhiXIiN90gJ2y0oTmMYN7akTre6lpjm77?= =?utf-8?q?9GqU5fL3TWDUOJAP+7X0IhvInlPThG7yfZ1k9hlfnIfv+DsM9frAZST9NSEjEiuaW?= =?utf-8?q?JgkWcAGtZsWCL5dPvVy8FkSsYhpdcWaVML+lv4pI6J498ut3Fb6/vHLzPU9TNWK9m?= =?utf-8?q?bz1mbz2KbFBko3jkj1FxHjpFh4hnCJyzm9Aa8ZX9OH0zkZr1CTpesU8Hw4h88ZmU2?= =?utf-8?q?RMDFwqzUIoCRCzL9yGxQYWkxC/ajACEac/MKVQq+S3pkiEV3mQOK2UeewwbCJgR+U?= =?utf-8?q?/gGsp3pCmCAKo89Q/eksLUbxMxTte68NXbCvFqhAZrXl0uj+A+HNl3y1ISJ+xXhxV?= =?utf-8?q?4JtiecptzITM6obkdXpMXiPpohg2OQEakHVE2jEbaVEMf+JU8Q3RwTfTBXnqqhzuw?= =?utf-8?q?ObtxKjB8Gk+otxWhrv7Z6hkwDn6mB1vA/gK/4nZkxZ0Y7+M1VqzFVOlwKwWgmtAnC?= =?utf-8?q?15ClPLWA7LWcZlN6NPyi9LnC0RBhS67U9jo+0+OmUlbH3Z+MpqPb2UsLpHj6VIdkO?= =?utf-8?q?erKxBcvx0rhsZGQcosV2zUgx7KaWwdtzMOKanSajDyEq9u9cwHiAXVTrLPIoVHacU?= =?utf-8?q?H2KfQRRr6i3CnB10hK6BfSlaxFcCQyPp8Ii3BKHRpRodI4LMGfcWh9v508gOAi/J3?= =?utf-8?q?tcnjXwhAxH2KH45WKVjxM1i8aTNM2HHYQV1H7HPrqtO2XKWLXfRUnc0zfycjhRbSy?= =?utf-8?q?DMGk6ByXx59w3SMc5JMdZFxeL12zgu9kzScNPudJG4hvxtgEfwa5vWys36lj39xIi?= =?utf-8?q?49RxAbvG/oWw3Q9KHMgHn8vqkqzIR1kaTMgcWoQNT1ilpJpBQMPTdbKoAlY0W0bbG?= =?utf-8?q?lnbBGdzjjDxfQv9e+N/I/9AAsqUXj1ijcEIBX0mqUsTFohog9qoHFUTXD7oZIwGcr?= =?utf-8?q?ddV9uKmBSbgMWdXMguOsZLdJlODTKWhzgHwFUcD2o8FaYts76d7/KSbSes8RqCoES?= =?utf-8?q?NCkjwvZBH34Zyp3EcsIvPypk5yeDdCVHlaijLMdZz9/dDx4VvC0lljNYzhEYCXoN5?= =?utf-8?q?RMXtdCjZU3FQ3k2JlDO89nnoZqvSMLYoSfkmfl1jBF0K7tyoiJsDovokO1YDFDLtL?= =?utf-8?q?Q9u9ZN5m9Vzn5nhUjSlvYkq5eWsEnsv8If8figetGxxgq6j39p6uHCpf6dihjcC1e?= =?utf-8?q?HOzv0kCYLYeioB0cIXGYBLM5afbFb4jTVF3uUGS4Y9Rgn6xSonrOnht1HWR7c7NAo?= =?utf-8?q?FruXdw45L9wl+7oqII8pDO5Yo7UZcl3vIerchpKd6mIT2cT5t1y2nET6RJXj/juVR?= =?utf-8?q?15H4PMh+0REMbrNYtICDgY9rW+ho9n7Kg2isTbR/D+4PgCuI21nciNG5Q8dYrrpha?= =?utf-8?q?mlWtw5GeH0NxELAVdc/FmelfpEAzZFiHvgU5WgudB14mXBaLKWuxLg=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: d4e8539d-cd57-4abe-b40e-08d9d67299a8 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:56:34.8314 (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: AbSBovG3m7O58PVDX0MS0ZnxqRfwN90SyeEQVCotrNsWSm1prga6u0u5/HY4j5GL7Kyc2fJqK/FdAFLojLpJmA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller There is currently, a mismatch between the location of the firmware in linux-firmware and the path written in the driver. We take this opportunity to relocate the WF200 firmware in wfx/ instead of silabs/. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus_sdio.c | 16 ++++++++-------- drivers/staging/wfx/bus_spi.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index 361585763f30..6ead6957b751 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -22,23 +22,23 @@ #include "bh.h" static const struct wfx_platform_data pdata_wf200 = { - .file_fw = "wfm_wf200", - .file_pds = "wf200.pds", + .file_fw = "wfx/wfm_wf200", + .file_pds = "wfx/wf200.pds", }; static const struct wfx_platform_data pdata_brd4001a = { - .file_fw = "wfm_wf200", - .file_pds = "brd4001a.pds", + .file_fw = "wfx/wfm_wf200", + .file_pds = "wfx/brd4001a.pds", }; static const struct wfx_platform_data pdata_brd8022a = { - .file_fw = "wfm_wf200", - .file_pds = "brd8022a.pds", + .file_fw = "wfx/wfm_wf200", + .file_pds = "wfx/brd8022a.pds", }; static const struct wfx_platform_data pdata_brd8023a = { - .file_fw = "wfm_wf200", - .file_pds = "brd8023a.pds", + .file_fw = "wfx/wfm_wf200", + .file_pds = "wfx/brd8023a.pds", }; /* Legacy DT don't use it */ diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index 9aa52d76cdda..6b4f9fff8b44 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -24,26 +24,26 @@ #define SET_READ 0x8000 /* usage: or operation */ static const struct wfx_platform_data pdata_wf200 = { - .file_fw = "wfm_wf200", - .file_pds = "wf200.pds", + .file_fw = "wfx/wfm_wf200", + .file_pds = "wfx/wf200.pds", .use_rising_clk = true, }; static const struct wfx_platform_data pdata_brd4001a = { - .file_fw = "wfm_wf200", - .file_pds = "brd4001a.pds", + .file_fw = "wfx/wfm_wf200", + .file_pds = "wfx/brd4001a.pds", .use_rising_clk = true, }; static const struct wfx_platform_data pdata_brd8022a = { - .file_fw = "wfm_wf200", - .file_pds = "brd8022a.pds", + .file_fw = "wfx/wfm_wf200", + .file_pds = "wfx/brd8022a.pds", .use_rising_clk = true, }; static const struct wfx_platform_data pdata_brd8023a = { - .file_fw = "wfm_wf200", - .file_pds = "brd8023a.pds", + .file_fw = "wfx/wfm_wf200", + .file_pds = "wfx/brd8023a.pds", .use_rising_clk = true, }; From patchwork Thu Jan 13 08:55:23 2022 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: 532409 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 699B0C433F5 for ; Thu, 13 Jan 2022 08:59:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233646AbiAMI66 (ORCPT ); Thu, 13 Jan 2022 03:58:58 -0500 Received: from mail-dm6nam11on2085.outbound.protection.outlook.com ([40.107.223.85]:34208 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233398AbiAMI6P (ORCPT ); Thu, 13 Jan 2022 03:58:15 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lcL+d4BinX6j/C7ZB33Baaf+QePecu96SxeDaNyTX2QspJN80AxWCncnvwgKi1CEFox/4vynG0MB1Avs2zmdhvQddvSQ6O0yyI+xT5qmm/tHNZphBeocYdWrxsYdyf/W/du3T+nygz+dErCMBuHPIzwZufo1QRoGule9VOi0kp748NfC9C7Bu0jhv/DYFh2KBNNp4OurhiVXjS/1u1Ztb727L6tLZCjGa44j64DdMGTirluYy919Yeq+Erw2BQLhkiCEHvqOkNsPx5cXV3/ma9/w/KcRCcaPhgwvfkeTXROklR7M+tYMHYnml1jZV+cpUh2nEl0nF6nKyAkJd76htQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iD+6WoICOOtFeCiCZJGaZ1TH+EHiLNsyD/IL9E5coZI=; b=ZvwiK6sDOme5komHqyhvNO2xZog1FbQUtrWPVoOhqetPuQZaTmu2GTXfjampHh9+hr7l9eDWfO9AR40QMwBLBO3Qv5s9pCdUkAbpCCu5VRMEsC8YDRbzimGYOFJRy5uHfrG5DankuUDiGgMIALanfFnVKAY54wlANEiX14B0Z5A0S9xTAjCaAoiLPlkbsuYuqwUTaVx6e8sp0FPu3wx9kd9TZ4TxWLqLfrERyrShDS0qVoJb3zCwiSxKFTp+PZNniP5vLc9qPXA8Gabwo7ScUVRkr7QnNxOwg5pt/eMtN4hinCZ7Hru8iJY6tDmezT+Ju6cMV7F7ku1VPnPC+q4ttA== 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=iD+6WoICOOtFeCiCZJGaZ1TH+EHiLNsyD/IL9E5coZI=; b=gGUsO4b8m3n+TvHBQAqDIgiUM3Lk4Q5wf0rITk2oydDUBKqydl3f7CYjUxoR65kpl4o6yzAACpZs6TQvfB4Vb9OWF2H/10WMkMAb6ICfodub5uAyCGuRA+wmIyBusX3h3BOTDpDzRtUqqO9MdJMaOT2o3gGZFX5/ODiZ9N28GXw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by CY4PR1101MB2071.namprd11.prod.outlook.com (2603:10b6:910:1a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.9; Thu, 13 Jan 2022 08:56:38 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%5]) with mapi id 15.20.4888.011; Thu, 13 Jan 2022 08:56:38 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 30/31] staging: wfx: rename "config-file" DT attribute Date: Thu, 13 Jan 2022 09:55:23 +0100 Message-Id: <20220113085524.1110708-31-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> References: <20220113085524.1110708-1-Jerome.Pouiller@silabs.com> X-ClientProxiedBy: SA0PR11CA0117.namprd11.prod.outlook.com (2603:10b6:806:d1::32) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e622acb5-36bc-4858-78fa-08d9d6729c3a X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AceXUuT92E8M2I4pabXD3yGiG7DTC1DOD2Dy1niUJ9g/mSX46SlSu2bPBzFwh19Ix0asc/WLewYgVQTVTq1YAsY8k8GcenGSlItX4unmAZ5noJIdNKrIDLIYDqC5SizkT+/SzOYCHLgUoPTOE4s29uow9bM6/SNMa/VbO5P6f0wua3YjJ4VcG+5FVvqJBXaCGsJnUbJYW7IQ5D4j+kLwm8exI14Ty5/7bckoqeoC9rt3hQbZi3IbzP9BUKcVd252+A/UsO/D7I1+Wrx3c0F9eIqbAVPaA8tGiWNFmUKRjcTIFemn9c56+eimTi5ZtzN5fyttiZKFul7oCZ6vWViWBVjFj6j2nLEQdGzhjKNwkL3R39UBTlueR8CmwBqNVYhB5yvI3NPtUMu7fo32qVk0xYBPBLCaraLQAegfJjn5oqgI7FzEx3ZAIkaL2FYly3rDzA57VDRm5RWFz5B4o9X6aloSA447+bOh33NsK+/2mhKrw4s5C2kg8KZ/Z/b3DzWwr70s8yJUS5kJuZwGUXvnJQnxnrXtBDDvV9T22HlyYC8ZhDXXWtJKkb8qTF0hMuea9MN2kFD+100elPZ83mINY7IN/4Ewz+K2KPMOyUKJit5g10CB+w8zZlulkeU589PQflPrkGf9bLAKjtr+zc5ZGA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5657.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(2616005)(66476007)(52116002)(8676002)(6486002)(4326008)(38100700002)(8936002)(83380400001)(6506007)(107886003)(66556008)(6666004)(36756003)(508600001)(2906002)(5660300002)(6512007)(1076003)(86362001)(186003)(316002)(66946007)(54906003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?RKr9AfN1AYvWgmQFYpeba4UBl1KF?= =?utf-8?q?3uRB8vQ1pw21x+WZrPOcPsap/NogEiDCiKkF+x0gpbs+XWlEsRaF+dtpQrmeC20cR?= =?utf-8?q?GKrLFOdGgyWCSq9D/jlKmAVEcBqspDAk0SOz+QJ2kJU8mNngLlyaT6Qwv9xZe6wzQ?= =?utf-8?q?Z3Rq/siOZlePiZAfoFx5p7diUFrYmFr3Mr8FD4Iu05GTtcLEDz82jyFjuDoIdQv5Z?= =?utf-8?q?bRWXK9uiPbvMAJ2ObUselIkbRMiQkw0OoEVA06EBRRZquzRkiCrveEEIKDs7WZ6MT?= =?utf-8?q?Ebnizj5N/qHE1HsjZLTslClj/vRjFxBuq/lhxYObiZ2OX/3a1xX1mfdn/zjDxW1qU?= =?utf-8?q?x96QB47iuep/PXB0ZJh5pySBAMQLNfF2NFAjo9HNyrWJuOBx7XxDzh98GHkR329Kt?= =?utf-8?q?4Hufgi1JMOxJMqQGQGtAnoJpJeo4eZ/maAkxF9GPuu+EOYVqaIngo8M+8eA43ZkGh?= =?utf-8?q?To0b9+kayoi65AeMNiXfbPV4H3KuiQ5aEMjEwJcBnDkIwAWfPkAUnPeeTJ+ZiRO31?= =?utf-8?q?JJDYFzamBOS4MbzHa0P8Q7sjft5HVaIQbeSejWk9Wo7DPeBSBkmkqmoxOXXJRhg8J?= =?utf-8?q?FEv+LNu2+ojpHHSufmxeUNMZk5JySo9ri7d+k1izUx8wutia/6mOIouz9FGvKMCpj?= =?utf-8?q?DHYk3fUXr38p4PXupUr/gvO83wV6a62qQcNSuvEXmG9IhvL4ocl3Eh7HL/kSbnEdg?= =?utf-8?q?twKJIvPastK4tRxR0WEmLzQVsRKVnx351KPcVkE2gzobE7oUUdEWHZ4X5OKhhYACg?= =?utf-8?q?TOd/FFkxh0HDzCKbv1u9ZTPUieOZxyLd9/ACj6IbpqM7wBR/eG6yHMu9wJ+Xfnn67?= =?utf-8?q?+8qN2zBH/oOtO2czPP9jjTrARC3n9ilXNtlEbg13IHiZJ0lZem8ZwpOMpnqdg2uk6?= =?utf-8?q?eYuz0avK26N/zZtKJjLujVzcI4/bUvDVkgHECA5ypW2rFJ7QMm0O4BpxOusglJ/n8?= =?utf-8?q?Gc3OA4rmLBc05OVGDzI/fgbroIo8CQoTZxHeCRnzuyeSnx5pjRsL2QCFvlGmYep3u?= =?utf-8?q?HAc2hEyQWRMh0EvUCGbFlYhRHLcgzkNl+rKak/wKGc0PDIpPzp9aUuN/baomAg04i?= =?utf-8?q?FJe0WGAY9cHt0pSAGMXLByzBzTdPVBnObrBoDRunotys7e8AA265/P31NHqYZr+4t?= =?utf-8?q?EecgD8j5wUSP99yComztygWVEXsTd4jcHiL4MModNYPTuF0/xCHAYEMBb/du8FERw?= =?utf-8?q?w8nYy4CyZVRlQTMw6LayzM4LRqNVnkAchRI5T8fmwmuCHsKv8SimpL+/Cc3xeMtcr?= =?utf-8?q?6V2MK5CqwefU1uFxhc0wMMjZtr5TIVyn977QvjAgSLQahMEOp5qL4QkQlZpytHnsy?= =?utf-8?q?Y7ulyTu1DFClvhz1ptauiBPxQ0HmA8ZAow016d/tZh00+ka/qcBqMqkN7rBnBCYnn?= =?utf-8?q?vcZZFo3V7XuBUcxtVCe3tVZ1IcyHB9Lmv0scePAgYtDrOPM620hgE5Uak+7J0mTek?= =?utf-8?q?MSrcW9tze0JYdm609whFTKsNNiQSyYuSOBbZEkXNfb4DhvONx7HQXxfTXxctt/7vu?= =?utf-8?q?iACpNGgzZUPnsIJNnbRYqIynl8z02vw7bAZPCAU/AUyhiZGaqWntxiP23+IAhlE6X?= =?utf-8?q?pxgEiqmDKGmFCpZ2MbDJdUE2HeruOcNbHVv7WasV9tkYnZjS4+0EjY=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: e622acb5-36bc-4858-78fa-08d9d6729c3a X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jan 2022 08:56:38.7672 (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: np+4jPrfbKhN/+WlJg9ySDBUxxOtLfTt4/GuwKYF5+3UhRWKNyQxcwmXMi+70qM/l7NLanaI0mtCVCGhXFA2rw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller "config-file" is too broad. Replace it by "silabs,antenna-config-file" which is more explicit. The attribute "config-file" is probably not widely used. This patch obviously breaks setups that use this attribute. Signed-off-by: Jérôme Pouiller --- .../devicetree/bindings/net/wireless/silabs,wfx.yaml | 9 +++++---- drivers/staging/wfx/main.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml b/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml index c12be18eb6ac..c49496357180 100644 --- a/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml +++ b/drivers/staging/wfx/Documentation/devicetree/bindings/net/wireless/silabs,wfx.yaml @@ -72,10 +72,11 @@ properties: description: Phandle of gpio that will be used to wake-up chip. Without this property, driver will disable most of power saving features. maxItems: 1 - config-file: - description: Use an alternative file as PDS. Default is `wf200.pds`. Only - necessary for development/debug purpose. - maxItems: 1 + silabs,antenna-config-file: + $ref: /schemas/types.yaml#/definitions/string + description: Use an alternative file for antenna configuration (aka + "Platform Data Set" in Silabs jargon). Default depends of "compatible" + string. For "silabs,wf200", the default is 'wf200.pds'. required: - compatible diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index a98a261f6d76..8be9100847a7 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -309,7 +309,7 @@ struct wfx_dev *wfx_init_common(struct device *dev, const struct wfx_platform_da wdev->hwbus_ops = hwbus_ops; wdev->hwbus_priv = hwbus_priv; memcpy(&wdev->pdata, pdata, sizeof(*pdata)); - of_property_read_string(dev->of_node, "config-file", &wdev->pdata.file_pds); + of_property_read_string(dev->of_node, "silabs,antenna-config-file", &wdev->pdata.file_pds); wdev->pdata.gpio_wakeup = devm_gpiod_get_optional(dev, "wakeup", GPIOD_OUT_LOW); if (IS_ERR(wdev->pdata.gpio_wakeup)) return NULL;