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: 12712442 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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: 12712444 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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:56 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: 12712445 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EEB1C4332F for ; Thu, 13 Jan 2022 08:55:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231530AbiAMIzw (ORCPT ); Thu, 13 Jan 2022 03:55:52 -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 S231301AbiAMIzp (ORCPT ); Thu, 13 Jan 2022 03:55:45 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LFzZPaQCBWx9vpBIGyOWAXcHAmKo3aNhkYTyZVNErYnDEkQFnhRGdeqbeCr0t3AzusKbV8yA6mMt841q3CxCjSCfbuoM8Obft4m3mQEImX6NDdEztnHXQqsW+n1+X/+zv7PMixCVmpWvNSdIEaCBH8BKwddha9ComziGnYI5a6B4+1lNsgCsuw2ywSlsmayqCCxQKhLERZ5ocgz0lxSqD8/mAfwKQrEUgeYz4q0UEQxUnA3xx8MDToWFR9Yy8asXgkYEi2kqJkljY11nqf7XI61eXCn925hSQ6xs2BrfbnAdx5BYsOBzWdjls7/iH2SZlHFBIKj51ZLVTt3FL/L1bg== 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=9+/IB7ST8nlr1026UP+IngQPCmbmpjBPYvEwZJa3Mhs=; b=DXc4gFmzyHgotmMfpALhTErh077fxE4eOxScsBO4oAIJ3T6er6DRw0E1A4N9m/15nHmjBy4njFDmoWqO3PgFzZZP93H0uNFq1DKBxvAVAWgjSh9FUutp5K18vihUYP7gxxMVbzoc1omvDrIqzj0hEDBJNGdkxwxKRq+hXAYhlSk6zhPFIk6y006jZRXfo+PEspbPE9dhceQ9N/jCiT/XCEn6V+4AASNGr3W0zJHYyZ7i6z+abGXDMwTMalJq+DVRzKdCYANCBmPMA5KRJPYS8Lf00//ncRw27tLMup6+f7b4NyGSlxbUPjFbDbSt9aH/yN1KMEDFXx0ZxEyqRy8P/w== 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=9+/IB7ST8nlr1026UP+IngQPCmbmpjBPYvEwZJa3Mhs=; b=BLQwfu1mf3Ndq1p6IMXG4eQbke2OVRakKpIcXhzI9/UlUJkqYiRCZp3uGAr3Y4xqPt4GB8nsTZhasoc0mhNPzD4jU5RR0rAiYfFOjtH2eLnyPvXcTD4rABV/ZD7vAnrdSthMaDLEJYqHJfO9kn48/4aNE0rzV1iIkkYVwvdQqmA= 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:44 +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:44 +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 03/31] staging: wfx: fix missing headers Date: Thu, 13 Jan 2022 09:54:56 +0100 Message-Id: <20220113085524.1110708-4-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: b622f7f8-f28d-44f7-913f-08d9d6727b90 X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:551; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6gyyL0K2L5bJuEgZXSPFFlViEFoAPP1FNrAH/zOMgNUhWgxVtQ/TZYuK4r6dyDkYD6PEv0viq7S4U3mfEDq/lvHAS7VfiiCe2EcNEujIPtmI4UvAtj8PypYPz1Oyqj3Erc2jvPlMam1fcwl41GlnLXuvCWbaisId34TSOj6otV68BfURLRDsQo0js4r/cZwdqKWjqzJstVlW5Mqid2dbzPaHPWvuiFZEW6YbygFV4gVvNTug+CgCAqm80XrMQjpsshZU4Hr9QYpUlVoWzeIuMVHaVvlvY0wJm7q9eOY5fJRaSsPCU1AK7UCl6ouiq7dNzCtqA0SXeVRXc0fLxFV7g6o8LDTgiSNW1ZnNK8XuXsvWukWaypbzQyXk5xhu0FLJ8eTUpNx89kEf7n8WWYmY98V8nBbBa8K7014nHKpMSjs2o+lbBU5NfYDwiQpGPw4b/ZvtzZZBLev3/csBUKqUmfhXSLVIxCjGIanjNfyRMDG9rewOREKKYA2p/6t/+y6LVzT98io37xBY8Y8OgDYwfFYEz1OIDC9+VBRJAFNkaYDLpq3BvrVKSzOr9D9PSRB8jPth1SJFUC9UfDucsDbVUcASBtiBcv+iAn22N0fX82Mf56OFfPrB2PcDEjImlSdjB+IEVTBvqCyJt8CdUeJyjA== 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?3uggEfrA5m192wpsyiJN/s039hyU?= =?utf-8?q?KLWrqrvI2dmMl1NwZMvAuO2HSOVDOgGZ4GibAMH2x6W0CQTF4Px7jTP0+JHslXWWC?= =?utf-8?q?jX2ipYHUuqIyNXWcCXLr/PSsoo7Vl6fXrnyj+NDJSAGsgtS/q9pk1V7TmPokveu6z?= =?utf-8?q?B9jZ1Pzs1xMvRYlhynbVYa6JgSfPAwEOVPfJms7BiXUPJawGXBE7vQrxN0mOEqO0Y?= =?utf-8?q?DsnSFNsTKDq+rT8I1RRO3BHdM3QQBPhAdnQG+iqXAH43vTH9/sAhPH0wvcxuoU6va?= =?utf-8?q?Nqu27UrTa4JxwaEBLUKq3xoABdvcM+j7UI+8xu3iUzuJEKQREH2MH6V5/Wo+0VTQg?= =?utf-8?q?a4wDWXKX72QwvgkVFTbakKCElPOpUuvbpWs+yYwkT/h/wKug0vODWU1L+PJ+H2HLK?= =?utf-8?q?8FxTM+XRf5m+ez7gum4+Os66ksQuhNBkGfPhBe7uADQxEpDKWKWB4TgmpPCSZrBlJ?= =?utf-8?q?+7tkd66wxnyCoI70e+nBiddnSBFthQGD6kuTnnA85PRGDJuIS564RlLLoVlHGE7X4?= =?utf-8?q?e28u4KJArA3snjbaePKgbmUzXFlKLrM09OIRHSLYIB2+qBZE9aWJ0j2aGHoJqV1fh?= =?utf-8?q?9XjSC1zggHd1U6S4m2zfuyiuStjih8fcHFGg2ws2ONZ76x105x7rcyt4IyQ4lZ/Q/?= =?utf-8?q?QwH2QvZxhAbxbHrP4GpYe/vHD86jkWwaHbhfLJeTEV9sDChGJOmaVwzezIeu2iaE3?= =?utf-8?q?xdl7PdYsXNzi8NXbaR6qeenmgc4bFZavMWkjrEmQaA8aG/AytbqBYRPKBkiUyW1OG?= =?utf-8?q?QG4rFsw6FBjOczkiW+dYteM3iSyEP7NKavKcZb714T2dlMVzWJGBM9Pn0Dvc+yuU0?= =?utf-8?q?fd7XJ3QCuynIGnhHDpPKNNfF+8U1cic3thpYEeMowa8gMBoiOrBCszmQ/9euWMl28?= =?utf-8?q?tmezadyCRdNV9dQGcNFpM/hDrxfDlemU7QpJCOkoAbXIaNH2GFr0IkYwAj4EH+OCs?= =?utf-8?q?G+pf0M8A7vDWtLefmnj/uUTPQJtWMo4gZpUKfTsX00X3HMRiOITVJHgRr8jCRqCZo?= =?utf-8?q?bdMyri6JuFzOaqAws2GEeSQry6TodeIaAAYBmyB607diwigMEgXVYbeAcHVbZYxY6?= =?utf-8?q?s+Lk1wMReDJTbIZ/LJBAsXPcP59TD8cq6YXENOyPmHIkgmt9yENfdiYVChY12yfK6?= =?utf-8?q?lm97/mTLP4rZpwA/+STnzw5YQxtjJZrkpqZPW6Fx6CiVDYJdNC+pZkb2vHSvyvrAM?= =?utf-8?q?MR6GagYTeMfIfSgBiUxFkg8Le+AfF9T5laSydj7UbF9KIStuMNpKjZMVlMXHa1uku?= =?utf-8?q?QnQnIZ48R+gv6Hr+GqvZUBuguOkZleOTkGGPTZA7wD+XMOU7VpX3loof51I/9I6KX?= =?utf-8?q?jJ3qLyVFU9jRXQQmPFi/IqKcK50RjEjUNkM87Nzqokoim4qUcZcsync0aNj+aUM7H?= =?utf-8?q?VV6geoytuc9ZJeRIgw4VvsT3957luukAwGeFehv3vYVFP27FixAV77HibKiHIndAG?= =?utf-8?q?9XFnpyFocD0E/78AiEQAR49GBzTOJQwsKTaLP5m+AjM6jLEaaE9ZakeFxgPen0mci?= =?utf-8?q?VMeb7GuWSN7CcSSfBmZHOMZGiuMM1h2oUxF2flhsdvCnKYsaet5mCb2pEIfB/6UVL?= =?utf-8?q?scN9yYPjzTw72uy6vRYyRRUrz2DuRELMIYJT8g+aPPuBzVbTrEuTKg=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: b622f7f8-f28d-44f7-913f-08d9d6727b90 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:43.9979 (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: ruzHruSeKO+MYnzbx8weMpkWJaG0uUHhqfPiDg9o6snwjJzimw6LJfXKuzUqj28tOnJ4tJpGOm7pjTCqK830Ow== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4040 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Each headers files should include every types it needs to compile (ie. "gcc $CFLAGS -xc file.h" should compile) Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.h | 1 + drivers/staging/wfx/hif_tx.h | 4 ++++ drivers/staging/wfx/hif_tx_mib.h | 7 ++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/staging/wfx/bh.h b/drivers/staging/wfx/bh.h index 6c121ce4dd3f..a44c8b421b7c 100644 --- a/drivers/staging/wfx/bh.h +++ b/drivers/staging/wfx/bh.h @@ -10,6 +10,7 @@ #include #include +#include #include struct wfx_dev; diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h index e57eabdcfa77..f7895845686f 100644 --- a/drivers/staging/wfx/hif_tx.h +++ b/drivers/staging/wfx/hif_tx.h @@ -10,6 +10,10 @@ #ifndef WFX_HIF_TX_H #define WFX_HIF_TX_H +#include +#include +#include + struct ieee80211_channel; struct ieee80211_bss_conf; struct ieee80211_tx_queue_params; diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h index 2a3b84868ee4..fe08a69412ab 100644 --- a/drivers/staging/wfx/hif_tx_mib.h +++ b/drivers/staging/wfx/hif_tx_mib.h @@ -9,8 +9,13 @@ #ifndef WFX_HIF_TX_MIB_H #define WFX_HIF_TX_MIB_H -struct wfx_vif; +#include + struct sk_buff; +struct wfx_vif; +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, 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: 12712446 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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:58 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: 12712447 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39153C4332F for ; Thu, 13 Jan 2022 08:56:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231768AbiAMIz7 (ORCPT ); Thu, 13 Jan 2022 03:55:59 -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 S231301AbiAMIzy (ORCPT ); Thu, 13 Jan 2022 03:55:54 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gawe/DMOkk9hzqZo0qmvfBdz8OW8hhAEq2dH2SV/5O7qtGz7bo63om+w9bSTKGj16ia1keSgMHW2hm3OHaEXFskyjyvKFGyVzRajexYb3xA3RIxloJ5qXdxqdUNhgCyys9fvqUGmieO2cqeY4BIks+vM28u2Ablae3JUYpjjMj7p91QlejIzxOoXDOHVy3LS4MDBHBo7yCYNGAHNQqmXbl5kO2mYaqFlDs0fQ24n8vFVUQQDUzwNkb3LpmKFBW1AOvmrJhEcxHoOuAndDKwzv/n3HByNMx9LrbcVqntpSbWNgFKD1napCugASV/n0qZ0UOnJv9MOIjFCCiuIg3Wk5w== 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=K2NpYeKofP+AM3/AJSHbF84kPqm4EPUJUKSnHPkPhns=; b=gMqN6kkzRfH3DgX0Djg02RzpLOqlNp2cgYO9ceow7SmLeAFktU6fzG2eZtDCAbHZzTA1/v0z/AMLZyFGWZAmk9DrKHClnHSZRfjb5dOfUgagexMwd6ZtjAi9T8FjckZJNJzCMv38xxjK678FoI0H6js+aWGKSJoNs1P2fz5i6w6zFJLKCcGyIrwGfhdl5dOtO0REvnJRFuD7nFhew7MmaO3sJWx8ex4gy/Eu7fEqYscZ3N2lfuEfXXFhfw6TzZJS/V9FvcXU8EUXk8VxJ299jGzp8acGoaOOUlbLCxz62mHSmivFSpbTZuBwxNL3au+oKgi8w62vFufc4SMI7Q/EdA== 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=K2NpYeKofP+AM3/AJSHbF84kPqm4EPUJUKSnHPkPhns=; b=nz++PNadxM6GDwmhBd//P+ZX2DftOnpqc5aw+wJXD5XZ4WYzjnzOpTfTkIh/Bw513MUVijyCSeHpF6/61cIwHQI9XUL3EX1d0iIcTmnjhNHlqvGGtD+GUO15hCdGLzOahKURmDsWkn5/zVi9S/Y0APnJEet9Uv2u5Rmnou1Txfw= 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:48 +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:48 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 05/31] staging: wfx: explain uncommon Makefile statement Date: Thu, 13 Jan 2022 09:54:58 +0100 Message-Id: <20220113085524.1110708-6-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: fb0d7bfe-424c-46c1-fcc8-08d9d6727dfd X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:597; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HmVfIUz0skLrCJ9YyRcuUXh5lAZZQXBaKaL470HBTeZhhgTxsd1SpiGFimKsi1LwblXRglSvasUOEiOk4ib+Zqv6r9OK1ApbQQUObepEdpTAkVonzhF1jSVRWU0oBs6w2Zo/7xWLUOKnoE8rAk1zm2QKv5wDkgckCsCQLo5kmyl74j2DLPD33ARGf/MNCp+DVzEKxyewJP+xX2Z/Reg6uXIK/x05xUGEe+qqPVEeqWJC29nb5nwkI4FF6qu2vZiuHwr+W4adFnhakKqnPnZjtRbG9uNTpZicrjBheI1fXhIp3fE6Q8n5mSRo1rv8sSt9pbNUl2F2PxBWkQ8SuGfNCkESsf6thdrmTMZjhUIXPoWfT67K8CtBplBxPpd2JuAgy2H49YQkQzXmsCo4sRoZD0KbLgpn4Qv5QFtRELaMHa/lzujPwkuNxrupWoR0lOQ3O0vDsARCOwh5OrRhBUDPruUGjMzTmuU0alQTKaCTFxDHXp5f9N5lLmJzgsMtLB5UPd3+AhL+w6LGqs2cPoJzZV/l+ra7kjRUOhU9qkVeFGVJqFFPX0rik3dJptbC9I7Oah4OQ9DGl2HS6w/tyODcjrah9Gb/eyhvKR+DPP3y5syWBJCUcjS5Oc4RMxB5FggAHbAWQsDuEhXO8JYl3efxsQ== 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)(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?Bz2Ns637XRBWbQnaJU3+HKA+tZLm?= =?utf-8?q?9xxNsuNppdZX90XfbS5Sq1IBGdpv3b8OEC/csoBwzOjgJjBBVIIkGKbU8cBmVoBth?= =?utf-8?q?hv6GrFdm/BwKHzP7lWMNQqRlJfpHCAt6iSYFtmUkHh27QQpJGxEsfeG8WsDM+poJz?= =?utf-8?q?3Si8Q58DfpWK6+qTQbBA+zqm8yWrMGzgCd49OPFywP2xIPQmE9iTJZO2Hc6kEwiN1?= =?utf-8?q?2CPCtpp5sKV3sOuuyJRub/UeJVwDOHiqeBFMq4tpGC9JIWtr7tz7wxUtIdFxuU1Xd?= =?utf-8?q?wYkdFhZ97yAg+Z9MZtOEqz8Vpy1DwsPtgVI0/cJh6Va7xSBsvyKEU3M84yz0n/xO4?= =?utf-8?q?wDV4IHjM/gWWTtbEm8oPiZKQ5Q80Kwnhm9suWrxM0sFR/vVLWTaeOCnE8APBAR6Kx?= =?utf-8?q?SHv4LgYi8IwfRU2ip9DjleNG9FZBQ4ggtqemK0tNZz3juO64DcfZSo83x0RgfECZA?= =?utf-8?q?WZndp3yEqIErE1wbGdXS2FNiyGHhiZiB8w6MkyeSZBeyHwShjqGRJTBvR60k0l+wJ?= =?utf-8?q?5E2pSiH4oyppG3lTYWBZr/j7uBaPVWomIpdsiH6U5KBGIKbXWkNU5w4T+l5+JzXue?= =?utf-8?q?SIO1O5jIFfbD6YdzVI2xMo9oJxK+jz1n2c4/hrLVHmgIQYWUXRaLW88+D6zvKLonb?= =?utf-8?q?OEMisTyR0QIQ94VCn8clpy8WPwqwBfNtaLmzIkqCsjLvNdRXhpcnwm9YrPFctNUmc?= =?utf-8?q?rgD0n5SPWGAmvM40a1aUgRVP4apjVMSSifBli+vdWGwiK12vv1xMmyOeNB6IF+M/L?= =?utf-8?q?BOikVaenAsqn1n4C2V8zH3HLFnDeHQpQcBL5g4PYQkOZfu2ggFuTZYXq+0HJ5PghD?= =?utf-8?q?wGP0zrX/ErAX2MX0Eo2Pp4dq311H7/tCyh9hox45IjOLpNS3/SeEPhtp7XXI1gOa4?= =?utf-8?q?0M+gByCxyuTtUFrC3CS3MU8o9Amrd4ZmHrH825F/rlZzR9xsxWj/4a3SRUksWOJYv?= =?utf-8?q?TTiyACWZFF5rI6SrL8MbbyfHcrEetdHfdwIoCog/FzVCZ99UZlBqpdeA+umtlzPc7?= =?utf-8?q?FYNkio1woZzAdAdpPsqpeAoYr56NBd+rH8jI+r5feEleKfAjCqtN0i36QZTzUEcWg?= =?utf-8?q?T9n+J9SpcF/ubxzhhWa7+av04uR8jY2u8BaK4691JElXDuLVGd6IjxSvTKxM0LDkq?= =?utf-8?q?XXCrTMxv38rGBOWVX4IAWTjJvdlyPMziw9urFpm3chW3fk0/Ho8G9K9yOJiw+Jm3k?= =?utf-8?q?lWi6aF93t+48wMFDV8JuEP/Xoc4S2t+qbdC7h6JMMiyRKc1n8/u7jSymFu1l+3cqT?= =?utf-8?q?eayltFF7Go3RDC5+b69jCoZ+mYjz/xo2Q9kPR8ax33FAfgBvLst+GrzNoeg5D5Dar?= =?utf-8?q?5NmXTe9DmUHaZ5tu93jut7z4uNC1K+J93hk/O0uCN6bewBKUx7TaEAMbLQoPXcwjO?= =?utf-8?q?Dn0kUCjvZ2xwQfEE+rb6/rSIKtSrrnLQkBEguYcKSfBnf4NO/dKp5qpI0hYZiOKIu?= =?utf-8?q?1YYVlw0KxZb6ocYOwMAuWlkHX4s83czFtbjtx706vxAm/Gy6YH8jMYp/Dw/p47TcO?= =?utf-8?q?SyyLIjAAIIhcNctMZG3bkeK/UqfKRVsXtBvEBRdPyKzTtELkuXWVSaeLReAEC32pq?= =?utf-8?q?bnnDCmZmkIE1Xot0m4ZwgYKyO0tc1Ms9ot21++kEaTloGzPqVxOFj4=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb0d7bfe-424c-46c1-fcc8-08d9d6727dfd 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:48.0256 (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: JME37LQhw8llX0UtNwbNxrgx9w/8DA7vWAniJdrNb77+ORZ50f9CKprNnVYHd2SBfKPt1Q7lV6nxkp/wWnxTHw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4040 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller I have got questions about this line from several reviewers. A comment is definitively welcome. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/wfx/Makefile b/drivers/staging/wfx/Makefile index 1e99e6ffe044..ae94c6552d77 100644 --- a/drivers/staging/wfx/Makefile +++ b/drivers/staging/wfx/Makefile @@ -20,6 +20,7 @@ wfx-y := \ sta.o \ debug.o wfx-$(CONFIG_SPI) += bus_spi.o +# When CONFIG_MMC == m, append to 'wfx-y' (and not to 'wfx-m') wfx-$(subst m,y,$(CONFIG_MMC)) += bus_sdio.o obj-$(CONFIG_WFX) += wfx.o 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: 12712448 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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:00 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: 12712449 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC264C433F5 for ; Thu, 13 Jan 2022 08:56:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231858AbiAMI4M (ORCPT ); Thu, 13 Jan 2022 03:56:12 -0500 Received: from mail-mw2nam10on2077.outbound.protection.outlook.com ([40.107.94.77]:35104 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231301AbiAMI4B (ORCPT ); Thu, 13 Jan 2022 03:56:01 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cX0dkhsSL91imIXRfDCEwMqeEQCAeUMIjde38OMZqJllNAGUmrrOPYbAoytNJYhJT9PZpjxiBY1vm/Wy0ko8yiTsSd4XpYq/j7Hh2PZK3qKxziTqxfydZCu/OT6CoCdyjPFowlsD6dRomfpMhMbj0FJMtk3xBCHYBXXzoNyGe92+Zuf1um8Liw43+FkobkqFDl5MypuP+BvWnSyjPoJCiMTkE/PfYvyTeLtrftj1dKrWjWqBCVwfsSPfym6ozqwnxdY9vYGbXwsn3B0V+ViaYGm5n5pPntM3Gku7naW12yHyRGtWjLg0YdaxADSxLXOKFW65ZNGLLy7Ozx1u/BM7RQ== 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=phBDzhaT40l9IgYtXB5/UWs/UEjXEIHwTOFXmYhCtvQ=; b=cYyJdjqIYykui3FmQvddHemdaFR3baSAOfiSL8Y7c4bKv7WRoOj32Jq6OPOAbJPFbwcHAkukhOZDHqXs55KBPx3GFGFkK6GjqNLGfaQ1FQWhHBTrUBZ1Xae57YQKY++q7kWXsjGh8fPOlAuw9VciiZKV+sJrUXNkg0b9IBuSJnn3hcpcQ2zcvsvgWSY/zeerqQgPd5j9oS3RvCQqtmXM4aYXUv1qsbm8P8c8YMG6PeS2uwbCEnUr1ITk0XhUmJujf8G0ahwRr50riWbcUpdEMlCPQd4SYgXoRGEiMdhtbcURqbMZHD6/a5hf9apu/X7kz95zv0AAyJ+F5c8r5s/GPw== 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=phBDzhaT40l9IgYtXB5/UWs/UEjXEIHwTOFXmYhCtvQ=; b=aaBKQyVYVxMC+ZOptfqhD17cROwKFpMjHutBVnNvC4F5ZN3t6aNTFgzo84YksX2KTSJPspNn6q74suFPC7XyVCXkG79Sp5AjdKAuqbqRTqRNsDtarPWbOWNW0xrTwp4lIevfQgaiPr2OdFye+yP+Z8h5gFrbfaifv6RNf5LEe3Q= 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:51 +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:51 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 07/31] staging: wfx: remove useless #ifdef Date: Thu, 13 Jan 2022 09:55:00 +0100 Message-Id: <20220113085524.1110708-8-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: 3dc276f2-1e3c-46e4-4a9b-08d9d6728033 X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4303; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /8n5Yfows5VF9WYEEd/UwZFBD5Ndg2/dENjcbUMEfEso/bamjMWPZea+Yofr6N15IwTHjHCqAJJ+Z6eb4B5J3r8Ry49BTbD7r7tdgK91JEdODX6Si8RL/SJjhWgZS87wELxZWjF6xvpZ41nXyb6T7tosvdn72mPdNp2Lmy+xwIPyhTs7YzV3OQAoG2C2IF22iuo7Bk0k3P0hlKgwYy98FL8DyFfF9I4npR3aemabh5OMe+G1BPj6BN6dPm+slacU6dNdvPadDZssCVwf7R3VCgT2vDphDxuhAe0webnErHldeKp8zsNI5Y6csP/ogrWnzAy9DWenxNMvQL12gnZJ+cUiVY4wUSZlc5ORz8R2yWkUlHQBxlzAwCPRg0k1gAR3xxVgc0yeTODc3dUZDdcK4SQXLJ1ACQFiGA/segm/yptYVhxHo+5FDkW/vOmGqMBJljE36uxUHAQOkMy5A+pOqW+wXuMQcHgCYAjxg+jDhiB1ssGgA3uEFHh97xtdTnDamurN9uXJKr+XfpzDJRyWI9e7xXkgXQQXHRakWMcJxieQCzI35vMrT9hXMMGUTYhxUZjeFGudUMkDKu/+XbezyC4/k8Cthr0U4bxMq0CB48WlE1X4R2pMtGYLUGR48j6RU80Gdx50E5LsEGYcxVquSg== 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?hhhWwP0Ir5RDkBHGyZzGWJEJM3/G?= =?utf-8?q?6rOjkevQarTAdDLBx9ZDLpXOknhlvDNr5mKi11lDBpw5U0+jfiI9qVQ9CHWBwfPtR?= =?utf-8?q?7UnILo2uF0SBJUMznLO9hdHawnxTH99ME/wbx4kN+vI++g4Yu61Fv5Jj6S9FxPrO7?= =?utf-8?q?5EP6MDZ/Plj+mE+8e/ov+3n50bCk0zJ7BjFCIRM5WiMehaH8OSYQouCwLCezRsV9I?= =?utf-8?q?S0ZK/+ko5rq0IAfjAVjcf4BxEscxcR/m3BCZc1gOCYq1RuZy/lN7qxZWFRGA0L9ul?= =?utf-8?q?e1OX7WMyV5IkOuCt1wqAQW7o0rubOoydqW8vGRnnlcoDpHY6YMNPQmknsoiI1qXzr?= =?utf-8?q?puLjH0ogpCp6zpV7Gei3UjnGKV46cST/M7JHZdUp6uPgBUKDQOmTNm6LbxxA7wV/w?= =?utf-8?q?297f39ArItcnlMjEQhPPRkbTNromh/CKXs7/wIJGV7FO+xpv09WNCz+WCVhKX/0mG?= =?utf-8?q?y5ToI/WBcCqVRCKIxcKh/4K3KlL8VHEDmCveR+dhBBxEeSDOIMdGUQ0y8HQvAnuj3?= =?utf-8?q?sEfo/i0bVwgllITgOLcfMYWtFzo4BsKBvnn9BTNN3Qknw11ICWDOFLj5AL2x9agFK?= =?utf-8?q?kw1ai8j167j6NJ3BVXqmmrVRFciREVPr+u71ZB1KJ2U60ZkSuXbHZsmDepbetHrqr?= =?utf-8?q?3JklGMJ4XG5AFEaOKaQpaBSmLWMgEoWI8A48EYQOFsfAf4XZ5aah2ZmU+hgGaDONC?= =?utf-8?q?cHVD8dkdav656HReXi81I53AUAhMpTMGDS9LZmqrrDztQPPCpBi6Rxga329gd6bmm?= =?utf-8?q?gaj0eUjIL59fRvRPeLZ0NfWIhDedXr9bR+mmE2k83Bg8dlaANTBo3o5ezcaRr4YEq?= =?utf-8?q?kIVtKEk93AwsdppZfWQ0N2y+7QsMhLRBeu7Tcj9cp3g1BoSgTKiivjVYkS4JFxJLt?= =?utf-8?q?JigvcmDngg5gPYPNw4DGgyqyQuJ/w5UbjKu7e9Iy03slgM4aESbp6u0DAAFKglBuj?= =?utf-8?q?DvNipcsW8YrvtmezhARdqT2XUgAWFkzD8RW+SAzOf52kxd0z5vJkrObMFLaoIxvCd?= =?utf-8?q?D4pPX5gwZzOluSh6JyDk2qY+I/u8Z3o7lKkqG4fZL3GTZK24wqimSyDi8nRpPklxw?= =?utf-8?q?LBDuMvgUmdCNlK1lfglYNBbDyd3hV2hDdJAizn0Jk81YeeX+muWfzU1BeonqsAJKN?= =?utf-8?q?xpBXRoL9zM7MJyvygMzfteHxJWNZC40qOHjEJIuw7VQwaPZMKCErgYz1WPHq3Y6jl?= =?utf-8?q?mGZ5Qoe3Bb7F7EYExuQStePD9YduqEQIWxjTCFHo/US6hkAQnCw3TYtkg8sRnm3LN?= =?utf-8?q?+5X0yci/E27KLTWbFXDOu1R1gYVzz49g9xfWft7t6DeSEJFF6G4tkJJ0ZBazv3HBl?= =?utf-8?q?lOanVmB9g5J2pGijw3XUKs2vnzM4usgkPwI76MtmjcC/XjcD8g/TsT1QiF8dvV8qn?= =?utf-8?q?EuMhQqKMD6Afkj+NIbgbb37ND77mHe2ZfNmySgSSEQauowe0X8H2MUOVfFSMBKUY/?= =?utf-8?q?L+PaLfk3g6WeYu5SLQJuSOpaknWID5hZpPujIpZ1uHk9EPiPkR54yUhBaGLDHojWV?= =?utf-8?q?55Jlv3er2RqYeVyZ0BcFoTsQImM1qfWF1Vc4pL5Cc31b0EgYlc0Pu2dpABJmKHP9Y?= =?utf-8?q?BSP/n5b0ORZw5ShNX5ExkPT7N0KqQpfra8PsEB/zzHQfVC8w2m1m+g=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3dc276f2-1e3c-46e4-4a9b-08d9d6728033 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:51.7283 (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: NSXoh1ySJmWqtqCmtZYKBfzVLfrY5V+m0ZkrW0SSFW9SwhnvJsR+uOSO+inozBvqqnRqnOkihRlsyA1oA7eC2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4040 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller In the old days, this file was shared with other projects. Obviously, this "#ifdef __KERNEL__" have no reasons to be in the kernel. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/hif_api_general.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index 3e5c92e12d35..8244676112a5 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -8,14 +8,8 @@ #ifndef WFX_HIF_API_GENERAL_H #define WFX_HIF_API_GENERAL_H -#ifdef __KERNEL__ #include #include -#else -#include -#include -#define __packed __attribute__((__packed__)) -#endif #define HIF_ID_IS_INDICATION 0x80 #define HIF_COUNTER_MAX 7 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: 12712458 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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:02 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: 12712457 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D92CC433F5 for ; Thu, 13 Jan 2022 08:56:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233200AbiAMI4a (ORCPT ); Thu, 13 Jan 2022 03:56:30 -0500 Received: from mail-mw2nam10on2077.outbound.protection.outlook.com ([40.107.94.77]:35104 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231576AbiAMI4I (ORCPT ); Thu, 13 Jan 2022 03:56:08 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=agKL6kuvioK5++3d3BFnQ5i4x8vjifQnZdp1enwzkx7fMCsEa5qhxwGQitEXKtyuz+qLHzZq+agbkmVkVGxXYwcmvGrwUI7CDp/OZrKB3y5j2ibQsQQp1G3/l1UprIkLfV7uIoQOJ/XrouuBFiJ6j2gNaarzEQF6hbvxPnwctz4gfujtz8yCXNt3tUs8dbnaEta6wNKDu/YbCfZ+B+xFbIm19fwktZ/xfPt5DjN/YdDDXWlog6BHYjNBd5N1674bunOTD1VwySz52onhtRHsOCmWxQJeqtYnSN1T1KAk6/CsXgMJxE8E10qPtXzM1PL5x15jdLUzEqFijErKkBUkJg== 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=ksytp06C9OwuefGlf79uqyNLgoHJ7mhaEpS7Pt1UJYs=; b=AGGBkXJGB2eaqedvSQp4qdtMy13dYRB06qcbYN9ca2KW+FraM0Rk2GLSBt92YsJB03P84TPxyNK6i4rU9WSAHlj6SgCgTjQBq9hBGdgZcnPnykmcDWbNRqmAhjwwdpVI/4FfTW2EIUUAdaQUBpzXfx5IBtcumP3SW6yi2FgJU2qz3TdbjR1eskhjKgWa98xVpLNl+ODhSAKIOmFKKL2Hbk+iGUOtH3g/WAyLD2NM4Ks/PIPzOhx3w1EhLi3elpv+Bkll6fgds5l0W7ViwifIS4YlZBjFK3MLtAiGHZ4sWjphWw3Wkg6qmFaZQlwPbVt3iaM5uztUIlLtdQOnfi/lQw== 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=ksytp06C9OwuefGlf79uqyNLgoHJ7mhaEpS7Pt1UJYs=; b=LPVc+Jwn497sS0C/f1omj4wSZ4nlaGQe3/CcOSHpOGQ8uJkl9QMBk+vIK4332pM1GGOxpgSCso1VxBgl6z54Uovcn/kFIKavXXX882PH522g8LBDDse4S4/WQccxoXDe8F4ZhJroa/TncuFvykXXoafbrNUU/4/trNAq3yT3P+8= 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:55 +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:55 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 09/31] staging: wfx: replace magic value by WFX_HIF_BUFFER_SIZE Date: Thu, 13 Jan 2022 09:55:02 +0100 Message-Id: <20220113085524.1110708-10-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: bb07ffc4-2e60-4ba3-6e12-08d9d672829c X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:415; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lIvIy7tqqeJyex6A8dqUAn1PnLtGwaZkKJTW/nPwXtmrJZftc8kTF7JkXJuv1plrpa/99rNaInnTXzdMLNkAOq8YknYk51LNE7Y/yvqxCQFrEfWoLEzDqop4kxpQOoWpOaO1KpCAh4/OoUrcE6FkumPwRUCNAyeRXUvBZRLHkAX76VTQeS0AGhJC8hApxsoEvazJ6AkdrO+K1McX9hOIPn2CqRvB0VF/o8SYDKS41YCAAlMltqS+yDVv7NWZTZZO1UPBE6zI/v2ficyOMRYUWkTY4hlNsF9xyWwUlGpBPTTZ5Z9Jb0T3w4/2O5zm4XcVPoTyGXnUoR4i5qgLI5yo8cEovku4/d6UNDNMo7FkKyoHcG0ukEmfTNhd0YBQxf60vU5JOuWwOLS10FEfdVxHGzocf6xIRn7PONIAz0owoYMXaYWyzCBknXpT5mmbmlYBUWOGcoz1QbkD7gTQjwaoM3qdW+2yQ4VpW0gAz4hc7humZeZArnauAwmYTdlW0Fx596yGkoFJ6bQXGSOslUS3XSD7XW4h4TPPIGW/GpOUCxCR2Fmp7GNKOZqgvsVnrxGbjIGUbYbJrPgad4JpVRUjQoOlv3syAVmF7m60urCreDGA7C0GOTaRr3GMsv8Ya5qWYuziydPEKVMy9sjXWW4BDg== 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?ha7ooX1gbCwSaDS8noTr719Fan+J?= =?utf-8?q?4rLtMjePg2NswiNhnqwQn37UTbIL1WnNWAwfgelkR8Muc3dcg+w0tlUr3P2oPS2Z5?= =?utf-8?q?B3rcfQDxezboFLHSuWv/rXFnfm2dVKcx89wlqpQSxzDYu3dx/OTzM5iAUsZxOT79z?= =?utf-8?q?9hSlg9MdSygY9Ayl/wqhU+5au/F6a+UyrFYixtjsptYDQx+Drhy7L6xGjnTbl7532?= =?utf-8?q?2Gqnuo1h3ipJd6eJ72ZqO9VvSaK6YTBzmrjwB94fbquqXWYJrpKjsRIk1hlT/sExZ?= =?utf-8?q?+wVhBBPoKAK+SFy+zzk7PwCgYzjPih6gTlGxpXb4SUlgCLJmN0Bt0ezdhKUcn0aAN?= =?utf-8?q?RDU/YJdrP42aAb/UDvTXWqkv9QVD8dq2kEl1gbYJEm8DeGmoWGyck2d0CsW8WxoJB?= =?utf-8?q?/LKPks74O76zc0wdIrUeOMjhgcNVPvJ6eZWvfkISEYd0mzIsEAG4SPE4wEqcZKvLS?= =?utf-8?q?sEHau8UToU3Tkq4Bf2vZzsnHg7C7btbOotljmYpGOy+PvAMOMPVUl8Lb10e05pzPz?= =?utf-8?q?bzz/iohHuBf1XkECmm9WoTwK284AGBibJiVFOtaxhdbMXV+DdNufYFGPiwcyNzduI?= =?utf-8?q?q4idSJGh1bGhLbvMDGG8S3iMYjnOME1AD7OLqm1dEFsiyTX/Nc3Zg9hOxJSjbSmll?= =?utf-8?q?c8G56snvW/jXuVCtSnNG9+E4Ip04Q1EBJMb/wgIvkpynUoCGYsgCGj62J42/3hf+S?= =?utf-8?q?30CEWs28Q9BoQJvwG74HEUywueUniEZGOJ/XCcgR0W5vBrICnO19/LJZyluDgtdu7?= =?utf-8?q?zPWAsA/CyS59cCDCbr9zWrELVSQwa1QEd9WLshy3bJqz7wAndoc4hoOwDSf2yj9zu?= =?utf-8?q?Agk9GD0DyQsg8KylGjiP1VRWia0ffCLLYsKDRiLjPrzdZA/zSFCZMKzmFGBPnMkSL?= =?utf-8?q?NIv6biRLmX0wBaT/Ga1/JssMtlrSFmUlIUy33qhnoXNfcgxMLp6stVtz6ctaMBR/G?= =?utf-8?q?mlqy2AFHUOlU/EvDpqkx0UI5McCasduSBVkUTWl4dM0qdneLnbTVW8NdUMF1+bmQA?= =?utf-8?q?5M5iF36SE/f0oqnuTlMIeDVCs4LltUj2hjE/dmJ9WMqap2UxeeKDFqs/A8kcQDPIT?= =?utf-8?q?BX6MGsV8hsnBYNdyIzRWirMfTkvN2rx5iiX+69VJWpH1bh5EYWkrIUwo3ZPDBrRIk?= =?utf-8?q?i3zQ1Emwr8kqNwvo12ixKzVLMBS9ltTLE4Nf3dysK2OAblziiCFn/kpGT2p8QqRQ2?= =?utf-8?q?hPNMtxJm/Z0yN4YEZbBJEq6Y9pDHB5oBiERi6d626+MU1ArtFLgCOfY2AjXnMHo9z?= =?utf-8?q?EINF6JBgwBzbYpuXt2pj1V2u6GkeeaaMJSMzDk5kzKzO+k0lM3e4t3BfucMnUJuZv?= =?utf-8?q?i8p+n2UMwHh5Zh1499U1im+dOM8Vl2M0uGUkrP/YDySR/V8fk2L6Ex6y0bAgYgChn?= =?utf-8?q?pEaB6KcqVbq1xx6z3/FWWWonGeLerxb3hDUtQLNEr2ssxQNshkb4SSiBnaQtfuQgm?= =?utf-8?q?ns6tNChw34gl1F69Kf7unG8794ENatkriWu1ZII/JKDa/VHPNy3n70FQxFrMgqQVo?= =?utf-8?q?iQbw/iX3ENtN9+EwUnLFpcXc+v3i49BnkaTG7tGMj8bPOsBVXLUGr0/5PzFw+VtKf?= =?utf-8?q?vway+pOQtVkETVw26wids+Wl1ATEhgQOy4ZiDpyn/oqMj3MQavoA1A=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: bb07ffc4-2e60-4ba3-6e12-08d9d672829c 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:55.7728 (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: 4k9f5C/NEumxgNvW9xfcAz5rcPeCB88gQHtbcqYNz0iJ+7NC+jJ2GpoNe9l5XyDp17bx2bLMG6hDwUXMbykBkw== 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/hwio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wfx/hwio.c b/drivers/staging/wfx/hwio.c index a2a37efc51a6..977b9325f496 100644 --- a/drivers/staging/wfx/hwio.c +++ b/drivers/staging/wfx/hwio.c @@ -15,6 +15,8 @@ #include "bus.h" #include "traces.h" +#define WFX_HIF_BUFFER_SIZE 0x2000 + static int read32(struct wfx_dev *wdev, int reg, u32 *val) { int ret; @@ -103,7 +105,7 @@ static int indirect_read(struct wfx_dev *wdev, int reg, u32 addr, u32 cfg; u32 prefetch; - WARN_ON(len >= 0x2000); + WARN_ON(len >= WFX_HIF_BUFFER_SIZE); WARN_ON(reg != WFX_REG_AHB_DPORT && reg != WFX_REG_SRAM_DPORT); if (reg == WFX_REG_AHB_DPORT) @@ -151,7 +153,7 @@ static int indirect_write(struct wfx_dev *wdev, int reg, u32 addr, { int ret; - WARN_ON(len >= 0x2000); + WARN_ON(len >= WFX_HIF_BUFFER_SIZE); WARN_ON(reg != WFX_REG_AHB_DPORT && reg != WFX_REG_SRAM_DPORT); ret = write32(wdev, WFX_REG_BASE_ADDR, addr); if (ret < 0) 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: 12712452 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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:04 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: 12712453 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69A1EC433F5 for ; Thu, 13 Jan 2022 08:56:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233161AbiAMI4V (ORCPT ); Thu, 13 Jan 2022 03:56:21 -0500 Received: from mail-mw2nam10on2077.outbound.protection.outlook.com ([40.107.94.77]:35104 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231980AbiAMI4N (ORCPT ); Thu, 13 Jan 2022 03:56:13 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N6JMUAgPLsKbJJi9xAOU8cAqaiKGU8lKj6J7EuLDGy/YNssHt/7OokC514ijhFSngatuaaxrmlzhwCqPBt65CcnnVPNKHLRMhCDZHA/THT7BgmVsrL1i5rGT73SCow+McuQPXzDQ1DQ69PoZXgi2E4602WH7Bqt1BAHswytQkcjR74qkQG+0e1Ji9gQFlyg/XcxgUok75CYpRkwfcyJc1LIkRWAKj6S6XCS4tQS1hGs/ABfLUIiLnhg4smkYRFoMx9PWT8T+XZGzzNVf7tuq5gG6SLIBnc9QXT2mmxqlrqdVtNlh0XlQ3fVVwQzzHP2PdyoVHEm5XloUH+IktbsVbA== 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=f7Gah0YhgE6rIFrvRZ9DdGceIfhj0jtn1zWQUDomX7E=; b=fMLFSPHdASTS1x97BoIGjoZXbAolFLiGVK/BsqWSdtXqbXo6EwziZ1uO7cm0wHHSw0WGMwto8otMk+iaEhkfC2GmR7zkBDmFkRIN5YjDyP9Wv1qqbNheh2+l+kclhQl5IvVGsokzZmbVafYD4MCMm4hE4Rlmc79C0a8S2pcC2YUGnrOhZin4MLL56JpfzSGW9iu3jvOhZASqtsexpNGAUlXkVPaOJ6+SqRBMUJFZIXleSl1t44Q6Sm17GKXEskcOwP6XhEdYTTZl0layLjak7emF9JcspwmPGZdwoIff5t9GtKvzIRpLSqVSagk2gYcGodZLJMesMh8ZEGAtstPhDw== 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=f7Gah0YhgE6rIFrvRZ9DdGceIfhj0jtn1zWQUDomX7E=; b=LF2BqjQRmbcj+1fNtaZbHUkJIqvHhhLnLPWzr6n140h2rOyV+XeOtETkf4S/A2n+S5KwHmv2ZhyxtzYpQtwmcoRfbG0lj24rMzkjsjjlkhJSIglg3ctVCkT1pTL5qDgqGxauFc/q/UhaLFTc1Ns6k2ARKbnOwgSvPOEtAv0jxw8= 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:59 +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:59 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 11/31] staging: wfx: preserve endianness of struct hif_ind_startup Date: Thu, 13 Jan 2022 09:55:04 +0100 Message-Id: <20220113085524.1110708-12-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: 634502e5-44eb-47b1-81e4-08d9d67284e9 X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lsfvUEh6dNufLDLCpsE4NKOBiVft98Lz93RsFULn2GDrdSJjzVeyT0Pm1YgJ6w82IvFDseW7D8ZB+bO4+p4XHP1j72YEi8NToJXxtjYXfa6OzlF08IND2Hk4dQHBxOCteLYtANfMr/8+FP4pi/3qwQsdsjP/e6MSATHqYFuD3CfgPkQHMXVZ2Y4xgM1ArMeB2nXdrTy2AlZvy2sIXIJNwlja+XQT7DYIzz9qAcWUkRCeu4+57OqSOHFKZD4kRbNKMeI+jj792XwN/eqIPiNXqm0aP/Za/iW56bVOaNJcov2bU6gt+89xgXj45m3cjNs6q/XA5E3fBvxPZzy0SX4nYhgV3PpLHv7JZJu+YpnwOpXZQ/kMTZN3Wvery83so7axrUsjn5RknJW0NrFsgjBwouEbGrPKCv188f3TYPG7OOzPr3IShrOtrOLTie2+HF+XrzeNwjZ3UZfg8/DfshafQUl4aG2/sUP3Z+jEwaQIZ7uioyZNNY54bk8b7dqdDkh4IOV9ZM+qfJnbuUMFJY55tXLnGJknnsXsc/6ajShMxAR0zqdG5cwcSgkNFumabk4spkp07ShgWy9sDb7YyN+GevHz9Sw9S0QBVH2tJE/t8tV+FJ/T/GwdlkTl2xjfDZXQcTqfT0N0xLeB7mzRYsJ1bw== 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?oul0FJ23WngL7TwGZnx2huqlSRMe?= =?utf-8?q?R/wMFUVpj2xV6BLY5C4LHNCkjs4erNZNoOQWIL+MQhd/WC0BQNA6GZgDeHTQPqW34?= =?utf-8?q?laey7UTnrYveH5j6/lHZojUqDlx7NTSo7p5q/qyv/eF+fICFVR09YZAKsPmiFK6hI?= =?utf-8?q?+e+9Z8bjAN/cODAtExC+DlGCS6Ae2RAGYP9JI2HHxpF3+eVmp+JrP7ahvsjgTct6m?= =?utf-8?q?kX+S3QeRFEgaD/TmICzLejko9NAiZXhFEsjnwhWveY8PUhUCxULwoQO9Xdj1OE0BR?= =?utf-8?q?piIAfAbtzJFH4x+EpSJj/JoCnCwfjQX2JAR2F5BvTRtK2kkfEctXzQiiWREbAXPdk?= =?utf-8?q?Wc6LeEXkPdpjUBH4YkfKjFqj+0+51amim+gNihQXMsuD2zoZ02DdMBMtOK1Pm0KyP?= =?utf-8?q?ZyyuOuCi3j3g/UL5Z9Ubvd24gi8SAatvCo/zDPSH+VqzkfkREMiyYnRO/LNhpAMgH?= =?utf-8?q?+VoM9OxvCfWQxFsxQGIy4Px7HBBgqETi0xNa3Scl5qCKREFDN3UnUenXYdNISchk1?= =?utf-8?q?yWvdlMkoQ2a/5wiP0j8cgubOIoyRwnBbFMOy45Kxb/Oc28zlET3HgCyYsSOrPBURc?= =?utf-8?q?kKTBbSCBq2o9zK8bJ5e7Yaf6p6Xrwapoc2aL6UppBX3Qy1tcz5nkaQwYJ8mQbzZZs?= =?utf-8?q?E1v85cUo9J3grOj10ka4MtAhWV4TsfCziltsZbXcqm8EPTivQOiE09w2PaffWHnH9?= =?utf-8?q?nGtTEOAWmU/e4kcWKMq3DJkBXk7bbXlkaVQOLrx3qiwkQTgln87vCL2BJZpMBtkAM?= =?utf-8?q?FBn6541czw2kvtOOz5jk0+FTWCuyAPLkkg7zdgKrITBqIf0SU4zX8ViTsJb95f0Iy?= =?utf-8?q?tt3VbeJXAzVZs8zr0pEK+7/PVaQPlKH6UehxQZBtRnXzbHpxA1yeWBflbg5AV6GjC?= =?utf-8?q?ysluBfSshticJ6vMA3h3/UgFYzQE1cvbr/u7lrGCMOXhvFHcc77I/De8T3e/wQ8kp?= =?utf-8?q?0tgfqHXEqof0RnHjA8iW6ySdKRMfcGqy/5VRnvKqsroXWzN9k2FLsLSadvQDp8p/z?= =?utf-8?q?+juz9AKh3n5JjGvHuIcRQUIvttEoHwzQ+CaAHsGlPA5utFXmzd7YD/s+rbRJSddtH?= =?utf-8?q?wefyGIq+4hIzBfvNYYeUUuBCJZl8vm15+oIYP6q4Y6WPy4SWnqcP0cao47wVCIJgA?= =?utf-8?q?KExD4q/9Jb0t9rU3hYuiczStdmGjx4yktalBxIFfWaIlVbQvoscdaVb2rTvaAsgDJ?= =?utf-8?q?/f6yNZozMm7YZnELJOjsZvbnaPiSKaqQvw26gQXSF/WTV+FXX6mnyUhWp1WUuYyWn?= =?utf-8?q?sezhs6A/JiCw+A/Zj2KNK0jPttjOccbCjVMuUkoGyfqU40XRMxMnv/wjpna/Kjyx+?= =?utf-8?q?iKpO7fXLJWWjVhD49ZpQDuRq/8Sb2jWhGgHHjB+Ft1dpQxSqvCd1bmPtGKNbN7XDF?= =?utf-8?q?eoUsdl9j8EFyXEt2mp1KAbXmESKiGbwx9pHw/gJX/NsvDEMiAzB879R/Yv63Eun+V?= =?utf-8?q?eOQQlvhSFs87fC47oOr2B3W5ZEK5nI822VeLgc1Ai8qUebu7wnejkhB5uVLO4BtRB?= =?utf-8?q?GkpQX7560T7flhPU2mtHMGI+c9UNfTs0qcxdfVyCrYp/LtPfz9MrxY7DCBgTmT2kT?= =?utf-8?q?00l1NQcy7vJE/5OrRe0JqRmglk82hA2jrl5YZLNtPHliqHNCoTSC+k=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 634502e5-44eb-47b1-81e4-08d9d67284e9 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:59.6803 (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: 0jfV/fb2vfJJWWbFHzXWkaqdqV/whI/BjchKsZNysxEj3IzVN8UUSB2052yYC8VZb2gfM9iVs7xXDgdIz0/AMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4040 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller The hardware fills struct hif_ind_startup with little endian values. So, declare it with little endian fields. It is now a bit more verbose to access to fields of struct hif_ind_startup, but it is less confusing. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 8 ++++---- drivers/staging/wfx/data_tx.c | 4 ++-- drivers/staging/wfx/hif_api_general.h | 12 ++++-------- drivers/staging/wfx/hif_rx.c | 5 ----- 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index a0f9d1b53019..bbcf8d6a39c4 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -182,9 +182,9 @@ static void tx_helper(struct wfx_dev *wdev, struct hif_msg *hif) wdev->hif.tx_seqnum = (wdev->hif.tx_seqnum + 1) % (HIF_COUNTER_MAX + 1); data = hif; - WARN(len > wdev->hw_caps.size_inp_ch_buf, - "%s: request exceed the chip capability: %zu > %d\n", __func__, - len, wdev->hw_caps.size_inp_ch_buf); + WARN(len > le16_to_cpu(wdev->hw_caps.size_inp_ch_buf), + "request exceed the chip capability: %zu > %d\n", + len, le16_to_cpu(wdev->hw_caps.size_inp_ch_buf)); len = wdev->hwbus_ops->align_size(wdev->hwbus_priv, len); ret = wfx_data_write(wdev, data, len); if (ret) @@ -204,7 +204,7 @@ static int bh_work_tx(struct wfx_dev *wdev, int max_msg) for (i = 0; i < max_msg; i++) { hif = NULL; - if (wdev->hif.tx_buffers_used < wdev->hw_caps.num_inp_ch_bufs) { + if (wdev->hif.tx_buffers_used < le16_to_cpu(wdev->hw_caps.num_inp_ch_bufs)) { if (try_wait_for_completion(&wdev->hif_cmd.ready)) { WARN(!mutex_is_locked(&wdev->hif_cmd.lock), "data locking error"); hif = wdev->hif_cmd.buf_send; diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 052a19161dc5..5492375fe80a 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -359,10 +359,10 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, hif_msg->len = cpu_to_le16(skb->len); hif_msg->id = HIF_REQ_ID_TX; hif_msg->interface = wvif->id; - if (skb->len > wvif->wdev->hw_caps.size_inp_ch_buf) { + if (skb->len > le16_to_cpu(wvif->wdev->hw_caps.size_inp_ch_buf)) { dev_warn(wvif->wdev->dev, "requested frame size (%d) is larger than maximum supported (%d)\n", - skb->len, wvif->wdev->hw_caps.size_inp_ch_buf); + skb->len, le16_to_cpu(wvif->wdev->hw_caps.size_inp_ch_buf)); skb_pull(skb, wmsg_len); return -EIO; } diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index 8244676112a5..a57789ceb209 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -108,16 +108,12 @@ enum hif_api_rate_index { }; struct hif_ind_startup { - /* As the others, this struct is interpreted as little endian by the - * device. However, this struct is also used by the driver. We prefer to - * declare it in native order and doing byte swap on reception. - */ __le32 status; - u16 hardware_id; + __le16 hardware_id; u8 opn[14]; u8 uid[8]; - u16 num_inp_ch_bufs; - u16 size_inp_ch_buf; + __le16 num_inp_ch_bufs; + __le16 size_inp_ch_buf; u8 num_links_ap; u8 num_interfaces; u8 mac_addr[2][ETH_ALEN]; @@ -138,7 +134,7 @@ struct hif_ind_startup { u8 phy1_region:3; u8 phy0_region:3; u8 otp_phy_ver:2; - u32 supported_rate_mask; + __le32 supported_rate_mask; u8 firmware_label[128]; } __packed; diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 5e675d2c3e82..ea6d192ce28c 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -81,11 +81,6 @@ static int hif_startup_indication(struct wfx_dev *wdev, return -EINVAL; } memcpy(&wdev->hw_caps, body, sizeof(struct hif_ind_startup)); - le16_to_cpus((__le16 *)&wdev->hw_caps.hardware_id); - le16_to_cpus((__le16 *)&wdev->hw_caps.num_inp_ch_bufs); - le16_to_cpus((__le16 *)&wdev->hw_caps.size_inp_ch_buf); - le32_to_cpus((__le32 *)&wdev->hw_caps.supported_rate_mask); - complete(&wdev->firmware_ready); return 0; } 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: 12712450 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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:06 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: 12712451 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1349BC433EF for ; Thu, 13 Jan 2022 08:56:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231952AbiAMI4S (ORCPT ); Thu, 13 Jan 2022 03:56:18 -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 S231817AbiAMI4M (ORCPT ); Thu, 13 Jan 2022 03:56:12 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TXoY4oDr7RP640puvBT5CoETMgpZ86rnUnGGe99sX8OnJ5nzOypSFADRgAWs+NrmkhbKDb416WHbF6QwMtF+Aw7u3DlkTO/Hql0TFJSBiqMOmKSetqdSVxbCauXxWvLJvXHEIPBUkmqDEjGjWb01IfrgsWb7hsmZ9U4tIcSAOQqbftakmmeVd3VviKkdKzCLuoNcXNfuhjBALQ89WtxMC4989I4AXPDtYzQYRaTUNhy0RjxjkivsmxGov4E7Zh0xLCpCDI5UQPcXQ0wtzyyE8gTqbFL94HnYAL/xlzvUTXa/EftHAd93IFvNYotwz7kulatreH3js4ooF9JqvE0sHg== 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=B/IqAtaKLS85I0Ect0B8jkTWemnsBq29LWk67+TZC58=; b=ca53F8klNyTOHgmDeu4soeV4nFI9uBn7JpzwY5gGH/8tDBcnPdlFP47GCi8yYhRrvODXWUvG5+mBg5oT4bUYJ+n8CBdGeZVvbAcRwsKi2SWGVChk/OUGZBZ8uIIa1DoABetBsZPqFEtgTanD31zpP/nxn7kHobS+2qdRtNk28iJy4awdwDgTaW8i6A/VlkyzgG5Km32/sbc/LzkHQX+M9okc0WR9EJ2ogkbQe9YBLFR2G4Qb/Zka1bgB25sMRDHYY1SgP1vUDZRxNcUXmo8ivVzNxjBAlZZBcLlJkfWAzu9BKmu8U9LmUaqhVOHllGI1WB5SNF0K6T+NLdyZda6l5w== 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=B/IqAtaKLS85I0Ect0B8jkTWemnsBq29LWk67+TZC58=; b=ag+0+EKVM91Nzg8GaRTavfLJwbeCfJfxz2C9okFe3Gd+bfURUVmkkgc8Kv9d/DaQb+P8otqLdi4aDtbOHTJePdf9Y8M/y+P1RpYSzphxBrMa4ItoESnM81nUi/mArbW10pNAHcS/xT5WCEVdL8ucPuoWDGUPVIwWXFxZ/JU0tfk= 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:03 +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:03 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 13/31] staging: wfx: fix ambiguous function name Date: Thu, 13 Jan 2022 09:55:06 +0100 Message-Id: <20220113085524.1110708-14-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: 1e4f187e-fd33-4307-aa39-08d9d6728723 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071: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: RwwdJbHfJESLVTges5WJkm8QaeXslStrmcLYlfOZQOX7XHZJ6nCf86ksnpP1pgMgRSiLzfMJLNE/t3D0fubrV2MmZccRG1BE+g1NgVEJN2ScQyDZHisRRx2xfynqlFhNR77ZwhRXMMPQTUmbXza8Xezc+GhoxSADpB4DLIJOgNUJW0dLwEcD8QlaMrpcJw5zFY2XwDx3r6AB4kpxk36Ff5l69G3DCGr5n+wZdjNLzhdEm4/lytKv368fH5y1bgVqOyi9JESFZ/qyrBzs8nbOoPQzlP55DxlJLX845qtBTWCW2HybkWB65dQlZIdB1fbLHIHc43q2P/wM9Sup4z6sq5paVHuaCQ3Bz5NhZ8syULWjBxljaBDpMEgyb0v/dI+/YvRj79+3CgxqvKGzXEeb78/z2U0nFPYOwdtUqx4Fwl/Gs6sNz2XtR7ZE8noNZ8m0Zh/Lr8xh6XMfuoOGuUbH+9ZslkobOOnOFewi9DO7/PfHr0oYt6ybUqIV9k59M4qOQZF9ANpHO2AiLPdvjIi4g9lj3eu23rvhzgfRUeFoo6PiFGmYCL2JdG9/fy9q8eeUnYrgDx9zq9vNenGwC0BPi9oZqW2iYeIR+IFASiPpmkEdBNXIBK/J4Wp8E2w1o4SEXYKQNTlR4kPoY0jeiD6Vzw== 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?SCd4e0YXOtE0EO0d0upZgc4TsHKK?= =?utf-8?q?Clkpl6hE/kug/xhrHGDrtwFs/b44KaDoWDM043kYbtFoEQlpVhaGwzn6sqlo6IEW/?= =?utf-8?q?ng0I2W3xO6Zjo5Qw0cb6tRVc4kWlq6VgR/CZ+ThUX6D+li/rX6pjwWCW0SYSKZDPl?= =?utf-8?q?tJASAY00pwYT0fU1UniLSTT9S8YQgwjh0cQohLWJXbVIcRainxO1eYuOGCK11mPfp?= =?utf-8?q?Ud5ECa1xc3BtUkb9ZVmRM/KCo/J9aaUW7SJoYuF2BKTOFHpSqIJqUxIKfEFtXNoZx?= =?utf-8?q?BEgXdIh4O9g2l/DSKpY489OBQ4Sf1n3oMdr1cAd50B71QsVscSjeyaomll7h3JMvS?= =?utf-8?q?Fusxr0CUhahb/rVocfzGDmPOMHYN1QFDUYUpC2D0FpeGgrinNM2guxUUnsKN0bfE+?= =?utf-8?q?MHpn2qNhpsky2ZC0rECBd7skctW+FqCetjZbMtoWaVW5FAGkZV3UM2iWFN6R44QPY?= =?utf-8?q?oojiJ7sNvgOYEjU1VtmRn5f1nzvCXvIbnH5k/tWYD0fQeIe6XVkUoNlwMJTYAE/B4?= =?utf-8?q?2wyfR5yzkiIONkDBlwf38hRMk1A2eWPZT40X0c0yRlO2TQ0QqVeHSlhyxsB353WQn?= =?utf-8?q?CGgLRzjTEADvbpeGALkQuoJo1L5RF5Njmw/bWqDd6tGAQFOonzL8dN/zEVpHAhNGE?= =?utf-8?q?pRln7RlqQLbhfxkhEWTyfZtqVvCPpchuWUm+z+lYiwcNwafEAhJfvPaT47yuoLkKG?= =?utf-8?q?c7zuIxa3vETvhuYeQzH1r3NEhl4YB3lyLX6vWMYy/V0fkI125NvVnGq8GKig/ahnE?= =?utf-8?q?5h5NxqaTFUuz2sRreWe4GqJb7ZTj6fZCz6zM5o+4c3/cB8P2KxtV3qgcT1zPHKIEf?= =?utf-8?q?L6t1SgDRGXSyPJaBA+M4SeF3pxrLtcBm9U88mKEfiJxOviOFyY3OF0nfcTsdaIbqh?= =?utf-8?q?aoGhcsJNUzK4trAOWqs7IcBMHp4lV9uvOadI9mU+q3mnNy6ZQAzyODwK9EQPxgEFv?= =?utf-8?q?nZkGVX5RjZeKDeQd4A+qK/O2zkui1ek/NFioAvzM2ugRc8Q/yPKlSgAu6FwJERZcP?= =?utf-8?q?BwC4s3H99UnUho8a1tisFYKMPWQ6hNmZdettr8hLIaeXJZYgULnPo5phr1dK5LNxF?= =?utf-8?q?3zH2f8uCYe6AGFDT7D+0uho+25KtOYf4jOjrqVBL8XOebRRO2KU/aZq2CcgO8G/g8?= =?utf-8?q?evkFpdeYKpfSBNQH4deslYhmxpdI0pdbiS7ih7BKgh2LGucvOlHdSE0Cs21l7b51m?= =?utf-8?q?wwYy4DpQRaS9FCA2D/YjomMDDzVYBWxvqijXRWAwFIdqPWAewJ50iyiGoDbEEr3v9?= =?utf-8?q?KE6BpX0DlwMznpoqzcjo3NIGgeoDtXMK2i0GM21VOyur++RcZdOXFWeJ+esLi8XZF?= =?utf-8?q?q2lSnLG6pdfUl817OOAIkETh0NTvecCCoTQ2ufNHHGwT/2T8unmIUN1Esub5fFlW2?= =?utf-8?q?hUg/FJKSyVCi4MkcdqH1fsTWZIiF17q22pZ8LsZvHwm3NYbMZc3+/uzbzRr18zLbF?= =?utf-8?q?rqpYWsQvu96y4d6B4BNfgSumXyAS69I+IRfEvzzXCtOr9LIzurPCRaFnM+nN0xAej?= =?utf-8?q?C9Yvb/co7k/dDDeaw695WJgFkrIcxQUyGJLkLIuEy3jTd/MeE6+qyppPBn2ciNLux?= =?utf-8?q?orQiWjSZqDgtMDm7tGKW4cFE09dxZuZK6JhyzLC9Xb15RK5EDPwyPQ=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1e4f187e-fd33-4307-aa39-08d9d6728723 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:03.3856 (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: VdQNe+0htqatolmwGS77BWQNn1x6S3aJS2nUHx6kZ21UFMpvfhFOEhciJ4hcqwaNSPhT76TxGN/KeIg4JS2mkQ== 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/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 5492375fe80a..9ff9cca5eb66 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -207,7 +207,7 @@ void wfx_tx_policy_init(struct wfx_vif *wvif) /* Tx implementation */ -static bool ieee80211_is_action_back(struct ieee80211_hdr *hdr) +static bool wfx_is_action_back(struct ieee80211_hdr *hdr) { struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)hdr; @@ -420,7 +420,7 @@ void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, /* Because of TX_AMPDU_SETUP_IN_HW, mac80211 does not try to send any * BlockAck session management frame. The check below exist just in case. */ - if (ieee80211_is_action_back(hdr)) { + if (wfx_is_action_back(hdr)) { dev_info(wdev->dev, "drop BA action\n"); goto drop; } 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: 12712454 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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:08 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: 12712455 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52934C433FE for ; Thu, 13 Jan 2022 08:56:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233193AbiAMI41 (ORCPT ); Thu, 13 Jan 2022 03:56:27 -0500 Received: from mail-mw2nam10on2077.outbound.protection.outlook.com ([40.107.94.77]:35104 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232412AbiAMI4R (ORCPT ); Thu, 13 Jan 2022 03:56:17 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VBEzLjMOCtOIYraxPwATDj5lmhDiw8i03VPc7+zFM68W9cN4emjAzE598aANWlwQztcoZ3BFCaEfIthueiorjx8m4rdPEM83cPo/x8OyS4IrRXHSHQY2hbgSla6JyNZMSaJzlxHKZnYA92RfFbONIiD1aBgr4meRsS5CZeJNtEkLQbNNEeP6KSJzwZf7Rmup1LD5iyqiNAganZyk/fTC0lp0l5NKYdRdsrtCfRB5h3xl/JB3io0KeXfqr1IGI18QV8giXzCjW8sPAvkOWN57uGx2SnCviji+6EX6fALiGI18+ZRhWljLXW8UDUfglRZ1SceEx5lIju91kFV9HjhtDw== 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=MmTrl3snazhqJMS/L7OHmReLfXtYoyj2BWSk8QTPahU=; b=lBbfImHhezrX9hQlJPVSmq6xMiCGKDjo1VhsGQsuMeTaF3PJJWItE3Nlm+ljXrMt1Lb33pUytXuBPYVQquTXr/v99nKBGJ0IQP78cHhAaetBplfvl5izi+/G3QK/5gux2N5CEyvKlpQB0323/ODvLYRPQoP/M83VQj7p4j+zznI6NF8v0yBynzI+/vfhQRPDNLcWr594Aitj6H+JC3ldYlutlVV6wh2CXFz/C4Glg0m9vQgn4T4D/mHyPrf0xLAocXfknaVMIvsDqdnK83ilwN/eoh7zOswclgb/mIdPRa/DARQhViC7Pj29pHQA+RKyos407aH9ZBQmck4vo+uOPQ== 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=MmTrl3snazhqJMS/L7OHmReLfXtYoyj2BWSk8QTPahU=; b=HviL/+lHVORPN5dlD1ly5zKnGAMBmvmllvoXgT4aUZfVWnSOTZDeTnuIv38QEpRLIu3yxMcv3HoJn/ff22IeYqKVdcir7XUs+8tRJmVK1nkw3kL81yYbcgoL1xh3s7z9licNdRXNesVpw/LIhZx618UJ7ECUKhfsc746pPEFAG4= 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:07 +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:07 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 15/31] staging: wfx: prefix functions from hwio.h with wfx_ Date: Thu, 13 Jan 2022 09:55:08 +0100 Message-Id: <20220113085524.1110708-16-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: 1759edbb-cd2b-4276-3b70-08d9d6728992 X-MS-TrafficTypeDiagnostic: BY5PR11MB4040:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1107; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7Nht9UqGn11bqTwiK5RMX1Tlw5hR4jWWHK2FWgqWuQV/8ZxgTbhLr+O/eVddMrXk9V8fbeWtkNzZoHXwctYT3uGvEpW1QPRublKaRhxXnI7ge28RMzBJCiCHKbpsRvB7WQBYJeNC27bhyL+eHYT/MAoHAb/yln/BdNy/EtRAKgS726Shr60PkvR85SEBGfnquKqSgXPLi8elF5JSGjZyYpJyDqeHliSMDat/sTtPasxCc0XrrmVcOkN7C2RqlvPuVEqiwqef4Dp1ej+VaURU1vozw+8MBnhuYUdLyH7Snons+i8mnbaRTqO3zG30KK+XUxgZ/u98rUlZYbGixXZvxNxI0isvVattr79YNUsMLtmnb68mIpxheLVPdBKxV9EXgRlYFp3L1fgjwChceq+88ZdTK8w3ssgD9gJ6XpF9zxS7mkoFVSepsMKfetAka0wzrN7MtLtN5jrnlptmf9JisuIldRoDPL+3aCKOXEDMbXUuUIlBoWRlDzhEVTWhyHhyzrvrqIWzBRUzz12GiVHaFeXkcLm4kgF5JmjyUMF1AiG4HLX2QPiYfWxoc8V5Cs9WFYgnjyuIDszIkLff9Dtjw6F9BA5PU1z7Iwk2hKgYGSiT6WLxvktgRnOip7hIe11vZlLkULNoNYs5yIb8keP1MQ== 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);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?0HxEZb8fD1VcHbaJMSd/+eRTgM3A?= =?utf-8?q?JPC7Ae3EeavHyqGFWJSZAF8IGwfNoOL+0RDLKJEFYT+uK9b2wFqhzFst4N7jo2uVI?= =?utf-8?q?/MDh6zRG0Zjv0IE86r9+NuvMJCVHTltRphAumQat+3mBuyDaHKNjEAVhasNNgy0zZ?= =?utf-8?q?DW324Md3+mRbpzuGxYp4GrbSWpGdvNMXCcSaH6yD3VpDZyryLBJ74Flrm32IHCIln?= =?utf-8?q?MHn8fRB45sXSjXZKWdHkkrqXH1LpJuiAyohRUP7oWHO7xk3N0yWzEoFWpW5Ty0awW?= =?utf-8?q?QYD08TEuOofG7FG54PPXcX7B2JFs9xEAY1fR261C1Vmz9M9AsGxmn4vhq4K7Z3F6D?= =?utf-8?q?v/2fb2twO5B7GRBSauiV4BRWRgHK75r1secx5ADXPgG6uK9XUzI/DItgNGSXwRC5j?= =?utf-8?q?SaT0aipnVOMjAgiHHie6Jp1Sd21U36h+DA5Z5zGdW8Mh5dP+5rT5FxuboFTzKJ7ZD?= =?utf-8?q?JHAQ+X34nNsRLkiHCgkDm+AFesBPH155vgoI8/cPDQyIFYzNWVO5F/lLrpri+OH26?= =?utf-8?q?gdEu1aAlNiul2LlHqyxl+aupcwAMzhR5l8bxHhxcVVS/tIataECjBJPVdyJpaAaER?= =?utf-8?q?1HSGJ9W/1qSQlDV/W+Wi0Gj22ejs1fUd7HI4NwfnOCXILBCT1WzFjM8sFndoaUvxn?= =?utf-8?q?54/bHAhDVWdYxAPjccQl9dThvSQd5Qny/VO6ayTOZQHknLf5E2mMfsYbnMJr406FM?= =?utf-8?q?WGdK5OiUCit3REaicUXat8B4UaXbUt5wZHgQWwZqbN9PnyJNe9FkdNYFtyNEtA0DM?= =?utf-8?q?d8iWsK35XNZsJIDhOxfNdvZcQzB0ae7C83H0fYTZBcxVCNSwkBCRjBAtvYzixeqgb?= =?utf-8?q?FRND72HXgUKYqLEPxOyUFk9nbMwbk1b5cjuDwpyVA0Lja1zq2hmJkue1jiPRTMJIe?= =?utf-8?q?ogvJ/Htqw72/h2JxRFBFhFyMv3nrZUCN9GM9jjx0cUU0605h705VUh1z6dUklqtnX?= =?utf-8?q?hCxjyWw4z/sg2RuGwqU4ARL8n5ZoZz9tU7Fb9Ny7sB9CpVUGEaUWriWqupPQDthMI?= =?utf-8?q?uP5brPp7hu7E7WamuZH60rYg+mPNlXCX3+OE4hDJVNR7C2YU03uYclXZ1fJrd2zQu?= =?utf-8?q?Y1AUD3unujWNaXBpYwzO7JeU9Utfm/qaPkQWRIlxKI4LUleCVNt4Tw2lbkkOWJXlv?= =?utf-8?q?RV/S5cDqSUe9FWloiaxydYEYXUe0FM6Dw2wVHbydLqqDDgG5qICuDoBFDiP+vyjS9?= =?utf-8?q?grbOcwXW50HlBRygy9I5srPdJPB8QC6dNeBntlq/kaykiXDvkMr7eiMcq+0CywSQr?= =?utf-8?q?LVLvwRn2b1djvgSjerU3mdZvH7YMbPzTB9OaxMIKIedoVeqdSn7J4zvrA0IcScOYz?= =?utf-8?q?IECmeWKACBJmU1io+V/VJQIciRpG4STxOHaSgOFySLL8l5BMq4YJ00iKDTvBmU5ps?= =?utf-8?q?9CAV1/rAIvHXYWIbYgdkObUmDtoPFPDYDr1wo6z0m+AZ6cT//17J+lhh3koDVNAen?= =?utf-8?q?WSXllIyvfSyv3b9sICPfwrh04WnWaSeezZ5CcJyI4tc/KZKKInyPOs4pUQ7tWad1R?= =?utf-8?q?BfRBXq2R1yo809LzeWKsiiRckV/ZPvZ4v6O+PeokpzE6RvmmMTcED3bvaHZP6alak?= =?utf-8?q?L97YeNpAHTNTKnagScXp6QPEM7c1rhtnuESYfoK/JfIcnwaDcmg/Sw=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1759edbb-cd2b-4276-3b70-08d9d6728992 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:07.4813 (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: ycRdDbSm/gDa/wFWidph8bwLSHhYsefd1Yo8lgf8NEo8yzkyWH9srNuFrwhHeE77PVtr4bcqdX8jLl+8aPPfSQ== 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/bh.c | 8 +-- drivers/staging/wfx/fwio.c | 78 ++++++++++---------- drivers/staging/wfx/hif_tx.c | 2 +- drivers/staging/wfx/hwio.c | 135 +++++++++++++++++++---------------- drivers/staging/wfx/hwio.h | 32 ++++----- drivers/staging/wfx/main.c | 2 +- 6 files changed, 133 insertions(+), 124 deletions(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index bbcf8d6a39c4..b7fa0aeafd78 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -227,11 +227,11 @@ static void ack_sdio_data(struct wfx_dev *wdev) { u32 cfg_reg; - config_reg_read(wdev, &cfg_reg); + wfx_config_reg_read(wdev, &cfg_reg); if (cfg_reg & 0xFF) { dev_warn(wdev->dev, "chip reports errors: %02x\n", cfg_reg & 0xFF); - config_reg_write_bits(wdev, 0xFF, 0x00); + wfx_config_reg_write_bits(wdev, 0xFF, 0x00); } } @@ -270,7 +270,7 @@ void wfx_bh_request_rx(struct wfx_dev *wdev) { u32 cur, prev; - control_reg_read(wdev, &cur); + wfx_control_reg_read(wdev, &cur); prev = atomic_xchg(&wdev->hif.ctrl_reg, cur); complete(&wdev->hif.ctrl_ready); queue_work(system_highpri_wq, &wdev->hif.bh); @@ -304,7 +304,7 @@ void wfx_bh_poll_irq(struct wfx_dev *wdev) WARN(!wdev->poll_irq, "unexpected IRQ polling can mask IRQ"); start = ktime_get(); for (;;) { - control_reg_read(wdev, ®); + wfx_control_reg_read(wdev, ®); now = ktime_get(); if (reg & 0xFFF) break; diff --git a/drivers/staging/wfx/fwio.c b/drivers/staging/wfx/fwio.c index 98a9391b2bee..c9a54c519e8a 100644 --- a/drivers/staging/wfx/fwio.c +++ b/drivers/staging/wfx/fwio.c @@ -79,8 +79,8 @@ static const char * const fwio_errors[] = { * NOTE: it may also be possible to use 'pages' from struct firmware and avoid * bounce buffer */ -static int 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; @@ -92,7 +92,7 @@ static int sram_write_dma_safe(struct wfx_dev *wdev, u32 addr, const u8 *buf, } else { tmp = buf; } - ret = sram_buf_write(wdev, addr, tmp, len); + ret = wfx_sram_buf_write(wdev, addr, tmp, len); if (tmp != buf) kfree(tmp); return ret; @@ -156,7 +156,7 @@ static int wait_ncp_status(struct wfx_dev *wdev, u32 status) start = ktime_get(); for (;;) { - ret = sram_reg_read(wdev, WFX_DCA_NCP_STATUS, ®); + ret = wfx_sram_reg_read(wdev, WFX_DCA_NCP_STATUS, ®); if (ret < 0) return -EIO; now = ktime_get(); @@ -192,7 +192,7 @@ static int upload_firmware(struct wfx_dev *wdev, const u8 *data, size_t len) break; if (ktime_after(now, ktime_add_ms(start, DCA_TIMEOUT))) return -ETIMEDOUT; - ret = sram_reg_read(wdev, WFX_DCA_GET, &bytes_done); + ret = wfx_sram_reg_read(wdev, WFX_DCA_GET, &bytes_done); if (ret < 0) return ret; } @@ -200,9 +200,9 @@ 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 = sram_write_dma_safe(wdev, WFX_DNLD_FIFO + - (offs % DNLD_FIFO_SIZE), - data + offs, DNLD_BLOCK_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; @@ -210,7 +210,7 @@ static int upload_firmware(struct wfx_dev *wdev, const u8 *data, size_t len) * during first loop */ offs += DNLD_BLOCK_SIZE; - ret = sram_reg_write(wdev, WFX_DCA_PUT, offs); + ret = wfx_sram_reg_write(wdev, WFX_DCA_PUT, offs); if (ret < 0) return ret; } @@ -221,10 +221,10 @@ static void print_boot_status(struct wfx_dev *wdev) { u32 reg; - sram_reg_read(wdev, WFX_STATUS_INFO, ®); + wfx_sram_reg_read(wdev, WFX_STATUS_INFO, ®); if (reg == 0x12345678) return; - sram_reg_read(wdev, WFX_ERR_INFO, ®); + wfx_sram_reg_read(wdev, WFX_ERR_INFO, ®); if (reg < ARRAY_SIZE(fwio_errors) && fwio_errors[reg]) dev_info(wdev->dev, "secure boot: %s\n", fwio_errors[reg]); else @@ -245,36 +245,36 @@ static int load_firmware_secure(struct wfx_dev *wdev) if (!buf) return -ENOMEM; - sram_reg_write(wdev, WFX_DCA_HOST_STATUS, HOST_READY); + wfx_sram_reg_write(wdev, WFX_DCA_HOST_STATUS, HOST_READY); ret = wait_ncp_status(wdev, NCP_INFO_READY); if (ret) goto error; - sram_buf_read(wdev, WFX_BOOTLOADER_LABEL, buf, BOOTLOADER_LABEL_SIZE); + wfx_sram_buf_read(wdev, WFX_BOOTLOADER_LABEL, buf, BOOTLOADER_LABEL_SIZE); buf[BOOTLOADER_LABEL_SIZE] = 0; dev_dbg(wdev->dev, "bootloader: \"%s\"\n", buf); - sram_buf_read(wdev, WFX_PTE_INFO, buf, PTE_INFO_SIZE); + wfx_sram_buf_read(wdev, WFX_PTE_INFO, buf, PTE_INFO_SIZE); ret = get_firmware(wdev, buf[PTE_INFO_KEYSET_IDX], &fw, &fw_offset); if (ret) goto error; header_size = fw_offset + FW_SIGNATURE_SIZE + FW_HASH_SIZE; - sram_reg_write(wdev, WFX_DCA_HOST_STATUS, HOST_INFO_READ); + wfx_sram_reg_write(wdev, WFX_DCA_HOST_STATUS, HOST_INFO_READ); ret = wait_ncp_status(wdev, NCP_READY); if (ret) goto error; - sram_reg_write(wdev, WFX_DNLD_FIFO, 0xFFFFFFFF); /* Fifo init */ - sram_write_dma_safe(wdev, WFX_DCA_FW_VERSION, "\x01\x00\x00\x00", - FW_VERSION_SIZE); - sram_write_dma_safe(wdev, WFX_DCA_FW_SIGNATURE, fw->data + fw_offset, - FW_SIGNATURE_SIZE); - sram_write_dma_safe(wdev, WFX_DCA_FW_HASH, - fw->data + fw_offset + FW_SIGNATURE_SIZE, - FW_HASH_SIZE); - sram_reg_write(wdev, WFX_DCA_IMAGE_SIZE, fw->size - header_size); - sram_reg_write(wdev, WFX_DCA_HOST_STATUS, HOST_UPLOAD_PENDING); + 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_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, + 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); ret = wait_ncp_status(wdev, NCP_DOWNLOAD_PENDING); if (ret) goto error; @@ -287,14 +287,14 @@ static int load_firmware_secure(struct wfx_dev *wdev) dev_dbg(wdev->dev, "firmware load after %lldus\n", ktime_us_delta(ktime_get(), start)); - sram_reg_write(wdev, WFX_DCA_HOST_STATUS, HOST_UPLOAD_COMPLETE); + wfx_sram_reg_write(wdev, WFX_DCA_HOST_STATUS, HOST_UPLOAD_COMPLETE); ret = wait_ncp_status(wdev, NCP_AUTH_OK); /* Legacy ROM support */ if (ret < 0) ret = wait_ncp_status(wdev, NCP_PUB_KEY_RDY); if (ret < 0) goto error; - sram_reg_write(wdev, WFX_DCA_HOST_STATUS, HOST_OK_TO_JUMP); + wfx_sram_reg_write(wdev, WFX_DCA_HOST_STATUS, HOST_OK_TO_JUMP); error: kfree(buf); @@ -320,8 +320,8 @@ static int init_gpr(struct wfx_dev *wdev) }; for (i = 0; i < ARRAY_SIZE(gpr_init); i++) { - ret = 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", @@ -341,13 +341,13 @@ int wfx_init_device(struct wfx_dev *wdev) reg = CFG_DIRECT_ACCESS_MODE | CFG_CPU_RESET | CFG_BYTE_ORDER_ABCD; if (wdev->pdata.use_rising_clk) reg |= CFG_CLK_RISE_EDGE; - ret = config_reg_write(wdev, reg); + ret = wfx_config_reg_write(wdev, reg); if (ret < 0) { dev_err(wdev->dev, "bus returned an error during first write access. Host configuration error?\n"); return -EIO; } - ret = config_reg_read(wdev, ®); + ret = wfx_config_reg_read(wdev, ®); if (ret < 0) { dev_err(wdev->dev, "bus returned an error during first read access. Bus configuration error?\n"); return -EIO; @@ -374,12 +374,12 @@ int wfx_init_device(struct wfx_dev *wdev) if (ret < 0) return ret; - ret = control_reg_write(wdev, CTRL_WLAN_WAKEUP); + ret = wfx_control_reg_write(wdev, CTRL_WLAN_WAKEUP); if (ret < 0) return -EIO; start = ktime_get(); for (;;) { - ret = control_reg_read(wdev, ®); + ret = wfx_control_reg_read(wdev, ®); now = ktime_get(); if (reg & CTRL_WLAN_READY) break; @@ -391,15 +391,15 @@ int wfx_init_device(struct wfx_dev *wdev) dev_dbg(wdev->dev, "chip wake up after %lldus\n", ktime_us_delta(now, start)); - ret = config_reg_write_bits(wdev, CFG_CPU_RESET, 0); + ret = wfx_config_reg_write_bits(wdev, CFG_CPU_RESET, 0); if (ret < 0) return ret; ret = load_firmware_secure(wdev); if (ret < 0) return ret; - return config_reg_write_bits(wdev, - CFG_DIRECT_ACCESS_MODE | - CFG_IRQ_ENABLE_DATA | - CFG_IRQ_ENABLE_WRDY, - CFG_IRQ_ENABLE_DATA); + return wfx_config_reg_write_bits(wdev, + CFG_DIRECT_ACCESS_MODE | + CFG_IRQ_ENABLE_DATA | + CFG_IRQ_ENABLE_WRDY, + CFG_IRQ_ENABLE_DATA); } diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 7c9d3d86c22e..9899e7b62203 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -135,7 +135,7 @@ int wfx_hif_shutdown(struct wfx_dev *wdev) if (wdev->pdata.gpio_wakeup) gpiod_set_value(wdev->pdata.gpio_wakeup, 0); else - control_reg_write(wdev, 0); + wfx_control_reg_write(wdev, 0); kfree(hif); return ret; } diff --git a/drivers/staging/wfx/hwio.c b/drivers/staging/wfx/hwio.c index 977b9325f496..c53b36d36687 100644 --- a/drivers/staging/wfx/hwio.c +++ b/drivers/staging/wfx/hwio.c @@ -17,7 +17,7 @@ #define WFX_HIF_BUFFER_SIZE 0x2000 -static int read32(struct wfx_dev *wdev, int reg, u32 *val) +static int wfx_read32(struct wfx_dev *wdev, int reg, u32 *val) { int ret; __le32 *tmp = kmalloc(sizeof(u32), GFP_KERNEL); @@ -36,7 +36,7 @@ static int read32(struct wfx_dev *wdev, int reg, u32 *val) return ret; } -static int write32(struct wfx_dev *wdev, int reg, u32 val) +static int wfx_write32(struct wfx_dev *wdev, int reg, u32 val) { int ret; __le32 *tmp = kmalloc(sizeof(u32), GFP_KERNEL); @@ -53,29 +53,30 @@ static int write32(struct wfx_dev *wdev, int reg, u32 val) return ret; } -static int read32_locked(struct wfx_dev *wdev, int reg, u32 *val) +static int wfx_read32_locked(struct wfx_dev *wdev, int reg, u32 *val) { int ret; wdev->hwbus_ops->lock(wdev->hwbus_priv); - ret = read32(wdev, reg, val); + ret = wfx_read32(wdev, reg, val); _trace_io_read32(reg, *val); wdev->hwbus_ops->unlock(wdev->hwbus_priv); return ret; } -static int write32_locked(struct wfx_dev *wdev, int reg, u32 val) +static int wfx_write32_locked(struct wfx_dev *wdev, int reg, u32 val) { int ret; wdev->hwbus_ops->lock(wdev->hwbus_priv); - ret = write32(wdev, reg, val); + ret = wfx_write32(wdev, reg, val); _trace_io_write32(reg, val); wdev->hwbus_ops->unlock(wdev->hwbus_priv); return ret; } -static int write32_bits_locked(struct wfx_dev *wdev, int reg, u32 mask, u32 val) +static int wfx_write32_bits_locked(struct wfx_dev *wdev, + int reg, u32 mask, u32 val) { int ret; u32 val_r, val_w; @@ -83,13 +84,13 @@ static int write32_bits_locked(struct wfx_dev *wdev, int reg, u32 mask, u32 val) WARN_ON(~mask & val); val &= mask; wdev->hwbus_ops->lock(wdev->hwbus_priv); - ret = read32(wdev, reg, &val_r); + ret = wfx_read32(wdev, reg, &val_r); _trace_io_read32(reg, val_r); if (ret < 0) goto err; val_w = (val_r & ~mask) | val; if (val_w != val_r) { - ret = write32(wdev, reg, val_w); + ret = wfx_write32(wdev, reg, val_w); _trace_io_write32(reg, val_w); } err: @@ -97,8 +98,8 @@ static int write32_bits_locked(struct wfx_dev *wdev, int reg, u32 mask, u32 val) return ret; } -static int indirect_read(struct wfx_dev *wdev, int reg, u32 addr, - void *buf, size_t len) +static int wfx_indirect_read(struct wfx_dev *wdev, int reg, u32 addr, + void *buf, size_t len) { int ret; int i; @@ -115,20 +116,20 @@ static int indirect_read(struct wfx_dev *wdev, int reg, u32 addr, else return -ENODEV; - ret = write32(wdev, WFX_REG_BASE_ADDR, addr); + ret = wfx_write32(wdev, WFX_REG_BASE_ADDR, addr); if (ret < 0) goto err; - ret = read32(wdev, WFX_REG_CONFIG, &cfg); + ret = wfx_read32(wdev, WFX_REG_CONFIG, &cfg); if (ret < 0) goto err; - ret = write32(wdev, WFX_REG_CONFIG, cfg | prefetch); + ret = wfx_write32(wdev, WFX_REG_CONFIG, cfg | prefetch); if (ret < 0) goto err; for (i = 0; i < 20; i++) { - ret = read32(wdev, WFX_REG_CONFIG, &cfg); + ret = wfx_read32(wdev, WFX_REG_CONFIG, &cfg); if (ret < 0) goto err; if (!(cfg & prefetch)) @@ -148,46 +149,46 @@ static int indirect_read(struct wfx_dev *wdev, int reg, u32 addr, return ret; } -static int indirect_write(struct wfx_dev *wdev, int reg, u32 addr, - const void *buf, size_t len) +static int wfx_indirect_write(struct wfx_dev *wdev, int reg, u32 addr, + const void *buf, size_t len) { int ret; WARN_ON(len >= WFX_HIF_BUFFER_SIZE); WARN_ON(reg != WFX_REG_AHB_DPORT && reg != WFX_REG_SRAM_DPORT); - ret = write32(wdev, WFX_REG_BASE_ADDR, addr); + ret = wfx_write32(wdev, WFX_REG_BASE_ADDR, addr); if (ret < 0) return ret; return wdev->hwbus_ops->copy_to_io(wdev->hwbus_priv, reg, buf, len); } -static int indirect_read_locked(struct wfx_dev *wdev, int reg, u32 addr, - void *buf, size_t len) +static int wfx_indirect_read_locked(struct wfx_dev *wdev, int reg, u32 addr, + void *buf, size_t len) { int ret; wdev->hwbus_ops->lock(wdev->hwbus_priv); - ret = indirect_read(wdev, reg, addr, buf, len); + ret = wfx_indirect_read(wdev, reg, addr, buf, len); _trace_io_ind_read(reg, addr, buf, len); wdev->hwbus_ops->unlock(wdev->hwbus_priv); return ret; } -static int indirect_write_locked(struct wfx_dev *wdev, int reg, u32 addr, - const void *buf, size_t len) +static int wfx_indirect_write_locked(struct wfx_dev *wdev, int reg, u32 addr, + const void *buf, size_t len) { int ret; wdev->hwbus_ops->lock(wdev->hwbus_priv); - ret = indirect_write(wdev, reg, addr, buf, len); + ret = wfx_indirect_write(wdev, reg, addr, buf, len); _trace_io_ind_write(reg, addr, buf, len); wdev->hwbus_ops->unlock(wdev->hwbus_priv); return ret; } -static int 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); @@ -195,7 +196,7 @@ static int indirect_read32_locked(struct wfx_dev *wdev, int reg, if (!tmp) return -ENOMEM; wdev->hwbus_ops->lock(wdev->hwbus_priv); - ret = indirect_read(wdev, reg, addr, tmp, sizeof(u32)); + ret = wfx_indirect_read(wdev, reg, addr, tmp, sizeof(u32)); *val = le32_to_cpu(*tmp); _trace_io_ind_read32(reg, addr, *val); wdev->hwbus_ops->unlock(wdev->hwbus_priv); @@ -203,8 +204,8 @@ static int indirect_read32_locked(struct wfx_dev *wdev, int reg, return ret; } -static int indirect_write32_locked(struct wfx_dev *wdev, int reg, - u32 addr, u32 val) +static int wfx_indirect_write32_locked(struct wfx_dev *wdev, int reg, + u32 addr, u32 val) { int ret; __le32 *tmp = kmalloc(sizeof(u32), GFP_KERNEL); @@ -213,7 +214,7 @@ static int indirect_write32_locked(struct wfx_dev *wdev, int reg, return -ENOMEM; *tmp = cpu_to_le32(val); wdev->hwbus_ops->lock(wdev->hwbus_priv); - ret = indirect_write(wdev, reg, addr, tmp, sizeof(u32)); + ret = wfx_indirect_write(wdev, reg, addr, tmp, sizeof(u32)); _trace_io_ind_write32(reg, addr, val); wdev->hwbus_ops->unlock(wdev->hwbus_priv); kfree(tmp); @@ -252,92 +253,100 @@ int wfx_data_write(struct wfx_dev *wdev, const void *buf, size_t len) return ret; } -int sram_buf_read(struct wfx_dev *wdev, u32 addr, void *buf, size_t len) +int wfx_sram_buf_read(struct wfx_dev *wdev, u32 addr, void *buf, size_t len) { - return 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 ahb_buf_read(struct wfx_dev *wdev, u32 addr, void *buf, size_t len) +int wfx_ahb_buf_read(struct wfx_dev *wdev, u32 addr, void *buf, size_t len) { - return 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 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 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 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 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 sram_reg_read(struct wfx_dev *wdev, u32 addr, u32 *val) +int wfx_sram_reg_read(struct wfx_dev *wdev, u32 addr, u32 *val) { - return indirect_read32_locked(wdev, WFX_REG_SRAM_DPORT, addr, val); + return wfx_indirect_read32_locked(wdev, WFX_REG_SRAM_DPORT, + addr, val); } -int ahb_reg_read(struct wfx_dev *wdev, u32 addr, u32 *val) +int wfx_ahb_reg_read(struct wfx_dev *wdev, u32 addr, u32 *val) { - return indirect_read32_locked(wdev, WFX_REG_AHB_DPORT, addr, val); + return wfx_indirect_read32_locked(wdev, WFX_REG_AHB_DPORT, + addr, val); } -int sram_reg_write(struct wfx_dev *wdev, u32 addr, u32 val) +int wfx_sram_reg_write(struct wfx_dev *wdev, u32 addr, u32 val) { - return indirect_write32_locked(wdev, WFX_REG_SRAM_DPORT, addr, val); + return wfx_indirect_write32_locked(wdev, WFX_REG_SRAM_DPORT, addr, val); } -int ahb_reg_write(struct wfx_dev *wdev, u32 addr, u32 val) +int wfx_ahb_reg_write(struct wfx_dev *wdev, u32 addr, u32 val) { - return indirect_write32_locked(wdev, WFX_REG_AHB_DPORT, addr, val); + return wfx_indirect_write32_locked(wdev, WFX_REG_AHB_DPORT, addr, val); } -int config_reg_read(struct wfx_dev *wdev, u32 *val) +int wfx_config_reg_read(struct wfx_dev *wdev, u32 *val) { - return read32_locked(wdev, WFX_REG_CONFIG, val); + return wfx_read32_locked(wdev, WFX_REG_CONFIG, val); } -int config_reg_write(struct wfx_dev *wdev, u32 val) +int wfx_config_reg_write(struct wfx_dev *wdev, u32 val) { - return write32_locked(wdev, WFX_REG_CONFIG, val); + return wfx_write32_locked(wdev, WFX_REG_CONFIG, val); } -int config_reg_write_bits(struct wfx_dev *wdev, u32 mask, u32 val) +int wfx_config_reg_write_bits(struct wfx_dev *wdev, u32 mask, u32 val) { - return write32_bits_locked(wdev, WFX_REG_CONFIG, mask, val); + return wfx_write32_bits_locked(wdev, WFX_REG_CONFIG, mask, val); } -int control_reg_read(struct wfx_dev *wdev, u32 *val) +int wfx_control_reg_read(struct wfx_dev *wdev, u32 *val) { - return read32_locked(wdev, WFX_REG_CONTROL, val); + return wfx_read32_locked(wdev, WFX_REG_CONTROL, val); } -int control_reg_write(struct wfx_dev *wdev, u32 val) +int wfx_control_reg_write(struct wfx_dev *wdev, u32 val) { - return write32_locked(wdev, WFX_REG_CONTROL, val); + return wfx_write32_locked(wdev, WFX_REG_CONTROL, val); } -int control_reg_write_bits(struct wfx_dev *wdev, u32 mask, u32 val) +int wfx_control_reg_write_bits(struct wfx_dev *wdev, u32 mask, u32 val) { - return write32_bits_locked(wdev, WFX_REG_CONTROL, mask, val); + return wfx_write32_bits_locked(wdev, WFX_REG_CONTROL, mask, val); } -int igpr_reg_read(struct wfx_dev *wdev, int index, u32 *val) +int wfx_igpr_reg_read(struct wfx_dev *wdev, int index, u32 *val) { int ret; *val = ~0; /* Never return undefined value */ - ret = write32_locked(wdev, WFX_REG_SET_GEN_R_W, IGPR_RW | index << 24); + ret = wfx_write32_locked(wdev, WFX_REG_SET_GEN_R_W, IGPR_RW | index << 24); if (ret) return ret; - ret = read32_locked(wdev, WFX_REG_SET_GEN_R_W, val); + ret = wfx_read32_locked(wdev, WFX_REG_SET_GEN_R_W, val); if (ret) return ret; *val &= IGPR_VALUE; return ret; } -int igpr_reg_write(struct wfx_dev *wdev, int index, u32 val) +int wfx_igpr_reg_write(struct wfx_dev *wdev, int index, u32 val) { - return write32_locked(wdev, WFX_REG_SET_GEN_R_W, index << 24 | val); + return wfx_write32_locked(wdev, WFX_REG_SET_GEN_R_W, index << 24 | val); } diff --git a/drivers/staging/wfx/hwio.h b/drivers/staging/wfx/hwio.h index d34baae47017..8c8fe76871f8 100644 --- a/drivers/staging/wfx/hwio.h +++ b/drivers/staging/wfx/hwio.h @@ -19,17 +19,17 @@ struct wfx_dev; 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); -int sram_buf_read(struct wfx_dev *wdev, u32 addr, void *buf, size_t len); -int sram_buf_write(struct wfx_dev *wdev, u32 addr, const void *buf, size_t len); +int wfx_sram_buf_read(struct wfx_dev *wdev, u32 addr, void *buf, size_t len); +int wfx_sram_buf_write(struct wfx_dev *wdev, u32 addr, const void *buf, size_t len); -int ahb_buf_read(struct wfx_dev *wdev, u32 addr, void *buf, size_t len); -int ahb_buf_write(struct wfx_dev *wdev, u32 addr, const void *buf, size_t len); +int wfx_ahb_buf_read(struct wfx_dev *wdev, u32 addr, void *buf, size_t len); +int wfx_ahb_buf_write(struct wfx_dev *wdev, u32 addr, const void *buf, size_t len); -int sram_reg_read(struct wfx_dev *wdev, u32 addr, u32 *val); -int sram_reg_write(struct wfx_dev *wdev, u32 addr, u32 val); +int wfx_sram_reg_read(struct wfx_dev *wdev, u32 addr, u32 *val); +int wfx_sram_reg_write(struct wfx_dev *wdev, u32 addr, u32 val); -int ahb_reg_read(struct wfx_dev *wdev, u32 addr, u32 *val); -int ahb_reg_write(struct wfx_dev *wdev, u32 addr, u32 val); +int wfx_ahb_reg_read(struct wfx_dev *wdev, u32 addr, u32 *val); +int wfx_ahb_reg_write(struct wfx_dev *wdev, u32 addr, u32 val); #define CFG_ERR_SPI_FRAME 0x00000001 /* only with SPI */ #define CFG_ERR_SDIO_BUF_MISMATCH 0x00000001 /* only with SDIO */ @@ -59,21 +59,21 @@ int ahb_reg_write(struct wfx_dev *wdev, u32 addr, u32 val); #define CFG_DEVICE_ID_MAJOR 0x07000000 #define CFG_DEVICE_ID_RESERVED 0x78000000 #define CFG_DEVICE_ID_TYPE 0x80000000 -int config_reg_read(struct wfx_dev *wdev, u32 *val); -int config_reg_write(struct wfx_dev *wdev, u32 val); -int config_reg_write_bits(struct wfx_dev *wdev, u32 mask, u32 val); +int wfx_config_reg_read(struct wfx_dev *wdev, u32 *val); +int wfx_config_reg_write(struct wfx_dev *wdev, u32 val); +int wfx_config_reg_write_bits(struct wfx_dev *wdev, u32 mask, u32 val); #define CTRL_NEXT_LEN_MASK 0x00000FFF #define CTRL_WLAN_WAKEUP 0x00001000 #define CTRL_WLAN_READY 0x00002000 -int control_reg_read(struct wfx_dev *wdev, u32 *val); -int control_reg_write(struct wfx_dev *wdev, u32 val); -int control_reg_write_bits(struct wfx_dev *wdev, u32 mask, u32 val); +int wfx_control_reg_read(struct wfx_dev *wdev, u32 *val); +int wfx_control_reg_write(struct wfx_dev *wdev, u32 val); +int wfx_control_reg_write_bits(struct wfx_dev *wdev, u32 mask, u32 val); #define IGPR_RW 0x80000000 #define IGPR_INDEX 0x7F000000 #define IGPR_VALUE 0x00FFFFFF -int igpr_reg_read(struct wfx_dev *wdev, int index, u32 *val); -int igpr_reg_write(struct wfx_dev *wdev, int index, u32 val); +int wfx_igpr_reg_read(struct wfx_dev *wdev, int index, u32 *val); +int wfx_igpr_reg_write(struct wfx_dev *wdev, int index, u32 val); #endif diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index abc1a6d43300..43947f8f2e0c 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -428,7 +428,7 @@ int wfx_probe(struct wfx_dev *wdev) "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); - control_reg_write(wdev, 0); + wfx_control_reg_write(wdev, 0); wfx_hif_set_operational_mode(wdev, HIF_OP_POWER_MODE_QUIESCENT); } else { wfx_hif_set_operational_mode(wdev, HIF_OP_POWER_MODE_DOZE); 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: 12712460 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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: 12712456 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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:11 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: 12712461 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87A0EC433FE for ; Thu, 13 Jan 2022 08:56:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232362AbiAMI4s (ORCPT ); Thu, 13 Jan 2022 03:56:48 -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 S232119AbiAMI4a (ORCPT ); Thu, 13 Jan 2022 03:56:30 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XV3M+ql9PCYNDsC6amPKPKPObAntNNYkg4HZ4OAvaf+QoT72Q0/IzM1hfrv0EbqeLi/VE7zAu7jXy+jf7TabOrUz+Cu6IB9/9iKhvebJBvcspRgB2/3Lb2BjUobleUrV1JArgvoQVS61aBSBT/0qQadxA1ZrssHTvXyUfI5Q8qJbN24pgBkVBevaggohipYQyfMKa+Z1IGpH3Ll/fwcBwwk8xM/uVaqRCdmhHuV4L+e5+l3lM03LcuXlAHjzhBbaZWWLbjuKeMp+IftyJ5ZLvkzj4h2MRHEuaOtHADSudKRKdyNVGK3OmYK1dQxLeqXL8So8yYUDl4zytAfpch6kBg== 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=PJFGAXUSKQ6VnacN19l4jg/RG2DR7GhGcU0SNdtk25o=; b=BHgCsD+7Cpnp1im+IHbJQ4rYNl81zJQGEA6RC+5WhiODM79xgI/eBTKF4slZt8n5bfneIpXKjPac/6jHLsTD0FfZQ2LE5R64Og9tWZdCE/JR9qSClBroJk0tFed+aqJrjtGV0wpvN7vPEmUrt6lb5F8p8s/4GFvhDnwoGj2P9/lW6simgtvC02902xVgRrVkK+f23uHXOg6tpQP+1NFqcsMPQ2nYmhQOA+fHKwbtlNZllWy+XFfXQaHekuxiJAcYvr+GK6rzV7YWKlAvY+K7JFPrzoHG3WOaE522o/vcl7ZhSnN7IWg0TOUFIrNwOd5PnkLxrxwx4eL1CdGKNh0aEA== 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=PJFGAXUSKQ6VnacN19l4jg/RG2DR7GhGcU0SNdtk25o=; b=nfEdVW7B9W9jf/1pDEbTtHAr05MCO5R32YCxAzSYQe0toLSzHnfRkEGz0yHBTVt7pfQDJwVKR4ou/wIezyF5+PNjbywRmsBJ9ixReAdhGWdx0MVvN2Y2zL5UjT0TYAhK5T7350vwP8q8aIopVJrnuhMmMbOvv6IeLrTMI9hPlmY= 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:13 +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:13 +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 18/31] staging: wfx: prefix structs hif_* with wfx_ Date: Thu, 13 Jan 2022 09:55:11 +0100 Message-Id: <20220113085524.1110708-19-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: 349a081d-3224-4eae-d0ad-08d9d6728d19 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:113; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0odCqEvn2vZrAnstHWDBlsIrfm/87RCakxSq6uDzXFvAmED5dbUSQc0iGoZILplbMzzJh+InUJNUtFA8OOBS9hXdFY/ne8bCfdGS2tB1okNZMY1iuCBz/k8SjUACfjsnVR4riegPWzuiAWIROoDqzIlVIDgc8CeZ9MMdgQ/ZmhtZpGlodZX0EdeRK5jSEc+0H51oserG+mLHW2kpyCTQxJRld8JG6hR/RKkpsXAKrU7Rydnhtok8u4OCQ4Rm4WR7+dwjNQu5Elqp51xRUVmgAt0WMS7oRKIyvF9KNqM0yfeE4MEbr7aM+mRSiBaulpVZPEN8jW6wevCpcKa6w+uBVYK1s+cIEXAqTmkjKpbNATEHo0a/6Z/dcwjorfRVaDYY9CDpYBvP/AaM7l9uqLiCMhW0Ju+Wx7GVr6o92U0AgsVW5X0C5u451avU/wt+2KM7DZQdKnQVrgx9qaaSs/CEUtty2IZ3u66JqtYPBSsSgVtYbnoU14sIwzT3rFy0mO0M8qZcdAirXP0BrG8EXsFK98vUM6u+qrg/xB8HsjFgxV0m4qy3v9F9wq0p52icMpPeYyHbP0i4SoRvwLEeEsJ2ja+EPXdZZSzGSmbmo2iMChe+yHQ5uGIJlb3/KYvjZqfAD1Rkk5QNwiVrR8S+wPh1kA== 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)(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?XGEQ6VrYQaWZ7gG5/dmR1w0J5uFq?= =?utf-8?q?WqH/vzc+5jdPO9JgiQvJtyO6T40cYPJyL3kFGybLOTNktnIhty8f3w/Y45cHq0h2m?= =?utf-8?q?vhmB6LvmtsFp+/ykFlwyxodEvcAWJbGqa+2+8buEH0PGpoBwz13vsJh5Lau4Ti0Q3?= =?utf-8?q?genoWbQP6nAKKYrWBtLk/A269XTFU89IWIjRvMa0Wwksp0RoZD9OQVecoskDVDSXV?= =?utf-8?q?S07Rd6CmmB1jDhiEWJ4jVncqbhkftEpX5VkQP0PGkzPqZHNtL5TDVcruUPYm64lii?= =?utf-8?q?IoeSW6ptU/TsMR3HldSoU1uqTI+9A+Gs5lUDFQKkcHZ+b0FgW6dBOXcpPPxMFQIW5?= =?utf-8?q?QEuXlGDpuRJUNmPUthUQJjMGpcqzrMrmFLL4CFfvhqB9N5REroG2ai8wDZUo6eVIr?= =?utf-8?q?K+IH16Ve7uA2BYrphIxiHudATVBLEZmfwcCx5GVDuZctZeoAtdUW7R85Z5QL90JSM?= =?utf-8?q?/RZt+2JjwfW73PbO2+If4OJ0Y/ygS+GY63SzAMlxkTwzLEkEpdAmH+GJOb08TpOBC?= =?utf-8?q?kZBZ2aWaUVXyfqFIXqNPduRV2fWDNAc7dSSdhMPRBlsD02Z0Y0vxEE3wmuB9kbGp6?= =?utf-8?q?A3yq94BZT1l2y4yppI/1mOJkTvndIY2Pu8LgRtb41SJYjLzxaBiC8Wam9NwW2BRlT?= =?utf-8?q?eZVIA2G5hjy5raAzBz0ezwAl121O86UMgDFiJGTuB+FpPdNvaUWdcA0wlucKPCV5+?= =?utf-8?q?Uc5MFhum8G6FbcYaN1J9lkyc0RtxLQoL5kJJBtfYjRZq0j/q/YW6ldzA4RSp5Mz/W?= =?utf-8?q?gUw+surMOW9Uc6is/C8TC83pCCMs+zHoUm8hlmKB3nDqAs5hrrko462Me0hMxiHFi?= =?utf-8?q?PsnJ8Yh5bo5pHW214ud3rbNoPk6uApARY+Zg1r9RtTB7yeB2Wm2UgjIs/FsK+bTou?= =?utf-8?q?Q2GEHb2IlvWqyTVsB/FVafieTDH7zj+lfhyqLhogUDCv4zrJ2FpuFLXaWVJZeYSZU?= =?utf-8?q?m+C3jxPb3zuhc9oe9mZcWwkxMT5awnwVWBl5Vo1OD50g2kWChuHsh4+MwMpAFmcdl?= =?utf-8?q?5gJPia/NL6Imo65XdOZ0mATnz1S93D5ciwhc2Y/y5e9ELqdKUOmSiIBlQw/+b5Ijj?= =?utf-8?q?MVjJwsByV+5xj93PSxgdAfcgI1MihcO8JbRUS//xkzmGy2buuuRCW34eNI2dGq/nu?= =?utf-8?q?N+Ti2FsMj2/n++AOttTS0QK9ucVWDd1LMR1wfZupUkNpgP2Ws7oq69hAb7eyQlbW+?= =?utf-8?q?JCiZBTNZQP3rIjHoNkB7sTVvzcnFfl9Ew/xCHnSJI4BRoffySG1SyNe4vwcGl6gD9?= =?utf-8?q?51k2ojCY0AzjPMVO3x7uynYYlMKkactYstPt8QFxUhjMUIa++BR3GJjD4eNJKYgWQ?= =?utf-8?q?ReekNJ+xPdwz8wvVUusbuBt+2QAGJEmRgbNVIhV+MZhMj8JUfH+WmWBwCPneYnVh4?= =?utf-8?q?dxCkdDeXCYOwgcL9DiZ3yqssbzcrHwWs+OU6Qg0JZfNzRzxfLLHcmolTFJzlA5OFI?= =?utf-8?q?Fkxmcm69s6h029zZn9B3n+D6JpGO4iHrkkrHl2UkJ0SvPRBsWXaW+CUAGhmTmKsfE?= =?utf-8?q?uslTW8SfDEZIKQ/LXym8nH4wohjKXVnWC50XE1sD5CPVbvaVyZ+Ic9iztBpEtMP1a?= =?utf-8?q?+d3qlgFAJmMrwxfVg2WROQ11GEE/TN7LuoOJMZnkr93yLZzVLw+azQ=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 349a081d-3224-4eae-d0ad-08d9d6728d19 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:13.6217 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: j/02OVKS77tCg9E/vCPEPFVBmxqQG86LzfVm0obf3pJX+SBUthX3LOAsdNYg068fSuPx4m+1nNab5GrWvJ+gJw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller All the types related to a driver should use the same prefix. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 12 +-- drivers/staging/wfx/data_rx.c | 2 +- drivers/staging/wfx/data_rx.h | 4 +- drivers/staging/wfx/data_tx.c | 30 +++--- drivers/staging/wfx/data_tx.h | 8 +- drivers/staging/wfx/debug.c | 10 +- drivers/staging/wfx/hif_api_cmd.h | 142 +++++++++++++------------- drivers/staging/wfx/hif_api_general.h | 44 ++++---- drivers/staging/wfx/hif_api_mib.h | 66 ++++++------ drivers/staging/wfx/hif_rx.c | 57 ++++++----- drivers/staging/wfx/hif_tx.c | 95 ++++++++--------- drivers/staging/wfx/hif_tx.h | 20 ++-- drivers/staging/wfx/hif_tx_mib.c | 54 +++++----- drivers/staging/wfx/hif_tx_mib.h | 10 +- drivers/staging/wfx/key.c | 20 ++-- drivers/staging/wfx/main.c | 4 +- drivers/staging/wfx/queue.c | 22 ++-- drivers/staging/wfx/queue.h | 2 +- drivers/staging/wfx/sta.c | 2 +- drivers/staging/wfx/traces.h | 10 +- drivers/staging/wfx/wfx.h | 6 +- 21 files changed, 311 insertions(+), 309 deletions(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index b7fa0aeafd78..872f3298dc87 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -67,7 +67,7 @@ static void device_release(struct wfx_dev *wdev) static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) { struct sk_buff *skb; - struct hif_msg *hif; + struct wfx_hif_msg *hif; size_t alloc_len; size_t computed_len; int release_count; @@ -88,9 +88,9 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) piggyback = le16_to_cpup((__le16 *)(skb->data + alloc_len - 2)); _trace_piggyback(piggyback, false); - hif = (struct hif_msg *)skb->data; + hif = (struct wfx_hif_msg *)skb->data; WARN(hif->encrypted & 0x3, "encryption is unsupported"); - if (WARN(read_len < sizeof(struct hif_msg), "corrupted read")) + if (WARN(read_len < sizeof(struct wfx_hif_msg), "corrupted read")) goto err; computed_len = le16_to_cpu(hif->len); computed_len = round_up(computed_len, 2); @@ -105,7 +105,7 @@ 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 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"); @@ -169,7 +169,7 @@ static int bh_work_rx(struct wfx_dev *wdev, int max_msg, int *num_cnf) return i; } -static void tx_helper(struct wfx_dev *wdev, struct hif_msg *hif) +static void tx_helper(struct wfx_dev *wdev, struct wfx_hif_msg *hif) { int ret; void *data; @@ -199,7 +199,7 @@ static void tx_helper(struct wfx_dev *wdev, struct hif_msg *hif) static int bh_work_tx(struct wfx_dev *wdev, int max_msg) { - struct hif_msg *hif; + struct wfx_hif_msg *hif; int i; for (i = 0; i < max_msg; i++) { diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c index bfc3961b7b89..3fe67c4815e7 100644 --- a/drivers/staging/wfx/data_rx.c +++ b/drivers/staging/wfx/data_rx.c @@ -35,7 +35,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 hif_ind_rx *arg, struct sk_buff *skb) + 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; diff --git a/drivers/staging/wfx/data_rx.h b/drivers/staging/wfx/data_rx.h index 84d0e3c0507b..7d77cdbbc31b 100644 --- a/drivers/staging/wfx/data_rx.h +++ b/drivers/staging/wfx/data_rx.h @@ -10,9 +10,9 @@ struct wfx_vif; struct sk_buff; -struct hif_ind_rx; +struct wfx_hif_ind_rx; void wfx_rx_cb(struct wfx_vif *wvif, - const struct hif_ind_rx *arg, struct sk_buff *skb); + 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 c3efbcdcc8c3..c004f455bb47 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -329,16 +329,16 @@ static int wfx_tx_get_icv_len(struct ieee80211_key_conf *hw_key) static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, struct sk_buff *skb) { - struct hif_msg *hif_msg; - struct hif_req_tx *req; + struct wfx_hif_msg *hif_msg; + struct wfx_hif_req_tx *req; struct wfx_tx_priv *tx_priv; struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); struct ieee80211_key_conf *hw_key = tx_info->control.hw_key; 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 hif_msg) + - sizeof(struct 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); @@ -355,7 +355,7 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, skb_put(skb, tx_priv->icv_size); skb_push(skb, wmsg_len); memset(skb->data, 0, wmsg_len); - hif_msg = (struct hif_msg *)skb->data; + hif_msg = (struct wfx_hif_msg *)skb->data; hif_msg->len = cpu_to_le16(skb->len); hif_msg->id = HIF_REQ_ID_TX; hif_msg->interface = wvif->id; @@ -368,7 +368,7 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, } /* Fill tx request */ - req = (struct hif_req_tx *)hif_msg->body; + req = (struct wfx_hif_req_tx *)hif_msg->body; /* packet_id just need to be unique on device. 32bits are more than * necessary for that task, so we tae advantage of it to add some extra * data for debug. @@ -435,10 +435,10 @@ void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, static void wfx_skb_dtor(struct wfx_vif *wvif, struct sk_buff *skb) { - struct hif_msg *hif = (struct hif_msg *)skb->data; - struct hif_req_tx *req = (struct hif_req_tx *)hif->body; - unsigned int offset = sizeof(struct hif_msg) + - sizeof(struct hif_req_tx) + + struct wfx_hif_msg *hif = (struct hif_msg *)skb->data; + struct wfx_hif_req_tx *req = (struct hif_req_tx *)hif->body; + unsigned int offset = sizeof(struct wfx_hif_msg) + + sizeof(struct wfx_hif_req_tx) + req->fc_offset; if (!wvif) { @@ -452,7 +452,7 @@ static void wfx_skb_dtor(struct wfx_vif *wvif, struct sk_buff *skb) static void wfx_tx_fill_rates(struct wfx_dev *wdev, struct ieee80211_tx_info *tx_info, - const struct hif_cnf_tx *arg) + const struct wfx_hif_cnf_tx *arg) { struct ieee80211_tx_rate *rate; int tx_count; @@ -488,7 +488,7 @@ static void wfx_tx_fill_rates(struct wfx_dev *wdev, dev_dbg(wdev->dev, "%d more retries than expected\n", tx_count); } -void wfx_tx_confirm_cb(struct wfx_dev *wdev, const struct hif_cnf_tx *arg) +void wfx_tx_confirm_cb(struct wfx_dev *wdev, const struct wfx_hif_cnf_tx *arg) { const struct wfx_tx_priv *tx_priv; struct ieee80211_tx_info *tx_info; @@ -503,7 +503,7 @@ void wfx_tx_confirm_cb(struct wfx_dev *wdev, const struct hif_cnf_tx *arg) } tx_info = IEEE80211_SKB_CB(skb); tx_priv = wfx_skb_tx_priv(skb); - wvif = wdev_to_wvif(wdev, ((struct hif_msg *)skb->data)->interface); + wvif = wdev_to_wvif(wdev, ((struct wfx_hif_msg *)skb->data)->interface); WARN_ON(!wvif); if (!wvif) return; @@ -572,7 +572,7 @@ void wfx_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct wfx_dev *wdev = hw->priv; struct sk_buff_head dropped; struct wfx_vif *wvif; - struct hif_msg *hif; + struct wfx_hif_msg *hif; struct sk_buff *skb; skb_queue_head_init(&dropped); @@ -588,7 +588,7 @@ void wfx_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (wdev->chip_frozen) wfx_pending_drop(wdev, &dropped); while ((skb = skb_dequeue(&dropped)) != NULL) { - hif = (struct hif_msg *)skb->data; + hif = (struct wfx_hif_msg *)skb->data; wvif = wdev_to_wvif(wdev, hif->interface); ieee80211_tx_info_clear_status(IEEE80211_SKB_CB(skb)); wfx_skb_dtor(wvif, skb); diff --git a/drivers/staging/wfx/data_tx.h b/drivers/staging/wfx/data_tx.h index 15590a8faefe..c901a03ee4d8 100644 --- a/drivers/staging/wfx/data_tx.h +++ b/drivers/staging/wfx/data_tx.h @@ -43,7 +43,7 @@ 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_confirm_cb(struct wfx_dev *wdev, const struct hif_cnf_tx *arg); +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); @@ -57,10 +57,10 @@ static inline struct wfx_tx_priv *wfx_skb_tx_priv(struct sk_buff *skb) return (struct wfx_tx_priv *)tx_info->rate_driver_data; } -static inline struct hif_req_tx *wfx_skb_txreq(struct sk_buff *skb) +static inline struct wfx_hif_req_tx *wfx_skb_txreq(struct sk_buff *skb) { - struct hif_msg *hif = (struct hif_msg *)skb->data; - struct hif_req_tx *req = (struct hif_req_tx *)hif->body; + struct wfx_hif_msg *hif = (struct hif_msg *)skb->data; + struct wfx_hif_req_tx *req = (struct hif_req_tx *)hif->body; return req; } diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c index 9324248b1d20..f0796eb2afff 100644 --- a/drivers/staging/wfx/debug.c +++ b/drivers/staging/wfx/debug.c @@ -63,7 +63,7 @@ static int wfx_counters_show(struct seq_file *seq, void *v) { int ret, i; struct wfx_dev *wdev = seq->private; - struct hif_mib_extended_count_table counters[3]; + struct wfx_hif_mib_extended_count_table counters[3]; for (i = 0; i < ARRAY_SIZE(counters); i++) { ret = wfx_hif_get_counters_table(wdev, i, counters + i); @@ -153,7 +153,7 @@ static const char * const channel_names[] = { static int wfx_rx_stats_show(struct seq_file *seq, void *v) { struct wfx_dev *wdev = seq->private; - struct hif_rx_stats *st = &wdev->rx_stats; + struct wfx_hif_rx_stats *st = &wdev->rx_stats; int i; mutex_lock(&wdev->rx_stats_lock); @@ -185,7 +185,7 @@ DEFINE_SHOW_ATTRIBUTE(wfx_rx_stats); static int wfx_tx_power_loop_show(struct seq_file *seq, void *v) { struct wfx_dev *wdev = seq->private; - struct hif_tx_power_loop_info *st = &wdev->tx_power_loop_info; + struct wfx_hif_tx_power_loop_info *st = &wdev->tx_power_loop_info; int tmp; mutex_lock(&wdev->tx_power_loop_info_lock); @@ -247,13 +247,13 @@ static ssize_t wfx_send_hif_msg_write(struct file *file, { struct dbgfs_hif_msg *context = file->private_data; struct wfx_dev *wdev = context->wdev; - struct hif_msg *request; + struct wfx_hif_msg *request; if (completion_done(&context->complete)) { dev_dbg(wdev->dev, "read previous result before start a new one\n"); return -EBUSY; } - if (count < sizeof(struct hif_msg)) + if (count < sizeof(struct wfx_hif_msg)) return -EINVAL; /* wfx_cmd_send() checks that reply buffer is wide enough, but does not diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index b1829d01a5d9..463532b25939 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -12,7 +12,7 @@ #include "hif_api_general.h" -enum hif_requests_ids { +enum wfx_hif_requests_ids { HIF_REQ_ID_RESET = 0x0a, HIF_REQ_ID_READ_MIB = 0x05, HIF_REQ_ID_WRITE_MIB = 0x06, @@ -31,7 +31,7 @@ enum hif_requests_ids { HIF_REQ_ID_MAP_LINK = 0x1c, }; -enum hif_confirmations_ids { +enum wfx_hif_confirmations_ids { HIF_CNF_ID_RESET = 0x0a, HIF_CNF_ID_READ_MIB = 0x05, HIF_CNF_ID_WRITE_MIB = 0x06, @@ -51,7 +51,7 @@ enum hif_confirmations_ids { HIF_CNF_ID_MAP_LINK = 0x1c, }; -enum hif_indications_ids { +enum wfx_hif_indications_ids { HIF_IND_ID_RX = 0x84, HIF_IND_ID_SCAN_CMPL = 0x86, HIF_IND_ID_JOIN_COMPLETE = 0x8f, @@ -60,40 +60,40 @@ enum hif_indications_ids { HIF_IND_ID_EVENT = 0x85 }; -struct hif_req_reset { +struct wfx_hif_req_reset { u8 reset_stat:1; u8 reset_all_int:1; u8 reserved1:6; u8 reserved2[3]; } __packed; -struct hif_cnf_reset { +struct wfx_hif_cnf_reset { __le32 status; } __packed; -struct hif_req_read_mib { +struct wfx_hif_req_read_mib { __le16 mib_id; __le16 reserved; } __packed; -struct hif_cnf_read_mib { +struct wfx_hif_cnf_read_mib { __le32 status; __le16 mib_id; __le16 length; u8 mib_data[]; } __packed; -struct hif_req_write_mib { +struct wfx_hif_req_write_mib { __le16 mib_id; __le16 length; u8 mib_data[]; } __packed; -struct hif_cnf_write_mib { +struct wfx_hif_cnf_write_mib { __le32 status; } __packed; -struct hif_req_update_ie { +struct wfx_hif_req_update_ie { u8 beacon:1; u8 probe_resp:1; u8 probe_req:1; @@ -103,11 +103,11 @@ struct hif_req_update_ie { u8 ie[]; } __packed; -struct hif_cnf_update_ie { +struct wfx_hif_cnf_update_ie { __le32 status; } __packed; -struct hif_ssid_def { +struct wfx_hif_ssid_def { __le32 ssid_length; u8 ssid[IEEE80211_MAX_SSID_LEN]; } __packed; @@ -115,7 +115,7 @@ struct hif_ssid_def { #define HIF_API_MAX_NB_SSIDS 2 #define HIF_API_MAX_NB_CHANNELS 14 -struct hif_req_start_scan_alt { +struct wfx_hif_req_start_scan_alt { u8 band; u8 maintain_current_bss:1; u8 periodic:1; @@ -135,45 +135,45 @@ struct hif_req_start_scan_alt { __le32 min_channel_time; __le32 max_channel_time; __le32 tx_power_level; /* signed value */ - struct hif_ssid_def ssid_def[HIF_API_MAX_NB_SSIDS]; + struct wfx_hif_ssid_def ssid_def[HIF_API_MAX_NB_SSIDS]; u8 channel_list[]; } __packed; -struct hif_cnf_start_scan { +struct wfx_hif_cnf_start_scan { __le32 status; } __packed; -struct hif_cnf_stop_scan { +struct wfx_hif_cnf_stop_scan { __le32 status; } __packed; -enum hif_pm_mode_status { +enum wfx_hif_pm_mode_status { HIF_PM_MODE_ACTIVE = 0x0, HIF_PM_MODE_PS = 0x1, HIF_PM_MODE_UNDETERMINED = 0x2 }; -struct hif_ind_scan_cmpl { +struct wfx_hif_ind_scan_cmpl { __le32 status; u8 pm_mode; u8 num_channels_completed; __le16 reserved; } __packed; -enum hif_queue_id { +enum wfx_hif_queue_id { HIF_QUEUE_ID_BACKGROUND = 0x0, HIF_QUEUE_ID_BESTEFFORT = 0x1, HIF_QUEUE_ID_VIDEO = 0x2, HIF_QUEUE_ID_VOICE = 0x3 }; -enum hif_frame_format { +enum wfx_hif_frame_format { HIF_FRAME_FORMAT_NON_HT = 0x0, HIF_FRAME_FORMAT_MIXED_FORMAT_HT = 0x1, HIF_FRAME_FORMAT_GF_HT_11N = 0x2 }; -struct hif_req_tx { +struct wfx_hif_req_tx { /* packet_id is not interpreted by the device, so it is not necessary to * declare it little endian */ @@ -203,16 +203,16 @@ struct hif_req_tx { u8 frame[]; } __packed; -enum hif_qos_ackplcy { +enum wfx_hif_qos_ackplcy { HIF_QOS_ACKPLCY_NORMAL = 0x0, HIF_QOS_ACKPLCY_TXNOACK = 0x1, HIF_QOS_ACKPLCY_NOEXPACK = 0x2, HIF_QOS_ACKPLCY_BLCKACK = 0x3 }; -struct hif_cnf_tx { +struct wfx_hif_cnf_tx { __le32 status; - /* packet_id is copied from struct hif_req_tx without been interpreted + /* packet_id is copied from struct wfx_hif_req_tx without been interpreted * by the device, so it is not necessary to declare it little endian */ u32 packet_id; @@ -228,13 +228,13 @@ struct hif_cnf_tx { __le32 tx_queue_delay; } __packed; -struct hif_cnf_multi_transmit { +struct wfx_hif_cnf_multi_transmit { u8 num_tx_confs; u8 reserved[3]; - struct hif_cnf_tx tx_conf_payload[]; + struct wfx_hif_cnf_tx tx_conf_payload[]; } __packed; -enum hif_ri_flags_encrypt { +enum wfx_hif_ri_flags_encrypt { HIF_RI_FLAGS_UNENCRYPTED = 0x0, HIF_RI_FLAGS_WEP_ENCRYPTED = 0x1, HIF_RI_FLAGS_TKIP_ENCRYPTED = 0x2, @@ -242,7 +242,7 @@ enum hif_ri_flags_encrypt { HIF_RI_FLAGS_WAPI_ENCRYPTED = 0x4 }; -struct hif_ind_rx { +struct wfx_hif_ind_rx { __le32 status; u8 channel_number; u8 reserved1; @@ -274,7 +274,7 @@ struct hif_ind_rx { u8 frame[]; } __packed; -struct hif_req_edca_queue_params { +struct wfx_hif_req_edca_queue_params { u8 queue_id; u8 reserved1; u8 aifsn; @@ -286,11 +286,11 @@ struct hif_req_edca_queue_params { __le32 reserved3; } __packed; -struct hif_cnf_edca_queue_params { +struct wfx_hif_cnf_edca_queue_params { __le32 status; } __packed; -struct hif_req_join { +struct wfx_hif_req_join { u8 infrastructure_bss_mode:1; u8 reserved1:7; u8 band; @@ -312,15 +312,15 @@ struct hif_req_join { __le32 basic_rate_set; } __packed; -struct hif_cnf_join { +struct wfx_hif_cnf_join { __le32 status; } __packed; -struct hif_ind_join_complete { +struct wfx_hif_ind_join_complete { __le32 status; } __packed; -struct hif_req_set_bss_params { +struct wfx_hif_req_set_bss_params { u8 lost_count_only:1; u8 reserved:7; u8 beacon_lost_count; @@ -328,11 +328,11 @@ struct hif_req_set_bss_params { __le32 operational_rate_set; } __packed; -struct hif_cnf_set_bss_params { +struct wfx_hif_cnf_set_bss_params { __le32 status; } __packed; -struct hif_req_set_pm_mode { +struct wfx_hif_req_set_pm_mode { u8 enter_psm:1; u8 reserved:6; u8 fast_psm:1; @@ -341,17 +341,17 @@ struct hif_req_set_pm_mode { u8 min_auto_ps_poll_period; } __packed; -struct hif_cnf_set_pm_mode { +struct wfx_hif_cnf_set_pm_mode { __le32 status; } __packed; -struct hif_ind_set_pm_mode_cmpl { +struct wfx_hif_ind_set_pm_mode_cmpl { __le32 status; u8 pm_mode; u8 reserved[3]; } __packed; -struct hif_req_start { +struct wfx_hif_req_start { u8 mode; u8 band; u8 channel_number; @@ -367,23 +367,23 @@ struct hif_req_start { __le32 basic_rate_set; } __packed; -struct hif_cnf_start { +struct wfx_hif_cnf_start { __le32 status; } __packed; -struct hif_req_beacon_transmit { +struct wfx_hif_req_beacon_transmit { u8 enable_beaconing; u8 reserved[3]; } __packed; -struct hif_cnf_beacon_transmit { +struct wfx_hif_cnf_beacon_transmit { __le32 status; } __packed; #define HIF_LINK_ID_MAX 14 #define HIF_LINK_ID_NOT_ASSOCIATED (HIF_LINK_ID_MAX + 1) -struct hif_req_map_link { +struct wfx_hif_req_map_link { u8 mac_addr[ETH_ALEN]; u8 unmap:1; u8 mfpc:1; @@ -391,11 +391,11 @@ struct hif_req_map_link { u8 peer_sta_id; } __packed; -struct hif_cnf_map_link { +struct wfx_hif_cnf_map_link { __le32 status; } __packed; -struct hif_ind_suspend_resume_tx { +struct wfx_hif_ind_suspend_resume_tx { u8 resume:1; u8 reserved1:2; u8 bc_mc_only:1; @@ -417,7 +417,7 @@ struct hif_ind_suspend_resume_tx { #define HIF_API_RX_SEQUENCE_COUNTER_SIZE 8 #define HIF_API_IPN_SIZE 8 -enum hif_key_type { +enum wfx_hif_key_type { HIF_KEY_TYPE_WEP_DEFAULT = 0x0, HIF_KEY_TYPE_WEP_PAIRWISE = 0x1, HIF_KEY_TYPE_TKIP_GROUP = 0x2, @@ -430,21 +430,21 @@ enum hif_key_type { HIF_KEY_TYPE_NONE = 0x9 }; -struct hif_wep_pairwise_key { +struct wfx_hif_wep_pairwise_key { u8 peer_address[ETH_ALEN]; u8 reserved; u8 key_length; u8 key_data[HIF_API_WEP_KEY_DATA_SIZE]; } __packed; -struct hif_wep_group_key { +struct wfx_hif_wep_group_key { u8 key_id; u8 key_length; u8 reserved[2]; u8 key_data[HIF_API_WEP_KEY_DATA_SIZE]; } __packed; -struct hif_tkip_pairwise_key { +struct wfx_hif_tkip_pairwise_key { u8 peer_address[ETH_ALEN]; u8 reserved[2]; u8 tkip_key_data[HIF_API_TKIP_KEY_DATA_SIZE]; @@ -452,7 +452,7 @@ struct hif_tkip_pairwise_key { u8 tx_mic_key[HIF_API_TX_MIC_KEY_SIZE]; } __packed; -struct hif_tkip_group_key { +struct wfx_hif_tkip_group_key { u8 tkip_key_data[HIF_API_TKIP_KEY_DATA_SIZE]; u8 rx_mic_key[HIF_API_RX_MIC_KEY_SIZE]; u8 key_id; @@ -460,20 +460,20 @@ struct hif_tkip_group_key { u8 rx_sequence_counter[HIF_API_RX_SEQUENCE_COUNTER_SIZE]; } __packed; -struct hif_aes_pairwise_key { +struct wfx_hif_aes_pairwise_key { u8 peer_address[ETH_ALEN]; u8 reserved[2]; u8 aes_key_data[HIF_API_AES_KEY_DATA_SIZE]; } __packed; -struct hif_aes_group_key { +struct wfx_hif_aes_group_key { u8 aes_key_data[HIF_API_AES_KEY_DATA_SIZE]; u8 key_id; u8 reserved[3]; u8 rx_sequence_counter[HIF_API_RX_SEQUENCE_COUNTER_SIZE]; } __packed; -struct hif_wapi_pairwise_key { +struct wfx_hif_wapi_pairwise_key { u8 peer_address[ETH_ALEN]; u8 key_id; u8 reserved; @@ -481,53 +481,53 @@ struct hif_wapi_pairwise_key { u8 mic_key_data[HIF_API_MIC_KEY_DATA_SIZE]; } __packed; -struct hif_wapi_group_key { +struct wfx_hif_wapi_group_key { u8 wapi_key_data[HIF_API_WAPI_KEY_DATA_SIZE]; u8 mic_key_data[HIF_API_MIC_KEY_DATA_SIZE]; u8 key_id; u8 reserved[3]; } __packed; -struct hif_igtk_group_key { +struct wfx_hif_igtk_group_key { u8 igtk_key_data[HIF_API_IGTK_KEY_DATA_SIZE]; u8 key_id; u8 reserved[3]; u8 ipn[HIF_API_IPN_SIZE]; } __packed; -struct hif_req_add_key { +struct wfx_hif_req_add_key { u8 type; u8 entry_index; u8 int_id:2; u8 reserved1:6; u8 reserved2; union { - struct hif_wep_pairwise_key wep_pairwise_key; - struct hif_wep_group_key wep_group_key; - struct hif_tkip_pairwise_key tkip_pairwise_key; - struct hif_tkip_group_key tkip_group_key; - struct hif_aes_pairwise_key aes_pairwise_key; - struct hif_aes_group_key aes_group_key; - struct hif_wapi_pairwise_key wapi_pairwise_key; - struct hif_wapi_group_key wapi_group_key; - struct hif_igtk_group_key igtk_group_key; + struct wfx_hif_wep_pairwise_key wep_pairwise_key; + struct wfx_hif_wep_group_key wep_group_key; + struct wfx_hif_tkip_pairwise_key tkip_pairwise_key; + struct wfx_hif_tkip_group_key tkip_group_key; + struct wfx_hif_aes_pairwise_key aes_pairwise_key; + struct wfx_hif_aes_group_key aes_group_key; + struct wfx_hif_wapi_pairwise_key wapi_pairwise_key; + struct wfx_hif_wapi_group_key wapi_group_key; + struct wfx_hif_igtk_group_key igtk_group_key; } key; } __packed; -struct hif_cnf_add_key { +struct wfx_hif_cnf_add_key { __le32 status; } __packed; -struct hif_req_remove_key { +struct wfx_hif_req_remove_key { u8 entry_index; u8 reserved[3]; } __packed; -struct hif_cnf_remove_key { +struct wfx_hif_cnf_remove_key { __le32 status; } __packed; -enum hif_event_ind { +enum wfx_hif_event_ind { HIF_EVENT_IND_BSSLOST = 0x1, HIF_EVENT_IND_BSSREGAINED = 0x2, HIF_EVENT_IND_RCPI_RSSI = 0x3, @@ -535,7 +535,7 @@ enum hif_event_ind { HIF_EVENT_IND_INACTIVITY = 0x5 }; -enum hif_ps_mode_error { +enum wfx_hif_ps_mode_error { HIF_PS_ERROR_NO_ERROR = 0, HIF_PS_ERROR_AP_NOT_RESP_TO_POLL = 1, HIF_PS_ERROR_AP_NOT_RESP_TO_UAPSD_TRIGGER = 2, @@ -543,7 +543,7 @@ enum hif_ps_mode_error { HIF_PS_ERROR_AP_NO_DATA_AFTER_TIM = 4 }; -struct hif_ind_event { +struct wfx_hif_ind_event { __le32 event_id; union { u8 rcpi_rssi; diff --git a/drivers/staging/wfx/hif_api_general.h b/drivers/staging/wfx/hif_api_general.h index a57789ceb209..4d400fdc2252 100644 --- a/drivers/staging/wfx/hif_api_general.h +++ b/drivers/staging/wfx/hif_api_general.h @@ -14,7 +14,7 @@ #define HIF_ID_IS_INDICATION 0x80 #define HIF_COUNTER_MAX 7 -struct hif_msg { +struct wfx_hif_msg { __le16 len; u8 id; u8 reserved:1; @@ -24,7 +24,7 @@ struct hif_msg { u8 body[]; } __packed; -enum hif_general_requests_ids { +enum wfx_hif_general_requests_ids { HIF_REQ_ID_CONFIGURATION = 0x09, HIF_REQ_ID_CONTROL_GPIO = 0x26, HIF_REQ_ID_SET_SL_MAC_KEY = 0x27, @@ -37,7 +37,7 @@ enum hif_general_requests_ids { HIF_REQ_ID_SHUT_DOWN = 0x32, }; -enum hif_general_confirmations_ids { +enum wfx_hif_general_confirmations_ids { HIF_CNF_ID_CONFIGURATION = 0x09, HIF_CNF_ID_CONTROL_GPIO = 0x26, HIF_CNF_ID_SET_SL_MAC_KEY = 0x27, @@ -50,7 +50,7 @@ enum hif_general_confirmations_ids { HIF_CNF_ID_SHUT_DOWN = 0x32, }; -enum hif_general_indications_ids { +enum wfx_hif_general_indications_ids { HIF_IND_ID_EXCEPTION = 0xe0, HIF_IND_ID_STARTUP = 0xe1, HIF_IND_ID_WAKEUP = 0xe2, @@ -81,7 +81,7 @@ enum hif_general_indications_ids { #define HIF_STATUS_ROLLBACK_SUCCESS (cpu_to_le32(0x1234)) #define HIF_STATUS_ROLLBACK_FAIL (cpu_to_le32(0x1256)) -enum hif_api_rate_index { +enum wfx_hif_api_rate_index { API_RATE_INDEX_B_1MBPS = 0, API_RATE_INDEX_B_2MBPS = 1, API_RATE_INDEX_B_5P5MBPS = 2, @@ -107,7 +107,7 @@ enum hif_api_rate_index { API_RATE_NUM_ENTRIES = 22 }; -struct hif_ind_startup { +struct wfx_hif_ind_startup { __le32 status; __le16 hardware_id; u8 opn[14]; @@ -138,19 +138,19 @@ struct hif_ind_startup { u8 firmware_label[128]; } __packed; -struct hif_ind_wakeup { +struct wfx_hif_ind_wakeup { } __packed; -struct hif_req_configuration { +struct wfx_hif_req_configuration { __le16 length; u8 pds_data[]; } __packed; -struct hif_cnf_configuration { +struct wfx_hif_cnf_configuration { __le32 status; } __packed; -enum hif_gpio_mode { +enum wfx_hif_gpio_mode { HIF_GPIO_MODE_D0 = 0x0, HIF_GPIO_MODE_D1 = 0x1, HIF_GPIO_MODE_OD0 = 0x2, @@ -160,24 +160,24 @@ enum hif_gpio_mode { HIF_GPIO_MODE_READ = 0x6 }; -struct hif_req_control_gpio { +struct wfx_hif_req_control_gpio { u8 gpio_label; u8 gpio_mode; } __packed; -struct hif_cnf_control_gpio { +struct wfx_hif_cnf_control_gpio { __le32 status; __le32 value; } __packed; -enum hif_generic_indication_type { +enum wfx_hif_generic_indication_type { HIF_GENERIC_INDICATION_TYPE_RAW = 0x0, HIF_GENERIC_INDICATION_TYPE_STRING = 0x1, HIF_GENERIC_INDICATION_TYPE_RX_STATS = 0x2, HIF_GENERIC_INDICATION_TYPE_TX_POWER_LOOP_INFO = 0x3, }; -struct hif_rx_stats { +struct wfx_hif_rx_stats { __le32 nb_rx_frame; __le32 nb_crc_frame; __le32 per_total; @@ -193,7 +193,7 @@ struct hif_rx_stats { s8 current_temp; } __packed; -struct hif_tx_power_loop_info { +struct wfx_hif_tx_power_loop_info { __le16 tx_gain_dig; __le16 tx_gain_pa; __le16 target_pout; /* signed value */ @@ -203,15 +203,15 @@ struct hif_tx_power_loop_info { u8 reserved; } __packed; -struct hif_ind_generic { +struct wfx_hif_ind_generic { __le32 type; union { - struct hif_rx_stats rx_stats; - struct hif_tx_power_loop_info tx_power_loop_info; + struct wfx_hif_rx_stats rx_stats; + struct wfx_hif_tx_power_loop_info tx_power_loop_info; } data; } __packed; -enum hif_error { +enum wfx_hif_error { HIF_ERROR_FIRMWARE_ROLLBACK = 0x00, HIF_ERROR_FIRMWARE_DEBUG_ENABLED = 0x01, HIF_ERROR_SLK_OUTDATED_SESSION_KEY = 0x02, @@ -232,17 +232,17 @@ enum hif_error { HIF_ERROR_SLK_UNCONFIGURED = 0x11, }; -struct hif_ind_error { +struct wfx_hif_ind_error { __le32 type; u8 data[]; } __packed; -struct hif_ind_exception { +struct wfx_hif_ind_exception { __le32 type; u8 data[]; } __packed; -enum hif_secure_link_state { +enum wfx_hif_secure_link_state { SEC_LINK_UNAVAILABLE = 0x0, SEC_LINK_RESERVED = 0x1, SEC_LINK_EVAL = 0x2, diff --git a/drivers/staging/wfx/hif_api_mib.h b/drivers/staging/wfx/hif_api_mib.h index be76e2766880..7b68b83866c9 100644 --- a/drivers/staging/wfx/hif_api_mib.h +++ b/drivers/staging/wfx/hif_api_mib.h @@ -13,7 +13,7 @@ #define HIF_API_IPV4_ADDRESS_SIZE 4 #define HIF_API_IPV6_ADDRESS_SIZE 16 -enum hif_mib_ids { +enum wfx_hif_mib_ids { HIF_MIB_ID_GL_OPERATIONAL_POWER_MODE = 0x2000, HIF_MIB_ID_GL_BLOCK_ACK_INFO = 0x2001, HIF_MIB_ID_GL_SET_MULTI_MSG = 0x2002, @@ -63,39 +63,39 @@ enum hif_mib_ids { HIF_MIB_ID_BEACON_STATS = 0x2056, }; -enum hif_op_power_mode { +enum wfx_hif_op_power_mode { HIF_OP_POWER_MODE_ACTIVE = 0x0, HIF_OP_POWER_MODE_DOZE = 0x1, HIF_OP_POWER_MODE_QUIESCENT = 0x2 }; -struct hif_mib_gl_operational_power_mode { +struct wfx_hif_mib_gl_operational_power_mode { u8 power_mode:4; u8 reserved1:3; u8 wup_ind_activation:1; u8 reserved2[3]; } __packed; -struct hif_mib_gl_set_multi_msg { +struct wfx_hif_mib_gl_set_multi_msg { u8 enable_multi_tx_conf:1; u8 reserved1:7; u8 reserved2[3]; } __packed; -enum hif_arp_ns_frame_treatment { +enum wfx_hif_arp_ns_frame_treatment { HIF_ARP_NS_FILTERING_DISABLE = 0x0, HIF_ARP_NS_FILTERING_ENABLE = 0x1, HIF_ARP_NS_REPLY_ENABLE = 0x2 }; -struct hif_mib_arp_ip_addr_table { +struct wfx_hif_mib_arp_ip_addr_table { u8 condition_idx; u8 arp_enable; u8 reserved[2]; u8 ipv4_address[HIF_API_IPV4_ADDRESS_SIZE]; } __packed; -struct hif_mib_rx_filter { +struct wfx_hif_mib_rx_filter { u8 reserved1:1; u8 bssid_filter:1; u8 reserved2:1; @@ -105,7 +105,7 @@ struct hif_mib_rx_filter { u8 reserved4[3]; } __packed; -struct hif_ie_table_entry { +struct wfx_hif_ie_table_entry { u8 ie_id; u8 has_changed:1; u8 no_longer:1; @@ -116,23 +116,23 @@ struct hif_ie_table_entry { u8 match_data[3]; } __packed; -struct hif_mib_bcn_filter_table { +struct wfx_hif_mib_bcn_filter_table { __le32 num_of_info_elmts; - struct hif_ie_table_entry ie_table[]; + struct wfx_hif_ie_table_entry ie_table[]; } __packed; -enum hif_beacon_filter { +enum wfx_hif_beacon_filter { HIF_BEACON_FILTER_DISABLE = 0x0, HIF_BEACON_FILTER_ENABLE = 0x1, HIF_BEACON_FILTER_AUTO_ERP = 0x2 }; -struct hif_mib_bcn_filter_enable { +struct wfx_hif_mib_bcn_filter_enable { __le32 enable; __le32 bcn_count; } __packed; -struct hif_mib_extended_count_table { +struct wfx_hif_mib_extended_count_table { __le32 count_drop_plcp; __le32 count_drop_fcs; __le32 count_tx_frames; @@ -164,7 +164,7 @@ struct hif_mib_extended_count_table { __le32 reserved[12]; } __packed; -struct hif_mib_count_table { +struct wfx_hif_mib_count_table { __le32 count_drop_plcp; __le32 count_drop_fcs; __le32 count_tx_frames; @@ -190,35 +190,35 @@ struct hif_mib_count_table { __le32 count_drop_bip_mic; } __packed; -struct hif_mib_mac_address { +struct wfx_hif_mib_mac_address { u8 mac_addr[ETH_ALEN]; __le16 reserved; } __packed; -struct hif_mib_wep_default_key_id { +struct wfx_hif_mib_wep_default_key_id { u8 wep_default_key_id; u8 reserved[3]; } __packed; -struct hif_mib_dot11_rts_threshold { +struct wfx_hif_mib_dot11_rts_threshold { __le32 threshold; } __packed; -struct hif_mib_slot_time { +struct wfx_hif_mib_slot_time { __le32 slot_time; } __packed; -struct hif_mib_current_tx_power_level { +struct wfx_hif_mib_current_tx_power_level { __le32 power_level; /* signed value */ } __packed; -struct hif_mib_non_erp_protection { +struct wfx_hif_mib_non_erp_protection { u8 use_cts_to_self:1; u8 reserved1:7; u8 reserved2[3]; } __packed; -enum hif_tmplt { +enum wfx_hif_tmplt { HIF_TMPLT_PRBREQ = 0x0, HIF_TMPLT_BCN = 0x1, HIF_TMPLT_NULL = 0x2, @@ -231,7 +231,7 @@ enum hif_tmplt { #define HIF_API_MAX_TEMPLATE_FRAME_SIZE 700 -struct hif_mib_template_frame { +struct wfx_hif_mib_template_frame { u8 frame_type; u8 init_rate:7; u8 mode:1; @@ -239,7 +239,7 @@ struct hif_mib_template_frame { u8 frame[]; } __packed; -struct hif_mib_beacon_wake_up_period { +struct wfx_hif_mib_beacon_wake_up_period { u8 wakeup_period_min; u8 receive_dtim:1; u8 reserved1:7; @@ -247,7 +247,7 @@ struct hif_mib_beacon_wake_up_period { u8 reserved2; } __packed; -struct hif_mib_rcpi_rssi_threshold { +struct wfx_hif_mib_rcpi_rssi_threshold { u8 detection:1; u8 rcpi_rssi:1; u8 upperthresh:1; @@ -260,14 +260,14 @@ struct hif_mib_rcpi_rssi_threshold { #define DEFAULT_BA_MAX_RX_BUFFER_SIZE 16 -struct hif_mib_block_ack_policy { +struct wfx_hif_mib_block_ack_policy { u8 block_ack_tx_tid_policy; u8 reserved1; u8 block_ack_rx_tid_policy; u8 block_ack_rx_max_buffer_size; } __packed; -enum hif_mpdu_start_spacing { +enum wfx_hif_mpdu_start_spacing { HIF_MPDU_START_SPACING_NO_RESTRIC = 0x0, HIF_MPDU_START_SPACING_QUARTER = 0x1, HIF_MPDU_START_SPACING_HALF = 0x2, @@ -278,7 +278,7 @@ enum hif_mpdu_start_spacing { HIF_MPDU_START_SPACING_SIXTEEN = 0x7 }; -struct hif_mib_set_association_mode { +struct wfx_hif_mib_set_association_mode { u8 preambtype_use:1; u8 mode:1; u8 rateset:1; @@ -292,7 +292,7 @@ struct hif_mib_set_association_mode { __le32 basic_rate_set; } __packed; -struct hif_mib_set_uapsd_information { +struct wfx_hif_mib_set_uapsd_information { u8 trig_bckgrnd:1; u8 trig_be:1; u8 trig_video:1; @@ -308,7 +308,7 @@ struct hif_mib_set_uapsd_information { __le16 auto_trigger_step; } __packed; -struct hif_tx_rate_retry_policy { +struct wfx_hif_tx_rate_retry_policy { u8 policy_index; u8 short_retry_count; u8 long_retry_count; @@ -324,13 +324,13 @@ struct hif_tx_rate_retry_policy { #define HIF_TX_RETRY_POLICY_MAX 15 #define HIF_TX_RETRY_POLICY_INVALID HIF_TX_RETRY_POLICY_MAX -struct hif_mib_set_tx_rate_retry_policy { +struct wfx_hif_mib_set_tx_rate_retry_policy { u8 num_tx_rate_policies; u8 reserved[3]; - struct hif_tx_rate_retry_policy tx_rate_retry_policy[]; + struct wfx_hif_tx_rate_retry_policy tx_rate_retry_policy[]; } __packed; -struct hif_mib_protected_mgmt_policy { +struct wfx_hif_mib_protected_mgmt_policy { u8 pmf_enable:1; u8 unpmf_allowed:1; u8 host_enc_auth_frames:1; @@ -338,7 +338,7 @@ struct hif_mib_protected_mgmt_policy { u8 reserved2[3]; } __packed; -struct hif_mib_keep_alive_period { +struct wfx_hif_mib_keep_alive_period { __le16 keep_alive_period; u8 reserved[2]; } __packed; diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 7a2a32e3ceb9..f2564a20bdcf 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -17,7 +17,7 @@ #include "hif_api_cmd.h" static int wfx_hif_generic_confirm(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) + const struct wfx_hif_msg *hif, const void *buf) { /* All confirm messages start with status */ int status = le32_to_cpup((__le32 *)buf); @@ -51,18 +51,18 @@ static int wfx_hif_generic_confirm(struct wfx_dev *wdev, } static int wfx_hif_tx_confirm(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) + const struct wfx_hif_msg *hif, const void *buf) { - const struct hif_cnf_tx *body = buf; + const struct wfx_hif_cnf_tx *body = buf; wfx_tx_confirm_cb(wdev, body); return 0; } static int wfx_hif_multi_tx_confirm(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) + const struct wfx_hif_msg *hif, const void *buf) { - const struct hif_cnf_multi_transmit *body = buf; + const struct wfx_hif_cnf_multi_transmit *body = buf; int i; WARN(body->num_tx_confs <= 0, "corrupted message"); @@ -72,22 +72,23 @@ static int wfx_hif_multi_tx_confirm(struct wfx_dev *wdev, } static int wfx_hif_startup_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, + const struct wfx_hif_msg *hif, const void *buf) { - const struct hif_ind_startup *body = buf; + const struct wfx_hif_ind_startup *body = buf; if (body->status || body->firmware_type > 4) { dev_err(wdev->dev, "received invalid startup indication"); return -EINVAL; } - memcpy(&wdev->hw_caps, body, sizeof(struct hif_ind_startup)); + memcpy(&wdev->hw_caps, body, sizeof(struct wfx_hif_ind_startup)); complete(&wdev->firmware_ready); return 0; } static int wfx_hif_wakeup_indication(struct wfx_dev *wdev, - const struct 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) { @@ -98,28 +99,28 @@ static int wfx_hif_wakeup_indication(struct wfx_dev *wdev, } static int wfx_hif_receive_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, + const struct wfx_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; + const struct wfx_hif_ind_rx *body = buf; if (!wvif) { dev_warn(wdev->dev, "%s: ignore rx data for non-existent vif %d\n", __func__, hif->interface); return -EIO; } - skb_pull(skb, sizeof(struct hif_msg) + sizeof(struct hif_ind_rx)); + skb_pull(skb, sizeof(struct wfx_hif_msg) + sizeof(struct hif_ind_rx)); wfx_rx_cb(wvif, body, skb); return 0; } static int wfx_hif_event_indication(struct wfx_dev *wdev, - const struct 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 hif_ind_event *body = buf; + const struct wfx_hif_ind_event *body = buf; int type = le32_to_cpu(body->event_id); if (!wvif) { @@ -151,7 +152,7 @@ static int wfx_hif_event_indication(struct wfx_dev *wdev, } static int wfx_hif_pm_mode_complete_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, + const struct wfx_hif_msg *hif, const void *buf) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); @@ -166,11 +167,11 @@ 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 hif_msg *hif, + const struct wfx_hif_msg *hif, const void *buf) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); - const struct hif_ind_scan_cmpl *body = buf; + const struct wfx_hif_ind_scan_cmpl *body = buf; if (!wvif) { dev_warn(wdev->dev, "%s: received event for non-existent vif\n", __func__); @@ -183,7 +184,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 hif_msg *hif, + const struct wfx_hif_msg *hif, const void *buf) { struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); @@ -198,10 +199,10 @@ static int wfx_hif_join_complete_indication(struct wfx_dev *wdev, } static int wfx_hif_suspend_resume_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, + const struct wfx_hif_msg *hif, const void *buf) { - const struct hif_ind_suspend_resume_tx *body = buf; + const struct wfx_hif_ind_suspend_resume_tx *body = buf; struct wfx_vif *wvif; if (body->bc_mc_only) { @@ -227,10 +228,10 @@ static int wfx_hif_suspend_resume_indication(struct wfx_dev *wdev, } static int wfx_hif_generic_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, + const struct wfx_hif_msg *hif, const void *buf) { - const struct hif_ind_generic *body = buf; + const struct wfx_hif_ind_generic *body = buf; int type = le32_to_cpu(body->type); switch (type) { @@ -308,9 +309,9 @@ static const struct { }; static int wfx_hif_error_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, const void *buf) + const struct wfx_hif_msg *hif, const void *buf) { - const struct hif_ind_error *body = buf; + const struct wfx_hif_ind_error *body = buf; int type = le32_to_cpu(body->type); int param = (s8)body->data[0]; int i; @@ -335,10 +336,10 @@ static int wfx_hif_error_indication(struct wfx_dev *wdev, }; static int wfx_hif_exception_indication(struct wfx_dev *wdev, - const struct hif_msg *hif, + const struct wfx_hif_msg *hif, const void *buf) { - const struct hif_ind_exception *body = buf; + const struct wfx_hif_ind_exception *body = buf; int type = le32_to_cpu(body->type); if (type == 4) @@ -356,7 +357,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 hif_msg *hif, const void *buf); + const struct wfx_hif_msg *hif, const void *buf); } hif_handlers[] = { /* Confirmations */ { HIF_CNF_ID_TX, wfx_hif_tx_confirm }, @@ -379,7 +380,7 @@ static const struct { void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb) { int i; - const struct hif_msg *hif = (const struct hif_msg *)skb->data; + const struct wfx_hif_msg *hif = (const struct hif_msg *)skb->data; int hif_id = hif->id; if (hif_id == HIF_IND_ID_RX) { diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index 67f1847c1fc1..429c70b991e1 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -22,7 +22,7 @@ void wfx_init_hif_cmd(struct wfx_hif_cmd *hif_cmd) mutex_init(&hif_cmd->lock); } -static void wfx_fill_header(struct hif_msg *hif, int if_id, +static void wfx_fill_header(struct wfx_hif_msg *hif, int if_id, unsigned int cmd, size_t size) { if (if_id == -1) @@ -37,16 +37,16 @@ static void wfx_fill_header(struct hif_msg *hif, int if_id, hif->interface = if_id; } -static void *wfx_alloc_hif(size_t body_len, struct hif_msg **hif) +static void *wfx_alloc_hif(size_t body_len, struct wfx_hif_msg **hif) { - *hif = kzalloc(sizeof(struct hif_msg) + body_len, GFP_KERNEL); + *hif = kzalloc(sizeof(struct wfx_hif_msg) + body_len, GFP_KERNEL); if (*hif) return (*hif)->body; else return NULL; } -int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, +int wfx_cmd_send(struct wfx_dev *wdev, struct wfx_hif_msg *request, void *reply, size_t reply_len, bool no_reply) { const char *mib_name = ""; @@ -125,7 +125,7 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, int wfx_hif_shutdown(struct wfx_dev *wdev) { int ret; - struct hif_msg *hif; + struct wfx_hif_msg *hif; wfx_alloc_hif(0, &hif); if (!hif) @@ -143,9 +143,9 @@ int wfx_hif_shutdown(struct wfx_dev *wdev) 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; - struct hif_msg *hif; - struct hif_req_configuration *body = wfx_alloc_hif(buf_len, &hif); + size_t buf_len = sizeof(struct wfx_hif_req_configuration) + len; + struct wfx_hif_msg *hif; + struct wfx_hif_req_configuration *body = wfx_alloc_hif(buf_len, &hif); if (!hif) return -ENOMEM; @@ -160,8 +160,8 @@ int wfx_hif_configuration(struct wfx_dev *wdev, const u8 *conf, size_t len) int wfx_hif_reset(struct wfx_vif *wvif, bool reset_stat) { int ret; - struct hif_msg *hif; - struct hif_req_reset *body = wfx_alloc_hif(sizeof(*body), &hif); + struct wfx_hif_msg *hif; + struct wfx_hif_req_reset *body = wfx_alloc_hif(sizeof(*body), &hif); if (!hif) return -ENOMEM; @@ -176,10 +176,10 @@ 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; - int buf_len = sizeof(struct hif_cnf_read_mib) + val_len; - struct hif_req_read_mib *body = wfx_alloc_hif(sizeof(*body), &hif); - struct hif_cnf_read_mib *reply = kmalloc(buf_len, GFP_KERNEL); + struct wfx_hif_msg *hif; + int buf_len = sizeof(struct wfx_hif_cnf_read_mib) + val_len; + struct wfx_hif_req_read_mib *body = wfx_alloc_hif(sizeof(*body), &hif); + struct wfx_hif_cnf_read_mib *reply = kmalloc(buf_len, GFP_KERNEL); if (!body || !reply) { ret = -ENOMEM; @@ -212,9 +212,9 @@ 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; - int buf_len = sizeof(struct hif_req_write_mib) + val_len; - struct hif_req_write_mib *body = wfx_alloc_hif(buf_len, &hif); + struct wfx_hif_msg *hif; + int buf_len = sizeof(struct wfx_hif_req_write_mib) + val_len; + struct wfx_hif_req_write_mib *body = wfx_alloc_hif(buf_len, &hif); if (!hif) return -ENOMEM; @@ -231,10 +231,10 @@ 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; - size_t buf_len = - sizeof(struct hif_req_start_scan_alt) + chan_num * sizeof(u8); - struct hif_req_start_scan_alt *body = wfx_alloc_hif(buf_len, &hif); + struct wfx_hif_msg *hif; + 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"); WARN(req->n_ssids > HIF_API_MAX_NB_SSIDS, "invalid params"); @@ -279,7 +279,7 @@ int wfx_hif_scan(struct wfx_vif *wvif, struct cfg80211_scan_request *req, int wfx_hif_stop_scan(struct wfx_vif *wvif) { int ret; - struct hif_msg *hif; + struct wfx_hif_msg *hif; /* body associated to HIF_REQ_ID_STOP_SCAN is empty */ wfx_alloc_hif(0, &hif); @@ -295,8 +295,8 @@ 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; - struct hif_req_join *body = wfx_alloc_hif(sizeof(*body), &hif); + struct wfx_hif_msg *hif; + struct wfx_hif_req_join *body = wfx_alloc_hif(sizeof(*body), &hif); WARN_ON(!conf->beacon_int); WARN_ON(!conf->basic_rates); @@ -325,9 +325,9 @@ int wfx_hif_join(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, int wfx_hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count) { int ret; - struct hif_msg *hif; - struct hif_req_set_bss_params *body = - wfx_alloc_hif(sizeof(*body), &hif); + struct wfx_hif_msg *hif; + struct wfx_hif_req_set_bss_params *body = wfx_alloc_hif(sizeof(*body), + &hif); if (!hif) return -ENOMEM; @@ -340,12 +340,12 @@ int wfx_hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count) return ret; } -int wfx_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 wfx_hif_req_add_key *arg) { int ret; - struct hif_msg *hif; + struct wfx_hif_msg *hif; /* FIXME: only send necessary bits */ - struct hif_req_add_key *body = wfx_alloc_hif(sizeof(*body), &hif); + struct wfx_hif_req_add_key *body = wfx_alloc_hif(sizeof(*body), &hif); if (!hif) return -ENOMEM; @@ -367,8 +367,8 @@ 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 ret; - struct hif_msg *hif; - struct hif_req_remove_key *body = wfx_alloc_hif(sizeof(*body), &hif); + struct wfx_hif_msg *hif; + struct wfx_hif_req_remove_key *body = wfx_alloc_hif(sizeof(*body), &hif); if (!hif) return -ENOMEM; @@ -383,9 +383,9 @@ 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; - struct hif_req_edca_queue_params *body = wfx_alloc_hif(sizeof(*body), - &hif); + struct wfx_hif_msg *hif; + struct wfx_hif_req_edca_queue_params *body = wfx_alloc_hif(sizeof(*body), + &hif); if (!body) return -ENOMEM; @@ -413,8 +413,9 @@ int wfx_hif_set_edca_queue_params(struct wfx_vif *wvif, u16 queue, int wfx_hif_set_pm(struct wfx_vif *wvif, bool ps, int dynamic_ps_timeout) { int ret; - struct hif_msg *hif; - struct hif_req_set_pm_mode *body = wfx_alloc_hif(sizeof(*body), &hif); + struct wfx_hif_msg *hif; + struct wfx_hif_req_set_pm_mode *body = wfx_alloc_hif(sizeof(*body), + &hif); if (!body) return -ENOMEM; @@ -438,8 +439,8 @@ 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; - struct hif_req_start *body = wfx_alloc_hif(sizeof(*body), &hif); + struct wfx_hif_msg *hif; + struct wfx_hif_req_start *body = wfx_alloc_hif(sizeof(*body), &hif); WARN_ON(!conf->beacon_int); if (!hif) @@ -461,9 +462,9 @@ int wfx_hif_start(struct wfx_vif *wvif, const struct ieee80211_bss_conf *conf, int wfx_hif_beacon_transmit(struct wfx_vif *wvif, bool enable) { int ret; - struct hif_msg *hif; - struct hif_req_beacon_transmit *body = wfx_alloc_hif(sizeof(*body), - &hif); + struct wfx_hif_msg *hif; + struct wfx_hif_req_beacon_transmit *body = wfx_alloc_hif(sizeof(*body), + &hif); if (!hif) return -ENOMEM; @@ -479,8 +480,8 @@ 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; - struct hif_req_map_link *body = wfx_alloc_hif(sizeof(*body), &hif); + struct wfx_hif_msg *hif; + struct wfx_hif_req_map_link *body = wfx_alloc_hif(sizeof(*body), &hif); if (!hif) return -ENOMEM; @@ -499,9 +500,9 @@ int wfx_hif_update_ie_beacon(struct wfx_vif *wvif, const u8 *ies, size_t ies_len) { int ret; - struct hif_msg *hif; - int buf_len = sizeof(struct hif_req_update_ie) + ies_len; - struct hif_req_update_ie *body = wfx_alloc_hif(buf_len, &hif); + struct wfx_hif_msg *hif; + int buf_len = sizeof(struct wfx_hif_req_update_ie) + ies_len; + struct wfx_hif_req_update_ie *body = wfx_alloc_hif(buf_len, &hif); if (!hif) return -ENOMEM; diff --git a/drivers/staging/wfx/hif_tx.h b/drivers/staging/wfx/hif_tx.h index b28a2ee5350a..36caffa4d1eb 100644 --- a/drivers/staging/wfx/hif_tx.h +++ b/drivers/staging/wfx/hif_tx.h @@ -18,22 +18,22 @@ struct ieee80211_channel; struct ieee80211_bss_conf; struct ieee80211_tx_queue_params; struct cfg80211_scan_request; -struct hif_req_add_key; +struct wfx_hif_req_add_key; struct wfx_dev; struct wfx_vif; struct wfx_hif_cmd { - struct mutex lock; - struct completion ready; - struct completion done; - struct hif_msg *buf_send; - void *buf_recv; - size_t len_recv; - int ret; + struct mutex lock; + struct completion ready; + struct completion done; + struct wfx_hif_msg *buf_send; + void *buf_recv; + size_t len_recv; + int ret; }; void wfx_init_hif_cmd(struct wfx_hif_cmd *wfx_hif_cmd); -int wfx_cmd_send(struct wfx_dev *wdev, struct hif_msg *request, +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, @@ -47,7 +47,7 @@ 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_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); int wfx_hif_set_bss_params(struct wfx_vif *wvif, int aid, int beacon_lost_count); diff --git a/drivers/staging/wfx/hif_tx_mib.c b/drivers/staging/wfx/hif_tx_mib.c index b79ffdf6fcd2..daf966693f67 100644 --- a/drivers/staging/wfx/hif_tx_mib.c +++ b/drivers/staging/wfx/hif_tx_mib.c @@ -16,7 +16,7 @@ int wfx_hif_set_output_power(struct wfx_vif *wvif, int val) { - struct hif_mib_current_tx_power_level arg = { + struct wfx_hif_mib_current_tx_power_level arg = { .power_level = cpu_to_le32(val * 10), }; @@ -29,7 +29,7 @@ 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 = { + struct wfx_hif_mib_beacon_wake_up_period arg = { .wakeup_period_min = dtim_interval, .receive_dtim = 0, .wakeup_period_max = listen_interval, @@ -45,7 +45,7 @@ int wfx_hif_set_beacon_wakeup_period(struct wfx_vif *wvif, int wfx_hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, int rssi_thold, int rssi_hyst) { - struct hif_mib_rcpi_rssi_threshold arg = { + struct wfx_hif_mib_rcpi_rssi_threshold arg = { .rolling_average_count = 8, .detection = 1, }; @@ -66,23 +66,23 @@ int wfx_hif_set_rcpi_rssi_threshold(struct wfx_vif *wvif, } int wfx_hif_get_counters_table(struct wfx_dev *wdev, int vif_id, - struct hif_mib_extended_count_table *arg) + struct wfx_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 wfx_hif_read_mib(wdev, vif_id, HIF_MIB_ID_COUNTERS_TABLE, - arg, sizeof(struct hif_mib_count_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 hif_mib_extended_count_table)); + sizeof(struct wfx_hif_mib_extended_count_table)); } } int wfx_hif_set_macaddr(struct wfx_vif *wvif, u8 *mac) { - struct hif_mib_mac_address arg = { }; + struct wfx_hif_mib_mac_address arg = { }; if (mac) ether_addr_copy(arg.mac_addr, mac); @@ -94,7 +94,7 @@ 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 filter_prbreq) { - struct hif_mib_rx_filter arg = { }; + struct wfx_hif_mib_rx_filter arg = { }; if (filter_bssid) arg.bssid_filter = 1; @@ -105,10 +105,10 @@ int wfx_hif_set_rx_filter(struct wfx_vif *wvif, } int wfx_hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, - const struct hif_ie_table_entry *tbl) + const struct wfx_hif_ie_table_entry *tbl) { int ret; - struct hif_mib_bcn_filter_table *arg; + struct wfx_hif_mib_bcn_filter_table *arg; int buf_len = struct_size(arg, ie_table, tbl_len); arg = kzalloc(buf_len, GFP_KERNEL); @@ -125,7 +125,7 @@ int wfx_hif_set_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, int wfx_hif_beacon_filter_control(struct wfx_vif *wvif, int enable, int beacon_count) { - struct hif_mib_bcn_filter_enable arg = { + struct wfx_hif_mib_bcn_filter_enable arg = { .enable = cpu_to_le32(enable), .bcn_count = cpu_to_le32(beacon_count), }; @@ -135,9 +135,9 @@ int wfx_hif_beacon_filter_control(struct wfx_vif *wvif, } int wfx_hif_set_operational_mode(struct wfx_dev *wdev, - enum hif_op_power_mode mode) + enum wfx_hif_op_power_mode mode) { - struct hif_mib_gl_operational_power_mode arg = { + struct wfx_hif_mib_gl_operational_power_mode arg = { .power_mode = mode, .wup_ind_activation = 1, }; @@ -149,11 +149,11 @@ int wfx_hif_set_operational_mode(struct wfx_dev *wdev, 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; + struct wfx_hif_mib_template_frame *arg; WARN(skb->len > HIF_API_MAX_TEMPLATE_FRAME_SIZE, "frame is too big"); skb_push(skb, 4); - arg = (struct hif_mib_template_frame *)skb->data; + arg = (struct wfx_hif_mib_template_frame *)skb->data; skb_pull(skb, 4); arg->init_rate = init_rate; arg->frame_type = frame_type; @@ -164,7 +164,7 @@ int wfx_hif_set_template_frame(struct wfx_vif *wvif, struct sk_buff *skb, int wfx_hif_set_mfp(struct wfx_vif *wvif, bool capable, bool required) { - struct hif_mib_protected_mgmt_policy arg = { }; + struct wfx_hif_mib_protected_mgmt_policy arg = { }; WARN(required && !capable, "incoherent arguments"); if (capable) { @@ -181,7 +181,7 @@ 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) { - struct hif_mib_block_ack_policy arg = { + struct wfx_hif_mib_block_ack_policy arg = { .block_ack_tx_tid_policy = tx_tid_policy, .block_ack_rx_tid_policy = rx_tid_policy, }; @@ -194,7 +194,7 @@ int wfx_hif_set_block_ack_policy(struct wfx_vif *wvif, 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 = { + struct wfx_hif_mib_set_association_mode arg = { .preambtype_use = 1, .mode = 1, .spacing = 1, @@ -211,7 +211,7 @@ int wfx_hif_set_association_mode(struct wfx_vif *wvif, int ampdu_density, 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; + struct wfx_hif_mib_set_tx_rate_retry_policy *arg; size_t size = struct_size(arg, tx_rate_retry_policy, 1); int ret; @@ -236,7 +236,7 @@ int wfx_hif_set_tx_rate_retry_policy(struct wfx_vif *wvif, int wfx_hif_keep_alive_period(struct wfx_vif *wvif, int period) { - struct hif_mib_keep_alive_period arg = { + struct wfx_hif_mib_keep_alive_period arg = { .keep_alive_period = cpu_to_le16(period), }; @@ -247,7 +247,7 @@ 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) { - struct hif_mib_arp_ip_addr_table arg = { + struct wfx_hif_mib_arp_ip_addr_table arg = { .condition_idx = idx, .arp_enable = HIF_ARP_NS_FILTERING_DISABLE, }; @@ -264,7 +264,7 @@ 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) { - struct hif_mib_gl_set_multi_msg arg = { + struct wfx_hif_mib_gl_set_multi_msg arg = { .enable_multi_tx_conf = enable, }; @@ -274,7 +274,7 @@ 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) { - struct hif_mib_set_uapsd_information arg = { }; + struct wfx_hif_mib_set_uapsd_information arg = { }; if (val & BIT(IEEE80211_AC_VO)) arg.trig_voice = 1; @@ -291,7 +291,7 @@ 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) { - struct hif_mib_non_erp_protection arg = { + struct wfx_hif_mib_non_erp_protection arg = { .use_cts_to_self = enable, }; @@ -302,7 +302,7 @@ int wfx_hif_erp_use_protection(struct wfx_vif *wvif, bool enable) int wfx_hif_slot_time(struct wfx_vif *wvif, int val) { - struct hif_mib_slot_time arg = { + struct wfx_hif_mib_slot_time arg = { .slot_time = cpu_to_le32(val), }; @@ -312,7 +312,7 @@ int wfx_hif_slot_time(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 = { + struct wfx_hif_mib_wep_default_key_id arg = { .wep_default_key_id = val, }; @@ -323,7 +323,7 @@ int wfx_hif_wep_default_key_id(struct wfx_vif *wvif, int val) int wfx_hif_rts_threshold(struct wfx_vif *wvif, int val) { - struct hif_mib_dot11_rts_threshold arg = { + struct wfx_hif_mib_dot11_rts_threshold arg = { .threshold = cpu_to_le32(val >= 0 ? val : 0xFFFF), }; diff --git a/drivers/staging/wfx/hif_tx_mib.h b/drivers/staging/wfx/hif_tx_mib.h index 9b4c16ad5ecf..e7e556b05c9a 100644 --- a/drivers/staging/wfx/hif_tx_mib.h +++ b/drivers/staging/wfx/hif_tx_mib.h @@ -14,8 +14,8 @@ struct sk_buff; struct wfx_vif; struct wfx_dev; -struct hif_ie_table_entry; -struct hif_mib_extended_count_table; +struct wfx_hif_ie_table_entry; +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, @@ -24,16 +24,16 @@ int wfx_hif_set_beacon_wakeup_period(struct wfx_vif *wvif, 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); + 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_beacon_filter_table(struct wfx_vif *wvif, int tbl_len, - const struct hif_ie_table_entry *tbl); + 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 hif_op_power_mode mode); + 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); diff --git a/drivers/staging/wfx/key.c b/drivers/staging/wfx/key.c index 6069be161154..dea8238f9916 100644 --- a/drivers/staging/wfx/key.c +++ b/drivers/staging/wfx/key.c @@ -30,7 +30,7 @@ static void wfx_free_key(struct wfx_dev *wdev, int idx) wdev->key_map &= ~BIT(idx); } -static u8 fill_wep_pair(struct hif_wep_pairwise_key *msg, +static u8 fill_wep_pair(struct wfx_hif_wep_pairwise_key *msg, struct ieee80211_key_conf *key, u8 *peer_addr) { WARN(key->keylen > sizeof(msg->key_data), "inconsistent data"); @@ -40,7 +40,7 @@ static u8 fill_wep_pair(struct hif_wep_pairwise_key *msg, return HIF_KEY_TYPE_WEP_PAIRWISE; } -static u8 fill_wep_group(struct hif_wep_group_key *msg, +static u8 fill_wep_group(struct wfx_hif_wep_group_key *msg, struct ieee80211_key_conf *key) { WARN(key->keylen > sizeof(msg->key_data), "inconsistent data"); @@ -50,7 +50,7 @@ static u8 fill_wep_group(struct hif_wep_group_key *msg, return HIF_KEY_TYPE_WEP_DEFAULT; } -static u8 fill_tkip_pair(struct hif_tkip_pairwise_key *msg, +static u8 fill_tkip_pair(struct wfx_hif_tkip_pairwise_key *msg, struct ieee80211_key_conf *key, u8 *peer_addr) { u8 *keybuf = key->key; @@ -67,7 +67,7 @@ static u8 fill_tkip_pair(struct hif_tkip_pairwise_key *msg, return HIF_KEY_TYPE_TKIP_PAIRWISE; } -static u8 fill_tkip_group(struct hif_tkip_group_key *msg, +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) @@ -92,7 +92,7 @@ static u8 fill_tkip_group(struct hif_tkip_group_key *msg, return HIF_KEY_TYPE_TKIP_GROUP; } -static u8 fill_ccmp_pair(struct hif_aes_pairwise_key *msg, +static u8 fill_ccmp_pair(struct wfx_hif_aes_pairwise_key *msg, struct ieee80211_key_conf *key, u8 *peer_addr) { WARN(key->keylen != sizeof(msg->aes_key_data), "inconsistent data"); @@ -101,7 +101,7 @@ static u8 fill_ccmp_pair(struct hif_aes_pairwise_key *msg, return HIF_KEY_TYPE_AES_PAIRWISE; } -static u8 fill_ccmp_group(struct hif_aes_group_key *msg, +static u8 fill_ccmp_group(struct wfx_hif_aes_group_key *msg, struct ieee80211_key_conf *key, struct ieee80211_key_seq *seq) { @@ -113,7 +113,7 @@ static u8 fill_ccmp_group(struct hif_aes_group_key *msg, return HIF_KEY_TYPE_AES_GROUP; } -static u8 fill_sms4_pair(struct hif_wapi_pairwise_key *msg, +static u8 fill_sms4_pair(struct wfx_hif_wapi_pairwise_key *msg, struct ieee80211_key_conf *key, u8 *peer_addr) { u8 *keybuf = key->key; @@ -128,7 +128,7 @@ static u8 fill_sms4_pair(struct hif_wapi_pairwise_key *msg, return HIF_KEY_TYPE_WAPI_PAIRWISE; } -static u8 fill_sms4_group(struct hif_wapi_group_key *msg, +static u8 fill_sms4_group(struct wfx_hif_wapi_group_key *msg, struct ieee80211_key_conf *key) { u8 *keybuf = key->key; @@ -142,7 +142,7 @@ static u8 fill_sms4_group(struct hif_wapi_group_key *msg, return HIF_KEY_TYPE_WAPI_GROUP; } -static u8 fill_aes_cmac_group(struct hif_igtk_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) { @@ -158,7 +158,7 @@ static int wfx_add_key(struct wfx_vif *wvif, struct ieee80211_sta *sta, struct ieee80211_key_conf *key) { int ret; - struct hif_req_add_key k = { }; + struct wfx_hif_req_add_key k = { }; struct ieee80211_key_seq seq; struct wfx_dev *wdev = wvif->wdev; int idx = wfx_alloc_key(wvif->wdev); diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 43947f8f2e0c..f34cfed503d4 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -288,8 +288,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 hif_msg) - + sizeof(struct hif_req_tx) + 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) | diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c index 7a3ba3c38925..71c6ef94a904 100644 --- a/drivers/staging/wfx/queue.c +++ b/drivers/staging/wfx/queue.c @@ -127,13 +127,13 @@ void wfx_pending_drop(struct wfx_dev *wdev, struct sk_buff_head *dropped) { struct wfx_queue *queue; struct wfx_vif *wvif; - struct hif_msg *hif; + struct wfx_hif_msg *hif; struct sk_buff *skb; 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 hif_msg *)skb->data; + hif = (struct wfx_hif_msg *)skb->data; wvif = wdev_to_wvif(wdev, hif->interface); if (wvif) { queue = &wvif->tx_queue[skb_get_queue_mapping(skb)]; @@ -148,15 +148,15 @@ void wfx_pending_drop(struct wfx_dev *wdev, struct sk_buff_head *dropped) struct sk_buff *wfx_pending_get(struct wfx_dev *wdev, u32 packet_id) { struct wfx_queue *queue; - struct hif_req_tx *req; + struct wfx_hif_req_tx *req; struct wfx_vif *wvif; - struct hif_msg *hif; + struct wfx_hif_msg *hif; struct sk_buff *skb; spin_lock_bh(&wdev->tx_pending.lock); skb_queue_walk(&wdev->tx_pending, skb) { - hif = (struct hif_msg *)skb->data; - req = (struct hif_req_tx *)hif->body; + hif = (struct wfx_hif_msg *)skb->data; + req = (struct wfx_hif_req_tx *)hif->body; if (req->packet_id != packet_id) continue; spin_unlock_bh(&wdev->tx_pending.lock); @@ -179,7 +179,7 @@ void wfx_pending_dump_old_frames(struct wfx_dev *wdev, unsigned int limit_ms) { ktime_t now = ktime_get(); struct wfx_tx_priv *tx_priv; - struct hif_req_tx *req; + struct wfx_hif_req_tx *req; struct sk_buff *skb; bool first = true; @@ -236,7 +236,7 @@ static struct sk_buff *wfx_tx_queues_get_skb(struct wfx_dev *wdev) struct wfx_queue *queues[IEEE80211_NUM_ACS * ARRAY_SIZE(wdev->vif)]; int i, j, num_queues = 0; struct wfx_vif *wvif; - struct hif_msg *hif; + struct wfx_hif_msg *hif; struct sk_buff *skb; /* sort the queues */ @@ -265,7 +265,7 @@ static struct sk_buff *wfx_tx_queues_get_skb(struct wfx_dev *wdev) * and only one vif can be AP, all queued frames has * same interface id */ - hif = (struct hif_msg *)skb->data; + 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)]); @@ -289,7 +289,7 @@ static struct sk_buff *wfx_tx_queues_get_skb(struct wfx_dev *wdev) return NULL; } -struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev) +struct wfx_hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev) { struct wfx_tx_priv *tx_priv; struct sk_buff *skb; @@ -303,5 +303,5 @@ struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev) wake_up(&wdev->tx_dequeue); tx_priv = wfx_skb_tx_priv(skb); tx_priv->xmit_timestamp = ktime_get(); - return (struct hif_msg *)skb->data; + return (struct wfx_hif_msg *)skb->data; } diff --git a/drivers/staging/wfx/queue.h b/drivers/staging/wfx/queue.h index edd0d018b198..66596a9abe30 100644 --- a/drivers/staging/wfx/queue.h +++ b/drivers/staging/wfx/queue.h @@ -30,7 +30,7 @@ void wfx_tx_queues_init(struct wfx_vif *wvif); void wfx_tx_queues_check_empty(struct wfx_vif *wvif); bool wfx_tx_queues_has_cab(struct wfx_vif *wvif); void wfx_tx_queues_put(struct wfx_vif *wvif, struct sk_buff *skb); -struct hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev); +struct wfx_hif_msg *wfx_tx_queues_get(struct wfx_dev *wdev); bool wfx_tx_queue_empty(struct wfx_vif *wvif, struct wfx_queue *queue); void wfx_tx_queue_drop(struct wfx_vif *wvif, struct wfx_queue *queue, diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index d384f2df329c..620d8c912f95 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -63,7 +63,7 @@ void wfx_suspend_hot_dev(struct wfx_dev *wdev, enum sta_notify_cmd cmd) static void wfx_filter_beacon(struct wfx_vif *wvif, bool filter_beacon) { - static const struct hif_ie_table_entry filter_ies[] = { + static const struct wfx_hif_ie_table_entry filter_ies[] = { { .ie_id = WLAN_EID_VENDOR_SPECIFIC, .has_changed = 1, diff --git a/drivers/staging/wfx/traces.h b/drivers/staging/wfx/traces.h index e90dc73c4b01..99bd1808111e 100644 --- a/drivers/staging/wfx/traces.h +++ b/drivers/staging/wfx/traces.h @@ -158,7 +158,7 @@ hif_mib_list_enum #define hif_mib_list hif_mib_list_enum { -1, NULL } DECLARE_EVENT_CLASS(hif_data, - TP_PROTO(const struct hif_msg *hif, int tx_fill_level, bool is_recv), + TP_PROTO(const struct wfx_hif_msg *hif, int tx_fill_level, bool is_recv), TP_ARGS(hif, tx_fill_level, is_recv), TP_STRUCT__entry( __field(int, tx_fill_level) @@ -192,7 +192,7 @@ DECLARE_EVENT_CLASS(hif_data, } __entry->buf_len = min_t(int, __entry->msg_len, sizeof(__entry->buf)) - - sizeof(struct hif_msg) - header_len; + - sizeof(struct wfx_hif_msg) - header_len; memcpy(__entry->buf, hif->body + header_len, __entry->buf_len); ), TP_printk("%d:%d:%s_%s%s%s: %s%s (%d bytes)", @@ -208,12 +208,12 @@ DECLARE_EVENT_CLASS(hif_data, ) ); DEFINE_EVENT(hif_data, hif_send, - TP_PROTO(const struct hif_msg *hif, int tx_fill_level, bool is_recv), + TP_PROTO(const struct wfx_hif_msg *hif, int tx_fill_level, bool is_recv), TP_ARGS(hif, tx_fill_level, is_recv)); #define _trace_hif_send(hif, tx_fill_level)\ trace_hif_send(hif, tx_fill_level, false) DEFINE_EVENT(hif_data, hif_recv, - TP_PROTO(const struct hif_msg *hif, int tx_fill_level, bool is_recv), + TP_PROTO(const struct wfx_hif_msg *hif, int tx_fill_level, bool is_recv), TP_ARGS(hif, tx_fill_level, is_recv)); #define _trace_hif_recv(hif, tx_fill_level)\ trace_hif_recv(hif, tx_fill_level, true) @@ -364,7 +364,7 @@ TRACE_EVENT(bh_stats, trace_bh_stats(ind, req, cnf, busy, release) TRACE_EVENT(tx_stats, - TP_PROTO(const struct hif_cnf_tx *tx_cnf, const struct sk_buff *skb, + TP_PROTO(const struct wfx_hif_cnf_tx *tx_cnf, const struct sk_buff *skb, int delay), TP_ARGS(tx_cnf, skb, delay), TP_STRUCT__entry( diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index f8df59ad1639..1c06430e5996 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -38,7 +38,7 @@ struct wfx_dev { u8 keyset; struct completion firmware_ready; - struct hif_ind_startup hw_caps; + struct wfx_hif_ind_startup hw_caps; struct wfx_hif hif; struct delayed_work cooling_timeout_work; bool poll_irq; @@ -53,9 +53,9 @@ struct wfx_dev { atomic_t packet_id; u32 key_map; - struct hif_rx_stats rx_stats; + struct wfx_hif_rx_stats rx_stats; struct mutex rx_stats_lock; - struct hif_tx_power_loop_info tx_power_loop_info; + struct wfx_hif_tx_power_loop_info tx_power_loop_info; struct mutex tx_power_loop_info_lock; int force_ps_timeout; }; From patchwork Thu Jan 13 08:55:12 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: 12712459 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D659CC433FE for ; Thu, 13 Jan 2022 08:56:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233234AbiAMI4i (ORCPT ); Thu, 13 Jan 2022 03:56:38 -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 S231897AbiAMI4S (ORCPT ); Thu, 13 Jan 2022 03:56:18 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YSYWqLpNWB3bF+aTkunqM9phLGiglf1EJDeWVCGpRJGeDgZ1bmzEUB0weM3/Rj81d8xda4zu9pBnXQ0Oqq0C62FOL7+j003KzENPT6aT1Wq022JqwxlsmnA+Uo0D2bchRc8QG1l3IE0S4jjElkggVsQR/KFarWaVNIMryMAlARahHeFLm2NaKaxdpiXH1242+F6096ZBllAIcHzRroeJYo4T1YQBYgsiSVLxHlPv1iltmmYSiu/S5TID+oTsdRP9p/4hhu0t+Sf5npoB8tpcSZmu/hp6Z0YuPgDZGk/p+PnV7Rt9AnGTiGRTpYeacaGPt0uu9iFOYbrTs3yF/sbkkw== 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=EFKTSebZbniqXelG5WghP9hFv/xZuXpXjmC05FRqzNA=; b=SpHkuEgFLQV2SvpNbfPgkrKqhJu3x4YW0JeQFYxJiauRNDUW1SvySgwH5ub9oYnnu5nt7aZdzXv/WzmnW4oopWJZ6YymYEKahRRTAU3mqD0qt/th0j4i8NgcubUZBFnmEDhACJN8R87h3DOPh3QACMc8hD1WO64J+vrVR/W/dXC62ZYoAM+//BW93nMEnrBZqShgsVcHx2apcLnmxTYW5hBxs++e/dr59qIrx2xK7GevFo25FoozV3qvwj/oa6BEqUaili92uqw/jn93GJTSnrH7+aHO+8GmZ95K/dvDVCC0G8F2r7n1LCL8gs9IsMxtxDTXxyZuyvd9ic3avVm5Yg== 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=EFKTSebZbniqXelG5WghP9hFv/xZuXpXjmC05FRqzNA=; b=ArJJz1BXPS68Sx/9QaB2jRqWThzPkmE6YaqsVrvl8OSD+87jUL+L1gElcVyTjJAsf+c9Pk4blrwFCLOAkAGW4lOmRW9YVE1wsyibT/eX+uiHd1Wxlk3LwFwoCQ+9xnqjx+TT+q5p69xP+jqv/QhzMn1zq6xUa8bEttQYFO6rm8c= 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:15 +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:15 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 19/31] staging: wfx: prefix structs tx_policy and hwbus_ops with wfx_ Date: Thu, 13 Jan 2022 09:55:12 +0100 Message-Id: <20220113085524.1110708-20-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: ada7dd3b-d154-4144-d023-08d9d6728e5b X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3173; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MpiTlg+VtJcflHn1pPqToIvW1fyLixWHEEYj5rmdVg7pJIoR5/5SbkUzYyiRqZJL1USaz4BpAQjndsrasJBHvviL/lOadDLQwkpQTjuQx9nbrvRqgANo8I8LxEj87WPDz3PuJH1+S23QxzOKLpcJP3GLIVmkDRNu6okzg+lBqf1fnLCan+11C21GxV5KWX5PlxhDIscO9s/mGsFOgaH+9Az9uGNC9sXesqZ1r2mBPKSJaC3QXCX2ycTznVZdpn6CH64WlYqCOpznYlXm5e3/zmulHcyPA4w8SGVYcfoOE2tczs5QrE4AKJyEFGAqW8tbpACWmlol+a31Ka1t2Jxx8vM1gVZxzVapjy0qKFH567FiKW7q8f6LiBOOraIrYB7VSYUNdRIJI61FXxIwWq8MxKGdohKhI8jX/A/Q5RyKXKf21QrCeZJpJAOzP13UglxWhmlGti7khPB89/6WdJeN7SgTOivLebZ4gc7AG7olHIZ5T95zFg+l13d4sKSni0ZTuy6qHnIQZ77SybrWzYhSc3jydxN+vRHtn7vZDeBk/Dx7p2/nwCtzHUBDkOSF0WI0YgaJMm1l3vBGtcAfQSnbbmrpSul2F/Vb4tW7T2xrJHwHMNm5jEDYyKrsVtMcAsnqkkKkXJZDyES5kRbOJ8KXKQ== 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?+RgTfeOMa9BhUNlJw0CBKkTICOV/?= =?utf-8?q?bUmj3zS/AVIo82eLTIMTRDPPOtY6ByZWNsRpmjj86rGuPxTWnXc8p8MRhNMrWxnVT?= =?utf-8?q?oZt13sr8P+KKpaEnaUnoPBT4Ki+DcX50c/VWPoEEQqOWhgFGAoejiSydYqC2v6Qtv?= =?utf-8?q?2Gigq9+gGP4p540jizx57u5zb8C38f71uOE8RET2gglA1Mqwq/eEddZqdxlGGKHFm?= =?utf-8?q?XtP9kRiNa3GeYFEYoudsoNv2tKVZ0oYg36HyQybsvmx+nuwl2jQOAPtxWMoexR/oZ?= =?utf-8?q?mqFtus9s0g930yhpc5YypGsTSWtP1Ppv6QDZJeVANQ1nDxgQ6HIMCHmCv4csJ3WLJ?= =?utf-8?q?NR8BE71+mtK/vIp17EH/CNmq1v8Toko2MYnr3P0wF3QCk0hheq4XQpU9yBe9s2lIv?= =?utf-8?q?/loDHEwZK5T4AOf0F/TiMlwW047glyvQEtuQVpbhktPruSXIkuWFNXap+tBGkd4yF?= =?utf-8?q?a5y232spraMbYQOaeStwZu/1QBIKmF0hZGhOqHy8DXJflhYS3RQYcq63ZDlFrayUf?= =?utf-8?q?MhqSsWBUOYzBDCJ4q0LdzjQlshpPjFg3aoPuckJf+UgTxceYF0EZTjNrkTDw5rLQR?= =?utf-8?q?1MMHIMNpQrDoZBTgS4VQYjPw4EWWBdDI5wH14M9o1IL42Ur2wBqaMzEocZXwWXca/?= =?utf-8?q?FJ7Ym8L/Np9mOVg0k4ibd9h5+CpY5lNac5Jz/Ps7PjcsVGHZv2rkoRHJBGZd0h0ca?= =?utf-8?q?qqf1K2VWjDQ3K28XAul2+hQkUO8Yzg2lvyAcVghN8h0cTCGGldk0j+Vl8ylpw29vh?= =?utf-8?q?BTRYJ55Uob0RSuAyimtTsvBk2l/2rPUrrdYvj5gJHPJsQ0SYcC/FDvm1NRSfF2swd?= =?utf-8?q?GFNsqGjyAe8/pkaGku+weWE21GKe4oHnEQGMmiw12h0npPOrkGDeDhFfGkxMxgzhh?= =?utf-8?q?78GeeacNG+Zy5gwihRP8+eF4ZMx9xMgl9X2djdeHbkFKZcMpB9sem2p1xWghQZBRc?= =?utf-8?q?8wdmfFjqoTXrFe1Q7z+CO/Bn6m+emWmKsTYnlS0udOqC3p8LyWqTUle0geXg333w5?= =?utf-8?q?EEYUhyMSgMib3Q4QZZ2EK5g4UZu1TjWQgG/ebEJH+AK+ZKmlhbyx/GeOdptdhVlJE?= =?utf-8?q?HxGxIrZReWQSbh86h9Fxlf+1+Nw3qbxqWTDFuSHdMSV9ShBdz8rAtOv2DR6g60ote?= =?utf-8?q?hmrUVzwt52LSNhMW6MRotXnE3rp0xJfPz8aVBV5nXAAZQcrQuRSYfB6IBSukfVk8G?= =?utf-8?q?9PbQc0yQ3ajk+B+KfVDiLXKsBbaocs/IQS5AapjdzvU5UBwJjptkH6/+94w8Xw10O?= =?utf-8?q?22smh29udzKdHcwqFKIrYrXqtGRHrJBpONr9dESRY2yoRAzrIvIk1tkFXqi46atDg?= =?utf-8?q?PlJBzFoRa6aCBqQ2Jf3de7Olox8yU0IsSC59ct1GTicSuGAsbrzH3DpSXYWwb6xd+?= =?utf-8?q?LLytg4dlE5FD8rz2H6zw9OkF0JGXFq1FoI2CLfrIDMiQ24XxmcR3ip5BL/BkeUklm?= =?utf-8?q?NNT6loFie1lieolkWugPU7L7hKUKdczYpDYV8EX0A97p12on/wIRZokH/ecdGoj0r?= =?utf-8?q?sxJckh+4u4kw6htpbOsIah6//yiz6hicEftUi/W/paLuo4h2OaGO0p6P/tylRlHI4?= =?utf-8?q?dANnFWX/7n6Eit4x270AmM0HQ5DhntkMod3cTSf8N5WLA+atn+PVXE=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: ada7dd3b-d154-4144-d023-08d9d6728e5b 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:15.4820 (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: 52q9htVdTVzeWdFsG2B5B4MRjOONFf6kr+87HxtGUMswyWspyTCovLHBFDRHNdLNNWGCDg8sh/W3ha8j9ewqZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller All the types related to a driver should use the same prefix. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus.h | 2 +- drivers/staging/wfx/bus_sdio.c | 2 +- drivers/staging/wfx/bus_spi.c | 2 +- drivers/staging/wfx/data_tx.c | 38 +++++++++++++++++----------------- drivers/staging/wfx/data_tx.h | 10 ++++----- drivers/staging/wfx/hif_rx.c | 4 ++-- drivers/staging/wfx/main.c | 2 +- drivers/staging/wfx/main.h | 4 ++-- drivers/staging/wfx/wfx.h | 6 +++--- 9 files changed, 35 insertions(+), 35 deletions(-) diff --git a/drivers/staging/wfx/bus.h b/drivers/staging/wfx/bus.h index ca04b3da6204..91b5a545b8ff 100644 --- a/drivers/staging/wfx/bus.h +++ b/drivers/staging/wfx/bus.h @@ -20,7 +20,7 @@ #define WFX_REG_SET_GEN_R_W 0x6 #define WFX_REG_FRAME_OUT 0x7 -struct hwbus_ops { +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, diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index 42aeab30bf0a..abcb507a48b3 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -159,7 +159,7 @@ static size_t wfx_sdio_align_size(void *priv, size_t size) return sdio_align_size(bus->func, size); } -static const struct hwbus_ops wfx_sdio_hwbus_ops = { +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, diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index 55ffcd7c42e2..99d33a128830 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -168,7 +168,7 @@ static size_t wfx_spi_align_size(void *priv, size_t size) return ALIGN(size, 4); } -static const struct hwbus_ops wfx_spi_hwbus_ops = { +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, diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index c004f455bb47..fec30d773e62 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -44,7 +44,7 @@ static int wfx_get_hw_rate(struct wfx_dev *wdev, /* TX policy cache implementation */ -static void wfx_tx_policy_build(struct wfx_vif *wvif, struct tx_policy *policy, +static void wfx_tx_policy_build(struct wfx_vif *wvif, struct wfx_tx_policy *policy, struct ieee80211_tx_rate *rates) { struct wfx_dev *wdev = wvif->wdev; @@ -66,16 +66,16 @@ static void wfx_tx_policy_build(struct wfx_vif *wvif, struct tx_policy *policy, } } -static bool wfx_tx_policy_is_equal(const struct tx_policy *a, - const struct 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 tx_policy_cache *cache, - struct tx_policy *wanted) +static int wfx_tx_policy_find(struct wfx_tx_policy_cache *cache, + struct wfx_tx_policy *wanted) { - struct tx_policy *it; + struct wfx_tx_policy *it; list_for_each_entry(it, &cache->used, link) if (wfx_tx_policy_is_equal(wanted, it)) @@ -86,15 +86,15 @@ static int wfx_tx_policy_find(struct tx_policy_cache *cache, return -1; } -static void wfx_tx_policy_use(struct tx_policy_cache *cache, - struct 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 tx_policy_cache *cache, - struct 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; @@ -107,9 +107,9 @@ static int wfx_tx_policy_get(struct wfx_vif *wvif, struct ieee80211_tx_rate *rates, bool *renew) { int idx; - struct tx_policy_cache *cache = &wvif->tx_policy_cache; - struct tx_policy wanted; - struct tx_policy *entry; + struct wfx_tx_policy_cache *cache = &wvif->tx_policy_cache; + struct wfx_tx_policy wanted; + struct wfx_tx_policy *entry; wfx_tx_policy_build(wvif, &wanted, rates); @@ -127,7 +127,7 @@ static int wfx_tx_policy_get(struct wfx_vif *wvif, * entry in "free" list */ *renew = true; - entry = list_entry(cache->free.prev, struct tx_policy, link); + entry = list_entry(cache->free.prev, struct wfx_tx_policy, link); memcpy(entry->rates, wanted.rates, sizeof(entry->rates)); entry->uploaded = false; entry->usage_count = 0; @@ -143,7 +143,7 @@ static int wfx_tx_policy_get(struct wfx_vif *wvif, static void wfx_tx_policy_put(struct wfx_vif *wvif, int idx) { int usage, locked; - struct tx_policy_cache *cache = &wvif->tx_policy_cache; + struct wfx_tx_policy_cache *cache = &wvif->tx_policy_cache; if (idx == HIF_TX_RETRY_POLICY_INVALID) return; @@ -157,7 +157,7 @@ static void wfx_tx_policy_put(struct wfx_vif *wvif, int idx) static int wfx_tx_policy_upload(struct wfx_vif *wvif) { - struct tx_policy *policies = wvif->tx_policy_cache.cache; + struct wfx_tx_policy *policies = wvif->tx_policy_cache.cache; u8 tmp_rates[12]; int i, is_used; @@ -192,7 +192,7 @@ void wfx_tx_policy_upload_work(struct work_struct *work) void wfx_tx_policy_init(struct wfx_vif *wvif) { - struct tx_policy_cache *cache = &wvif->tx_policy_cache; + struct wfx_tx_policy_cache *cache = &wvif->tx_policy_cache; int i; memset(cache, 0, sizeof(*cache)); @@ -435,8 +435,8 @@ void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, static void wfx_skb_dtor(struct wfx_vif *wvif, struct sk_buff *skb) { - struct wfx_hif_msg *hif = (struct hif_msg *)skb->data; - struct wfx_hif_req_tx *req = (struct hif_req_tx *)hif->body; + 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) + req->fc_offset; diff --git a/drivers/staging/wfx/data_tx.h b/drivers/staging/wfx/data_tx.h index c901a03ee4d8..040f731e62ae 100644 --- a/drivers/staging/wfx/data_tx.h +++ b/drivers/staging/wfx/data_tx.h @@ -18,15 +18,15 @@ struct wfx_tx_priv; struct wfx_dev; struct wfx_vif; -struct tx_policy { +struct wfx_tx_policy { struct list_head link; int usage_count; u8 rates[12]; bool uploaded; }; -struct tx_policy_cache { - struct tx_policy cache[HIF_TX_RETRY_POLICY_MAX]; +struct wfx_tx_policy_cache { + struct wfx_tx_policy cache[HIF_TX_RETRY_POLICY_MAX]; /* FIXME: use a trees and drop hash from tx_policy */ struct list_head used; struct list_head free; @@ -59,8 +59,8 @@ static inline struct wfx_tx_priv *wfx_skb_tx_priv(struct sk_buff *skb) static inline struct wfx_hif_req_tx *wfx_skb_txreq(struct sk_buff *skb) { - struct wfx_hif_msg *hif = (struct hif_msg *)skb->data; - struct wfx_hif_req_tx *req = (struct hif_req_tx *)hif->body; + struct wfx_hif_msg *hif = (struct wfx_hif_msg *)skb->data; + struct wfx_hif_req_tx *req = (struct wfx_hif_req_tx *)hif->body; return req; } diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index f2564a20bdcf..2073ac43bebd 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -110,7 +110,7 @@ static int wfx_hif_receive_indication(struct wfx_dev *wdev, __func__, hif->interface); return -EIO; } - skb_pull(skb, sizeof(struct wfx_hif_msg) + sizeof(struct hif_ind_rx)); + skb_pull(skb, sizeof(struct wfx_hif_msg) + sizeof(struct wfx_hif_ind_rx)); wfx_rx_cb(wvif, body, skb); return 0; @@ -380,7 +380,7 @@ static const struct { void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb) { int i; - const struct wfx_hif_msg *hif = (const struct hif_msg *)skb->data; + const struct wfx_hif_msg *hif = (const struct wfx_hif_msg *)skb->data; int hif_id = hif->id; if (hif_id == HIF_IND_ID_RX) { diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index f34cfed503d4..7b9d75f219fb 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -262,7 +262,7 @@ static void wfx_free_common(void *data) struct wfx_dev *wfx_init_common(struct device *dev, const struct wfx_platform_data *pdata, - const struct hwbus_ops *hwbus_ops, + const struct wfx_hwbus_ops *hwbus_ops, void *hwbus_priv) { struct ieee80211_hw *hw; diff --git a/drivers/staging/wfx/main.h b/drivers/staging/wfx/main.h index 115abd2d4378..68a7807c5fb6 100644 --- a/drivers/staging/wfx/main.h +++ b/drivers/staging/wfx/main.h @@ -16,7 +16,7 @@ #include "hif_api_general.h" struct wfx_dev; -struct hwbus_ops; +struct wfx_hwbus_ops; struct wfx_platform_data { /* Keyset and ".sec" extension will be appended to this string */ @@ -31,7 +31,7 @@ struct wfx_platform_data { struct wfx_dev *wfx_init_common(struct device *dev, const struct wfx_platform_data *pdata, - const struct hwbus_ops *hwbus_ops, + const struct wfx_hwbus_ops *hwbus_ops, void *hwbus_priv); int wfx_probe(struct wfx_dev *wdev); diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 1c06430e5996..189b96cd3d13 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -25,7 +25,7 @@ #define USEC_PER_TXOP 32 /* see struct ieee80211_tx_queue_params */ #define USEC_PER_TU 1024 -struct hwbus_ops; +struct wfx_hwbus_ops; struct wfx_dev { struct wfx_platform_data pdata; @@ -33,7 +33,7 @@ struct wfx_dev { struct ieee80211_hw *hw; struct ieee80211_vif *vif[2]; struct mac_address addresses[2]; - const struct hwbus_ops *hwbus_ops; + const struct wfx_hwbus_ops *hwbus_ops; void *hwbus_priv; u8 keyset; @@ -74,7 +74,7 @@ struct wfx_vif { struct delayed_work beacon_loss_work; struct wfx_queue tx_queue[4]; - struct tx_policy_cache tx_policy_cache; + struct wfx_tx_policy_cache tx_policy_cache; struct work_struct tx_policy_upload_work; struct work_struct update_tim_work; 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: 12712462 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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:14 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: 12712463 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45C3CC433FE for ; Thu, 13 Jan 2022 08:57:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232339AbiAMI5e (ORCPT ); Thu, 13 Jan 2022 03:57:34 -0500 Received: from mail-dm6nam11on2073.outbound.protection.outlook.com ([40.107.223.73]:16221 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233262AbiAMI4p (ORCPT ); Thu, 13 Jan 2022 03:56:45 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BaSvXWBczhLt7RHQcfUbbGULNVQK7sOLrGCLuGO0rmmenScwZ/8W6dL+9L6btbC7N5qfVRTHP/GtIj0qvk2uTWlv7RY0FSfwDmiLKBFtUGx8sH9gVvAwzjmztbPH7BDO7oPFAFz23h0QJUK4T6exIBwOqwJC8jrkQDn47X15Q2uHjCg7VTDTHAWtLPVNXrJ0sENTxCRwfsIsFyPjlvetWGdVXYhw+iwmXcUYgMviNOMVnYF5foWF6CePG/kwiXO8w6OffRUa4tM9NEHW5O10TyYP1L9Uwep51mi/X2TMwRJfp4ry3MK5RY6EB25qUpoll4WODweDz6Ea5ISrKSohHA== 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=zeBrkZFrqMH1dUaPdgUw3rI1eqJ9xdb12a7Y1PMHJZs=; b=hRWkm34tkdvmnKw/pauSYKHxzXoPcmDHeAVMROEf4pDWww4GXCaeH05ReJ8zeJsy3E6kQO10ZzYIcDIak2jAe9K4UHBogEsD1aKcwEsdGQTMfxRHlw+iZo4Qqu11GpznU4Sgz0Gl7MISaKQrw3ECxo9jdac8jo2GnfwLPo774RJoXksBlgdequttdjfNEUC0Mz2Va0qwrzUmCEqYMZjsFkyvJViEdNnh9aaEJHuZ4KPutpcKn2Ld2wMRlDf3+7Fg0JF3pxRuy94z0v+S+1fMeGJrVR1XvExf461v2CthCBx+attul87uy+4N/79oMF45vBYJfF3+uJx2eeaH5gMeOg== 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=zeBrkZFrqMH1dUaPdgUw3rI1eqJ9xdb12a7Y1PMHJZs=; b=V8xJfiRhV3JeG4lbh3Kv552wRGjky0DbSFqg8rTRPjTbCMszOw0sKslf6cNfHESNgllM8sCg5zMJASIVdC7tUj0DB15sOXe86eNlJSsu2TVqsfBJy+dKiHo+8ZBbGopzAf414yT68YRE7rTLPgY9e9tKkKdVljnqLWS/A+DOvgQ= 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:19 +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:19 +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 21/31] staging: wfx: reformat comments on 100 columns Date: Thu, 13 Jan 2022 09:55:14 +0100 Message-Id: <20220113085524.1110708-22-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: 9a0c6a4f-5b8f-47c2-c533-08d9d67290bb X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:121; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: p405yjH6tsSquJPgpQdhh19mbJktbVGTaYbJ0Qgk2Wz6jYD0FMOLHoVW+YytVdnq8EWsAGF5DIjXaH4XEyNWsR1Plu2I10iaK2M8qmoP3QR3qBIZAAooIlfSNj6Gj7k3zWztpFQ4pB10AAfXTMlbm3KP4dYej7nvw6AQ1SrtWnigyWAkCCebpdkYHrT73pLk/Jrx2iQctY/dogXeet6+VHupGWnwOjP5cWCIaWfu3wP7XgMVd7uhnY8eiVsGVQwOY+AuFL0NpNWycHHzZ7O/u/fxlvZ6meT6e45xhW8nbf2F6yXPU0TUITHKR4R/68SiQCVb85TFKUk9xFBJZZYRecU+0p5h+U2oBfoTEifjsKc4pOfAr9thsjiLg2M8kDKwrmw9DHhD9D9hwHmKCdTPYnADICmS8iMnb77S65VcOwN0kQF/X2ynXYLH4Z8qEb9re8pabo2MklpbX8giGOzFyH8ODnJqDLMCAEhWn3cHVTplVtoLuNBZ9QzFkehXmBZhalur/YgaxxfTRFKlr6IZU/gSg57IVpG+i/ZTeqtMVUneWkA4nUMaP9K58cSLq/cHnGYDB04hlJ5P0Ryd8SrQF9Knthky1WjKw/qfaXvYBNnEuVidHXxXrh3v19DFVrddLehuo6YViL73N7MxOtEZfdZvlD/ZqJ9yGuIX6oLM04KOTVExH7yCeJWiHAHYAcvjPEqFLCTmbQ1ABsuQLtOyuzfTgKXZynFx6Lb1NL3nFKo7ZNRxhZF8AxHA4kcqQEJH5W7bjK/ukNne6xZVon5Q0Q== 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)(84970400001)(86362001)(186003)(316002)(66946007)(54906003)(21314003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?EaxgHohM5ahBSBrrsq9m/RTvYXL1?= =?utf-8?q?yuCAqR35Grv2eqDDlOmRfxhIG1wsNLyo8jcd8BLh4vMtEPOz6LGADhnf4+bDJIo/N?= =?utf-8?q?rNFcNewOFIoz5CKpOixR33WhW+C69P8hYnpY5t7pNeRvejTh0XM9Pv/U1Hvaop9CD?= =?utf-8?q?bWL2TYLtLxdruO+07U4DpaFQuT4NH8Ty7heqHrJCH18d5yQNRuoSu1k5SPalHP+zR?= =?utf-8?q?gLkSEvCLgTBURn7G7u7B1CKBk4uZIvdUFDcJIiTJwXRHkQaqktZDYguWMWI17FgEy?= =?utf-8?q?PdrCarGZyQ99rGWVnihDfEuTjT/BLx0jYR7vLe7poOs1w4rYXsxqHNWx+ivxTZZye?= =?utf-8?q?/h0GflijEfUXe/p+SJD/t5K8FGwM7Dt71zZ3y59KmLsmtjf83BujeMo2aCEVxGjj1?= =?utf-8?q?UUx8FwP1mfQV0Dn4XJLm0lFEzGiJJn6AQpWkkj8xmLuU5yDDtYKi9wnkT7g0EcmBp?= =?utf-8?q?wyfWd2FdWspFyMY4hw2HKAgPTuX41cXveLElX9Y0CbNRf/nmXizPkjaw60rGfR/6/?= =?utf-8?q?934kGhttZsC3FZtpqPKkNAOHLkYG9dViw41dF4Jt4E7kSenEiYdBlQeO23yeHZLn2?= =?utf-8?q?ANAsBDTuAnno55v+FhUDfjkXzuZFKqoOyZrkU6mmScYAKtTpiw62zDJBOx8XY/biQ?= =?utf-8?q?Yl9yBw2v8v76EBe54Y97OTPz/aTRdTNghFkrdga/Iu03UaS2MlFMjOfMBibN7PMgW?= =?utf-8?q?hSDFONKe9OhfctNm2brcZegcTv1hRNpUWvHRm+RLRkgqLWOnptWE0/PED6lFBRyLL?= =?utf-8?q?KCO1TNE8+4WZ3OsQpNufzwmabQDO84UL3rSESEESHvJQfjU7wztTSknDiMyZ7GFPF?= =?utf-8?q?zkF2pSbD7+8pEF+nBHolN5/CYBan8NBAtIQBsjOnSdSfFHj7+73y2oDgb44442jgO?= =?utf-8?q?YoLJHYZiI5u8VRwb6M+1LhsLMWZsH7BsIdeJB3BxPqunuV+WB93RCSpOd2LgQZoks?= =?utf-8?q?q9JpgEYY4m7/c1R39i5TEOJk4eKQb/FfdJyw3Nk/P9cOoF0Tc+enLXG9W0gX51v3P?= =?utf-8?q?XU70uIK6KYjYKej7gERFtZygCBFiloz+a1tn4pihWkUx3HChiQsROEhTkNwEUOebQ?= =?utf-8?q?dzLjpG1jTLVjmcBSBwCLGVq7ZVPLJemHfREx8r4AmWTDnZTCJx+DpJQ8v6t+BPTwb?= =?utf-8?q?erWrAKmdrpFtraqJD5fDiMmnAN9MKdvEsg22o1xzsrAMS0E2WKewj83/8pIieRNOG?= =?utf-8?q?q/uqZEZo7WLbi0eXuCkVKx2RPCZOMgcQUntEJImNQv4A7+EKlrjYeY+Ybh+Di14Wt?= =?utf-8?q?8gBklxRqAMDU/nu50Tl8sfSKH1stZBti7ZXTlzIfOwdBCbP4YjYwPDWUNOko4Z+1D?= =?utf-8?q?wIxg5ni7l64hFynyxsdwQhhQKVvxp7GCvVTrRtYpix0p45ppdaD0lxAUH9fFQb7wH?= =?utf-8?q?I7+G16lS47BtPAuV73FrEK1JjSkci0/dB9AHHJdwaHBZrFaroXzZEHLJ+OOPdBwJp?= =?utf-8?q?IBYo2hgKpMU9xsgRwGqoazpbEOq+TQsIAFyjccTiQklRGfSouuyYvav0PxE70WX3u?= =?utf-8?q?QD5xRFnf7uMDSckuXfYaxWs7f+bKPScjXNmF0aBLJ5Mi3QJJKpQyqYoTYfwgk+mu9?= =?utf-8?q?bbG2G8tL0JC0b8AXMOG3LEYmtC9EuqwB1OW/zZSpbNvzYv8u4b/BoQ=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a0c6a4f-5b8f-47c2-c533-08d9d67290bb 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:19.4507 (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: Vgk4XUPKx1LsfEKJSRtSediwcrZlrTWdEjqUo/mrD0sQ5s8jE/ARusEpdpFqjwcScXATfeR+7BApgDk6soxxgA== 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 in every comments. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 26 ++++++++++------------- drivers/staging/wfx/bus_spi.c | 14 ++++++------- drivers/staging/wfx/data_rx.c | 4 ++-- drivers/staging/wfx/data_tx.c | 13 ++++++------ drivers/staging/wfx/debug.c | 10 ++++----- drivers/staging/wfx/fwio.c | 16 ++++++--------- drivers/staging/wfx/hif_api_cmd.h | 8 ++++---- drivers/staging/wfx/hif_rx.c | 4 +--- drivers/staging/wfx/hif_tx.c | 16 ++++++--------- drivers/staging/wfx/hwio.h | 5 ++--- drivers/staging/wfx/main.c | 22 +++++++++----------- drivers/staging/wfx/main.h | 4 ++-- drivers/staging/wfx/queue.c | 5 ++--- drivers/staging/wfx/sta.c | 34 ++++++++++++------------------- drivers/staging/wfx/traces.h | 9 ++++---- 15 files changed, 79 insertions(+), 111 deletions(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index b9a351913868..1ec4a4951d99 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -32,18 +32,15 @@ static void device_wakeup(struct wfx_dev *wdev) } for (;;) { gpiod_set_value_cansleep(wdev->pdata.gpio_wakeup, 1); - /* completion.h does not provide any function to wait - * completion without consume it (a kind of - * wait_for_completion_done_timeout()). So we have to emulate - * it. + /* completion.h does not provide any function to wait completion without consume it + * (a kind of wait_for_completion_done_timeout()). So we have to emulate it. */ if (wait_for_completion_timeout(&wdev->hif.ctrl_ready, msecs_to_jiffies(2))) { complete(&wdev->hif.ctrl_ready); return; } else if (max_retry-- > 0) { - /* Older firmwares have a race in sleep/wake-up process. - * Redo the process is sufficient to unfreeze the - * chip. + /* Older firmwares have a race in sleep/wake-up process. Redo the process + * is sufficient to unfreeze the chip. */ dev_err(wdev->dev, "timeout while wake up chip\n"); gpiod_set_value_cansleep(wdev->pdata.gpio_wakeup, 0); @@ -219,9 +216,9 @@ static int bh_work_tx(struct wfx_dev *wdev, int max_msg) return i; } -/* In SDIO mode, it is necessary to make an access to a register to acknowledge - * last received message. It could be possible to restrict this acknowledge to - * SDIO mode and only if last operation was rx. +/* In SDIO mode, it is necessary to make an access to a register to acknowledge last received + * message. It could be possible to restrict this acknowledge to SDIO mode and only if last + * operation was rx. */ static void ack_sdio_data(struct wfx_dev *wdev) { @@ -287,12 +284,11 @@ void wfx_bh_request_tx(struct wfx_dev *wdev) queue_work(system_highpri_wq, &wdev->hif.bh); } -/* If IRQ is not available, this function allow to manually poll the control - * register and simulate an IRQ ahen an event happened. +/* If IRQ is not available, this function allow to manually poll the control register and simulate + * an IRQ ahen an event happened. * - * Note that the device has a bug: If an IRQ raise while host read control - * register, the IRQ is lost. So, use this function carefully (only duing - * device initialisation). + * Note that the device has a bug: If an IRQ raise while host read control register, the IRQ is + * lost. So, use this function carefully (only duing device initialisation). */ void wfx_bh_poll_irq(struct wfx_dev *wdev) { diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index 43bc6e147d5f..fe39b4cb8194 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -38,13 +38,12 @@ struct wfx_spi_priv { bool need_swab; }; -/* The chip reads 16bits of data at time and place them directly into (little - * endian) CPU register. So, the chip expects bytes order to be "B1 B0 B3 B2" - * (while LE is "B0 B1 B2 B3" and BE is "B3 B2 B1 B0") +/* The chip reads 16bits of data at time and place them directly into (little endian) CPU register. + * So, the chip expects bytes order to be "B1 B0 B3 B2" (while LE is "B0 B1 B2 B3" and BE is + * "B3 B2 B1 B0") * - * A little endian host with bits_per_word == 16 should do the right job - * natively. The code below to support big endian host and commonly used SPI - * 8bits. + * A little endian host with bits_per_word == 16 should do the right job natively. The code below to + * support big endian host and commonly used SPI 8bits. */ static int wfx_spi_copy_from_io(void *priv, unsigned int addr, void *dst, size_t count) { @@ -160,8 +159,7 @@ static int wfx_spi_irq_unsubscribe(void *priv) static size_t wfx_spi_align_size(void *priv, size_t size) { - /* Most of SPI controllers avoid DMA if buffer size is not 32bit aligned - */ + /* Most of SPI controllers avoid DMA if buffer size is not 32bit aligned */ return ALIGN(size, 4); } diff --git a/drivers/staging/wfx/data_rx.c b/drivers/staging/wfx/data_rx.c index 4beee2624998..a4b5ffe158e4 100644 --- a/drivers/staging/wfx/data_rx.c +++ b/drivers/staging/wfx/data_rx.c @@ -74,8 +74,8 @@ void wfx_rx_cb(struct wfx_vif *wvif, const struct wfx_hif_ind_rx *arg, struct sk if (arg->encryp) hdr->flag |= RX_FLAG_DECRYPTED; - /* Block ack negotiation is offloaded by the firmware. However, - * re-ordering must be done by the mac80211. + /* Block ack negotiation is offloaded by the firmware. However, re-ordering must be done by + * the mac80211. */ if (ieee80211_is_action(frame->frame_control) && mgmt->u.action.category == WLAN_CATEGORY_BACK && diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index 0bfbf57cc035..ca2f24b92d24 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -30,8 +30,8 @@ static int wfx_get_hw_rate(struct wfx_dev *wdev, const struct ieee80211_tx_rate } return rate->idx + 14; } - /* The device only support 2GHz, else band information should be - * retrieved from ieee80211_tx_info + /* The device only support 2GHz, else band information should be retrieved from + * ieee80211_tx_info */ band = wdev->hw->wiphy->bands[NL80211_BAND_2GHZ]; if (rate->idx >= band->n_bitrates) { @@ -356,9 +356,8 @@ static int wfx_tx_inner(struct wfx_vif *wvif, struct ieee80211_sta *sta, struct /* Fill tx request */ req = (struct wfx_hif_req_tx *)hif_msg->body; - /* packet_id just need to be unique on device. 32bits are more than - * necessary for that task, so we tae advantage of it to add some extra - * data for debug. + /* packet_id just need to be unique on device. 32bits are more than necessary for that task, + * so we take advantage of it to add some extra data for debug. */ req->packet_id = atomic_add_return(1, &wvif->wdev->packet_id) & 0xFFFF; req->packet_id |= IEEE80211_SEQ_TO_SN(le16_to_cpu(hdr->seq_ctrl)) << 16; @@ -402,8 +401,8 @@ void wfx_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, struc wvif = wvif_iterate(wdev, NULL); if (WARN_ON(!wvif)) goto drop; - /* Because of TX_AMPDU_SETUP_IN_HW, mac80211 does not try to send any - * BlockAck session management frame. The check below exist just in case. + /* Because of TX_AMPDU_SETUP_IN_HW, mac80211 does not try to send any BlockAck session + * management frame. The check below exist just in case. */ if (wfx_is_action_back(hdr)) { dev_info(wdev->dev, "drop BA action\n"); diff --git a/drivers/staging/wfx/debug.c b/drivers/staging/wfx/debug.c index 210e2336d43a..c62cb5fea4eb 100644 --- a/drivers/staging/wfx/debug.c +++ b/drivers/staging/wfx/debug.c @@ -250,9 +250,9 @@ static ssize_t wfx_send_hif_msg_write(struct file *file, const char __user *user if (count < sizeof(struct wfx_hif_msg)) return -EINVAL; - /* wfx_cmd_send() checks that reply buffer is wide enough, but does not - * return precise length read. User have to know how many bytes should - * be read. Filling reply buffer with a memory pattern may help user. + /* wfx_cmd_send() checks that reply buffer is wide enough, but does not return precise + * length read. User have to know how many bytes should be read. Filling reply buffer with a + * memory pattern may help user. */ memset(context->reply, 0xFF, sizeof(context->reply)); request = memdup_user(user_buf, count); @@ -282,9 +282,7 @@ static ssize_t wfx_send_hif_msg_read(struct file *file, char __user *user_buf, return ret; if (context->ret < 0) return context->ret; - /* Be careful, write() is waiting for a full message while read() - * only returns a payload - */ + /* Be careful, write() is waiting for a full message while read() only returns a payload */ if (copy_to_user(user_buf, context->reply, count)) return -EFAULT; diff --git a/drivers/staging/wfx/fwio.c b/drivers/staging/wfx/fwio.c index 89a46fb0e789..24c314b10b95 100644 --- a/drivers/staging/wfx/fwio.c +++ b/drivers/staging/wfx/fwio.c @@ -69,15 +69,13 @@ static const char * const fwio_errors[] = { [ERR_MAC_KEY] = "MAC key not initialized", }; -/* request_firmware() allocate data using vmalloc(). It is not compatible with - * underlying hardware that use DMA. Function below detect this case and - * allocate a bounce buffer if necessary. +/* request_firmware() allocate data using vmalloc(). It is not compatible with underlying hardware + * that use DMA. Function below detect this case and allocate a bounce buffer if necessary. * - * Notice that, in doubt, you can enable CONFIG_DEBUG_SG to ask kernel to - * detect this problem at runtime (else, kernel silently fail). + * Notice that, in doubt, you can enable CONFIG_DEBUG_SG to ask kernel to detect this problem at + * runtime (else, kernel silently fail). * - * NOTE: it may also be possible to use 'pages' from struct firmware and avoid - * bounce buffer + * 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) { @@ -202,9 +200,7 @@ static int upload_firmware(struct wfx_dev *wdev, const u8 *data, size_t len) if (ret < 0) return ret; - /* The device seems to not support writing 0 in this register - * during first loop - */ + /* The device seems to not support writing 0 in this register during first loop */ offs += DNLD_BLOCK_SIZE; ret = wfx_sram_reg_write(wdev, WFX_DCA_PUT, offs); if (ret < 0) diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h index 463532b25939..444ff7ed882d 100644 --- a/drivers/staging/wfx/hif_api_cmd.h +++ b/drivers/staging/wfx/hif_api_cmd.h @@ -174,8 +174,8 @@ enum wfx_hif_frame_format { }; struct wfx_hif_req_tx { - /* packet_id is not interpreted by the device, so it is not necessary to - * declare it little endian + /* packet_id is not interpreted by the device, so it is not necessary to declare it little + * endian */ u32 packet_id; u8 max_tx_rate; @@ -212,8 +212,8 @@ enum wfx_hif_qos_ackplcy { struct wfx_hif_cnf_tx { __le32 status; - /* packet_id is copied from struct wfx_hif_req_tx without been interpreted - * by the device, so it is not necessary to declare it little endian + /* packet_id is copied from struct wfx_hif_req_tx without been interpreted by the device, so + * it is not necessary to declare it little endian */ u32 packet_id; u8 txed_rate; diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 1ddf8c51c303..5300ef57413f 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -371,9 +371,7 @@ void wfx_handle_rx(struct wfx_dev *wdev, struct sk_buff *skb) wfx_hif_receive_indication(wdev, hif, hif->body, skb); return; } - /* Note: mutex_is_lock cause an implicit memory barrier that protect - * buf_send - */ + /* Note: mutex_is_lock cause an implicit memory barrier that protect buf_send */ if (mutex_is_locked(&wdev->hif_cmd.lock) && wdev->hif_cmd.buf_send && wdev->hif_cmd.buf_send->id == hif_id) { wfx_hif_generic_confirm(wdev, hif, hif->body); diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c index b88a73077b48..ea2582714bb9 100644 --- a/drivers/staging/wfx/hif_tx.c +++ b/drivers/staging/wfx/hif_tx.c @@ -61,8 +61,8 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct wfx_hif_msg *request, mutex_lock(&wdev->hif_cmd.lock); WARN(wdev->hif_cmd.buf_send, "data locking error"); - /* Note: call to complete() below has an implicit memory barrier that - * hopefully protect buf_send + /* Note: call to complete() below has an implicit memory barrier that hopefully protect + * buf_send */ wdev->hif_cmd.buf_send = request; wdev->hif_cmd.buf_recv = reply; @@ -72,9 +72,7 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct wfx_hif_msg *request, wfx_bh_request_tx(wdev); if (no_reply) { - /* Chip won't reply. Give enough time to the wq to send the - * buffer. - */ + /* Chip won't reply. Give enough time to the wq to send the buffer. */ msleep(100); wdev->hif_cmd.buf_send = NULL; mutex_unlock(&wdev->hif_cmd.lock); @@ -118,8 +116,8 @@ int wfx_cmd_send(struct wfx_dev *wdev, struct wfx_hif_msg *request, return ret; } -/* This function is special. After HIF_REQ_ID_SHUT_DOWN, chip won't reply to any - * request anymore. Obviously, only call this function during device unregister. +/* This function is special. After HIF_REQ_ID_SHUT_DOWN, chip won't reply to any request anymore. + * Obviously, only call this function during device unregister. */ int wfx_hif_shutdown(struct wfx_dev *wdev) { @@ -340,9 +338,7 @@ int wfx_hif_add_key(struct wfx_dev *wdev, const struct wfx_hif_req_add_key *arg) /* FIXME: swap bytes as necessary in body */ memcpy(body, arg, sizeof(*body)); if (wfx_api_older_than(wdev, 1, 5)) - /* Legacy firmwares expect that add_key to be sent on right - * interface. - */ + /* Legacy firmwares expect that add_key to be sent on right interface. */ wfx_fill_header(hif, arg->int_id, HIF_REQ_ID_ADD_KEY, sizeof(*body)); else wfx_fill_header(hif, -1, HIF_REQ_ID_ADD_KEY, sizeof(*body)); diff --git a/drivers/staging/wfx/hwio.h b/drivers/staging/wfx/hwio.h index 8c8fe76871f8..c6e7b065b7ff 100644 --- a/drivers/staging/wfx/hwio.h +++ b/drivers/staging/wfx/hwio.h @@ -12,9 +12,8 @@ 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. +/* 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); diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 6b9ae67da286..028d7e53d66e 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -162,19 +162,17 @@ bool wfx_api_older_than(struct wfx_dev *wdev, int major, int minor) return false; } -/* The device needs data about the antenna configuration. This information in - * provided by PDS (Platform Data Set, this is the wording used in WF200 - * documentation) files. For hardware integrators, the full process to create - * PDS files is described here: +/* The device needs data about the antenna configuration. This information in provided by PDS + * (Platform Data Set, this is the wording used in WF200 documentation) files. For hardware + * integrators, the full process to create PDS files is described here: * https:github.com/SiliconLabs/wfx-firmware/blob/master/PDS/README.md * - * So this function aims to send PDS to the device. However, the PDS file is - * often bigger than Rx buffers of the chip, so it has to be sent in multiple - * parts. + * So this function aims to send PDS to the device. However, the PDS file is often bigger than Rx + * buffers of the chip, so it has to be sent in multiple parts. * - * In add, the PDS data cannot be split anywhere. The PDS files contains tree - * structures. Braces are used to enter/leave a level of the tree (in a JSON - * fashion). PDS files can only been split between root nodes. + * In add, the PDS data cannot be split anywhere. The PDS files contains tree structures. Braces are + * used to enter/leave a level of the tree (in a JSON fashion). PDS files can only been split + * between root nodes. */ int wfx_send_pds(struct wfx_dev *wdev, u8 *buf, size_t len) { @@ -341,8 +339,8 @@ int wfx_probe(struct wfx_dev *wdev) int err; struct gpio_desc *gpio_saved; - /* During first part of boot, gpio_wakeup cannot yet been used. So - * prevent bh() to touch it. + /* During first part of boot, gpio_wakeup cannot yet been used. So prevent bh() to touch + * it. */ gpio_saved = wdev->pdata.gpio_wakeup; wdev->pdata.gpio_wakeup = NULL; diff --git a/drivers/staging/wfx/main.h b/drivers/staging/wfx/main.h index def6270bf10d..68c665307153 100644 --- a/drivers/staging/wfx/main.h +++ b/drivers/staging/wfx/main.h @@ -23,8 +23,8 @@ struct wfx_platform_data { const char *file_fw; const char *file_pds; struct gpio_desc *gpio_wakeup; - /* if true HIF D_out is sampled on the rising edge of the clock - * (intended to be used in 50Mhz SDIO) + /* if true HIF D_out is sampled on the rising edge of the clock (intended to be used in + * 50Mhz SDIO) */ bool use_rising_clk; }; diff --git a/drivers/staging/wfx/queue.c b/drivers/staging/wfx/queue.c index 9b49e41f06ce..9186726ff07f 100644 --- a/drivers/staging/wfx/queue.c +++ b/drivers/staging/wfx/queue.c @@ -59,9 +59,8 @@ void wfx_tx_lock_flush(struct wfx_dev *wdev) void wfx_tx_queues_init(struct wfx_vif *wvif) { - /* The device is in charge to respect the details of the QoS parameters. - * The driver just ensure that it roughtly respect the priorities to - * avoid any shortage. + /* The device is in charge to respect the details of the QoS parameters. The driver just + * ensure that it roughtly respect the priorities to avoid any shortage. */ const int priorities[IEEE80211_NUM_ACS] = { 1, 2, 64, 128 }; int i; diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 07054666fe76..f64adba350eb 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -107,8 +107,8 @@ void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags, * - PS-Poll (FIF_PSPOLL) are never filtered * - RTS, CTS and Ack (FIF_CONTROL) are always filtered * - Broken frames (FIF_FCSFAIL and FIF_PLCPFAIL) are always filtered - * - Firmware does (yet) allow to forward unicast traffic sent to - * other stations (aka. promiscuous mode) + * - Firmware does (yet) allow to forward unicast traffic sent to other stations (aka. + * promiscuous mode) */ *total_flags &= FIF_BCN_PRBRESP_PROMISC | FIF_ALLMULTI | FIF_OTHER_BSS | FIF_PROBE_REQ | FIF_PSPOLL; @@ -168,9 +168,7 @@ static int wfx_get_ps_timeout(struct wfx_vif *wvif, bool *enable_ps) dev_info(wvif->wdev->dev, "ignoring requested PS mode"); return -1; } - /* It is necessary to enable PS if channels - * are different. - */ + /* It is necessary to enable PS if channels are different. */ if (enable_ps) *enable_ps = true; if (wvif->wdev->force_ps_timeout > -1) @@ -429,10 +427,9 @@ static void wfx_join(struct wfx_vif *wvif) ieee80211_connection_loss(wvif->vif); wfx_reset(wvif); } else { - /* Due to beacon filtering it is possible that the - * AP's beacon is not known for the mac80211 stack. - * Disable filtering temporary to make sure the stack - * receives at least one + /* Due to beacon filtering it is possible that the AP's beacon is not known for the + * mac80211 stack. Disable filtering temporary to make sure the stack receives at + * least one */ wfx_filter_beacon(wvif, false); } @@ -459,9 +456,7 @@ static void wfx_join_finalize(struct wfx_vif *wvif, wvif->join_in_progress = false; 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. - */ + /* beacon_loss_count is defined to 7 in net/mac80211/mlme.c. Let's use the same value. */ wfx_hif_set_bss_params(wvif, info->aid, 7); wfx_hif_set_beacon_wakeup_period(wvif, 1, 1); wfx_update_pm(wvif); @@ -485,10 +480,9 @@ void wfx_leave_ibss(struct ieee80211_hw *hw, struct ieee80211_vif *vif) static void wfx_enable_beacon(struct wfx_vif *wvif, bool enable) { - /* Driver has Content After DTIM Beacon in queue. Driver is waiting for - * a signal from the firmware. Since we are going to stop to send - * beacons, this signal will never happens. See also - * wfx_suspend_resume_mc() + /* Driver has Content After DTIM Beacon in queue. Driver is waiting for a signal from the + * firmware. Since we are going to stop to send beacons, this signal will never happens. See + * also wfx_suspend_resume_mc() */ if (!enable && wfx_tx_queues_has_cab(wvif)) { wvif->after_dtim_tx_allowed = true; @@ -527,9 +521,7 @@ 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__); 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. - */ + /* We temporary forwarded beacon for join process. It is now no more necessary. */ wfx_filter_beacon(wvif, true); } @@ -629,8 +621,8 @@ void wfx_suspend_resume_mc(struct wfx_vif *wvif, enum sta_notify_cmd notify_cmd) if (notify_cmd != STA_NOTIFY_AWAKE) return; - /* Device won't be able to honor CAB if a scan is in progress on any - * interface. Prefer to skip this DTIM and wait for the next one. + /* Device won't be able to honor CAB if a scan is in progress on any interface. Prefer to + * skip this DTIM and wait for the next one. */ wvif_it = NULL; while ((wvif_it = wvif_iterate(wvif->wdev, wvif_it)) != NULL) diff --git a/drivers/staging/wfx/traces.h b/drivers/staging/wfx/traces.h index 9fbf0081dbf7..e011e8a46bd5 100644 --- a/drivers/staging/wfx/traces.h +++ b/drivers/staging/wfx/traces.h @@ -18,8 +18,8 @@ #include "hif_api_cmd.h" #include "hif_api_mib.h" -/* The hell below need some explanations. For each symbolic number, we need to - * define it with TRACE_DEFINE_ENUM() and in a list for __print_symbolic. +/* The hell below need some explanations. For each symbolic number, we need to define it with + * TRACE_DEFINE_ENUM() and in a list for __print_symbolic. * * 1. Define a new macro that call TRACE_DEFINE_ENUM(): * @@ -41,9 +41,8 @@ * #undef xxx_name * #define xxx_name(msg) { msg, #msg }, * - * 5. list_name can now nearly be used with __print_symbolic() but, - * __print_symbolic() dislike last comma of list. So we define a new list - * with a dummy element: + * 5. list_name can now nearly be used with __print_symbolic() but, __print_symbolic() dislike + * last comma of list. So we define a new list with a dummy element: * * #define list_for_print_symbolic list_names { -1, NULL } */ 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: 12712464 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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:16 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: 12712465 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88683C433F5 for ; Thu, 13 Jan 2022 08:57:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233232AbiAMI5s (ORCPT ); Thu, 13 Jan 2022 03:57:48 -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 S232209AbiAMI45 (ORCPT ); Thu, 13 Jan 2022 03:56:57 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D/ltJFlSR8DD2TexN/YYefeS1j3PCs/qa+/yxcQuPwvKzxnRHj3L1EWWgT+gRvmxQ1lykRWp4IYt5zugv/cEQAtJpTy4S6g06adpGA7EYhF4nTHqs55JkZT5B7l0eCzTmj+2IfKRPGqwd30d5HKgDYLCoZmU4INysWEB7QUDZXnUighldl/BbIA6fjrd4lcRF4Ks1k1YIdGBHwB3DC9/FSmHzLFLxovyai9CpsYzdDiRQ2FRZFBOOkFPcRsQJmxITcaWfSkU9eCKg7iOim8ufc5mWhBxC6zbkkZsrG7uMU0S2sS3YK9FUsLRRbcU1x1mP29xvJFOghBzXbM938Murg== 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=XiIr7gy9KeHlgbSlVN/Qd+VHZJQtENGovsSdj9Qff/I=; b=TX9cg82U97/SVCgSMTi73tZVVVQDenmVlzyRjkOiTD3Wh9Nv8DW2euZ2cJoScUTa6vHkA0f2u3vyFTgcjnYybpR9wH1LXA4lHIvqHtWQWOUBtaOomedMuVZMF+EelgehL98iPZAkhhP2w391sMBquAUpBEpC8OhACrG20zAYIvA7M88FR7l6vR6cKP3Y7kF+yxGSAGmMg3RKezk8x7lNWhJ7PwOJBXnbhCBJ0/wgm2you+n9TK1SRdpTUwkk2esBqfDtXCA8dl7h3nP0bzllEe1+MZVDJasyiXAGnfNx7I95HYnhmxAtnwIsYBrUE4p1zNxMPp9tEAwaoBDZ+GGPNw== 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=XiIr7gy9KeHlgbSlVN/Qd+VHZJQtENGovsSdj9Qff/I=; b=GBjx2fbp+ssyLEnszIHBvr5EnlNaGO8eRSU8XumzismdSeLCrcspUvKcZVBseMspbqgywl1izMHztkQmorlts0shLrqOncY1L+WaPKvdoURbAnVeSl7qgbcN0SFA8YMWv0d03VnN/OY8fiV2wYB3gACFh6qDSOnIs+Rc/azJckc= 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:24 +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:24 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 23/31] staging: wfx: use explicit labels for errors Date: Thu, 13 Jan 2022 09:55:16 +0100 Message-Id: <20220113085524.1110708-24-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: 0d453a22-20c9-4dcf-064f-08d9d6729396 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:398; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WzyNLJ2KCDECLpuxXXPjTkSNDmmz2dEY7thSrB+vbgLbd8bdfVW96Cs1V6ZM2JJq2PVhmjT7jLlI7/VMrjKAWA+EMmToviG1gB+fji01n77yQqwIkc+RlBTHTCE4nwyAJQAVWvfDYpcay5ytZ99RIblsx13JPIbTq0DOQsYO6zL3/FiA61E5XOEfcCBOd92HNMILAH98Q1daarIS+xBeawyB1COhvdsrKO7YlWfUvp/U+XyWEGljgwnG8Xb/ExvMNnXfqjU7Zdb2x6ShaX1/BCgB1BzDOX49mOZVe35iCuTBzpcB5fD6v3RlR+dzpBLrUoaQFxX0N+uNxIycyvYoa0zf7BrcaN5Mc8ZfIFixba3lMJ2OxBOM1caSFnBJKhrY6rwHnIBuCKo6pBMHOjxZ7BxFvohMCF6I1x9VOJXLPXoFZZa2QhlpTWBElV6TEjwSDKDO24idj0u0Ejaqkgrj/DOgfMDjD1x9zI878EedHIy0S5t7tLnVvPw8pBq/W6SuGVBP/vDGr9VvFO8u8eZVp5c4zMz6A5uhRxBVNp82pB5wMzn26e2YbS1uTeeZgfJ9dSUVvl6u2fZggCFNXZnKs3Q0P5lDVOfqEUbvi5fbcLUCbsISdl1bCk65GrN+AWnRzOrGAzoXoKlST+X5R9rTzw== 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?wWWJRjTyVTSoATVXvYaWGKQQSMYk?= =?utf-8?q?xFNdllEgjfK5Pxv0g0xi51OFp7mS6Gs7+B59pqTRB+bYkZylk8AG7jVFDOAy2GMa0?= =?utf-8?q?LUs9Bt7u6VQK1E9nUb29NPbNLdzZSF2yfNuHVykcUAY5IUVq0kH10TLYFy8zzEHrl?= =?utf-8?q?p4Q3F5DQvjflgRi6QUdTCG9Ycx9s40Cmgg1uW5UWNQrjc+VVvldYvMIJPRqgAqmlO?= =?utf-8?q?DJn5zUPvGmIZz2WjWUhCuINqKfEtMAjQJtj+JAZUaQhf1GMQDrqhs+gNCYJ4yzFC+?= =?utf-8?q?XdhXwUkEz9/Ek+gr+EZjBPWAxKV/7MKUhvFfeRCey8/siCeGM+S2dxbIR3GHpc70c?= =?utf-8?q?UzPSjj7jZQT+VjhhnQAz0LqIyXVWdp980yQmULtx7jT/DiywCT0EqdSJPjRhk+ujz?= =?utf-8?q?O/85MEogypDl1QGEF676GkSmyY5g4HZYV6dx2+vipPd9p2UEU+ocb4V3nbHKLGNkQ?= =?utf-8?q?O3frQGfYS3/43UNUUNBjcJvOL0p3lDlsH+8l58uFk9td6H4NkqiylemCFfLHCqIUi?= =?utf-8?q?+O0k6Rt5AIFaLR25SF+4jrlVOVIxXfv/l0onsyquXwZcvfCKlKztwp2+JQSGxLrtG?= =?utf-8?q?bhUPFR/Qj3IM5pEekAZ9sqhec+9iRNMBMWKCx9uf7BKTf95c+sBbKuk8IR0yvkd8V?= =?utf-8?q?94z6UWy3XW3k6wk+4M2peKuK9C0kNdR7QR1Rhen4rKX4l5wvAzYMqqjR0VsFwv7iC?= =?utf-8?q?3Cin6pPJeJ5m8IvDpAD1/6+Y4pgVIAEayDoQg6AHkenjLWLoUv9noXhKs+si/blJB?= =?utf-8?q?j6/L3mrO1MQ+TmsajEUCa3rUMSA56b9o5zp2YUDf6gBURVdY0EYyNK75k9mRJcRpt?= =?utf-8?q?LQU1O3CRvMeGKaONsYVsSr1J3DB9Uw+jdfG6jCMc32UiCsXfFWebdtQW5xL7mUk1+?= =?utf-8?q?LUqyv2kvUbhLd8wlD/pQDjUrOhMwNyR0WdZVU0mSitcdxbOQMGbshuzyx3zV6qE9C?= =?utf-8?q?HESux+DXeu+p3q/c4b0DjFAIx9ES0JkPYN+69c+rYpNHxnfOx+QEq0G+aA455HvB5?= =?utf-8?q?S5S+MPxi24vgK7PPPqY8uAIVpiGK8m+VtcLzqANiDfmYJ21whanJBrUDT11ValfXC?= =?utf-8?q?CpNYEajGCEbJGMOpXNnCMHOD0PTIw/qnk1ZmI6tTJy02PK2KkyTwlYmzJQ/fLygqb?= =?utf-8?q?HPhAIFXPfN75Le5W4CPJzmQFVA6eOUI0+4t7gWO+CxrCP+7AsC6sOsvqoEdmU8P3D?= =?utf-8?q?dOilR2w0dGbcQO5w19Ir2657CJx/5YgWgrz5nle7BP1V1mEoiEd+aEjc8QOTHpVFX?= =?utf-8?q?xDZ/dk3Dq7SclUcxiAVqrxy/IFRFpWJneCm3CjsrBg5Z33TDRSGerdE+BeRngbg/H?= =?utf-8?q?P4/ivctJbyR9R8qIIN5NLHuPTQ83OWJgQjpcQURthxVOkqQRWGGKw560Q30ykclwU?= =?utf-8?q?z9v5pp3C3g/aH8I57p5vxQ4CymaM297FhFmTUquFPFol6U1OsYPE0fB5J7Q33igbI?= =?utf-8?q?qodhs2POuLUNbxj0yj9UsO3Wfa4z6NHK0RSxKGj0qo5zRNTWSNWmluyBPKGDWu8Xb?= =?utf-8?q?MRAOV7C6wnZ38l0XCTN2MypOKvgwUpE+H2qZ49Y1/ipiTFvmU+k1EylBw731TXEE+?= =?utf-8?q?MuQInIUGtGKMMEQoTKtjy2yJIicMUMpzMJCPwCbhjWttyeDppePj7U=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0d453a22-20c9-4dcf-064f-08d9d6729396 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:24.3771 (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: WaQzRJmpWuk5LU1vtGWZuldpYkpc5WlYRT0EUEO24sV2WnzaQOaNkhCSU/bWRhu8bvm007k/tObpMtt9Cw2QOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Prefer fully named labels to handle errors instead of err0, err1, ... Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bus_sdio.c | 9 ++++----- drivers/staging/wfx/main.c | 31 +++++++++++++++---------------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index 4b77df2f463e..5c45ccd85a7d 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -214,26 +214,25 @@ static int wfx_sdio_probe(struct sdio_func *func, const struct sdio_device_id *i sdio_set_block_size(func, 64); sdio_release_host(func); if (ret) - goto err0; + return ret; bus->core = wfx_init_common(&func->dev, &wfx_sdio_pdata, &wfx_sdio_hwbus_ops, bus); if (!bus->core) { ret = -EIO; - goto err1; + goto sdio_release; } ret = wfx_probe(bus->core); if (ret) - goto err1; + goto sdio_release; return 0; -err1: +sdio_release: sdio_claim_host(func); sdio_disable_func(func); sdio_release_host(func); -err0: return ret; } diff --git a/drivers/staging/wfx/main.c b/drivers/staging/wfx/main.c index 217c0c5c60d1..46fd5702e471 100644 --- a/drivers/staging/wfx/main.c +++ b/drivers/staging/wfx/main.c @@ -232,18 +232,17 @@ static int wfx_send_pdata_pds(struct wfx_dev *wdev) if (ret) { dev_err(wdev->dev, "can't load antenna parameters (PDS file %s). The device may be unstable.\n", wdev->pdata.file_pds); - goto err1; + return ret; } tmp_buf = kmemdup(pds->data, pds->size, GFP_KERNEL); if (!tmp_buf) { ret = -ENOMEM; - goto err2; + goto release_fw; } ret = wfx_send_pds(wdev, tmp_buf, pds->size); kfree(tmp_buf); -err2: +release_fw: release_firmware(pds); -err1: return ret; } @@ -350,7 +349,7 @@ int wfx_probe(struct wfx_dev *wdev) err = wfx_init_device(wdev); if (err) - goto err0; + goto bh_unregister; wfx_bh_poll_irq(wdev); err = wait_for_completion_timeout(&wdev->firmware_ready, 1 * HZ); @@ -361,7 +360,7 @@ int wfx_probe(struct wfx_dev *wdev) } else if (err == -ERESTARTSYS) { dev_info(wdev->dev, "probe interrupted by user\n"); } - goto err0; + goto bh_unregister; } /* FIXME: fill wiphy::hw_version */ @@ -380,13 +379,13 @@ int wfx_probe(struct wfx_dev *wdev) if (wfx_api_older_than(wdev, 1, 0)) { 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; + err = -EOPNOTSUPP; + goto bh_unregister; } if (wdev->hw_caps.link_mode == SEC_LINK_ENFORCED) { dev_err(wdev->dev, "chip require secure_link, but can't negotiate it\n"); - goto err0; + goto bh_unregister; } if (wdev->hw_caps.region_sel_mode) { @@ -401,12 +400,12 @@ int wfx_probe(struct wfx_dev *wdev) dev_dbg(wdev->dev, "sending configuration file %s\n", wdev->pdata.file_pds); err = wfx_send_pdata_pds(wdev); if (err < 0 && err != -ENOENT) - goto err0; + goto bh_unregister; wdev->poll_irq = false; err = wdev->hwbus_ops->irq_subscribe(wdev->hwbus_priv); if (err) - goto err0; + goto bh_unregister; err = wfx_hif_use_multi_tx_conf(wdev, true); if (err) @@ -444,19 +443,19 @@ int wfx_probe(struct wfx_dev *wdev) err = ieee80211_register_hw(wdev->hw); if (err) - goto err1; + goto irq_unsubscribe; err = wfx_debug_init(wdev); if (err) - goto err2; + goto ieee80211_unregister; return 0; -err2: +ieee80211_unregister: ieee80211_unregister_hw(wdev->hw); -err1: +irq_unsubscribe: wdev->hwbus_ops->irq_unsubscribe(wdev->hwbus_priv); -err0: +bh_unregister: wfx_bh_unregister(wdev); return err; } 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: 12712466 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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:18 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: 12712467 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F9D2C433EF for ; Thu, 13 Jan 2022 08:58:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233430AbiAMI6R (ORCPT ); Thu, 13 Jan 2022 03:58:17 -0500 Received: from mail-dm6nam11on2073.outbound.protection.outlook.com ([40.107.223.73]:16221 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232463AbiAMI5e (ORCPT ); Thu, 13 Jan 2022 03:57:34 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gGZw1gsa+ckb6Iogp0J1MLALm5LbBLWT7FFiDGUkFTp529u7JgSr/9AJq8Kjyiwn84itvyIEJ2ff1Mo4ciGJ8pEPJIZGbZh3sxacQrL2UARkR6RMJkIMKgzwHIh7EtXIgaELdpe2YWQ415aIquZJHCdE+Uli39bMB7Qr6oDBCxx0Ktmyet1oOfG6EhlRzykwaUtwlkV4bt9BKEA6F82QD3rU+XOdrRxTV9eMFHhx6xHcZVPeW0jdgCRzFiXcxmiZmXvHviiR7JPl1MeFjWu5vkB25eNpanM0VXj392QmaqGfLY9pZDDCgYGJUSOPSw61oqmo+9g5WCOCXQV55cksww== 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=qIcn4Cf4/8ZtWki0hhroUT1yK9q1a3c0Ptu+hemQpCE=; b=TKXaqnOEc4/NuthzbmvoBet5q24N8GinVi4QLZc68ff0R5fqazxgUZn3V1kPBpJG3duRMXT7qFtaJqNRXP72lq3jmVa1xlDdxECjHkOaCZEmZ5W0JbKBRrYgymJ2G33F92/7/RQO8bwY/vZILtZKkQkjvh0KeGxhuQ4I5CKdvUKer+uE76mGOK5xsxjRMR2eNUaDC9vFsK3VxCDICO5JSx8xOOQthfiWh62CT3TMlnXxuUAQVaZN7B0Ga5ycCVqAhO5rmC2NY/J9/Inj6LD7qGcOR31GpY+96T/zjShwj06m9ZfsLt+Kc2v4sCOecrbeVsGXZUxGwTIuH+QuUU17aw== 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=qIcn4Cf4/8ZtWki0hhroUT1yK9q1a3c0Ptu+hemQpCE=; b=P72QgOd3Hbn56/PQPXoXBlvyiEKM4gy0Uj/X1reUpWAzTYQDV6qH4WyKKJUAXDzkrv9EuoGD+YzX9zbu5zwMTdu3rKYRZLrXpN+vk/BBjpPXcsOMTmejFB/CrnGwm5hbHs/p8cbz6N9SXbK4wNu4SoD+CD3i/1VPxMhlSmifT1I= 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:28 +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:28 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 25/31] staging: wfx: do not display functions names in logs Date: Thu, 13 Jan 2022 09:55:18 +0100 Message-Id: <20220113085524.1110708-26-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: e941f6d5-75b1-4660-db02-08d9d6729638 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3513; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NMq1SZxEvAAXJpatY9K9Yhb+jNbx+o6W+ACpgeO6whZUSXuNKClTRY6Llr5AHLV60q3UVnzrkhC9NlscwEykfPtHJTYjN7qDV4L2dF21wYZbTgLZNbpBI2CHiLiBq+ZQ6zDBkzTXoF7wfZOVTk3E9PZ1oBMgSAKu06MNKHvSTNrbfjxi0CNX4UOiABj5EQbchn9axJS/7MIlmZz7X9lnrAOHoE4qL9lLkGGcwdpSp+pNYCLlf//WB1PHLzUckVN3w4nnoYJPYCKuZjYjnRz+1NgFL1AkOX5gvm2Q7k7tBppJvUXIZO8J4TuzyYAdPdsjPajop2Ar4jwAUC4FgeqNnygbsXOHl7TW1RsRZZElAgkIlWV7gOiF7ELA9DLfbZvtwNA03uLKLruzIAp5jJ2RhR0KSKArJIM0ainhSxWp0PIzjdHhX2vI/9Z6h3SyAlF/CyWY/a/HH7poTTrtcu6emoCi6ciWRIscrCEMnb9ivUaifjAy4N/TveEk1361RP2ZNskweIqf73UbpR/iff7sBaCg66VpVEMBx6Jdg+Dd9g3ICtXh7Jg18s2PCO8kVt4sGa2KpFrFB6DpIRM7A7zq8Kl6NYvUdJHYP0RpQpMHJZOjAPBDHBV2FlCJhYg0cgdMiy1sUWcH0QN0kMLrRAP9Jw== 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?MJVB4bwuGihY9D5SQOq+MsBarmB4?= =?utf-8?q?eTiz6VQSszhJj92U/P8ujrDmDBl7yhS9w+/0QddgchTu8zgy6zmUGVIUjuXGbjpU1?= =?utf-8?q?tfW8xr5TBqQ9YtkwO5QijwabTJvOeJ7QxzrvvBnYBWS4fGa2XjOmfSHEqrmBXwxrY?= =?utf-8?q?UdrF+B4Q9p4M0SoXUeShiKN2Ewtnc0ciaH4K23Ez9dI4//DnyMjktShtd4kLTPCv2?= =?utf-8?q?XC5DAWz+S1gWMl4EdLQsIrorjfqKbUc6stqzNj8q/+3e3lIi2ptHT65dmeA8uj2JV?= =?utf-8?q?Yeoi1eteuGsVEjH57HPb5w9uV4tkxTqH7vXEIMsKbYpEL7OcZC7XWihXQh7j8R/Br?= =?utf-8?q?syWOo3la0GoG3WZ2/x2YQKKObj0QbLEejc28V97lldhNCPOPLkwFGgVq+OEUA/m3B?= =?utf-8?q?zs9ooFP6wjIAQ0yuUfSywGZIJbuPgXeb01fosfY++gef/1B+/Qt6PVGe5Bk7+vXf2?= =?utf-8?q?MULpfQyUfPg+03feiSgYcjzEnsmuzkuKiUhFvwwIhd/3iar4W/AOBhtwMe5YyyWlq?= =?utf-8?q?GAktlUB5e8nsBEJyvAiZ6M2xtUciyI5QNbAvZF5u9qltZrKmSA85YmMzYN8whTkor?= =?utf-8?q?rn7/C9S9/Lgdw+81bltjC4nZiKLIRYTa4MllZJ7BgFN6d9mCfkv/RXnG2iBj6CeS0?= =?utf-8?q?jiKsXjTAlhzfdRiTGDdupWk57zLqWhHh8oM+X7eHNi6DXC4NwikPI78c7L9L48zoW?= =?utf-8?q?zPXf3z9ckZwohEWSIn38u9h/Ptht+hxqaeYdRPAnMqyLy/NzGLUtCXBDlfKV5Ig5r?= =?utf-8?q?ZYTG8JNWhkD+SadsVDpQgJSo1vYBAp+EYpo1NOih3R11nAFz22fLPp6zSqM4L9CUV?= =?utf-8?q?0TdGmLJ9ZodhWykiiW442UqYosDidrsLX36iO7bJeP0+HbSpExlxVY9ehNFawonqz?= =?utf-8?q?VweokcXnWRsLsdgfSgeiGv6W7eTzaUxgpWSWr/hVPGtvJwfIz+CvXGZAiozEyXEK6?= =?utf-8?q?On5bkukioyxT9Qj8cHLU7ozfqNoulrqjb7pPQdsWhD6z8juFxkpQo+6UfGKaoddmg?= =?utf-8?q?SI31+u+UdDkdaHmzYhTpreaz5hQtI2ML1M8x6YjVdLt4xbUW6lN9PrFSfqa7s0O68?= =?utf-8?q?ikkLSH9e3c3YPIhvLg5atvIy+Gcud2MEvIwNEjD/E9535lNklyIyYOiyWAM9HFAOE?= =?utf-8?q?K1sysKaJIdljZbpyOhp+65gj7H5yayVEShcrnlSz6iFMOrCd9C/mXwGUiJM4vYmdU?= =?utf-8?q?CcYNhNun060v0Y81OuI6MzJ3LFLYmIgDiZ5BESnphT9mF6tQHqfkxp5MOhWQdNvOr?= =?utf-8?q?MHhcK0H98KmcxNo8wAUvjoEyK0a7EKoPyvAdcpl+Hy8roFGjxzfdJGsoqqw3KmtoL?= =?utf-8?q?mUXDVq1fcmXG6w7A8XHdQrvTAFMyOAAPxcdgu6TMbqJGus4rwrSGWccMZt2UnJNAM?= =?utf-8?q?VAKL91/cJWO0qC8uhdlTuheyq8PLdD33UVCP+T9/kiC4EUfdGHYV4p3xxltRJduH0?= =?utf-8?q?Ft08m2mXeA3z/kJGsCUMFX35YWvIEaQD8W1620gQfOTLxtY4DEDFrLNSmMBhvFl7v?= =?utf-8?q?L1iAeAcNSV7hGqYq4ZX8jogKPwwMkoPIpsaEwm4Qw5cWJHmQfEdKKB0FXh6BAWTmg?= =?utf-8?q?+iV1kz51xgMkv1y5jmhyCTbbkvkchubkBjbSSG1SZMccuHkJQIATlU=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: e941f6d5-75b1-4660-db02-08d9d6729638 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:28.6590 (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: MDKfUVBw11HY/IjV0BahVqHB2gBD9iyeRzrJt5oYx5RZqBHyKtAD6863B3/tN2sP27Laf3AGRjifcljuYhLXHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller It is not necessary to prefix error logs with the function name when an error message is unique in the code. Note this patch still prefixes the message 'received event for non-existent vif' with the function name since it is used several times. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/bh.c | 3 +-- drivers/staging/wfx/data_tx.c | 2 +- drivers/staging/wfx/hif_rx.c | 3 +-- drivers/staging/wfx/scan.c | 3 +-- drivers/staging/wfx/sta.c | 5 ++--- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c index 1ec4a4951d99..4c6ba9c342a6 100644 --- a/drivers/staging/wfx/bh.c +++ b/drivers/staging/wfx/bh.c @@ -69,8 +69,7 @@ static int rx_helper(struct wfx_dev *wdev, size_t read_len, int *is_cnf) int release_count; int piggyback = 0; - WARN(read_len > round_down(0xFFF, 2) * sizeof(u16), - "%s: request exceed the chip capability", __func__); + WARN(read_len > round_down(0xFFF, 2) * sizeof(u16), "request exceed the chip capability"); /* Add 2 to take into account piggyback size */ alloc_len = wdev->hwbus_ops->align_size(wdev->hwbus_priv, read_len + 2); diff --git a/drivers/staging/wfx/data_tx.c b/drivers/staging/wfx/data_tx.c index bfc3d4412ac6..d7bcf3bae08a 100644 --- a/drivers/staging/wfx/data_tx.c +++ b/drivers/staging/wfx/data_tx.c @@ -425,7 +425,7 @@ static void wfx_skb_dtor(struct wfx_vif *wvif, struct sk_buff *skb) req->fc_offset; if (!wvif) { - pr_warn("%s: vif associated with the skb does not exist anymore\n", __func__); + pr_warn("vif associated with the skb does not exist anymore\n"); return; } wfx_tx_policy_put(wvif, req->retry_policy_index); diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index 5300ef57413f..302bdb2bf036 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -101,8 +101,7 @@ static int wfx_hif_receive_indication(struct wfx_dev *wdev, const struct wfx_hif const struct wfx_hif_ind_rx *body = buf; if (!wvif) { - dev_warn(wdev->dev, "%s: ignore rx data for non-existent vif %d\n", - __func__, hif->interface); + dev_warn(wdev->dev, "%s: received event for non-existent vif\n", __func__); return -EIO; } skb_pull(skb, sizeof(struct wfx_hif_msg) + sizeof(struct wfx_hif_ind_rx)); diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c index ce0ae4c91190..7f34f0d322f9 100644 --- a/drivers/staging/wfx/scan.c +++ b/drivers/staging/wfx/scan.c @@ -94,8 +94,7 @@ void wfx_hw_scan_work(struct work_struct *work) mutex_lock(&wvif->wdev->conf_mutex); mutex_lock(&wvif->scan_lock); if (wvif->join_in_progress) { - dev_info(wvif->wdev->dev, "%s: abort in-progress REQ_JOIN", - __func__); + dev_info(wvif->wdev->dev, "abort in-progress REQ_JOIN"); wfx_reset(wvif); } update_probe_tmpl(wvif, &hw_req->req); diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index f64adba350eb..83f1ac87e0f2 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -513,13 +513,12 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, else if (!info->assoc && vif->type == NL80211_IFTYPE_STATION) wfx_reset(wvif); else - dev_warn(wdev->dev, "%s: misunderstood change: ASSOC\n", - __func__); + dev_warn(wdev->dev, "misunderstood change: ASSOC\n"); } if (changed & BSS_CHANGED_BEACON_INFO) { if (vif->type != NL80211_IFTYPE_STATION) - dev_warn(wdev->dev, "%s: misunderstood change: BEACON_INFO\n", __func__); + dev_warn(wdev->dev, "misunderstood change: BEACON_INFO\n"); 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. */ wfx_filter_beacon(wvif, true); 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: 12712468 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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:20 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: 12712479 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDC12C433FE for ; Thu, 13 Jan 2022 08:58:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233564AbiAMI6m (ORCPT ); Thu, 13 Jan 2022 03:58:42 -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 S233214AbiAMI5s (ORCPT ); Thu, 13 Jan 2022 03:57:48 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ECKn7KfAiffSJ8bpNZludrm+K8pAc/mO3AZi7AZMYDK7DEbFxPVO3ttFs5oZ1/gyUc8yghLMhr+5zEEmrmKY2v/WvnM8c3iknOs2o3apje7HOPY6/O7VU53yUT+zyIlpWdsLwWCX4A9XpwH+ILCYJNlFlplKFydYdEKr9tPKCYJgtxI2OLQRQR4ytZSlZNhgLCucTUXNmgufjPJk3ZwL8FjegusPUzJrefW5f5zbcj8wn3U45CXCQL8/Vu7JkPFEFllBRzceyKbecIjIJDQnfYlWf9m4xEnuNXlVbxz4e5oNfIYX9JxHhP9Aite3AiSsbnCWVfuSfN2cUUX9/hCuRw== 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=ApN0805FqwaTDZhmNkzwiulmD6L+UBqGdb9PdCHBUZg=; b=EmYrE+0m6Tpv8QSANAcDSYRCSTzGguGJWgBDA+9NT+VZeRJjMUUVN2JQAMO8dIkVnAvOJZfxS9WEsXyzooxevABw4wQuK8VqIfRkcgnDdo6GJf/59Q3vLqCAhkJtDP2tqC+eAZ3U6pl+Y4fbO8BJ8e7bSIb3sPwvzKykJqlwL+U22yvLO5tuC5sSA6ZQF87/8Jty1oxJshJeIDLlsFIr/CrmyiHAphknxVJ6yIGJPp1EoBWEhMY/+DVzoczD2JTxR2WAFkcgtPFJ143NUtc13/7eFE8shJans4wqIZgbBOqMuBNoIPfKd/UUNx9bMsThmR+5CQvdlIapcQ5weJm7yA== 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=ApN0805FqwaTDZhmNkzwiulmD6L+UBqGdb9PdCHBUZg=; b=PVne9K+Tic62BzXrCvH9uUY1AK9OMFMqF/3tt1huS0f8SbMKkcHm/J1mqhCcV1is5ARxbVFP5/cTMv47TLk/E0bC0LgwAeFoVw4JPIuqicVXc/4+qV5qT+Np9ZVLEUeD1uCHfOatV7Wl/bbEwV+Z09NfqCebT6QGQNIiAuC5cDg= 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:32 +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:32 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 27/31] staging: wfx: map 'compatible' attribute with board name Date: Thu, 13 Jan 2022 09:55:20 +0100 Message-Id: <20220113085524.1110708-28-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: 3cef6f82-2b05-48e1-4117-08d9d6729881 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MuVgBbQ+gwipZgrJpyvyRYSPW5GMySC7oyC0d2laiMjbBVopNbIRH3WykSPqy5xIyQ/lM9PiIIitFTkjEddcfe+09+uTjCsCezGyanCeG/hkEpU4p4KjgNCCozV1xx5Lb5RyH48BUkjFUq2Z5wjaZkb42kTz4+uzGJ5r34JUJBB9wEU0uF8elEXXqRSvMRjMXxS8HGB2KaoF/b8Z2ifdnuvmwTeFAMJvAzm7k+l9suozL75D/h8ThEbCG+qKzWcbpxcvs0t2nzgfH6XRsHJGvzqAkIKIEvgwMpgIp3xr9ByEL/RImRmIhPZQyOPYS66q5nWGEAYydEZqTwYn01QwEhzcsIbaRBmn1CLhsWtM0TZB/4kc6RpowIlOgftoHwdvnn1H6L5iCj3e6MO5JnzPRT+uuzqebgOveyojAolfVQxcMsV4lfbK31gdkiybKLlR0eOFwMBtvQIndI7mHY1STEJB1L4WdPbGcLE5Ap8xEsUTKqU6h9s7hKIy8bJtvnr3Upyp/LV/of/vinqvizZu/WAbOLocOe/DDqnEgcou6rZeEF1l/qYz4XtM2jWojH1+xlscp79tqWljz0DO03i6u3aGf/e4s8ijySQ2aXDnmsLlNIOdU0NAPVU9WZ4DoWFlHAeONDTjwY/RWflxwqNJWQ== 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?FbBIp9Jzvsykm8v7BBFdysMYPlAi?= =?utf-8?q?sDm5g9TKQD4TcVLbpUjveU/8cN5Obocc4nI5kr/2GGUpoZyDmjMwnYlLo70XU7Sf7?= =?utf-8?q?iw+6P3yYjRTH1iYV7ffRlwVYwuqwpFKoVC148tca9eK/zYP+FDxdnpkHKgmxYJzSo?= =?utf-8?q?HZUM/05duYUifWcjDwjfHWYO0ImCLpF9jYKLX0jEh6fAG7mftnO8VKlbGk7PxPjOK?= =?utf-8?q?Dvs3sqf9bhjYHmYHYtNwHZiugFXwzhozWAtYlw5T6lyPWXszUi+15enopK60d6pZx?= =?utf-8?q?8WighLBiegrcBKel1SQIjfRrQx7KfWKy6zfOSZnl48zGeRqr2GDzR4l2OCxS3G/l8?= =?utf-8?q?TU1XvfZGE95qtpCNatov5NYHFkFT3UsjGb5K8gPBfWqcC1q3RVFtl+FPen6p8IDI1?= =?utf-8?q?wucZujwcpC1pm3ujmP//mP8+8F9eTOaagY8Hgh8p243PMjY9EYaxuOmxve+4hgrSK?= =?utf-8?q?GZENjm3RoTq3y6uczBSDCXbwukrz9lbJOoZ6GPo2T3Th5RW/2dhIbPtWe1fFvH7nh?= =?utf-8?q?r3orGF/b+VlK+6o1ppqJ+rHiFmd4SNyGJlQ5ngysS1C9qAKj4i+TLclH6bZp+8Q8I?= =?utf-8?q?U1Stm06z+eOlrfEmQuMkPUNXCUHcIv0UibmfiUFQgcuQlfN45jEBnVVY91PLZcyNp?= =?utf-8?q?lytR/ZWHmqEFsVgeSJvCvN8tHcCae6ABW7XAu1SKf27kH5igCKVWV2bo1cvDWK/8W?= =?utf-8?q?2wg7Ni7eHCpmdZgpVTWPRlgtmwufTJN42jTKzSRlm4B0MDsH5uZedotJAyT8LEOA0?= =?utf-8?q?m0UTmdPawBpM1BVif936XVcRa1lfDyXzDeHMTP3+u6Jc+c/6yTxWbwxieg1Q/JhdQ?= =?utf-8?q?0P67EFoTKgC6a2ADzzcHVmph1bM6HPy2odfF31/VCb+aWCwSF0/D1YKPF2liRMHyd?= =?utf-8?q?AvPZ9v7hkMGYWQS1XIH7sVDxNg4yNZ4Jz7+5R+tLy5dcOAWJGv+nkt98UQdCf3x7v?= =?utf-8?q?fdVvM/bYIvJP5wqn2xqYdqINQ68QwYcqExrXdJDdcuR9lKqA1XTAHxi78aBfN1gS+?= =?utf-8?q?U8HVQEZnKKnS2+ExAft4GuspDJXvRQANY2LzXF2Pfi6XMswCvR+JfrBBuEXFCZhsg?= =?utf-8?q?FDZr5TzEsyb9G+5bLSt0HNFH2bJtRSdNopWuOnwglBpSkukAMA5TT2DgadxnLzL4D?= =?utf-8?q?woGZskbFO78nv+N1I+NVKQ4rEFc77RvNsaZWJ9X3FUUZzSZb+ifrY10CMlLArHojD?= =?utf-8?q?kucTuu+fY1w5A0Qu9bsyjUG3MTrMzWjlEfVIdqxd1ZPOcd8lhrpNJWUmyorlD1n7i?= =?utf-8?q?XgCb+3sEw2odoafQVzH7VUXfNE2JldEjlanGRbZArymsN8oqYyo2bvTN9BVycNqFw?= =?utf-8?q?sl7YdPOcP3inoQQwRam/v2SNysSO0kdgcmEr9nSgZmduPyTiEnubVhMqX6EAzzw4b?= =?utf-8?q?UbS0ps+40jnLclSCytR2/HKv1iI22k7ny4Spkq4LQa0uCHRzgn/kGYXOuAvicJBjm?= =?utf-8?q?LXfj20gen39q2uzZMBJPErxHdgFnNYR5YFgectufZdDYIywe1Q7m0HHbVm4tI/2be?= =?utf-8?q?mzq7m7C6PywKs04+uMNmBoySXtFlAu4PMn0HbKoAI78/sfhosZSFvcOu6K6rp6H6s?= =?utf-8?q?1jYNBZ2hrW/2vkMaBfTVi7RQlxpp9zNcfTuM4gOQZl+2sRAi9xlt7E=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3cef6f82-2b05-48e1-4117-08d9d6729881 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:32.5046 (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: nKzeNH02Y1ya2RE2gOZnPNdTrm28qyHvHgspz1AwPW+8U+pHtbjChy1ukXltomz3gMzB6UTMx8sR8RDKo4jVNQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller "WF200" only designates the chip. To make a WiFi board, the chip must be associated with an antenna. The antenna configuration is located in separate files (aka PDS files in Silabs wording). Currently, user has to write in his DT something like: compatible = "silabs,wf200"; config = "brd4001a.pds"; It is far better to embed a list of known boards (chip + antenna) in the driver. So the user just have to declare: compatible = "silabs,brd4001a"; This patch add the configurations for the evaluation boards sold by Silabs. To provide a full plug-and-play experience, the associated PDS files[1] will be available in linux-firmware. This patch does not break compatibility with existing setups. Signed-off-by: Jérôme Pouiller --- .../bindings/net/wireless/silabs,wfx.yaml | 11 ++-- drivers/staging/wfx/bus_sdio.c | 35 +++++++++++-- drivers/staging/wfx/bus_spi.c | 52 ++++++++++++++++--- drivers/staging/wfx/main.h | 1 + 4 files changed, 83 insertions(+), 16 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 510edd12ed19..44aeba0f7276 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 @@ -39,7 +39,12 @@ description: properties: compatible: - const: silabs,wf200 + items: + - enum: + - silabs,brd4001a # WGM160P Evaluation Board + - silabs,brd8022a # WF200 Evaluation Board + - silabs,brd8023a # WFM200 Evaluation Board + - const: silabs,wf200 # Chip alone without antenna reg: description: When used on SDIO bus, must be set to 1. When used on SPI bus, it is @@ -87,7 +92,7 @@ examples: #size-cells = <0>; wfx@0 { - compatible = "silabs,wf200"; + compatible = "silabs,brd8022a", "silabs,wf200"; pinctrl-names = "default"; pinctrl-0 = <&wfx_irq &wfx_gpios>; reg = <0>; @@ -115,7 +120,7 @@ examples: #size-cells = <0>; mmc@1 { - compatible = "silabs,wf200"; + compatible = "silabs,brd8022a", "silabs,wf200"; pinctrl-names = "default"; pinctrl-0 = <&wfx_wakeup>; reg = <1>; diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index 5c45ccd85a7d..361585763f30 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -20,7 +21,28 @@ #include "main.h" #include "bh.h" -static const struct wfx_platform_data wfx_sdio_pdata = { +static const struct wfx_platform_data pdata_wf200 = { + .file_fw = "wfm_wf200", + .file_pds = "wf200.pds", +}; + +static const struct wfx_platform_data pdata_brd4001a = { + .file_fw = "wfm_wf200", + .file_pds = "brd4001a.pds", +}; + +static const struct wfx_platform_data pdata_brd8022a = { + .file_fw = "wfm_wf200", + .file_pds = "brd8022a.pds", +}; + +static const struct wfx_platform_data pdata_brd8023a = { + .file_fw = "wfm_wf200", + .file_pds = "brd8023a.pds", +}; + +/* Legacy DT don't use it */ +static const struct wfx_platform_data pdata_wfx_sdio = { .file_fw = "wfm_wf200", .file_pds = "wf200.pds", }; @@ -167,14 +189,18 @@ static const struct wfx_hwbus_ops wfx_sdio_hwbus_ops = { }; static const struct of_device_id wfx_sdio_of_match[] = { - { .compatible = "silabs,wfx-sdio" }, - { .compatible = "silabs,wf200" }, + { .compatible = "silabs,wf200", .data = &pdata_wf200 }, + { .compatible = "silabs,brd4001a", .data = &pdata_brd4001a }, + { .compatible = "silabs,brd8022a", .data = &pdata_brd8022a }, + { .compatible = "silabs,brd8023a", .data = &pdata_brd8023a }, + { .compatible = "silabs,wfx-sdio", .data = &pdata_wfx_sdio }, { }, }; MODULE_DEVICE_TABLE(of, wfx_sdio_of_match); static int wfx_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id) { + const struct wfx_platform_data *pdata = of_device_get_match_data(&func->dev); struct device_node *np = func->dev.of_node; struct wfx_sdio_priv *bus; int ret; @@ -216,8 +242,7 @@ static int wfx_sdio_probe(struct sdio_func *func, const struct sdio_device_id *i if (ret) return ret; - bus->core = wfx_init_common(&func->dev, &wfx_sdio_pdata, - &wfx_sdio_hwbus_ops, bus); + bus->core = wfx_init_common(&func->dev, pdata, &wfx_sdio_hwbus_ops, bus); if (!bus->core) { ret = -EIO; goto sdio_release; diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index 417bb74c88b9..9aa52d76cdda 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -23,12 +23,36 @@ #define SET_WRITE 0x7FFF /* usage: and operation */ #define SET_READ 0x8000 /* usage: or operation */ -#define WFX_RESET_INVERTED 1 +static const struct wfx_platform_data pdata_wf200 = { + .file_fw = "wfm_wf200", + .file_pds = "wf200.pds", + .use_rising_clk = true, +}; + +static const struct wfx_platform_data pdata_brd4001a = { + .file_fw = "wfm_wf200", + .file_pds = "brd4001a.pds", + .use_rising_clk = true, +}; + +static const struct wfx_platform_data pdata_brd8022a = { + .file_fw = "wfm_wf200", + .file_pds = "brd8022a.pds", + .use_rising_clk = true, +}; + +static const struct wfx_platform_data pdata_brd8023a = { + .file_fw = "wfm_wf200", + .file_pds = "brd8023a.pds", + .use_rising_clk = true, +}; -static const struct wfx_platform_data wfx_spi_pdata = { +/* Legacy DT don't use it */ +static const struct wfx_platform_data pdata_wfx_spi = { .file_fw = "wfm_wf200", .file_pds = "wf200.pds", .use_rising_clk = true, + .reset_inverted = true, }; struct wfx_spi_priv { @@ -175,6 +199,7 @@ static const struct wfx_hwbus_ops wfx_spi_hwbus_ops = { static int wfx_spi_probe(struct spi_device *func) { + struct wfx_platform_data *pdata; struct wfx_spi_priv *bus; int ret; @@ -183,6 +208,12 @@ static int wfx_spi_probe(struct spi_device *func) ret = spi_setup(func); if (ret) return ret; + pdata = (struct wfx_platform_data *)spi_get_device_id(func)->driver_data; + if (!pdata) { + dev_err(&func->dev, "unable to retrieve driver data (please report)\n"); + return -ENODEV; + } + /* 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); @@ -206,7 +237,7 @@ static int wfx_spi_probe(struct spi_device *func) 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) + if (pdata->reset_inverted) gpiod_toggle_active_low(bus->gpio_reset); gpiod_set_value_cansleep(bus->gpio_reset, 1); usleep_range(100, 150); @@ -214,8 +245,7 @@ static int wfx_spi_probe(struct spi_device *func) usleep_range(2000, 2500); } - bus->core = wfx_init_common(&func->dev, &wfx_spi_pdata, - &wfx_spi_hwbus_ops, bus); + bus->core = wfx_init_common(&func->dev, pdata, &wfx_spi_hwbus_ops, bus); if (!bus->core) return -EIO; @@ -235,16 +265,22 @@ static int wfx_spi_remove(struct spi_device *func) * stripped. */ static const struct spi_device_id wfx_spi_id[] = { - { "wfx-spi", WFX_RESET_INVERTED }, - { "wf200", 0 }, + { "wf200", (kernel_ulong_t)&pdata_wf200 }, + { "brd4001a", (kernel_ulong_t)&pdata_brd4001a }, + { "brd8022a", (kernel_ulong_t)&pdata_brd8022a }, + { "brd8023a", (kernel_ulong_t)&pdata_brd8023a }, + { "wfx-spi", (kernel_ulong_t)&pdata_wfx_spi }, { }, }; MODULE_DEVICE_TABLE(spi, wfx_spi_id); #ifdef CONFIG_OF static const struct of_device_id wfx_spi_of_match[] = { - { .compatible = "silabs,wfx-spi", .data = (void *)WFX_RESET_INVERTED }, { .compatible = "silabs,wf200" }, + { .compatible = "silabs,brd4001a" }, + { .compatible = "silabs,brd8022a" }, + { .compatible = "silabs,brd8023a" }, + { .compatible = "silabs,wfx-spi" }, { }, }; MODULE_DEVICE_TABLE(of, wfx_spi_of_match); diff --git a/drivers/staging/wfx/main.h b/drivers/staging/wfx/main.h index 68c665307153..fcd26b24519e 100644 --- a/drivers/staging/wfx/main.h +++ b/drivers/staging/wfx/main.h @@ -23,6 +23,7 @@ struct wfx_platform_data { const char *file_fw; const char *file_pds; struct gpio_desc *gpio_wakeup; + bool reset_inverted; /* if true HIF D_out is sampled on the rising edge of the clock (intended to be used in * 50Mhz SDIO) */ 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: 12712480 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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:22 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: 12712481 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1ACCC433F5 for ; Thu, 13 Jan 2022 08:58:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233609AbiAMI6y (ORCPT ); Thu, 13 Jan 2022 03:58:54 -0500 Received: from mail-dm6nam11on2073.outbound.protection.outlook.com ([40.107.223.73]:16221 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233351AbiAMI6O (ORCPT ); Thu, 13 Jan 2022 03:58:14 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UfaoJMFSWHJbC4Dgoq3vfbCdEKaSPs7G+r2X0IfFPkWGnYVVHG7Juy6Niayc7vKL63JjwVbH9SrGNqTTCb/YNBN34gl67DnQ+U4UG+sz9y7gt1FetpaMS+MlbMPJueFccu6oKaTqoduuA8bo4QrCDX73e9UJfw1phb6+n3+vFsRJqYYu9t6Y+y1Ua2aCHTznxIBY2LPgBj398xFSukIbHVvLlSf8b3sh/fDcNFysErksjxKwzKUuNGdEbey9/1CDkgNipVQGMBFlTW0h2tOieihoXZWkf66EFi/rM+c0tZ/oXP9KU9c6myhKT7Rac4NBaCFub8+7JoyKgJf8JwdYuw== 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=CraUO1EHQRox2TGQiIRnhpiB+IZaBNVOt3+Jn+Afr2c=; b=egiOM84+r9ds1R+BxvznOVmQBAFJBYSZewXT1EhM4pHN3zAMGigTKmqUugf6/DEbHhhq7sijJzPpmBI2xRkTtrJhewBaxgk4ytDL6N9CVwwA/R8rl8HPi8S+AwTwX4GakGpVAdURZtMrI1iHFy/T5eEyUkk3UYUxhhD3l/R0LgnyBChYRkRXk3j6guh9MbO2V+9HC8Ub/USt6zY5L/H8bRs3qZH+agyXmjSHdc++nV7/bIqfkTSjp8XMvbgqX+VmgEjrmP8pYoEqFyxJiXrTdIlTPPE3Mf0l3sU4XkRQDvBVJxuPIgCYGY+IpcbCDevDsc8f/Nx2i+6NRxcbae5r7Q== 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=CraUO1EHQRox2TGQiIRnhpiB+IZaBNVOt3+Jn+Afr2c=; b=g1iPfIEYMOg6zPg/Ap5PWhY7fYcV4uUvnKa1kMQ2Xq4pVTxYfkGnCc/8eGtwigY/i+Ie0I9ZTRV6Ax3UPFmvkN7hlM7N70qbVDCr8d/m+/JE/dt/y08c5DsWYkQCM7LEoZyxPyThT1tSlCutyuf34aCi7MoHW0QOeuT7RUL1ZW0= 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:36 +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:36 +0000 From: Jerome Pouiller To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kalle Valo , "David S . Miller" , =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= Subject: [PATCH 29/31] staging: wfx: drop legacy compatible values Date: Thu, 13 Jan 2022 09:55:22 +0100 Message-Id: <20220113085524.1110708-30-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: dafbfa3a-73c7-4008-0fb8-08d9d6729afb X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 78oo6fJbxkc/VtNSaRqmaSRvJ6I0lwMRhdRP4UKXNA/uj3YrNEUe+yHkD2OwxhilKf+mbJmhTQKHg4Dfp4kYJ5rhZ8nsHHx7ydzm5Xr5taYXbwMwBlaizq8ACblVxGKG018/7adce6uvALSJNWYVPAkJZSGOqeidaljHaeGPJy/5N+Pq7sgwZLbSQzxKEYGpfd8L6F39Stx57U/VXF5bcl77gHgHtvOe85f2dDf9EQ7RANvQjw2GvXm9BJv6FLeW9OUfWOBpyVY3CNEQCehgpwrUm6F0x7i5CqMzQgr3jrSIzzxkQXd0ONM+6D1z4E6M1+4vsfWpuVHPT41NIhv6a5/oC2X4rvici2G2wsmpOS/Oo5anC9cTZx80kuN2ZU77qJDxVvX3O96SWu2WtZ59q3pnCdw9LbHCRGwkLMNU8KYO9+1yy046qVfOHbhqxU3qMsyEL3S+B9MO5VIJ8FdcrPFkGKnBEpf+EBk/zixzsRPBxEuvF/Rfr8FdoaKGL/QWPFzxK9axQEfWXNTfmN+HcAGTD3CQvxn2v8Icv2dYPtf+mI+x4uA+dmQKldzdy0L8e3VYACNhL6QF70Kd7ywlxSbRbAU3nvyeNVKqVMi2/d7cAI7Usu0p85bhkMmAFRwq+awpmxqnkUZ+uVpVzQmvAw== 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?0zciDY/P2wnsMy7fJiYWnn9Of/6Z?= =?utf-8?q?IDOJuRyHNZlFyEIX8w3wsJ3AsazrUGpXmCvZQwhi1n7lQ0ec0bDSdPYwWO3bO26rM?= =?utf-8?q?QPw8I8ry3noglfb581AU+UIhfSakk6NlC1TN9Y0QGkfDY64NymUUY029X97TITMwX?= =?utf-8?q?dywJTNluD/heuXgDuD3XyIMuW4kQBNOwB0M8sHcWzKbQkooYz9HDakLWj0y8/AIji?= =?utf-8?q?palxi4W7BrLgYQiZag7g2DmDWtdXsARIEzllvHWy9Q37RrWi+awGy7nJAANv+1gKq?= =?utf-8?q?g5oqeeRJVMKdY7iguxmG+m/joyDCAY8Ho2PGnriy/iGu+0cl3ttAk5qhgpRbGfdus?= =?utf-8?q?+pH1oIkZ1+i3Rgp9a0lt2ZbI6kcVjEJN/Z9TCs0y7dHrHkc3oPs0GOH9628IzaD8x?= =?utf-8?q?UC35JiSgwVbPSOuNLJDBjS6StM3WyI70hCrkSXYitN8F6DQwz8nvZRQUT6vpSlGXu?= =?utf-8?q?Mn/yA3C/iUtLbdPLvt72CJ66ZSeBiQ44DoqMpfk1vl15cXN5Sjkvb4ekY8rEOtj2v?= =?utf-8?q?n5egFzrzOftaI9s/SOkvtHbnqwzb5zNKNZ3puXAAKpeFNIQBzsdstahHXt9gZYvaf?= =?utf-8?q?Hxf0DETSOHj4vKWFjlVnP5pqUyz4ZrWMLXpS+Dn/d73CbZAtIr0H0c1acYGdmWTOX?= =?utf-8?q?27k/LTkIpk75icYozC4yxQ60I3sQkf4VjVaKCp0Nb2NbKpUWAHPng3qMDs+cI3CRZ?= =?utf-8?q?e/oxoWw52GE6g/aAcDQwDSVbBJ4vTLh0cOeH3QQrKOsaH8keNpcrVG+M41UNEkfua?= =?utf-8?q?vlKNCj/kyg+tJPRbROqZTX8GCU014SvUW57aYDYx8FWln6R9rSkqV7nh+fAL8ovvm?= =?utf-8?q?c+dG1YqYi56ppj2qKfSGOvhnv8yVd8q1Tu+d+yPjNH5Nk82klBtFTVWKi7qEJOjO3?= =?utf-8?q?zcECkplRXclQF8hJHFIieQsb4+Y3tTH7HTtlt3PfMV9wAZd4PGTfGhzLvrcO0C9HG?= =?utf-8?q?fdqjY4AHE/4Y1q60F0Aq3fHHK/7/jmfJPaaIyAKLi9xW+boC0d5SKUmzOKfCsy88j?= =?utf-8?q?1WbiflcPV78ZWNls9rcIwQlWockx0NGwkAsdCJG2LPvXb/5tMhedUcTS0AF17MsS9?= =?utf-8?q?bRhxVNjGmmiw3VwVGhR4iqBq1wIiu0GWPt15bZEKLhmgpAO2VeQOXbdcYUHI3ivCE?= =?utf-8?q?IK5Z6beXCSUB964pYFXny92d0i9gzg3MQ9/uwFTcLLGTYPCKoXDPQAk36Yt0aWfrg?= =?utf-8?q?3CuMQl/CANOz/yF8H/PwOmSF+ALkgI6P9VJ0S0+KBpNbTPmeFGv42vddqwyS53WzP?= =?utf-8?q?2IrIM8qtVFRw74VnEIQoOD4BYVWc6QuxOgU+x/7B5Gxf1qaSK+kfMu7PZ1EhcYCwS?= =?utf-8?q?ceV/RonBkHG/Vp0tkDXjHIS+Zh1jGaYBaI54ORyZATtNJ2nwL2ziCgtXpazNPUGLC?= =?utf-8?q?xSP2f+MZwUoGdUzM49e2jcRg/DV0wj7521y7yBprQho6p5dkyfoTXWR4ORdIBxpA7?= =?utf-8?q?Dl5ER573pbAyJPz+T7WrWQFK2wnUlvBpEavlqyZZ96HQMbMycSwK1P1/KULrlHRgP?= =?utf-8?q?gonI1xsR/mLJCBnN/6nF6Zq4yAK5ARTBs0SMKt6lhGOiI5EKITxNxybljRr+4ECcJ?= =?utf-8?q?800EMDoy3PoC1O0tca2wtXISizMOmAOsNPRtnf4B865KQ6WxClngUo=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: dafbfa3a-73c7-4008-0fb8-08d9d6729afb 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:36.6739 (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: mAsWkyZLmdqdOQ09ZMEosmMPB+HGu9H22g2Dff96VU1jICb8KkalFFG/Oc6mIF/dUS879buUyQx4dsLqHsXdjQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Values "silabs,wfx-sdio" and "silabs,wfx-spi" are deprecated for a while now. We take advantage of getting out of the staging tree to drop them and start from a blank sheet. Signed-off-by: Jérôme Pouiller --- .../devicetree/bindings/net/wireless/silabs,wfx.yaml | 3 +-- drivers/staging/wfx/bus_sdio.c | 7 ------- drivers/staging/wfx/bus_spi.c | 12 ------------ drivers/staging/wfx/main.h | 1 - 4 files changed, 1 insertion(+), 22 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 44aeba0f7276..c12be18eb6ac 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 @@ -64,8 +64,7 @@ properties: reset-gpios: description: (SPI only) Phandle of gpio that will be used to reset chip during probe. Without this property, you may encounter issues with warm - boot. (For legacy purpose, the gpio in inverted when compatible == - "silabs,wfx-spi") + boot. For SDIO, the reset gpio should declared using a mmc-pwrseq. maxItems: 1 diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index 6ead6957b751..6ea573221ab1 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -41,12 +41,6 @@ static const struct wfx_platform_data pdata_brd8023a = { .file_pds = "wfx/brd8023a.pds", }; -/* Legacy DT don't use it */ -static const struct wfx_platform_data pdata_wfx_sdio = { - .file_fw = "wfm_wf200", - .file_pds = "wf200.pds", -}; - struct wfx_sdio_priv { struct sdio_func *func; struct wfx_dev *core; @@ -193,7 +187,6 @@ static const struct of_device_id wfx_sdio_of_match[] = { { .compatible = "silabs,brd4001a", .data = &pdata_brd4001a }, { .compatible = "silabs,brd8022a", .data = &pdata_brd8022a }, { .compatible = "silabs,brd8023a", .data = &pdata_brd8023a }, - { .compatible = "silabs,wfx-sdio", .data = &pdata_wfx_sdio }, { }, }; MODULE_DEVICE_TABLE(of, wfx_sdio_of_match); diff --git a/drivers/staging/wfx/bus_spi.c b/drivers/staging/wfx/bus_spi.c index 6b4f9fff8b44..062826aa7e6c 100644 --- a/drivers/staging/wfx/bus_spi.c +++ b/drivers/staging/wfx/bus_spi.c @@ -47,14 +47,6 @@ static const struct wfx_platform_data pdata_brd8023a = { .use_rising_clk = true, }; -/* Legacy DT don't use it */ -static const struct wfx_platform_data pdata_wfx_spi = { - .file_fw = "wfm_wf200", - .file_pds = "wf200.pds", - .use_rising_clk = true, - .reset_inverted = true, -}; - struct wfx_spi_priv { struct spi_device *func; struct wfx_dev *core; @@ -237,8 +229,6 @@ static int wfx_spi_probe(struct spi_device *func) 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 (pdata->reset_inverted) - gpiod_toggle_active_low(bus->gpio_reset); gpiod_set_value_cansleep(bus->gpio_reset, 1); usleep_range(100, 150); gpiod_set_value_cansleep(bus->gpio_reset, 0); @@ -269,7 +259,6 @@ static const struct spi_device_id wfx_spi_id[] = { { "brd4001a", (kernel_ulong_t)&pdata_brd4001a }, { "brd8022a", (kernel_ulong_t)&pdata_brd8022a }, { "brd8023a", (kernel_ulong_t)&pdata_brd8023a }, - { "wfx-spi", (kernel_ulong_t)&pdata_wfx_spi }, { }, }; MODULE_DEVICE_TABLE(spi, wfx_spi_id); @@ -280,7 +269,6 @@ static const struct of_device_id wfx_spi_of_match[] = { { .compatible = "silabs,brd4001a" }, { .compatible = "silabs,brd8022a" }, { .compatible = "silabs,brd8023a" }, - { .compatible = "silabs,wfx-spi" }, { }, }; MODULE_DEVICE_TABLE(of, wfx_spi_of_match); diff --git a/drivers/staging/wfx/main.h b/drivers/staging/wfx/main.h index fcd26b24519e..68c665307153 100644 --- a/drivers/staging/wfx/main.h +++ b/drivers/staging/wfx/main.h @@ -23,7 +23,6 @@ struct wfx_platform_data { const char *file_fw; const char *file_pds; struct gpio_desc *gpio_wakeup; - bool reset_inverted; /* if true HIF D_out is sampled on the rising edge of the clock (intended to be used in * 50Mhz SDIO) */ 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: 12712482 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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; From patchwork Thu Jan 13 08:55:24 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: 12712483 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7F97C433F5 for ; Thu, 13 Jan 2022 08:59:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232361AbiAMI75 (ORCPT ); Thu, 13 Jan 2022 03:59:57 -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 S231576AbiAMI6l (ORCPT ); Thu, 13 Jan 2022 03:58:41 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HvJOz/IvskuhSKI5wiP3W84rWUYTEuBXWqjV0rlq+b0fuO+LwmcXBVIETMoa89UVsXD1Lq4slt3JIgeyGjaXbHh83+x22oKj0B7IF9/6zxLZlPJya4N5s8crMB7yh5a0qtnPY7OrjGpOYfnHi1bkq0p7FF3A7ucElDVNNrYi0kYUE5oHa3TIjMOWOVqOcWvZC921rhAlAASNaK2RjiRQP+PIW+cFQk77+/NRS8t5Y1gZf+qGP3Cup7vcFf0M5hxVFTTM/K9QgVS+q/fvoLEkWdrbf4MTYmPwwsvHiERBJoShxUUbDObnl/heCCViTc9rRqF5koP1zK7Fw8ja7ABqnA== 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=fga0Vvkv5TIpQBCpG1FdA+lj1LRtkHc3USzK+Erj9MM=; b=JNll201+HiMtb2Qjb7xFvpKKDPQ98igKBCtFpd+IGQQVpHH1iFGjp/oXsHrr496QJQCAxtCqx6vA+E/dawBoJMo4gw9rkIR7SIWEWXzxWXfwk8CICPFDnYYvr8buIDXuA+MzsrYG5UsvDES9s77BYCCLIzkqLbQgEs8alIaI11GmmsgSz0pf2Ar/K52PFG4SxfHTz98kjAWSFOxXuSIgN6NztrBnlvOEm2X1rze4FgeCCeT+Qruv7u+HAVW/COBr07nlcYeiyLurW+ESes22pXHdFzAg153Kyd2KmSH/RkV3/1jkFTaENm7MyjtcaIBjxNJH8XaKp1h7yxvlUKLJjw== 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=fga0Vvkv5TIpQBCpG1FdA+lj1LRtkHc3USzK+Erj9MM=; b=j8yP5Nbt5JtRqE7mxarj2ZbZacRIUpSvj9JJBYGGGM635YZNkuJ69lgsaISgDIVIXg46QIsyFdtqiYQsYXpramG++SlPJJoNdmSaVlpumC0KcmnO9ZNoiDcNEyS2mKCC9+UFzeplotzW/WIBPH31gAkeTipiTY+VvhXgnnEyUFY= 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: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:56: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 31/31] staging: wfx: do not probe the device if not in the DT Date: Thu, 13 Jan 2022 09:55:24 +0100 Message-Id: <20220113085524.1110708-32-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: fb830ddc-7db8-4aab-9199-08d9d6729d51 X-MS-TrafficTypeDiagnostic: CY4PR1101MB2071:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Oa86KHzRHUVMd5vYf3eJ7UNN0LIGlnJZu1dmJBl0RBu6Q6lBYXXXRhTXn396UjIIu9Txol823vA9mv4QXHkkGtbf6ZXnI3Vrd2Kq5v71AOfQ8XCHNqN/2IXNRRFszMxOBxaCR6IcecFGj44VwQP2eMsJMER7hwK/dKYRx39SwDtR7zxQKl9BsZcRJQEJb6Q+2LB3kqY/BGkEi8OMFcE0n2/zJGWhrfv/on25fEYFGiDSs2TeJOHLL2WgYrCs3l1OO/NVbKOZJYZFe55TZjQ12UCORyqMjNNuCM00W4VGymeqxvaqCx4ONx77H94WefDekIG2wTU7dE8SQZiF0/VFcxmdX4w5fVRAA4HroSRGruarJ5402LfczB6jLVHHuV5ucnW4pOJHaz+wPwd0hRegKF/LU/lWeCoOYOwXwDzU38JAurBN10a98X4rE2iVoOBRZ/4Ti2LNZEBYie7vBRajDgNb2QWm4t9l/Zt556Rz5Crc4lHJjFU4LjHzxyjVV7PEyNTVZ51gyMxfUMqqqMgkN44Lm3YiMZetAH6H8Z7rGmgqz9OzbOwnfKe0VRIL4K8cf9UU2xv+uHFKwN15I7U3dfrxbfsEzRDWFsOAHPjiQYrFi2vXE+MKldcKVjcNP+8WeLJV7T0oum5pu7cS6zndZQ== 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?S1wts/dhKWyWipP3Lxma2ZKUHH19?= =?utf-8?q?fdBOUNVXuQ6R6Sja6PH1XHbQlVkz6XBGZsP+2B/boIu39y83D8ZxWA8F85gvhVi4i?= =?utf-8?q?c8cayW7VIHCCIQ39poO+/Lz0sT4hCtYvj2nQSqQ6I7MZ9pTuUZHDn1Sg8/xUk1wNY?= =?utf-8?q?1iSoI1SfHzT2ZS52+V+PX518lmaNLit6CvSz25dnHTQwZq3urDig7M2fEfXqzGlb0?= =?utf-8?q?9kgFIYROSp43aPtDVapyBocFXgGITkZuM0f4Un6ZZ37rUJfg0k8WQ4VUWwSYI6Odx?= =?utf-8?q?sr83MA5i8cx/q7/8tqy8hIm65kjhPxSbGAkatZgc6iseAk4Aszw5V8MB09ZlJU9ij?= =?utf-8?q?nIQj+8jUAQ4YIKm3+w2r4oQNOabylXIjqeCGGClWPoNT1hRkSQ53iIbARnsl0SIUJ?= =?utf-8?q?sOQ8uwz8OR0TYEDQLiIaurdyny2m4WqAHtsAtVMQ/v5OpvZcDkQ95o/af7xSfUEmr?= =?utf-8?q?z2FtjeOE75hwVJTcPymKcSn1DuVNVQUjHD7pWobNH/aME0zQkMbrOIldeyETdqjUQ?= =?utf-8?q?p/5RIaFCZjCCIzdT5IZEIc8hm2qWGIgg7F3+mEG8xym2Bag5zGlRJQtQaFdFcPqoO?= =?utf-8?q?5xFJvAoT6LZlEapJcEd5ogQZUcxDgg8dmQyCKD8B+M5fSNLd4mwPR4g3fdGrhzgen?= =?utf-8?q?SoSv1Xutq4Z/NF9nBnzayyNC3uyNDDksgux+Ug8x78BI9nqnmdIJAi7rySvSDnt3J?= =?utf-8?q?8BgZ3lDqhvfr5d1JZABtpF36BPfgERC2MSTXoFRb2fjhWyspcG3zzrHD6F9kKaWdb?= =?utf-8?q?ImjxUDuOxFBuRqCM9G1AqU2zd7zQvd2XbHPmM29uU1KOMo4Tu9lzA2myNzcz27td/?= =?utf-8?q?Bn5Fbux/05sDvFqLYiw/Wq8vznHVjLstkXTLAhzBtZ97GB5ZYmCRDxl8vePUBBcD4?= =?utf-8?q?u08KUClCnfeE5DMIJPsiOlwAzsnpvY4ngpDOx01ZOLhLbyZ+WGxuGP9GY6y1VWXIv?= =?utf-8?q?Diw/ww3QZmgjTWAxm1w+65HnPQb0I2jIa+owOtJUi/kuLUzoNvmUGbAsBQixJOnd1?= =?utf-8?q?V5yNxTeLJB67txe1FERFkoBu7Ui69TYRH7GDvuJxyINexf8pvf1OWeDd2fHNpG0wt?= =?utf-8?q?MyuF1DcOk8AHxUOZt0qRlIFxkblwgxSebBlHN8wsNz9+Wmud0swHceA4FPZoi/r7h?= =?utf-8?q?N71fr64/W6WLrt+zDgTICF1Cb1r97WMSjpTkDWEgF/blUtNrLo/RqGPuKnumXoSPT?= =?utf-8?q?O3hFIHn20DSvtC1GjnOgBBiIfmmqJ81A1lgU2WsioW8HRxEr4dIVnEJJmPpNhoh9a?= =?utf-8?q?ogCDN8GPuYeM1UZbIOu7MAMxFryRTqra+FHcTZEWtEvkYuMO66jFqJN3JWEjRzV1Z?= =?utf-8?q?EYm3bEATJLIRQ59ZqAzdqcd4fkCXHtT+HZawX7AZmOJsq1z0vdOMfnninKTMAwzEt?= =?utf-8?q?p6/+3dJ1oPpzpGhGnGXRAv1OwEkTQRgvQiej1OY6rFY28uvtrn0UofmUaXp2rseJX?= =?utf-8?q?lamCF2O7xNj8KPIHcLtc9cQf55aUVRe4HiCI/JdaqFHivn09iVg6H8mpISOTjrewy?= =?utf-8?q?bwAB8qW/J4RBLUfBFiYSBAZdiJu4geg7N3RTASVPZ246cFtYqNZssw2uSj9ZrtGuf?= =?utf-8?q?KHZHxVOGnmst5l8IyJryKR8mACVg/5ondzP0a+59g+4IFmIw2Sxld4=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb830ddc-7db8-4aab-9199-08d9d6729d51 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:40.5651 (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: YmouS+2Rnsvloi6cmM6nnmNo4/2VlYItyjuJqE7lsWReGHHiRQyGzz+MrVd0N9aySwh7vNQUkJoJEqhPcZdLVQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2071 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Jérôme Pouiller Since the WF200 VID/PID are not reliable, it's recommended to declare it in the DT. Until now, if the device was not declared, the driver just printed a warning and continue. But, the risk of a collision is too high, the driver now returns an error. Signed-off-by: Jérôme Pouiller --- drivers/staging/wfx/Kconfig | 4 ++++ drivers/staging/wfx/bus_sdio.c | 21 ++++++--------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/drivers/staging/wfx/Kconfig b/drivers/staging/wfx/Kconfig index 01ea09cb9697..835a855409d8 100644 --- a/drivers/staging/wfx/Kconfig +++ b/drivers/staging/wfx/Kconfig @@ -7,3 +7,7 @@ config WFX help This is a driver for Silicons Labs WFxxx series (WF200 and further) chipsets. This chip can be found on SPI or SDIO buses. + + Silabs does not use a reliable SDIO vendor ID. So, to avoid conflicts, + the driver won't probe the device if it is not also declared in the + Device Tree. diff --git a/drivers/staging/wfx/bus_sdio.c b/drivers/staging/wfx/bus_sdio.c index 6ea573221ab1..bc3df85a05b6 100644 --- a/drivers/staging/wfx/bus_sdio.c +++ b/drivers/staging/wfx/bus_sdio.c @@ -204,24 +204,17 @@ static int wfx_sdio_probe(struct sdio_func *func, const struct sdio_device_id *i return -ENODEV; } + if (!pdata) { + dev_warn(&func->dev, "no compatible device found in DT\n"); + return -ENODEV; + } + bus = devm_kzalloc(&func->dev, sizeof(*bus), GFP_KERNEL); if (!bus) return -ENOMEM; - if (np) { - if (!of_match_node(wfx_sdio_of_match, np)) { - dev_warn(&func->dev, "no compatible device found in DT\n"); - return -ENODEV; - } - bus->of_irq = irq_of_parse_and_map(np, 0); - } else { - dev_warn(&func->dev, - "device is not declared in DT, features will be limited\n"); - /* FIXME: ignore VID/PID and only rely on device tree */ - // return -ENODEV; - } - bus->func = func; + bus->of_irq = irq_of_parse_and_map(np, 0); sdio_set_drvdata(func, bus); func->card->quirks |= MMC_QUIRK_LENIENT_FN0 | MMC_QUIRK_BLKSZ_FOR_BYTE_MODE | @@ -268,8 +261,6 @@ static void wfx_sdio_remove(struct sdio_func *func) #define SDIO_DEVICE_ID_SILABS_WF200 0x1000 static const struct sdio_device_id wfx_sdio_ids[] = { { SDIO_DEVICE(SDIO_VENDOR_ID_SILABS, SDIO_DEVICE_ID_SILABS_WF200) }, - /* FIXME: ignore VID/PID and only rely on device tree */ - // { SDIO_DEVICE(SDIO_ANY_ID, SDIO_ANY_ID) }, { }, }; MODULE_DEVICE_TABLE(sdio, wfx_sdio_ids);