From patchwork Fri Nov 22 20:52:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adham Abozaeid X-Patchwork-Id: 11258403 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3346F913 for ; Fri, 22 Nov 2019 20:52:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F1E112071B for ; Fri, 22 Nov 2019 20:52:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="M5BdCFej" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726747AbfKVUwH (ORCPT ); Fri, 22 Nov 2019 15:52:07 -0500 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:44168 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726526AbfKVUwG (ORCPT ); Fri, 22 Nov 2019 15:52:06 -0500 Received-SPF: Pass (esa2.microchip.iphmx.com: domain of Adham.Abozaeid@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa2.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="Adham.Abozaeid@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com -exists:%{i}.spf.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa2.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa2.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa2.microchip.iphmx.com; spf=Pass smtp.mailfrom=Adham.Abozaeid@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: OJOiQWufm5oLVMdxwsg7fzxHt0/XVWpDN25BUHFqli8htfi/PZklTYNkdOcIgmX9YvqLgqb8RW Je47UM3vIVMexaKSEnuDkwD4qTGKg8uQ2eieUNUSmlePS6pBcncxMVSh55NnOkkNve1P2nCfHv 6uP49lgLf3e/aT5Pwm2CWKDiYONW6rXbm6V2EorXluQWrBtXrAl6ohn5Zsc4RSR09ah8OxmzQT 2fEpz81B7235TT/jJlFF3T/TAidJYpUECU3cgKowjTDOxW75sNDPkkxhZGgv5frhbcyAd9EwpF k8I= X-IronPort-AV: E=Sophos;i="5.69,231,1571727600"; d="scan'208";a="57656079" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 22 Nov 2019 13:52:05 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 22 Nov 2019 13:52:05 -0700 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 22 Nov 2019 13:52:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y1yovavYnKV1hXO9HzsTk3Bjm9RMygZNNOqNddBYvlMBVDcbipxQbHTkUDsnKAJIzwIGTtiL2/eVvmEpEAe3Z+BWcTfE0Wd+jPKWi3mHjMi4fP2dVxyynnEQaJnN0gmmt16l3qPL5aZpbehwbPzRNSzXTFx4FDUdymVYBPKigQhTUPNkh9V83T89P3EXPIwPsMkaksHiahE3hyXfSv4FbIOsNg9+Tfdy7335cc25CVaxa25AMmUFppk4pJrngPngXCrzFs7M4GR332Wi9JULaVzNW5jJsjgVh1Yj/uIAvSdivaGQcBdaWTpiSXyZ7xZAnijw0dm4umaSFR90ICQk5g== 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-SenderADCheck; bh=XcQOXd6HZqhxdYx4Y0YG55oQIuketf/2I5Dz3iybv0Y=; b=gIXq6WG+cIVMM2yCIEBtgL/SglKvUC0Q/c8VEIFxMvHipyXg7QNngLkXRzA+8Gqn8OxkEmmaWa7MxTZfQm8dMlgXipfUu6ZhE/zgYVpsvWIonjR4jWcMl+mCvmDfsY9c/k8+6llaSjCwb0Jvp9bxwZdoNolJq1Rx2Ii49oJoGfllqKDI7GPAvoJjQwftQmmjyVQCNnLeBAQLY2Y5fDPdSkvOPPdkffe8jZHybb0oUq+m/T1KleFbN5mOGm8FcAZp7tyRcg47GpNDy+oUZuvaeVgVt41CdqG4DBlEl5ArTwcWJeSwI1l5w5XNhSExJT5w/Jhb43VcWveWwWFgthVTWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XcQOXd6HZqhxdYx4Y0YG55oQIuketf/2I5Dz3iybv0Y=; b=M5BdCFej02kSB+srW6ty8VJRf4KDXXIxQIYGwSMo5jMwaxuwX3L2cpLLHnVvzXuvoz6rpkGuesoWSn8Iv7kPsApRhVinhXM8fEFDExhhf544LsIiSMIWJ7GPis1A1ByAB9E2e1SAoRAlaN1rYuhXj73pdyFL1Kp19QyhOpTz64Y= Received: from MWHPR11MB1373.namprd11.prod.outlook.com (10.169.234.141) by MWHPR11MB1472.namprd11.prod.outlook.com (10.172.54.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.22; Fri, 22 Nov 2019 20:52:02 +0000 Received: from MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::fc6d:2ed:d470:fb56]) by MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::fc6d:2ed:d470:fb56%8]) with mapi id 15.20.2474.019; Fri, 22 Nov 2019 20:52:02 +0000 From: To: CC: , , , Subject: [PATCH 1/4] staging: wilc1000: use runtime configuration for sdio oob interrupt Thread-Topic: [PATCH 1/4] staging: wilc1000: use runtime configuration for sdio oob interrupt Thread-Index: AQHVoXawsACklCtDcEijfkbhUigNzg== Date: Fri, 22 Nov 2019 20:52:02 +0000 Message-ID: <20191122205153.30723-1-adham.abozaeid@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [198.175.253.81] x-clientproxiedby: BYAPR03CA0028.namprd03.prod.outlook.com (2603:10b6:a02:a8::41) To MWHPR11MB1373.namprd11.prod.outlook.com (2603:10b6:300:25::13) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5cdaa1e5-201c-4e81-afa5-08d76f8dd360 x-ms-traffictypediagnostic: MWHPR11MB1472: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-forefront-prvs: 02296943FF x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(396003)(136003)(346002)(366004)(376002)(189003)(199004)(316002)(66946007)(7736002)(8936002)(107886003)(81156014)(81166006)(186003)(66556008)(6486002)(26005)(66066001)(99286004)(6506007)(5640700003)(4326008)(6436002)(52116002)(71190400001)(71200400001)(1076003)(5660300002)(14454004)(6916009)(2501003)(102836004)(2906002)(386003)(6512007)(25786009)(54906003)(66446008)(50226002)(3846002)(36756003)(66476007)(256004)(64756008)(2351001)(2616005)(8676002)(6116002)(86362001)(478600001)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR11MB1472;H:MWHPR11MB1373.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: =?iso-8859-1?q?nJfcbuX00r8r6key/5BPkfSEOG?= =?iso-8859-1?q?klBPJAGYfl4tzIAX6LYh+ZEM2HMaUK4fL3TDwV8QX05U79bkSvy1iDaqqRha?= =?iso-8859-1?q?yzBs4bAqxVVQkMFpEcQA8al9FPE5Ow6WCHwYYENmCVoy38BwIdzTuck4iQ+Z?= =?iso-8859-1?q?hxYZU6zKWamjBUIp/+jWxOr3d0hGp44GQtWFLlMqSUrb8ZaxIAdVSPNDJsKQ?= =?iso-8859-1?q?DY/9O2DwRR3YyM+MSR8lx+IYPLikTE+ii+/PB/gjGfY79AScO2c8JwttzVXL?= =?iso-8859-1?q?jkDAheRWj0t9SufCuH6sRXS0qRRrBL9uxblIgmTpv8wruAAfoeOvGeBe2JB3?= =?iso-8859-1?q?ZDUl8Z8+mClmFiRlRizdkW0ZTf7IRHl1GA5aTTzFsDtUlxA8GCEFnFCUeSBL?= =?iso-8859-1?q?8QjMRXZb1qv9vrRzbQAJ00dEpyBtItJEk+fm60wQlkP+NVa/SZHFWY0pQjn7?= =?iso-8859-1?q?9L06PqweXtz8Qr5fCtyFQgFefEHzvRSTbDEb4/2ZGzmg3H0nID0V2j82tIzS?= =?iso-8859-1?q?dmakAaja96qAMxkTZplVxlTlGHnc60ZKGXNpflX2eoWxW+0AnNlQe7V3t/TB?= =?iso-8859-1?q?OkSFiWHD43exa+V8FQ8qoSQlA8ktonfnTu3JGD7YB8M8rTQBnCHDBFg8CJiS?= =?iso-8859-1?q?LTY9y1uN7kec/4ENH9RxxIcl2d+d+5IRMLri+jMhBVVf71lLLbX9FOhXhqSU?= =?iso-8859-1?q?HlbhcHJ6J5a+Gyr6b0E4kvFd3OqWUHQkzUB8/6GRfsD4K5YUEebZt/0HrDAM?= =?iso-8859-1?q?iWgc7t3hOQnmq89srGBNr/OXlrUkRpvhsSAQxg/scN5Kw7z+jstYJhgtxxk/?= =?iso-8859-1?q?hUZoBJXDT0if/eTyF+Ny+qizWyPB++L5gCme2bVCOBqnUc1vxRZ6u5lze79p?= =?iso-8859-1?q?RWvYpPsdJd2HvPMsesT269AqX5jgNPoUD21WmBCVH4Qh7IDxhiw4CIp4Z0rC?= =?iso-8859-1?q?sYVi/JkTqukXmW+V73z14jRfrg1g3GlKOqQ7FCuzYHi1wevm83n4edwY0RXD?= =?iso-8859-1?q?35WSYsY9+QGhuWqdAt6LEXxuirmBHmtykamcrBKcJ4UpuwmL5hVaGTZkNTds?= =?iso-8859-1?q?dJ+nE6lcXwUY2oGu0sGHM4lXPtjypvytHIxnzkQvXKcJ++iC8AP/ujEaVXlP?= =?iso-8859-1?q?XZzefuPKt7wnr4WpmsRsqFXxaN4b3jAwW4e7Ousy8ZEhy6dqyHUy74S6VcSM?= =?iso-8859-1?q?9+ctpLGWeRg9xzyB5tySWZr5f6PlWEWw3ytjc4nJFuhCrOVm4zqjzSlS37eN?= =?iso-8859-1?q?8MZSuHPsyzoQzErNLeLOYkd1qgMuTwXb5cQtIC9k79CeRCfDQFj57n38DnI4?= =?iso-8859-1?q?2vvoXSbdZVVFaj4A6iYSYA0GYcj82zo9lGQ537W9j1bYcta2mH9xbIZsIkxx?= =?iso-8859-1?q?T5xZjgez5MHFYaU8kqYpUDnX39WI6Qd91C5zP2rx76M0sFwKG4eluXVulkmC?= =?iso-8859-1?q?EoWq0nyZpt4eh3A17ckuqhQhCHrBeD6bP7hI4rD5aX8K0XlT1kOMeMyLp3BH?= =?iso-8859-1?q?A0chiz8xa/7OwxEZO//q+3j6SEDQeoNytl3MjefBzrnTYDuGUCOb8xDJb2Ya?= =?iso-8859-1?q?32uZ8yobUP4fqaB+Y6imXtiJKukjaVHMINQRILOx9rhvsATehyDfZsQAuGcC?= =?iso-8859-1?q?x3v+qUWsr9YaYwPg/TJfRQl8QjC3MLv7t9+u73Isspn2SAI8pOp+2m7M7MMD?= =?iso-8859-1?q?Ps4bDcuV2YkSyzOTgJNiEGlxF0AIO3Kl2nFJ91GA=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 5cdaa1e5-201c-4e81-afa5-08d76f8dd360 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2019 20:52:02.5994 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3oPdIokbQpXdozG2bOzoeAPor1aDgHX0PYHl6hQPCadNFbk0E+5aNosgzCkFqf8ObEVZybk6GElldVlOvGvw9Xshn3v3YsxZfxfSCCqyC78= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1472 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ajay Singh Set SDIO Out-of-band interrupt configuration at run time by passing parameter during module load. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/Kconfig | 10 ---------- drivers/staging/wilc1000/sdio.c | 7 ++++++- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/staging/wilc1000/Kconfig b/drivers/staging/wilc1000/Kconfig index 59e58550d139..e556d3c9039b 100644 --- a/drivers/staging/wilc1000/Kconfig +++ b/drivers/staging/wilc1000/Kconfig @@ -30,13 +30,3 @@ config WILC1000_SPI full-duplex slave synchronous serial interface that is available immediately following reset when pin 9 (SDIO_SPI_CFG) is tied to VDDIO. Select this if your platform is using the SPI bus. - -config WILC1000_HW_OOB_INTR - bool "WILC1000 out of band interrupt" - depends on WILC1000_SDIO - help - This option enables out-of-band interrupt support for the WILC1000 - chipset. This OOB interrupt is intended to provide a faster interrupt - mechanism for SDIO host controllers that don't support SDIO interrupt. - Select this option If the SDIO host controller in your platform - doesn't support SDIO time devision interrupt. diff --git a/drivers/staging/wilc1000/sdio.c b/drivers/staging/wilc1000/sdio.c index 319e039380b0..098094ab5156 100644 --- a/drivers/staging/wilc1000/sdio.c +++ b/drivers/staging/wilc1000/sdio.c @@ -11,6 +11,11 @@ #include "netdev.h" #include "cfg80211.h" +static bool enable_oob_interrupt; +module_param(enable_oob_interrupt, bool, 0644); +MODULE_PARM_DESC(enable_oob_interrupt, + "enables sdio out-of-band interrupt support"); + #define SDIO_MODALIAS "wilc1000_sdio" #define SDIO_VENDOR_ID_WILC 0x0296 @@ -131,7 +136,7 @@ static int wilc_sdio_probe(struct sdio_func *func, if (!sdio_priv) return -ENOMEM; - if (IS_ENABLED(CONFIG_WILC1000_HW_OOB_INTR)) { + if (enable_oob_interrupt) { gpio = gpiod_get(&func->dev, "irq", GPIOD_IN); if (IS_ERR(gpio)) { /* get the GPIO descriptor from hardcode GPIO number */ From patchwork Fri Nov 22 20:52:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adham Abozaeid X-Patchwork-Id: 11258407 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0936E913 for ; Fri, 22 Nov 2019 20:52:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D3E442071B for ; Fri, 22 Nov 2019 20:52:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="XJtsaUO0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727088AbfKVUwJ (ORCPT ); Fri, 22 Nov 2019 15:52:09 -0500 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:44168 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726546AbfKVUwI (ORCPT ); Fri, 22 Nov 2019 15:52:08 -0500 Received-SPF: Pass (esa2.microchip.iphmx.com: domain of Adham.Abozaeid@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa2.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="Adham.Abozaeid@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com -exists:%{i}.spf.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa2.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa2.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa2.microchip.iphmx.com; spf=Pass smtp.mailfrom=Adham.Abozaeid@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: F7mSMRb62Rq3eUjw7T5HQkEOL/RT1rpoIKeWxDbF29tHkvb/Tfd+jl79VAfbWjyUrjV2cF2KFd QXurxTfLscefQe91agjYzsDjPesd/RnI1pCrlL6rbbbEb3GZYKbqsCjdyrMz+SYfKTTTjoUCKw uMtUcGqLtXT1X8xc+sVYCa4Jc2OOs4tZnnmZmJEDX/XREb4DKzOgLKPDegiYyanux2M9lSvK6e GWZtG7C/+/lBYCyF+BHlpNNAu9HOoDpqhDqeQKn/LX9a3HXNDl+7kQWLrNd5bul81I30vWIYg8 Gio= X-IronPort-AV: E=Sophos;i="5.69,231,1571727600"; d="scan'208";a="57656081" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 22 Nov 2019 13:52:06 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 22 Nov 2019 13:52:05 -0700 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 22 Nov 2019 13:52:05 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cyaBF41HQRdX9Qip+ZCECGNR8OSwRKXDVEKgNBVbI4tMTTseLhPzaPgYR3dLzyzBV8cqz3SywDtjZS3FAoxyE2Ve/LdgPe/QpqWZKpJPLx/8pHMzXf09zCMkcajqFe/mSKa0XlrifUdckcqv5IRCNOpRTgWvMwZHiZEAVp+MhUscDu5AEfbSCOuV/92ET+cIWV8G8fdUuOOq1JVxfZzcJd6UKYvt1HSEbysbKgXzT+bUcZ2i8U2704eapl5FPAnyHlxTyT9n4WSy6Up2CvcLqw7DYPXuDEKbHLkr90nDtDF3OdP3eQ6gGcQfwnE49SwLUVsSZLeUbnjINGIzSyiuaQ== 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-SenderADCheck; bh=M8l9OOnlkaNKKKbZaHBKEbZ+g4S73lTXxxpFOJ7dkA8=; b=L4+xhCJFap9fmwVrEOlppCq8uuJC5i2NcFOIxrDH0haP/bn4UWGUHPEX9fLZBh0cBvShVKqVMNrKeAFHzjH93T2H/Qi69GpyQyR+fHEkYsYYMVyldWJ+0mEpA5qDkN0veE99QNWqoKiYWymLF5BicDWFthcB7hAYvOZKQZXSyVI00oOsvQl7E1VUygK8qN59DKO5rJ+ds8dE0UsgSlScwaqQvKgnvPgG4DCfJfuanYs0FK8RfNrGb8VHtHhDWtOyKkue+RHL2w83LOTMCSRxto3j5sV+bm9SYboxM6YcSLGbza647zdIufw94g+uYCzjv1X33UqRTsXTpVjcsswNhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M8l9OOnlkaNKKKbZaHBKEbZ+g4S73lTXxxpFOJ7dkA8=; b=XJtsaUO0lTHKZ/ycYdjkIzTila7Dw3isow8SRbhvQKhNAnvSh2T/nzDLUgPu9S7NEoztQsolHcHhWUcg2faJ4L1lcVH04QOAO94mld1dKJ55zWD6dFreodPwnjCDrwYV8epxNE5i4wBylFzXz1Uq8jg4xZC7qmCeJ4/sHXh8xM0= Received: from MWHPR11MB1373.namprd11.prod.outlook.com (10.169.234.141) by MWHPR11MB1472.namprd11.prod.outlook.com (10.172.54.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.22; Fri, 22 Nov 2019 20:52:03 +0000 Received: from MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::fc6d:2ed:d470:fb56]) by MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::fc6d:2ed:d470:fb56%8]) with mapi id 15.20.2474.019; Fri, 22 Nov 2019 20:52:03 +0000 From: To: CC: , , , Subject: [PATCH 2/4] staging: wilc1000: remove unused compile time featurization Thread-Topic: [PATCH 2/4] staging: wilc1000: remove unused compile time featurization Thread-Index: AQHVoXaxgl+u+j+wVUmgsItc7XtH1w== Date: Fri, 22 Nov 2019 20:52:03 +0000 Message-ID: <20191122205153.30723-2-adham.abozaeid@microchip.com> References: <20191122205153.30723-1-adham.abozaeid@microchip.com> In-Reply-To: <20191122205153.30723-1-adham.abozaeid@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [198.175.253.81] x-clientproxiedby: BYAPR03CA0028.namprd03.prod.outlook.com (2603:10b6:a02:a8::41) To MWHPR11MB1373.namprd11.prod.outlook.com (2603:10b6:300:25::13) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 80091b0c-16a9-43f5-69f5-08d76f8dd3d8 x-ms-traffictypediagnostic: MWHPR11MB1472: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2000; x-forefront-prvs: 02296943FF x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(396003)(136003)(346002)(366004)(376002)(189003)(199004)(316002)(66946007)(7736002)(8936002)(107886003)(81156014)(81166006)(186003)(66556008)(6486002)(26005)(66066001)(99286004)(6506007)(76176011)(5640700003)(4326008)(6436002)(52116002)(71190400001)(71200400001)(1076003)(5660300002)(14454004)(6916009)(11346002)(2501003)(102836004)(2906002)(386003)(6512007)(446003)(25786009)(54906003)(66446008)(50226002)(3846002)(36756003)(66476007)(256004)(64756008)(2351001)(2616005)(8676002)(6116002)(86362001)(478600001)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR11MB1472;H:MWHPR11MB1373.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: =?iso-8859-1?q?q6VMaHa0xt0gZ7+cJvPQLu1v7B?= =?iso-8859-1?q?R9g2Hh0kiMgE2+DSx3vKIypx77n2G7Y37+bRV1BD0AJS5kUzU8sbiO5lM3Rh?= =?iso-8859-1?q?wg6zEqNqnlV1tOWQGkZfAykNkauK/CYlnLahB7j5MGJYcUHze9b/MT3yVuMY?= =?iso-8859-1?q?D7jZCdWcBbslaPCmDbb/XCQlB9WKwMIB5EqZe0lzoQzg5AUyN/M/EJgq7PRC?= =?iso-8859-1?q?7UXTr7TTGKmjf8uhr9M1JPYzjn6piJFJrq5Hsa/hYBHUH5pRDvD8n2ftnJGl?= =?iso-8859-1?q?g9vMeAYjetDGromzfKRZcZOAsOOz8YCRjJBgLTcZiOnyBe7CsCzedopKKh9I?= =?iso-8859-1?q?AGVbArGtD/DbM0nPNN/wqoFghmggYc3ufJ86xwXITmgn67AdxD9Za6H/qESF?= =?iso-8859-1?q?+6vYDg9juyEHzBGhVHH7JPxKOLY13PwLAGAEfSHvH+ZYy4db8dHMnz+ExYFP?= =?iso-8859-1?q?O57JgxsN9mHrVhCeuA8kGVb3aSfpVh4bTLExI9YQ2YAXMhE9rH+kt8IgPi4i?= =?iso-8859-1?q?9I9c/p95ay/UhLjRLMnGSNRD5KhCUk4nDo0iPUUBIC6fQ7F++xOYn4oxhjJ5?= =?iso-8859-1?q?Ta3ISJ6Cp6/Gjv0i+PZ9C530gQnxjwMssV2Xh+XgZrirU05jGjzvVJBO1op6?= =?iso-8859-1?q?2Dt9lWqwGUOBsJ0RLOaOpjqgqoQzNgf3paT6zIwInkJvfaKDl6vNnOZ5OWJn?= =?iso-8859-1?q?D3tW9n+KDYaZUglWQ4ptl7hG1w7TUuqEI4tc/ucYz84ti63IP8hemdGZXW9c?= =?iso-8859-1?q?epcB/sAx0oQCNgq4uHS1focVxhHoiWaoYb5Db3/TLfjzYPlCmmi7EZQn2KQU?= =?iso-8859-1?q?5qDDwgjMIZARF/uvKJRnqLLu6V8wV6Th7rZ/GW7xGLkFbRzJTaL1SNPILu+D?= =?iso-8859-1?q?pp+1kEOgEklo5DTFv36MR9Fl/PLZ1eomUFMIGKvCSD+uTBBLTu3AAl2O5Z8s?= =?iso-8859-1?q?VIyxzCuX4uJFZPXMG0AgKFB7R/pLogHdBmYiSQNUvAbREQ//pOwcVQdIfnG/?= =?iso-8859-1?q?kqIJ78+C24LlZm6QqZi5IsqCkqfzCqU+1j5DcalZ5pRBEZ2SlSa2uofW+fBc?= =?iso-8859-1?q?GlIuozQVKr6g9F7sgu8+6p+dsdZIEJHuM6HZ7iTrakZ4MF9889JCAYN7+WWM?= =?iso-8859-1?q?sT6G1XpBq1E7mrFrAd6KpRCw7ab2LxOmip6eojgccoAl6fK7xqPooZwN9WYA?= =?iso-8859-1?q?P2ZnMNBquD0gQyS2K8klpQPNthR+sku+59sKzdqMTNeCiAwc+qsz3LOUmkID?= =?iso-8859-1?q?H0PL5ATgS9PkYpZVPCT1lLl7V2orhtcG6az2F52Czpe85/BqSx5DD3cSu9dI?= =?iso-8859-1?q?K6rwduBqoP12qprO9xGy5KyhpoEMgLnN+kztzko/kH0zT2Va+eap4K1eeT9v?= =?iso-8859-1?q?aymmU2ZQ1v892Q3s5mTojLwpZ2gcR8hzSJtihI/E7kwe5koxTN7Ax8Mx6JPQ?= =?iso-8859-1?q?m7+/51Kbc3V0Kx0TA7G1CN/pCZadep024RELlSLmd39svXOVbCACSkeuh+5n?= =?iso-8859-1?q?zDXuGyv/PWgYSkRVTRj/cAmdqI+2XakPYfI5DlvSwu97GlvYAfMW9v27mAb6?= =?iso-8859-1?q?wpvFkaCHsT//MHTlENRHd+QjS5lrSoMTnqNfrWgbPI6qaOAjqJrBwyk5RQ1s?= =?iso-8859-1?q?/1wYnd8TYTm2B3xYmWyn7BgPQx9+Nda8ps11BfyNRijHC+pIenX6cjPa7Vc8?= =?iso-8859-1?q?1oW3hL0yAf5baPPBBoPSVF8UHf13bBEldxga0ozJBW/UU3DlqY/QWzYngkZW?= =?iso-8859-1?q?eFBRDvWVBp1S/QRwNNXfkquUzJki5KZkxJ3pc9LhNwFg=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 80091b0c-16a9-43f5-69f5-08d76f8dd3d8 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2019 20:52:03.4230 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Ut1Ju4pyCIzvXcSLGjeQBKCgSFsGrouKZaM/vt4/T4jSFhaHMEIIbRvunjzT/BTqpvm9+dWfiyIYKofNhQT5pnOzGBVTrHKCe7X5X1bkJrw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1472 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ajay Singh Removed the unused compile type featurization. It's not recommended to have compile type feature. Currently removing these defines as they are not used. If any of these parameters are needed later should be added using run time feature. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wlan.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/drivers/staging/wilc1000/wlan.c b/drivers/staging/wilc1000/wlan.c index d3de76126b78..ba5446724c93 100644 --- a/drivers/staging/wilc1000/wlan.c +++ b/drivers/staging/wilc1000/wlan.c @@ -890,29 +890,6 @@ int wilc_wlan_start(struct wilc *wilc) if (wilc->io_type == WILC_HIF_SDIO && wilc->dev_irq_num) reg |= WILC_HAVE_SDIO_IRQ_GPIO; -#ifdef WILC_DISABLE_PMU -#else - reg |= WILC_HAVE_USE_PMU; -#endif - -#ifdef WILC_SLEEP_CLK_SRC_XO - reg |= WILC_HAVE_SLEEP_CLK_SRC_XO; -#elif defined WILC_SLEEP_CLK_SRC_RTC - reg |= WILC_HAVE_SLEEP_CLK_SRC_RTC; -#endif - -#ifdef WILC_EXT_PA_INV_TX_RX - reg |= WILC_HAVE_EXT_PA_INV_TX_RX; -#endif - reg |= WILC_HAVE_USE_IRQ_AS_HOST_WAKE; - reg |= WILC_HAVE_LEGACY_RF_SETTINGS; -#ifdef XTAL_24 - reg |= WILC_HAVE_XTAL_24; -#endif -#ifdef DISABLE_WILC_UART - reg |= WILC_HAVE_DISABLE_WILC_UART; -#endif - ret = wilc->hif_func->hif_write_reg(wilc, WILC_GP_REG_1, reg); if (!ret) { release_bus(wilc, WILC_BUS_RELEASE_ONLY); From patchwork Fri Nov 22 20:52:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adham Abozaeid X-Patchwork-Id: 11258405 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 29096913 for ; Fri, 22 Nov 2019 20:52:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F376E2071B for ; Fri, 22 Nov 2019 20:52:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="DQFUxwD4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726895AbfKVUwI (ORCPT ); Fri, 22 Nov 2019 15:52:08 -0500 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:44174 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726526AbfKVUwI (ORCPT ); Fri, 22 Nov 2019 15:52:08 -0500 Received-SPF: Pass (esa2.microchip.iphmx.com: domain of Adham.Abozaeid@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa2.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="Adham.Abozaeid@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com -exists:%{i}.spf.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa2.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa2.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa2.microchip.iphmx.com; spf=Pass smtp.mailfrom=Adham.Abozaeid@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: ooSAMffm9sF5B6IsTSTfA2fcPSR6aAhoxAxpqDZNwVVKaGdkPQijN2NlKf7HirFnL7uYv9aoZ0 TILchSW4SdzT8m6u8warF/77IFM+NkWDRNG/PnMyx8JAWRL9KQwqjjgf5ye0I0FmM5fikB8TIU 4JqZ4slbSoL9ynUSFdllCkeNzQhwE73a0i/8iG39hNf0ZTIBKIAvn8Tyyo7xeECjYN62ZFsdWw KC6qA4B4UbX7o1z/W9uTYI09o6GFJ4d8wl0DoAZ9IgVxB3jxFCqeDyg6E1/JlB48sK9hfNHnQv WwM= X-IronPort-AV: E=Sophos;i="5.69,231,1571727600"; d="scan'208";a="57656084" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 22 Nov 2019 13:52:06 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 22 Nov 2019 13:52:06 -0700 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 22 Nov 2019 13:52:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=crseTMf8+iqIMiocaab22oH3pLuFdSXNm4V7bpaDiLQedxj/G7ONhotOJmKzViG8knGgczmaOIxtwSabVnKB3Dl+2mARR8wIxtITvo0rKqBf97V6tjNaD2JI8P+MroyRf+wH4DyPAx+mqcWII6YKhZXp41K3/+lSXA4sU6yhqGLYlY+LTRMbk3Nxz32jh2ipkuVXH0ynpVqugHHf+QRocuOYMygiuuHan5/xRi8CXXxukjfpfdV7oB8E+rSA1QiroMyKmFXtu4Ob42FBCkVFIOcegrayeecNmertuUVeC/rVb3tAi0s6JfvBMZb8y5xTb4s6S2PNHetb6g4ogW86Lw== 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-SenderADCheck; bh=0j1ylFJs6JeAokkedwwu5FNaVN8NDtBAV57EQuWuIkQ=; b=iH4zIILLx/2+U5qpTfe9QX/pktI/+XU0GznOYq9dkM5N3/ZJb0uUniJ6h9S72pUvfj9JPOMy3caebfBqNowsDVxYXQ/IOZXD+zxZXQMtGM+EUcoG8tMNM61LNC1Ug0Czw73BMHQqbD/kThV88Osaa9LfhQ1g21umE8+OCmaaXLDoH3wvDJokJsHCyqB2DJshKrgUd5/jyFFr4ylFOw9+P39U8OsQToINIMKij2ysO+FaGQ7NDp+xJXYJfvZtSd6ay6nk0drTQ6aWsXriyYxhN4HpdWFHe9zR/QF1h3BI3pEUKQPfcFAUuZ8dEsyeHC0ib/l6eWfdF+JMkI6vWA9uSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0j1ylFJs6JeAokkedwwu5FNaVN8NDtBAV57EQuWuIkQ=; b=DQFUxwD4ZlTD00SmcEQxtu/0OpMFIg3A5dhTa+CaW7YO/cItGaxB5Z6EpSdAw8C0K1aNL/jfx6OuKFG0hkVTeGGMDPT0XhA5dUegdcYKHj5o+WKNdceKygLqoqaO3fKU9fU8wJYaEQFaZ0qlnLSQ2MWrqn72A2RGh9l6/Dp10qc= Received: from MWHPR11MB1373.namprd11.prod.outlook.com (10.169.234.141) by MWHPR11MB1472.namprd11.prod.outlook.com (10.172.54.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.22; Fri, 22 Nov 2019 20:52:05 +0000 Received: from MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::fc6d:2ed:d470:fb56]) by MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::fc6d:2ed:d470:fb56%8]) with mapi id 15.20.2474.019; Fri, 22 Nov 2019 20:52:05 +0000 From: To: CC: , , , Subject: [PATCH 3/4] staging: wilc1000: use kernel provided struct cast to extract mac header Thread-Topic: [PATCH 3/4] staging: wilc1000: use kernel provided struct cast to extract mac header Thread-Index: AQHVoXayqAQs7Rt5U0akHYwi3cg+sg== Date: Fri, 22 Nov 2019 20:52:04 +0000 Message-ID: <20191122205153.30723-3-adham.abozaeid@microchip.com> References: <20191122205153.30723-1-adham.abozaeid@microchip.com> In-Reply-To: <20191122205153.30723-1-adham.abozaeid@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [198.175.253.81] x-clientproxiedby: BYAPR03CA0028.namprd03.prod.outlook.com (2603:10b6:a02:a8::41) To MWHPR11MB1373.namprd11.prod.outlook.com (2603:10b6:300:25::13) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 78c4717b-a183-404f-ca98-08d76f8dd49b x-ms-traffictypediagnostic: MWHPR11MB1472: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3173; x-forefront-prvs: 02296943FF x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(396003)(136003)(346002)(366004)(376002)(189003)(199004)(316002)(66946007)(7736002)(8936002)(107886003)(81156014)(81166006)(186003)(66556008)(6486002)(26005)(66066001)(99286004)(6506007)(76176011)(5640700003)(4326008)(6436002)(52116002)(71190400001)(71200400001)(1076003)(5660300002)(14454004)(6916009)(11346002)(2501003)(102836004)(2906002)(386003)(6512007)(446003)(25786009)(54906003)(66446008)(50226002)(3846002)(36756003)(66476007)(256004)(64756008)(2351001)(2616005)(8676002)(6116002)(86362001)(478600001)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR11MB1472;H:MWHPR11MB1373.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: =?iso-8859-1?q?kmE8jhnWdM0I+DYIdf6gTbcbag?= =?iso-8859-1?q?9VteR428UTXW74wqjZomRWpFmGUhSlF7VSYgzSahQdWjtx3xOH2TK8AGZvmG?= =?iso-8859-1?q?As/whEAKNjHzornlOdSRlQ/hlK9WULicUEGHWD2A6RtgeeOpxfj0JCllqIbb?= =?iso-8859-1?q?qTv3vY6ZtTcjuCsps0C/YcbCL4Qm+QUVvDjz+GNd0Hd+FY7GI7/lWH5bAtyF?= =?iso-8859-1?q?17Bm0wNbZrrvuvmGPDmlVjREYTIa5VsmYWJnlq9IV6hv1p32BbsfB/yXURpx?= =?iso-8859-1?q?ys/dW12FKyGIjA5QTmJ7uoGI9Pe6cvImKdwVpQcGy05qeW4nRkcsxlvHF2Xh?= =?iso-8859-1?q?2nDA8Lx8hlep6pZAXZkd9tzjBzhVRjisWdj1NrGA8tjFAWlshQgJRT+iZnfW?= =?iso-8859-1?q?sH6G8kOWNlWcDZhNckaytaGsdn9k5z7H0dO8LbTEkVxMoA0ssyEzh8aT/f3K?= =?iso-8859-1?q?nWBXTRhD/X4T3ossOa2sKHYMgMiZvXKAQaEa/Dw5eeaenmSFf5BZtaD3h+Sw?= =?iso-8859-1?q?HDjYs+8WfevRZ1LJl5ntdAqXyBmComsbaYAh4wVQ4J9xN4PsQjvBDyNMYOav?= =?iso-8859-1?q?TvXsxwXUUPcQilNOCwb91Wnbk0X5sF+kMRzHEct0sp0DBcViq4X0G1kKnjgy?= =?iso-8859-1?q?+TUZfFZu8O6btkCgvC2rJ1uMj+lM3D93pL26Tk4VvxfpNst8YIFYAM9mfCqt?= =?iso-8859-1?q?oTazE8qJmgL3nkewWKvLGN21W64liEh3/P7EwoEe44qykyPkLy7ZwvtCXRUK?= =?iso-8859-1?q?MoWp59iHb8+LyBFwKRLkgDL0Qg8DeXzxlNx+kbNvMPBJN+b703kRBdsyisaj?= =?iso-8859-1?q?59xb6uy1rbUMKDd0ecwCHkMtIPLn5dUvkEciyDGakBhbFXI/9PtJXrT13Rp2?= =?iso-8859-1?q?BXkYwofe5U1AMSPXPzjzgm8/V4WAD05t+M9uzHL6qzQiKq6Vl5fvZ8VBAjHw?= =?iso-8859-1?q?xh4hvKKV1ZCVnPXaepau6eooDZGeImfQNZIHKiAKtgIT701W82/coArW9DCO?= =?iso-8859-1?q?iq61fjKT9w8cRRzU74crLbR1gDV21LW4hMuo0ESxfdolLjG7jgofe6qyvnJg?= =?iso-8859-1?q?vgIHkohduwnBwOPHH+gnEIDtxQt89/ySbhR/ymXsV6laxYJPsrEEcDZGQORx?= =?iso-8859-1?q?NCjB9asdOI8rJSxUxSlo7o4L5AUkO6UmCmp30crGP2JcU58xJm9KAF93vutM?= =?iso-8859-1?q?Iru1uciW1eRyLdDpbYhGXi0efHkvWmnOgGRoXa4Cq4vN5NKahTzI6R+3/fIv?= =?iso-8859-1?q?PKmmieUmXeBCDGg7mV42YPKqqLemBcvtPymTG/QLT1yTba8dXJxX/a6ZbUUG?= =?iso-8859-1?q?8Smu8mte2Kw8CQWLFDyKbG0OTJtYpWqH1gqTcpArojM6zQ3I4VEBekQ42/a0?= =?iso-8859-1?q?GsUZkHMRrjH43jJR7CD6z+Cpi/+t/p0S0638H6YKvpq7MemAn++/LDl2AE8S?= =?iso-8859-1?q?Rw1QBtv7tZUYFuB3AtkYKX7G3mwynBJy7TTerw0akvv8Vzaf3Fmuew0isIFN?= =?iso-8859-1?q?5TlX6GoqYhOg6QctMnvAC+Top/ttFUppYRazoS/sUgs6vRhKy/RgOVZbxKDE?= =?iso-8859-1?q?9d+f2jIMdNnbnsf6k8A4AaA90BSlPvh6aKKQB6wytxlrqlYsrcUmXUaUDyT5?= =?iso-8859-1?q?einYwoiaV5DKmaGfO+vlscocbQq8tTJZbd0KnW2Wiuzu2pI/7ilN6vpWQOGe?= =?iso-8859-1?q?hV26H351BpetqtuqLahxLY9c3CCaJdDn6Tk9QS+heiKFAaMxNWDU83VnTzJH?= =?iso-8859-1?q?Ds21SK2Q/4crzHGceBj1YyCkwtRELu//842F+LO7JZMA=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 78c4717b-a183-404f-ca98-08d76f8dd49b X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2019 20:52:04.6645 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VnbM+dzgnuxB/6CS0vWbRwe34qrd/SXzLp6EmCNt3GrlmhDjw6+lJ15k9WRblmduiZ+Gdyj09lwZ3kmuR56tNO7P/mL2D2hMdc+FrKMv8ls= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1472 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ajay Singh To parse the mac header make use of *struct ieee80211_hdr* instead of extracting individual fields separately using pointer operation. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/netdev.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/netdev.c b/drivers/staging/wilc1000/netdev.c index d2c0b0f7cf63..3fd8e008f733 100644 --- a/drivers/staging/wilc1000/netdev.c +++ b/drivers/staging/wilc1000/netdev.c @@ -96,21 +96,18 @@ void wilc_mac_indicate(struct wilc *wilc) static struct net_device *get_if_handler(struct wilc *wilc, u8 *mac_header) { - u8 *bssid, *bssid1; struct net_device *ndev = NULL; struct wilc_vif *vif; - - bssid = mac_header + 10; - bssid1 = mac_header + 4; + struct ieee80211_hdr *h = (struct ieee80211_hdr *)mac_header; list_for_each_entry_rcu(vif, &wilc->vif_list, list) { if (vif->mode == WILC_STATION_MODE) - if (ether_addr_equal_unaligned(bssid, vif->bssid)) { + if (ether_addr_equal_unaligned(h->addr2, vif->bssid)) { ndev = vif->ndev; goto out; } if (vif->mode == WILC_AP_MODE) - if (ether_addr_equal_unaligned(bssid1, vif->bssid)) { + if (ether_addr_equal_unaligned(h->addr1, vif->bssid)) { ndev = vif->ndev; goto out; } From patchwork Fri Nov 22 20:52:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adham Abozaeid X-Patchwork-Id: 11258409 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1D47D14C0 for ; Fri, 22 Nov 2019 20:52:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E8CEC2071B for ; Fri, 22 Nov 2019 20:52:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="LUc1tTrI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727096AbfKVUwK (ORCPT ); Fri, 22 Nov 2019 15:52:10 -0500 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:39603 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726526AbfKVUwJ (ORCPT ); Fri, 22 Nov 2019 15:52:09 -0500 Received-SPF: Pass (esa4.microchip.iphmx.com: domain of Adham.Abozaeid@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa4.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="Adham.Abozaeid@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com -exists:%{i}.spf.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa4.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa4.microchip.iphmx.com; envelope-from="Adham.Abozaeid@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa4.microchip.iphmx.com; spf=Pass smtp.mailfrom=Adham.Abozaeid@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: 2VsuERo88KvkSTiznPcmZxmLeiUpZXgTLDr68AqqV06oGz8D3tpgpWEt4kwDUcvSE1N7785QjH ahAP11HF4gbfOnm6dfDfqxiJUeYLRUf4AqcJSrIK1NB/JAqNDJjLew57rFysd8Caa37Vor2/lj u6me/SaCmlQ7SLRIzWwszTR2Y28h+QCYZKDwkvqoeWtwnxTIa2IwvaK5+dHa4EsT/BoVyXdk6w yKsbvE8J05Ef/gm/cFGyXeTcmbtdwXfTwqvQg4ar2F4o5ekHjJ14WpYCZvHXb37cIQeITRp6EY 4r0= X-IronPort-AV: E=Sophos;i="5.69,231,1571727600"; d="scan'208";a="56399344" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 22 Nov 2019 13:52:08 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 22 Nov 2019 13:52:07 -0700 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 22 Nov 2019 13:52:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bzhWYtL3BSIkHkwUI2UJwblh20zLkVaiycJf55dptNtQTAgUttN5paF9QsVslCmjkfxgxskSGUF8rlEZoxdDGiuub3HC5m8FqC31szpwFRqLwtOH/iquklOHobvdvZih6GbXdIT3RMAaWp9TxUnYfgPz/XBeAfl0rH8k6kFFuavN/jQUC3yMKSC3e7CKBOfPVre5QcwGlGhfIMeO+HS/AOoFVMEniwcxFI9QeDYpF7fq1Ph1SnkuMJPc6Pzh1UsEr6W+aCUvH7X3zQAoRNZTPNBs6qikvAF+zJDL7B2jOnhAi8PSqzjJhLJujrbMy0IQEhJjlK0dTceKtTrsseifNw== 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-SenderADCheck; bh=M+rJy+E+vyIjv5Zd8uCHQWY1b18mmojJR5+5sFKc3Hg=; b=ONfG61f6aGmU24uq9RG3aiT+BiKxpIUZBfQgeBEZco5vv5Fbvf+NkB3AhUuqpAsOzMpmdki7oYim03dCEZiUdXains577bhEWloplNwsA3vciytcniTAcX8JXFeN10KJU+GAVY6vLIYC4ij/eldTdlV8Y9xf+Vv65AU82gqBx2y6VJvy00xh7WrYGoO+QVrP6WoGpJ3d7i0gktqqj+cmPnA+B0exGcmPuGwOPQUb9U1W0KdqAA0yIPHv2AaB40nolmkDIPutTPZRH+lEMKihpSqyOkTmRs8a0ottpvn3pBGeJ3iAHjIbVLRm35Ztckh9IhEZ0jdDib/+4fyhrK9iig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M+rJy+E+vyIjv5Zd8uCHQWY1b18mmojJR5+5sFKc3Hg=; b=LUc1tTrIAjGHGaxccB3AKCby/VJc9kcjKtXL50Mr4XIALgYtTk2j94l+RZfxZvqI3i1uwBDhOs6iubm+mbNXvTdqCEZdyABhLKpsahXKbdYJ/yNNniNOCRLz1kF/HPtFRBxYVcBsnDo6SFzv1xhl8AZ1deNvLbWyt4tTJJZifzs= Received: from MWHPR11MB1373.namprd11.prod.outlook.com (10.169.234.141) by MWHPR11MB1472.namprd11.prod.outlook.com (10.172.54.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2451.22; Fri, 22 Nov 2019 20:52:05 +0000 Received: from MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::fc6d:2ed:d470:fb56]) by MWHPR11MB1373.namprd11.prod.outlook.com ([fe80::fc6d:2ed:d470:fb56%8]) with mapi id 15.20.2474.019; Fri, 22 Nov 2019 20:52:05 +0000 From: To: CC: , , , Subject: [PATCH 4/4] staging: wilc1000: use GENMASK to extract wid type Thread-Topic: [PATCH 4/4] staging: wilc1000: use GENMASK to extract wid type Thread-Index: AQHVoXaykYuCp0pyik2Th735RqUfjg== Date: Fri, 22 Nov 2019 20:52:05 +0000 Message-ID: <20191122205153.30723-4-adham.abozaeid@microchip.com> References: <20191122205153.30723-1-adham.abozaeid@microchip.com> In-Reply-To: <20191122205153.30723-1-adham.abozaeid@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [198.175.253.81] x-clientproxiedby: BYAPR03CA0028.namprd03.prod.outlook.com (2603:10b6:a02:a8::41) To MWHPR11MB1373.namprd11.prod.outlook.com (2603:10b6:300:25::13) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4e994b37-0009-4411-d9c2-08d76f8dd545 x-ms-traffictypediagnostic: MWHPR11MB1472: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:288; x-forefront-prvs: 02296943FF x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(396003)(136003)(346002)(366004)(376002)(189003)(199004)(316002)(66946007)(7736002)(8936002)(107886003)(81156014)(81166006)(186003)(66556008)(6486002)(26005)(66066001)(99286004)(6506007)(76176011)(5640700003)(4326008)(6436002)(52116002)(71190400001)(71200400001)(1076003)(5660300002)(14454004)(6916009)(11346002)(2501003)(102836004)(2906002)(386003)(6512007)(446003)(25786009)(54906003)(66446008)(50226002)(3846002)(36756003)(66476007)(256004)(64756008)(2351001)(2616005)(8676002)(6116002)(86362001)(478600001)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR11MB1472;H:MWHPR11MB1373.namprd11.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: =?iso-8859-1?q?FWu0gRWB+0H0WLGkwSO5PfGTgx?= =?iso-8859-1?q?a6FbIWP58F92tA9GWzdrKyqaQFW8/fR4Qs64Rf6sy45oqjJWDYl9uOGzeKH/?= =?iso-8859-1?q?aqVdDYOvMkkt3X/Az1FOTSVFSLaumt8iW0uVwwfUkprKrWD72FmEGBMKvF8j?= =?iso-8859-1?q?93MLljPfpDwvHDltkuGGCz9IinuwHIEMsqbpbTl0EK0Pg16ZElHUs3IDSOW+?= =?iso-8859-1?q?c8faZSJsieS2/pqy8HCUvfVGYVbzuZwsKj6ploUzPQjwA/us0N39Blrtctcb?= =?iso-8859-1?q?CdswEKyCs8kKlIUVP+feowkgu6vd542hO7ucryb/dMA19yGoVxGepTG1Ux3/?= =?iso-8859-1?q?mGlkJPcZgOZeZ6Ek4LEdgwooPmzSJ8CICDM3hR6jayazNxSgAF+fdYZ6WZPL?= =?iso-8859-1?q?rGHjPWbGn70csfGYNCSpU8jTjbnsBpQqWybUYc907NZOoDZItqKqwN6TvFMz?= =?iso-8859-1?q?Od5OjK4fu57LMvsoqvYHtY4jOYzWayOaaB/aoAV2M7YBIgYImzz0OKklOjlF?= =?iso-8859-1?q?9XqFTU4QY21OiFQINsPt4PxI5mn+FwSdPXVKvMpFMbhTVi1mEXeHw5FlVj2G?= =?iso-8859-1?q?pyJN8/LH3pZ2GLWdIDKKoCrV0ci5ND1Y3sxUDoGPkgEaXdMB7WLIzYqiiFkr?= =?iso-8859-1?q?gexCqGdYay2scrSo2+zxWyuXOynEtkbEH5fw4OYTwvIwz1MfN+SmTNonI+XQ?= =?iso-8859-1?q?B/sLUYbyn9+cyartXD+K+qfnJ/DgmUuVNCshmgn1OW40zzwJ8VtP4vYkGbEc?= =?iso-8859-1?q?lWv8y/Zrg4d8s2VR1fAdAMiHri+UFzKCrBVzVVSGbo7R/7FERltvpinPnzLV?= =?iso-8859-1?q?nrP1VrG9L4Bc79+sKf/0CX1mZVY8QYq6bMPrfBv2k3c2PY/gL1Me+3BMSW1y?= =?iso-8859-1?q?T1uHgidD8GvW2ppdvlJ44ewMUpmCH/l67x83G0kjuM0HYuDtR8Ac0N7TYTFz?= =?iso-8859-1?q?mZ+Ut432UFXuMgHpS8YMZfqq/lABpXdnaYk0dx/KvsoFafH4/XDgh9gkKoZh?= =?iso-8859-1?q?mL0NlE4dxF1EagVWzozTrF80iD4vrCSVKRphO1d5FfJMdd4rRhU4uUFiMjdE?= =?iso-8859-1?q?VoTsmWdwCbL9v552kdyT0Nz18ruKbj18KvRxrjHCBac27s8tBzCUgUSq6NRI?= =?iso-8859-1?q?PvjdrvENJJAqm9nebx9tkJ2pFXyknJcAc1l9/lvao/VXio5DVdPyM2TVOfus?= =?iso-8859-1?q?rO9Yii3nAG4oCZxLi8WKnLv72ed3hWRbzmczZxOGtWTJiaoUT4mfowp7aIcC?= =?iso-8859-1?q?+pJa9qKhGpmCw9A6id2HKCtZ6QkLqndSYND9DqTl83VwATshVwiD1ZwsJ7VA?= =?iso-8859-1?q?isBBosRzVJmil7CmzfF+a4gNcWTNZQyI/zVgGm1dnZ+OtGlg5v6vZsDOT8tG?= =?iso-8859-1?q?ozwq8RdQdP2q8hyk04FS8yVdZm15dtWStJ/zzh4yX+5iPQ0Ol8Z8BXLYjTCt?= =?iso-8859-1?q?ytFHCKPCnkHZXnqHLMg8m6PVVQ5eo4A/aLn5KVGg47y4O9LS3JXvajkC90ZS?= =?iso-8859-1?q?aX0VRv7vMznEcqtMpiNEtxeDjQTYo2Zk4ewyvdjpxnhASEdhG6r1suw+e1i7?= =?iso-8859-1?q?yc1taNXWnQgduJRR5wc4Wt3ymYHStpYvcfD0PMQo0T6tCSf6F4PuLaL5a0Ll?= =?iso-8859-1?q?nQMWHWi1gxEU2FWI29lW8B5PuOi55PyJ+ObqKoRkx78eWoAOrxjTBzYKU8/A?= =?iso-8859-1?q?4Je3gtMsV/Av/pQ/VqglVLa93GSx2a8rrPIDhiXUzJSRr0J5XOw3SF5Nmivi?= =?iso-8859-1?q?EoT57Xao41iNVnpSWYXGzW5r3GLeCI1Bz9D5qIE+Y9Tg=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4e994b37-0009-4411-d9c2-08d76f8dd545 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2019 20:52:05.7400 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Tl/KMXhP/uAWritZtN3e8JaX1J28IbLKvwZShFEmLjMJOBDSS5WUUl5DuWWCPpS9NTH2HKkiX7FRB19TGRUjDtkDbQ4B6qfnevbR7EJyY9E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1472 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ajay Singh Refactor code by make use of 'GENMASK' to extract the WID type from buffer received from firmware. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wlan.h | 1 + drivers/staging/wilc1000/wlan_cfg.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wlan.h b/drivers/staging/wilc1000/wlan.h index 1f6957cf2e9c..44ae6ed6882c 100644 --- a/drivers/staging/wilc1000/wlan.h +++ b/drivers/staging/wilc1000/wlan.h @@ -197,6 +197,7 @@ #define IS_MANAGMEMENT_CALLBACK 0x080 #define IS_MGMT_STATUS_SUCCES 0x040 +#define WILC_WID_TYPE GENMASK(15, 12) /******************************************** * * Tx/Rx Queue Structure diff --git a/drivers/staging/wilc1000/wlan_cfg.c b/drivers/staging/wilc1000/wlan_cfg.c index 6f6b286788d1..2538435b82fd 100644 --- a/drivers/staging/wilc1000/wlan_cfg.c +++ b/drivers/staging/wilc1000/wlan_cfg.c @@ -4,6 +4,7 @@ * All rights reserved. */ +#include #include "wlan_if.h" #include "wlan.h" #include "wlan_cfg.h" @@ -132,7 +133,6 @@ static int wilc_wlan_cfg_set_bin(u8 *frame, u32 offset, u16 id, u8 *b, u32 size) * ********************************************/ -#define GET_WID_TYPE(wid) (((wid) >> 12) & 0x7) static void wilc_wlan_parse_response_frame(struct wilc *wl, u8 *info, int size) { u16 wid; @@ -142,7 +142,7 @@ static void wilc_wlan_parse_response_frame(struct wilc *wl, u8 *info, int size) i = 0; wid = get_unaligned_le16(info); - switch (GET_WID_TYPE(wid)) { + switch (FIELD_GET(WILC_WID_TYPE, wid)) { case WID_CHAR: do { if (wl->cfg.b[i].id == WID_NIL) @@ -244,7 +244,7 @@ static void wilc_wlan_parse_info_frame(struct wilc *wl, u8 *info) int wilc_wlan_cfg_set_wid(u8 *frame, u32 offset, u16 id, u8 *buf, int size) { - u8 type = (id >> 12) & 0xf; + u8 type = FIELD_GET(WILC_WID_TYPE, id); int ret = 0; switch (type) { @@ -290,7 +290,7 @@ int wilc_wlan_cfg_get_wid(u8 *frame, u32 offset, u16 id) int wilc_wlan_cfg_get_val(struct wilc *wl, u16 wid, u8 *buffer, u32 buffer_size) { - u32 type = (wid >> 12) & 0xf; + u8 type = FIELD_GET(WILC_WID_TYPE, wid); int i, ret = 0; i = 0;