From patchwork Tue Oct 30 04:22:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adham Abozaeid X-Patchwork-Id: 10660441 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B8CE14DE for ; Tue, 30 Oct 2018 04:23:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3831D2A14A for ; Tue, 30 Oct 2018 04:23:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C00B2A198; Tue, 30 Oct 2018 04:23:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44BC92A14A for ; Tue, 30 Oct 2018 04:23:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726223AbeJ3NOt (ORCPT ); Tue, 30 Oct 2018 09:14:49 -0400 Received: from esa1.microchip.iphmx.com ([68.232.147.91]:41576 "EHLO esa1.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725971AbeJ3NOt (ORCPT ); Tue, 30 Oct 2018 09:14:49 -0400 X-IronPort-AV: E=Sophos;i="5.54,442,1534834800"; d="scan'208";a="23285776" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Oct 2018 21:23:00 -0700 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.38) with Microsoft SMTP Server (TLS) id 14.3.352.0; Mon, 29 Oct 2018 21:22:59 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gqylKsKVuvKBvhUNCwLRJTQ+UCGrmmTqXVFD/SL/8q0=; b=RaXXEadA4QLf9Tev9USAJYeDucC0BGNN5aWqmTxa86i8KCxNo0kEdzjanCtPhYhKOftE89302t+ulI37mgWF2Yzv2u1Lxym+8C01fDHCnuMvKDMBFM+RMiBSUGIvvzLwxxzMZYI5rjBqs1u+vj414uiKkvWGBvuL4gaL+9dqgLo= Received: from DM2PR11MB0255.namprd11.prod.outlook.com (10.160.135.27) by DM2PR11MB0256.namprd11.prod.outlook.com (10.160.136.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.30; Tue, 30 Oct 2018 04:22:56 +0000 Received: from DM2PR11MB0255.namprd11.prod.outlook.com ([fe80::5cab:d918:f310:6f0e]) by DM2PR11MB0255.namprd11.prod.outlook.com ([fe80::5cab:d918:f310:6f0e%10]) with mapi id 15.20.1250.034; Tue, 30 Oct 2018 04:22:56 +0000 From: To: CC: , , , , , , Subject: [PATCH v2 1/4] staging: wilc1000: remove unused flags in handle_cfg_param() Thread-Topic: [PATCH v2 1/4] staging: wilc1000: remove unused flags in handle_cfg_param() Thread-Index: AQHUcAg7wLfjcrzavE2b+Y+MVnGcsA== Date: Tue, 30 Oct 2018 04:22:55 +0000 Message-ID: <20181030042243.2153-2-adham.abozaeid@microchip.com> References: <20181030042243.2153-1-adham.abozaeid@microchip.com> In-Reply-To: <20181030042243.2153-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: BYAPR07CA0025.namprd07.prod.outlook.com (2603:10b6:a02:bc::38) To DM2PR11MB0255.namprd11.prod.outlook.com (2a01:111:e400:3c24::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Adham.Abozaeid@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM2PR11MB0256;6:oXmI02fjR/EI4pN10ep1HTLd+CeQU+J4SD6cW1/m3VTYpu1EiR57uTaCpxieAHoqL/URY+/WPKKN9P/AN+CvGQnWhh7UlHgadDTBSQF/g5QwwhLGHc6JpuEh2Z2dS9oCZ7J8kS43WCjEvYeeNj3jlYJtcpw1OQanrGKjLfa4FKdvwpnho3LoSZ+d3t24GH6CM4D0M8arCdn80g6Z4vX/JvRASX8AfIOm1ANFk2adAZp0Ubug8efLr6e9AUGmC8t1eWOjtQRBcoHd/M976v2gxF+mDF/tJPK1ClYVV4W7rfkEwyYWt6YwvMhpbPuWhYwSw2H7V1/QWzHJVRGWLEfQV/eJS1yLrd+xyjQs7n4u2i0/Im1lo9ryZUAcQYEla4pVlFS+ntUrDkSavHTY8tU1N48UaMc6yDG6PJ4RzFv9iNYkS0eF+RdWYf07Mv5iPxnhDpilOW20q9RVjoRPSJJ44Q==;5:ybjH0PZp0T9+ovH5+hLiOtVMaig5qrrk1CQnbeYkn+9C8WGJMAIvgVGdNhD3ITvVoeUK0uVIiCeBL0RUH55OwQrH49VEQ9XKSvOJTaMYlBvSzDz6sHJXO7YAHBqb6OC+CnS9eZ4lZ9YQCKPMiEfdxdft8Gn/VFKrk3LmOJcJayI=;7:S04oKp4O1eOSVCnJVqJzlQp/uFjW9lLQjFJTyiRcmxjr8P1+rN+OCzZPc9KGesZVeh58e2aW3Zwyf1wItN3LEnAjsFV5kPy3nTzqb7H1nzMxM5b5V+QwRvkQWv1LSil0koFsw0CdlfjjEVBPEOKGMWnaTEILHxq46A2gBfcWlalC3M1a/wHLwH2MTKq5svUhRe8k/KY6uDzne3RKSPsxkqoB5oIVqebDGUrp9IlHqdWr1x0pjP12Q1eqpuMY/TcV x-ms-office365-filtering-correlation-id: 82e8a9dc-4056-4f38-f50f-08d63e1f5d71 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DM2PR11MB0256; x-ms-traffictypediagnostic: DM2PR11MB0256: x-ld-processed: 3f4057f3-b418-4d4e-ba84-d55b4e897d88,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231382)(944501410)(52105095)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095);SRVR:DM2PR11MB0256;BCL:0;PCL:0;RULEID:;SRVR:DM2PR11MB0256; x-forefront-prvs: 08417837C5 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39860400002)(136003)(366004)(376002)(396003)(189003)(199004)(5660300001)(36756003)(106356001)(14454004)(6486002)(105586002)(72206003)(71200400001)(2351001)(71190400001)(186003)(4744004)(66066001)(6916009)(446003)(3846002)(81156014)(8676002)(6116002)(1076002)(6512007)(81166006)(99286004)(5640700003)(26005)(97736004)(386003)(11346002)(476003)(6506007)(2900100001)(5250100002)(8936002)(25786009)(53936002)(486006)(102836004)(4326008)(551544002)(54906003)(478600001)(86362001)(305945005)(68736007)(6436002)(316002)(52116002)(256004)(76176011)(14444005)(7736002)(2906002)(2501003)(2616005);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR11MB0256;H:DM2PR11MB0255.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-microsoft-antispam-message-info: QaIqHZ+F+LVy+y76bfeAo5dvElZKC+v/xChTlqg62WINJeEJQaDpy+Qz6S3GfqvUcDG/4seuUBD8m2pjZ5zPBrgsXRFXyYy5Jo8XeI8qsLQzpGX0jiJLswS0M23r6y66aKC0Z+nMgcm97SmW2Lni+TmVD3wWuczwpmsqaKhaHfSb1TkZ6Tu8+k+H79/bZHp/3hBgfgUvOoRYoR6Wg0p2cbFaVkPKLi8f5lqMd5dPP9PAMxFTkvz3XohMC8rsO27q8s2YF8s3mu0yGytQaduOTm6Q2ZU9LuapZPLwTuOTGHx6VYtny1q/Btb/AoMYxBWy7pBdfswVsbfXf3U4DUiK2HvKc99Zl7ouI1qMFd/Cc40= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 82e8a9dc-4056-4f38-f50f-08d63e1f5d71 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Oct 2018 04:22:56.0137 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR11MB0256 X-OriginatorOrg: microchip.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Adham Abozaeid handle_cfg_param() receives a bit map that describes what to be changed. Some of these bits flags aren't referred to from elsewhere and can be removed. Signed-off-by: Adham Abozaeid --- drivers/staging/wilc1000/host_interface.c | 216 ---------------------- drivers/staging/wilc1000/host_interface.h | 29 --- drivers/staging/wilc1000/wilc_wlan_if.h | 9 - 3 files changed, 254 deletions(-) mode change 100644 => 100755 drivers/staging/wilc1000/host_interface.c mode change 100644 => 100755 drivers/staging/wilc1000/host_interface.h mode change 100644 => 100755 drivers/staging/wilc1000/wilc_wlan_if.h diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c old mode 100644 new mode 100755 index 01db8999335e..1a1ac5e936a7 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -374,64 +374,6 @@ static void handle_cfg_param(struct work_struct *work) mutex_lock(&hif_drv->cfg_values_lock); - if (param->flag & BSS_TYPE) { - u8 bss_type = param->bss_type; - - if (bss_type < 6) { - wid_list[i].id = WID_BSS_TYPE; - wid_list[i].val = (s8 *)¶m->bss_type; - wid_list[i].type = WID_CHAR; - wid_list[i].size = sizeof(char); - hif_drv->cfg_values.bss_type = bss_type; - } else { - netdev_err(vif->ndev, "check value 6 over\n"); - goto unlock; - } - i++; - } - if (param->flag & AUTH_TYPE) { - u8 auth_type = param->auth_type; - - if (auth_type == 1 || auth_type == 2 || auth_type == 5) { - wid_list[i].id = WID_AUTH_TYPE; - wid_list[i].val = (s8 *)¶m->auth_type; - wid_list[i].type = WID_CHAR; - wid_list[i].size = sizeof(char); - hif_drv->cfg_values.auth_type = auth_type; - } else { - netdev_err(vif->ndev, "Impossible value\n"); - goto unlock; - } - i++; - } - if (param->flag & AUTHEN_TIMEOUT) { - if (param->auth_timeout > 0) { - wid_list[i].id = WID_AUTH_TIMEOUT; - wid_list[i].val = (s8 *)¶m->auth_timeout; - wid_list[i].type = WID_SHORT; - wid_list[i].size = sizeof(u16); - hif_drv->cfg_values.auth_timeout = param->auth_timeout; - } else { - netdev_err(vif->ndev, "Range(1 ~ 65535) over\n"); - goto unlock; - } - i++; - } - if (param->flag & POWER_MANAGEMENT) { - u8 pm_mode = param->power_mgmt_mode; - - if (pm_mode < 5) { - wid_list[i].id = WID_POWER_MANAGEMENT; - wid_list[i].val = (s8 *)¶m->power_mgmt_mode; - wid_list[i].type = WID_CHAR; - wid_list[i].size = sizeof(char); - hif_drv->cfg_values.power_mgmt_mode = pm_mode; - } else { - netdev_err(vif->ndev, "Invalid power mode\n"); - goto unlock; - } - i++; - } if (param->flag & RETRY_SHORT) { u16 retry_limit = param->short_retry_limit; @@ -492,160 +434,6 @@ static void handle_cfg_param(struct work_struct *work) } i++; } - if (param->flag & PREAMBLE) { - u16 preamble_type = param->preamble_type; - - if (param->preamble_type < 3) { - wid_list[i].id = WID_PREAMBLE; - wid_list[i].val = (s8 *)¶m->preamble_type; - wid_list[i].type = WID_CHAR; - wid_list[i].size = sizeof(char); - hif_drv->cfg_values.preamble_type = preamble_type; - } else { - netdev_err(vif->ndev, "Preamble Range(0~2) over\n"); - goto unlock; - } - i++; - } - if (param->flag & SHORT_SLOT_ALLOWED) { - u8 slot_allowed = param->short_slot_allowed; - - if (slot_allowed < 2) { - wid_list[i].id = WID_SHORT_SLOT_ALLOWED; - wid_list[i].val = (s8 *)¶m->short_slot_allowed; - wid_list[i].type = WID_CHAR; - wid_list[i].size = sizeof(char); - hif_drv->cfg_values.short_slot_allowed = slot_allowed; - } else { - netdev_err(vif->ndev, "Short slot(2) over\n"); - goto unlock; - } - i++; - } - if (param->flag & TXOP_PROT_DISABLE) { - u8 prot_disabled = param->txop_prot_disabled; - - if (param->txop_prot_disabled < 2) { - wid_list[i].id = WID_11N_TXOP_PROT_DISABLE; - wid_list[i].val = (s8 *)¶m->txop_prot_disabled; - wid_list[i].type = WID_CHAR; - wid_list[i].size = sizeof(char); - hif_drv->cfg_values.txop_prot_disabled = prot_disabled; - } else { - netdev_err(vif->ndev, "TXOP prot disable\n"); - goto unlock; - } - i++; - } - if (param->flag & BEACON_INTERVAL) { - u16 beacon_interval = param->beacon_interval; - - if (beacon_interval > 0) { - wid_list[i].id = WID_BEACON_INTERVAL; - wid_list[i].val = (s8 *)¶m->beacon_interval; - wid_list[i].type = WID_SHORT; - wid_list[i].size = sizeof(u16); - hif_drv->cfg_values.beacon_interval = beacon_interval; - } else { - netdev_err(vif->ndev, "Beacon interval(1~65535)fail\n"); - goto unlock; - } - i++; - } - if (param->flag & DTIM_PERIOD) { - if (param->dtim_period > 0 && param->dtim_period < 256) { - wid_list[i].id = WID_DTIM_PERIOD; - wid_list[i].val = (s8 *)¶m->dtim_period; - wid_list[i].type = WID_CHAR; - wid_list[i].size = sizeof(char); - hif_drv->cfg_values.dtim_period = param->dtim_period; - } else { - netdev_err(vif->ndev, "DTIM range(1~255) fail\n"); - goto unlock; - } - i++; - } - if (param->flag & SITE_SURVEY) { - enum site_survey enabled = param->site_survey_enabled; - - if (enabled < 3) { - wid_list[i].id = WID_SITE_SURVEY; - wid_list[i].val = (s8 *)¶m->site_survey_enabled; - wid_list[i].type = WID_CHAR; - wid_list[i].size = sizeof(char); - hif_drv->cfg_values.site_survey_enabled = enabled; - } else { - netdev_err(vif->ndev, "Site survey disable\n"); - goto unlock; - } - i++; - } - if (param->flag & SITE_SURVEY_SCAN_TIME) { - u16 scan_time = param->site_survey_scan_time; - - if (scan_time > 0) { - wid_list[i].id = WID_SITE_SURVEY_SCAN_TIME; - wid_list[i].val = (s8 *)¶m->site_survey_scan_time; - wid_list[i].type = WID_SHORT; - wid_list[i].size = sizeof(u16); - hif_drv->cfg_values.site_survey_scan_time = scan_time; - } else { - netdev_err(vif->ndev, "Site scan time(1~65535) over\n"); - goto unlock; - } - i++; - } - if (param->flag & ACTIVE_SCANTIME) { - u16 active_scan_time = param->active_scan_time; - - if (active_scan_time > 0) { - wid_list[i].id = WID_ACTIVE_SCAN_TIME; - wid_list[i].val = (s8 *)¶m->active_scan_time; - wid_list[i].type = WID_SHORT; - wid_list[i].size = sizeof(u16); - hif_drv->cfg_values.active_scan_time = active_scan_time; - } else { - netdev_err(vif->ndev, "Active time(1~65535) over\n"); - goto unlock; - } - i++; - } - if (param->flag & PASSIVE_SCANTIME) { - u16 time = param->passive_scan_time; - - if (time > 0) { - wid_list[i].id = WID_PASSIVE_SCAN_TIME; - wid_list[i].val = (s8 *)¶m->passive_scan_time; - wid_list[i].type = WID_SHORT; - wid_list[i].size = sizeof(u16); - hif_drv->cfg_values.passive_scan_time = time; - } else { - netdev_err(vif->ndev, "Passive time(1~65535) over\n"); - goto unlock; - } - i++; - } - if (param->flag & CURRENT_TX_RATE) { - enum current_tx_rate curr_tx_rate = param->curr_tx_rate; - - if (curr_tx_rate == AUTORATE || curr_tx_rate == MBPS_1 || - curr_tx_rate == MBPS_2 || curr_tx_rate == MBPS_5_5 || - curr_tx_rate == MBPS_11 || curr_tx_rate == MBPS_6 || - curr_tx_rate == MBPS_9 || curr_tx_rate == MBPS_12 || - curr_tx_rate == MBPS_18 || curr_tx_rate == MBPS_24 || - curr_tx_rate == MBPS_36 || curr_tx_rate == MBPS_48 || - curr_tx_rate == MBPS_54) { - wid_list[i].id = WID_CURRENT_TX_RATE; - wid_list[i].val = (s8 *)&curr_tx_rate; - wid_list[i].type = WID_SHORT; - wid_list[i].size = sizeof(u16); - hif_drv->cfg_values.curr_tx_rate = (u8)curr_tx_rate; - } else { - netdev_err(vif->ndev, "out of TX rate\n"); - goto unlock; - } - i++; - } ret = wilc_send_config_pkt(vif, SET_CFG, wid_list, i, wilc_get_vif_idx(vif)); @@ -3372,11 +3160,7 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler) mutex_lock(&hif_drv->cfg_values_lock); hif_drv->hif_state = HOST_IF_IDLE; - hif_drv->cfg_values.site_survey_enabled = SITE_SURVEY_OFF; hif_drv->cfg_values.scan_source = DEFAULT_SCAN; - hif_drv->cfg_values.active_scan_time = ACTIVE_SCAN_TIME; - hif_drv->cfg_values.passive_scan_time = PASSIVE_SCAN_TIME; - hif_drv->cfg_values.curr_tx_rate = AUTORATE; hif_drv->p2p_timeout = 0; diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h old mode 100644 new mode 100755 index 33fb7318734b..5f894fe7c896 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -103,26 +103,11 @@ enum current_tx_rate { struct cfg_param_attr { u32 flag; u8 ht_enable; - u8 bss_type; - u8 auth_type; - u16 auth_timeout; - u8 power_mgmt_mode; u16 short_retry_limit; u16 long_retry_limit; u16 frag_threshold; u16 rts_threshold; - u16 preamble_type; - u8 short_slot_allowed; - u8 txop_prot_disabled; - u16 beacon_interval; - u16 dtim_period; - enum site_survey site_survey_enabled; - u16 site_survey_scan_time; u8 scan_source; - u16 active_scan_time; - u16 passive_scan_time; - enum current_tx_rate curr_tx_rate; - }; enum cfg_param { @@ -130,20 +115,6 @@ enum cfg_param { RETRY_LONG = BIT(1), FRAG_THRESHOLD = BIT(2), RTS_THRESHOLD = BIT(3), - BSS_TYPE = BIT(4), - AUTH_TYPE = BIT(5), - AUTHEN_TIMEOUT = BIT(6), - POWER_MANAGEMENT = BIT(7), - PREAMBLE = BIT(8), - SHORT_SLOT_ALLOWED = BIT(9), - TXOP_PROT_DISABLE = BIT(10), - BEACON_INTERVAL = BIT(11), - DTIM_PERIOD = BIT(12), - SITE_SURVEY = BIT(13), - SITE_SURVEY_SCAN_TIME = BIT(14), - ACTIVE_SCANTIME = BIT(15), - PASSIVE_SCANTIME = BIT(16), - CURRENT_TX_RATE = BIT(17), HT_ENABLE = BIT(18), }; diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h old mode 100644 new mode 100755 index ce2066b74287..4f258bf6a48d --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -698,13 +698,8 @@ enum { WID_LONG_RETRY_LIMIT = 0x1003, WID_BEACON_INTERVAL = 0x1006, WID_MEMORY_ACCESS_16BIT = 0x1008, - WID_RX_SENSE = 0x100B, - WID_ACTIVE_SCAN_TIME = 0x100C, - WID_PASSIVE_SCAN_TIME = 0x100D, - WID_SITE_SURVEY_SCAN_TIME = 0x100E, WID_JOIN_START_TIMEOUT = 0x100F, - WID_AUTH_TIMEOUT = 0x1010, WID_ASOC_TIMEOUT = 0x1011, WID_11I_PROTOCOL_TIMEOUT = 0x1012, WID_EAPOL_RESPONSE_TIMEOUT = 0x1013, @@ -739,11 +734,8 @@ enum { WID_HW_RX_COUNT = 0x2015, WID_MEMORY_ADDRESS = 0x201E, WID_MEMORY_ACCESS_32BIT = 0x201F, - WID_RF_REG_VAL = 0x2021, /* NMAC Integer WID list */ - WID_11N_PHY_ACTIVE_REG_VAL = 0x2080, - /* Custom Integer WID list */ WID_GET_INACTIVE_TIME = 0x2084, WID_SET_OPERATION_MODE = 0X2086, @@ -764,7 +756,6 @@ enum { WID_SUPP_PASSWORD = 0x3011, WID_SITE_SURVEY_RESULTS = 0x3012, WID_RX_POWER_LEVEL = 0x3013, - WID_DEL_ALL_RX_BA = 0x3014, WID_SET_STA_MAC_INACTIVE_TIME = 0x3017, WID_ADD_WEP_KEY = 0x3019, WID_REMOVE_WEP_KEY = 0x301A, From patchwork Tue Oct 30 04:22:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adham Abozaeid X-Patchwork-Id: 10660443 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0E44E14DE for ; Tue, 30 Oct 2018 04:23:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0FB22A14A for ; Tue, 30 Oct 2018 04:23:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E52112A16D; Tue, 30 Oct 2018 04:23:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4935F2A1B8 for ; Tue, 30 Oct 2018 04:23:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726249AbeJ3NOu (ORCPT ); Tue, 30 Oct 2018 09:14:50 -0400 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:45172 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726218AbeJ3NOu (ORCPT ); Tue, 30 Oct 2018 09:14:50 -0400 X-IronPort-AV: E=Sophos;i="5.54,442,1534834800"; d="scan'208";a="22350499" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Oct 2018 21:23:01 -0700 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.38) with Microsoft SMTP Server (TLS) id 14.3.352.0; Mon, 29 Oct 2018 21:23:01 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mDXsjNAsL7V85S8orWdBWIwEspqBZ8ccv6dlkoOIHpc=; b=To+pJETE+jPJieEDoTGnHpijn4b/MNrA6C8hDYl9Vqd5/vVjTMoUq+AtdIAkVGStQKKkiUhY4IoWUyhBWiyaI1+NW8cX9EXoujNyOf4Ucq1uIHfuAgOTBvJ9AFysWfr1wjHXDmFcMO/N0BPKkZfL7Kswv9e2qc70lHIsyKxZcj8= Received: from DM2PR11MB0255.namprd11.prod.outlook.com (10.160.135.27) by DM2PR11MB0256.namprd11.prod.outlook.com (10.160.136.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.30; Tue, 30 Oct 2018 04:22:57 +0000 Received: from DM2PR11MB0255.namprd11.prod.outlook.com ([fe80::5cab:d918:f310:6f0e]) by DM2PR11MB0255.namprd11.prod.outlook.com ([fe80::5cab:d918:f310:6f0e%10]) with mapi id 15.20.1250.034; Tue, 30 Oct 2018 04:22:57 +0000 From: To: CC: , , , , , , Subject: [PATCH v2 2/4] staging: wilc1000: validate cfg parameters before scheduling the work Thread-Topic: [PATCH v2 2/4] staging: wilc1000: validate cfg parameters before scheduling the work Thread-Index: AQHUcAg8FHYkGNpTbUGH58Q5DXqKFg== Date: Tue, 30 Oct 2018 04:22:57 +0000 Message-ID: <20181030042243.2153-3-adham.abozaeid@microchip.com> References: <20181030042243.2153-1-adham.abozaeid@microchip.com> In-Reply-To: <20181030042243.2153-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: BYAPR07CA0025.namprd07.prod.outlook.com (2603:10b6:a02:bc::38) To DM2PR11MB0255.namprd11.prod.outlook.com (2a01:111:e400:3c24::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Adham.Abozaeid@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM2PR11MB0256;6:JCgWJTDakfdgEcPFT5xCR9XV7YVoTep6FxaL3kOeYaZ0CKzZMXMEmhiXf5J2CiPybA2UQvjgt0j99NCXc8mhVMg1hYpxIqP3FK++DU97G5prCrxMWr65z9jRVP+c5cjpPJfbi/4DpDKtFrq47xTDY5STqf8glAfnf3/I734R5zq5ocdq7F9G0qsC/5GYxpydEtBeehDo5ed0TQPf3IQ+tIDNYpmE37STr30BNMUve/cgYNf3lEGEgzemCUKMe1eQAnNVPhvMoq93ni/d4HRi03UEqyrjIQn/hOQD+LHmanxaslVi4RGoVtOK+9yRsJnzNgCu83EK2fwtvElXJul70WhwtTE6vkN5/BmrNNbdUvW+03jZdTf2Uu1FG3XX0ow8w5VXO/3fBFg9weL0Auh3u/soN3eUpYhS1KKU0OpF/z2aPGnrutQNm6cM3s/qfIjKGK0KoNlgFz7499oM4UZ0bA==;5:+zQGA0Nwv9iwfJXYTetYNW90ohlTrrup3dg2NU0ugE/PdZzLosdKLn1TVfbxGttEDx1pYt1pUtcHYW33KkV7pKYxWUehe3zCjp4+hSUHdQD+z85eh3Y5Q+jlFZUlbROPDRTalnHjPWSLSVZtf4LKR6pGSvSaJ9fgc2ht3YZMKGg=;7:ST8ceS3OPuWzX8zvPW3Mt7dX6y09Rx6ojTHAPZ7/N4VACIw+HeWejO8csojRpkpT1xLcb70Iu9g1Ld2hMyQ1FIqe+cnhI0tnMvfkUzhA11ZEFMiP5+HSShLav5zOHGGXVXBh+dHHVo9PHAIkCfE70HDRdNBNupW8cUakIo9DsSi3do9zm4qVp+aKdtpmcVokrd3YOE9GiESj/7RkHq+og881l7a+Tj0rDSIReJ8i0H1e8+7T4Xueje4lrlTmn05J x-ms-office365-filtering-correlation-id: dae7dbe8-5ff7-4eff-6d94-08d63e1f5e5d x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DM2PR11MB0256; x-ms-traffictypediagnostic: DM2PR11MB0256: x-ld-processed: 3f4057f3-b418-4d4e-ba84-d55b4e897d88,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231382)(944501410)(52105095)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095);SRVR:DM2PR11MB0256;BCL:0;PCL:0;RULEID:;SRVR:DM2PR11MB0256; x-forefront-prvs: 08417837C5 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39860400002)(136003)(366004)(376002)(396003)(189003)(199004)(5660300001)(36756003)(106356001)(14454004)(6486002)(105586002)(72206003)(71200400001)(2351001)(71190400001)(186003)(66066001)(6916009)(446003)(15650500001)(3846002)(81156014)(8676002)(6116002)(1076002)(6512007)(81166006)(99286004)(5640700003)(26005)(97736004)(386003)(11346002)(476003)(6506007)(2900100001)(5250100002)(8936002)(25786009)(53936002)(486006)(102836004)(4326008)(54906003)(478600001)(86362001)(305945005)(68736007)(6436002)(316002)(52116002)(256004)(76176011)(14444005)(7736002)(2906002)(2501003)(2616005);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR11MB0256;H:DM2PR11MB0255.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-microsoft-antispam-message-info: 9Wr835LM6z4J8dMH+njEiFWHe7P9mtbfxGQnRXsDkrrJfzxLGmGP8ScCC4JZFMbBtGpbreb5T+dReyRv4r3ZgUznXqv+QhT9ggPVJPicN1M2Ji8Yd5DTdeRaiRjz1DnUQNuE7mC9R5owmTcPeIVTvbIh5T9xoe/GQlFYmb4dB70PrMjhowHLbiIu6vDFFmPgSM7Ad506YWgOfajahEI43YeXKm4WUt480xB5ySUtFY9dc/buMFqY9IxLM+qmhzV4cubpPfCsvywUIOZ0ApHh/Lf1YQNGNmqA/yoY7y9Umuq6plmX5/c9nEU+0hx0Kr56WwJ6MmEFEsaaDA1J4K1uoIC+Ow0vyErILxe1dmTVois= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: dae7dbe8-5ff7-4eff-6d94-08d63e1f5e5d X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Oct 2018 04:22:57.2016 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR11MB0256 X-OriginatorOrg: microchip.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Adham Abozaeid Validate cfg parameters after being called by cfg80211 in set_wiphy_params before scheduling the work executed in handle_cfg_param Signed-off-by: Adham Abozaeid --- drivers/staging/wilc1000/host_interface.c | 61 ++++++------------- .../staging/wilc1000/wilc_wfi_cfgoperations.c | 50 ++++++++++++--- 2 files changed, 62 insertions(+), 49 deletions(-) mode change 100644 => 100755 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 1a1ac5e936a7..0bb3b4f6d04e 100755 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -377,61 +377,41 @@ static void handle_cfg_param(struct work_struct *work) if (param->flag & RETRY_SHORT) { u16 retry_limit = param->short_retry_limit; - if (retry_limit > 0 && retry_limit < 256) { - wid_list[i].id = WID_SHORT_RETRY_LIMIT; - wid_list[i].val = (s8 *)¶m->short_retry_limit; - wid_list[i].type = WID_SHORT; - wid_list[i].size = sizeof(u16); - hif_drv->cfg_values.short_retry_limit = retry_limit; - } else { - netdev_err(vif->ndev, "Range(1~256) over\n"); - goto unlock; - } + wid_list[i].id = WID_SHORT_RETRY_LIMIT; + wid_list[i].val = (s8 *)¶m->short_retry_limit; + wid_list[i].type = WID_SHORT; + wid_list[i].size = sizeof(u16); + hif_drv->cfg_values.short_retry_limit = retry_limit; i++; } if (param->flag & RETRY_LONG) { u16 limit = param->long_retry_limit; - if (limit > 0 && limit < 256) { - wid_list[i].id = WID_LONG_RETRY_LIMIT; - wid_list[i].val = (s8 *)¶m->long_retry_limit; - wid_list[i].type = WID_SHORT; - wid_list[i].size = sizeof(u16); - hif_drv->cfg_values.long_retry_limit = limit; - } else { - netdev_err(vif->ndev, "Range(1~256) over\n"); - goto unlock; - } + wid_list[i].id = WID_LONG_RETRY_LIMIT; + wid_list[i].val = (s8 *)¶m->long_retry_limit; + wid_list[i].type = WID_SHORT; + wid_list[i].size = sizeof(u16); + hif_drv->cfg_values.long_retry_limit = limit; i++; } if (param->flag & FRAG_THRESHOLD) { u16 frag_th = param->frag_threshold; - if (frag_th > 255 && frag_th < 7937) { - wid_list[i].id = WID_FRAG_THRESHOLD; - wid_list[i].val = (s8 *)¶m->frag_threshold; - wid_list[i].type = WID_SHORT; - wid_list[i].size = sizeof(u16); - hif_drv->cfg_values.frag_threshold = frag_th; - } else { - netdev_err(vif->ndev, "Threshold Range fail\n"); - goto unlock; - } + wid_list[i].id = WID_FRAG_THRESHOLD; + wid_list[i].val = (s8 *)¶m->frag_threshold; + wid_list[i].type = WID_SHORT; + wid_list[i].size = sizeof(u16); + hif_drv->cfg_values.frag_threshold = frag_th; i++; } if (param->flag & RTS_THRESHOLD) { u16 rts_th = param->rts_threshold; - if (rts_th > 255) { - wid_list[i].id = WID_RTS_THRESHOLD; - wid_list[i].val = (s8 *)¶m->rts_threshold; - wid_list[i].type = WID_SHORT; - wid_list[i].size = sizeof(u16); - hif_drv->cfg_values.rts_threshold = rts_th; - } else { - netdev_err(vif->ndev, "Threshold Range fail\n"); - goto unlock; - } + wid_list[i].id = WID_RTS_THRESHOLD; + wid_list[i].val = (s8 *)¶m->rts_threshold; + wid_list[i].type = WID_SHORT; + wid_list[i].size = sizeof(u16); + hif_drv->cfg_values.rts_threshold = rts_th; i++; } @@ -441,7 +421,6 @@ static void handle_cfg_param(struct work_struct *work) if (ret) netdev_err(vif->ndev, "Error in setting CFG params\n"); -unlock: mutex_unlock(&hif_drv->cfg_values_lock); kfree(msg); } diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c old mode 100644 new mode 100755 index 4fbbbbd5a64b..26bb78a49d81 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -1149,21 +1149,55 @@ static int set_wiphy_params(struct wiphy *wiphy, u32 changed) cfg_param_val.flag = 0; if (changed & WIPHY_PARAM_RETRY_SHORT) { - cfg_param_val.flag |= RETRY_SHORT; - cfg_param_val.short_retry_limit = wiphy->retry_short; + if (wiphy->retry_short > 0 && wiphy->retry_short < 256) { + netdev_dbg(vif->ndev, + "Setting WIPHY_PARAM_RETRY_SHORT %d\n", + wiphy->retry_short); + cfg_param_val.flag |= RETRY_SHORT; + cfg_param_val.short_retry_limit = wiphy->retry_short; + } else { + netdev_err(vif->ndev, "Short retry limit out of range\n"); + return -EINVAL; + } } if (changed & WIPHY_PARAM_RETRY_LONG) { - cfg_param_val.flag |= RETRY_LONG; - cfg_param_val.long_retry_limit = wiphy->retry_long; + if (wiphy->retry_long > 0 && wiphy->retry_long < 256) { + netdev_dbg(vif->ndev, + "Setting WIPHY_PARAM_RETRY_LONG %d\n", + wiphy->retry_long); + cfg_param_val.flag |= RETRY_LONG; + cfg_param_val.long_retry_limit = wiphy->retry_long; + } else { + netdev_err(vif->ndev, "Long retry limit out of range\n"); + return -EINVAL; + } } if (changed & WIPHY_PARAM_FRAG_THRESHOLD) { - cfg_param_val.flag |= FRAG_THRESHOLD; - cfg_param_val.frag_threshold = wiphy->frag_threshold; + if (wiphy->frag_threshold > 255 && + wiphy->frag_threshold < 7937) { + netdev_dbg(vif->ndev, + "Setting WIPHY_PARAM_FRAG_THRESHOLD %d\n", + wiphy->frag_threshold); + cfg_param_val.flag |= FRAG_THRESHOLD; + cfg_param_val.frag_threshold = wiphy->frag_threshold; + } else { + netdev_err(vif->ndev, + "Fragmentation threshold out of range\n"); + return -EINVAL; + } } if (changed & WIPHY_PARAM_RTS_THRESHOLD) { - cfg_param_val.flag |= RTS_THRESHOLD; - cfg_param_val.rts_threshold = wiphy->rts_threshold; + if (wiphy->rts_threshold > 255) { + netdev_dbg(vif->ndev, + "Setting WIPHY_PARAM_RTS_THRESHOLD %d\n", + wiphy->rts_threshold); + cfg_param_val.flag |= RTS_THRESHOLD; + cfg_param_val.rts_threshold = wiphy->rts_threshold; + } else { + netdev_err(vif->ndev, "RTS threshold out of range\n"); + return -EINVAL; + } } ret = wilc_hif_set_cfg(vif, &cfg_param_val); From patchwork Tue Oct 30 04:22:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adham Abozaeid X-Patchwork-Id: 10660445 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CBF1B17DF for ; Tue, 30 Oct 2018 04:23:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB0F72A14A for ; Tue, 30 Oct 2018 04:23:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF4E42A198; Tue, 30 Oct 2018 04:23:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 40A9C2A14A for ; Tue, 30 Oct 2018 04:23:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726364AbeJ3NOv (ORCPT ); Tue, 30 Oct 2018 09:14:51 -0400 Received: from esa4.microchip.iphmx.com ([68.232.154.123]:21644 "EHLO esa4.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726218AbeJ3NOv (ORCPT ); Tue, 30 Oct 2018 09:14:51 -0400 X-IronPort-AV: E=Sophos;i="5.54,442,1534834800"; d="scan'208";a="22053468" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Oct 2018 21:23:02 -0700 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.108) with Microsoft SMTP Server (TLS) id 14.3.352.0; Mon, 29 Oct 2018 21:23:02 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TifEg0fRo/Iyy8cHif+IAczPoTHWADUbbfMD0Ku+XRY=; b=giO+XjYLTdSno4TuQVoprTQ8Rb9cQRFgnrf6hSmrNiGW1ZtpuZskOKR78z2uy7RkbkgRAmkXmDy28q9v6TTBHJ9v2zbI54fv1WVVkoGKdHXGBql1rTNW+lAiX3z+hTr3qBA+SCTEkfq6r/esCcGP7Y3W/m+CKi7Ywumf+nWlOuY= Received: from DM2PR11MB0255.namprd11.prod.outlook.com (10.160.135.27) by DM2PR11MB0256.namprd11.prod.outlook.com (10.160.136.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.30; Tue, 30 Oct 2018 04:22:58 +0000 Received: from DM2PR11MB0255.namprd11.prod.outlook.com ([fe80::5cab:d918:f310:6f0e]) by DM2PR11MB0255.namprd11.prod.outlook.com ([fe80::5cab:d918:f310:6f0e%10]) with mapi id 15.20.1250.034; Tue, 30 Oct 2018 04:22:58 +0000 From: To: CC: , , , , , , Subject: [PATCH v2 3/4] staging: wilc1000: Don't keep a copy of wiphy parameters in the driver Thread-Topic: [PATCH v2 3/4] staging: wilc1000: Don't keep a copy of wiphy parameters in the driver Thread-Index: AQHUcAg800/W1Fyg106kOUe0yuf3CQ== Date: Tue, 30 Oct 2018 04:22:58 +0000 Message-ID: <20181030042243.2153-4-adham.abozaeid@microchip.com> References: <20181030042243.2153-1-adham.abozaeid@microchip.com> In-Reply-To: <20181030042243.2153-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: BYAPR07CA0025.namprd07.prod.outlook.com (2603:10b6:a02:bc::38) To DM2PR11MB0255.namprd11.prod.outlook.com (2a01:111:e400:3c24::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Adham.Abozaeid@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM2PR11MB0256;6:1LtwhIgMC/yN3ttciSculWRgTp3ITCPmc5Y5R2co2bzFhg72gYzGZA0eJ43ji053E8I59XNGDc82JBWZDeKibg1rMVFvy9y/K7H3xdyj2Di9mA7v2b/2loBpa4/fFtQo47zOYCBpL0RB+YmL/WJjgTbtXAL+DvMU3a9VBCJPmmHKIEZQauSY+OY/K/ejuZ3WBSHaVKXdbCzU7cPCaUO6XzkKfGXNToone4OIw43KVe2f9/kUMsiqdv1g7pJmH/6e2A/C+/TJdudWrNFJVc76XRziL+hXUf044CELnPSWVSkPxeLZtxdEUmtzvx4m8smCc9IRVEl8bxcE4P+csu0TZ8Zc1qH/kTJapV4f8l13MmG7sSNR8LLZo2bWJuy4iRfwyMISgrGc2ExQ8PsbL9XBouvtauMyuwduVirN9x8zW6sw1SDqzSY/zboxqO52PHyepfWeFJm0ZCvQB+KGMwxhhQ==;5:okaQ+Y2CmyopkNLdUGEDIrXD7vW+9Y2WbPzPQabIq5BZ2YZqLq6FN5bkcqutd04ZM58aCm9jZFEF5LXjYhPE/RBHhwHJyj6SDq8XZmzErK7miKSnBBFpGPFMoZsLn9BKi1UOUiexPWvV5dyXw6ex/Vbf7gcSfBw0heA9xSWV/wc=;7:e0RV5hcGqayqnmcfrYlAoqhpfRR8Ir9IX3e5DNUWKoupdIh0XVrI/7r7fypKcFSu+LHoOK0gUM6BwLrdvHXS8JaN+pCbM8bA30MOyn2Y+0I6XXZG7bRLTHraF+WdW6MZLcqNjTdHewZhkyReCVMere+zHHSYdCaxSXbAKKbnCjcjah3FqrTcN/lyGSbzB1XEzHW381b1YQ0eb8KcaoIJtN0bWhFBhzQZDKEgoHc6zCUe63nRfJlGS4ouVcIipdt2 x-ms-office365-filtering-correlation-id: 0c38ac41-d5c6-43d7-aef4-08d63e1f5f1d x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DM2PR11MB0256; x-ms-traffictypediagnostic: DM2PR11MB0256: x-ld-processed: 3f4057f3-b418-4d4e-ba84-d55b4e897d88,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231382)(944501410)(52105095)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095);SRVR:DM2PR11MB0256;BCL:0;PCL:0;RULEID:;SRVR:DM2PR11MB0256; x-forefront-prvs: 08417837C5 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39860400002)(136003)(366004)(376002)(396003)(189003)(199004)(5660300001)(36756003)(106356001)(14454004)(6486002)(105586002)(72206003)(71200400001)(2351001)(71190400001)(186003)(66066001)(6916009)(446003)(3846002)(81156014)(8676002)(6116002)(1076002)(6512007)(81166006)(99286004)(5640700003)(26005)(97736004)(386003)(11346002)(476003)(6506007)(2900100001)(5250100002)(8936002)(25786009)(53936002)(486006)(102836004)(4326008)(54906003)(478600001)(86362001)(305945005)(68736007)(6436002)(316002)(52116002)(256004)(76176011)(14444005)(7736002)(2906002)(2501003)(2616005);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR11MB0256;H:DM2PR11MB0255.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-microsoft-antispam-message-info: 56xxHJOFTSt1wCt2E8X+wkldZqQHrUWTXiyF4HZXbxjnAPZxN8p0etxNf+6Op/HyRj1e/whsIw3kZzbiCCqIeA98DbkiehvXtvJaUgSiNQlx0IiDIS3k7quNE8baE1KO3WMyfhUsfuMoq6YNu3HzzF5qGSVJSLruYDR62ZVxxwU2NfMU/qxRZX8kU85UsGbmLPjqrKQWSmoaFwgeCCSGepvO+/l2P6BBnLqrqg1XGSdiaGe+XQjftWIeWf/6gSVSNbdPnwUZ1c6XAvAEXseXzUiU/BHBaeEgEhOJ+TvJyPoQKrQGW6T2jPjoPqdYqfq4Hf1ecdz4JkgOYDdn5cVvisfhl5a41UGyRBalBgC0Rhg= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 0c38ac41-d5c6-43d7-aef4-08d63e1f5f1d X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Oct 2018 04:22:58.4186 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR11MB0256 X-OriginatorOrg: microchip.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Adham Abozaeid host_if_drv.cfg_values is a write only member, and can be removed Signed-off-by: Adham Abozaeid --- drivers/staging/wilc1000/host_interface.c | 13 ------------- drivers/staging/wilc1000/host_interface.h | 1 - 2 files changed, 14 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 0bb3b4f6d04e..cdc495287949 100755 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -375,43 +375,31 @@ static void handle_cfg_param(struct work_struct *work) mutex_lock(&hif_drv->cfg_values_lock); if (param->flag & RETRY_SHORT) { - u16 retry_limit = param->short_retry_limit; - wid_list[i].id = WID_SHORT_RETRY_LIMIT; wid_list[i].val = (s8 *)¶m->short_retry_limit; wid_list[i].type = WID_SHORT; wid_list[i].size = sizeof(u16); - hif_drv->cfg_values.short_retry_limit = retry_limit; i++; } if (param->flag & RETRY_LONG) { - u16 limit = param->long_retry_limit; - wid_list[i].id = WID_LONG_RETRY_LIMIT; wid_list[i].val = (s8 *)¶m->long_retry_limit; wid_list[i].type = WID_SHORT; wid_list[i].size = sizeof(u16); - hif_drv->cfg_values.long_retry_limit = limit; i++; } if (param->flag & FRAG_THRESHOLD) { - u16 frag_th = param->frag_threshold; - wid_list[i].id = WID_FRAG_THRESHOLD; wid_list[i].val = (s8 *)¶m->frag_threshold; wid_list[i].type = WID_SHORT; wid_list[i].size = sizeof(u16); - hif_drv->cfg_values.frag_threshold = frag_th; i++; } if (param->flag & RTS_THRESHOLD) { - u16 rts_th = param->rts_threshold; - wid_list[i].id = WID_RTS_THRESHOLD; wid_list[i].val = (s8 *)¶m->rts_threshold; wid_list[i].type = WID_SHORT; wid_list[i].size = sizeof(u16); - hif_drv->cfg_values.rts_threshold = rts_th; i++; } @@ -3139,7 +3127,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler) mutex_lock(&hif_drv->cfg_values_lock); hif_drv->hif_state = HOST_IF_IDLE; - hif_drv->cfg_values.scan_source = DEFAULT_SCAN; hif_drv->p2p_timeout = 0; diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 5f894fe7c896..60cb1a1fee1a 100755 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -238,7 +238,6 @@ struct host_if_drv { enum host_if_state hif_state; u8 assoc_bssid[ETH_ALEN]; - struct cfg_param_attr cfg_values; /*lock to protect concurrent setting of cfg params*/ struct mutex cfg_values_lock; From patchwork Tue Oct 30 04:22:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adham Abozaeid X-Patchwork-Id: 10660447 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C9C33CF1 for ; Tue, 30 Oct 2018 04:23:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B5C32A14A for ; Tue, 30 Oct 2018 04:23:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F6F52A198; Tue, 30 Oct 2018 04:23:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAE772A14A for ; Tue, 30 Oct 2018 04:23:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726384AbeJ3NOw (ORCPT ); Tue, 30 Oct 2018 09:14:52 -0400 Received: from esa1.microchip.iphmx.com ([68.232.147.91]:41576 "EHLO esa1.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726280AbeJ3NOv (ORCPT ); Tue, 30 Oct 2018 09:14:51 -0400 X-IronPort-AV: E=Sophos;i="5.54,442,1534834800"; d="scan'208";a="23285779" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Oct 2018 21:23:03 -0700 Received: from NAM01-BN3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.38) with Microsoft SMTP Server (TLS) id 14.3.352.0; Mon, 29 Oct 2018 21:23:02 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SKBy8Qi+Qq5h8PCdvEprQ5XKGMTRfXRm8Y2FcLvL3/w=; b=uEporkhs7PuV/xfS4Ng0m9HBRtKAvktxcTMpfcxb4HK6NkfF0DvAfR+g5uqNaujxB2vI8sYLKMBLMg234aHqJ2TW+WfSbY8MVdmPc6YiiqVj4/1iQGUiUFV+ErLxPhz9OrRAqdjF/aoAaOs9HdtSnfjlWgmD3fEgOuEyf/2OLOg= Received: from DM2PR11MB0255.namprd11.prod.outlook.com (10.160.135.27) by DM2PR11MB0256.namprd11.prod.outlook.com (10.160.136.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.30; Tue, 30 Oct 2018 04:22:59 +0000 Received: from DM2PR11MB0255.namprd11.prod.outlook.com ([fe80::5cab:d918:f310:6f0e]) by DM2PR11MB0255.namprd11.prod.outlook.com ([fe80::5cab:d918:f310:6f0e%10]) with mapi id 15.20.1250.034; Tue, 30 Oct 2018 04:22:59 +0000 From: To: CC: , , , , , , Subject: [PATCH v2 4/4] staging: wilc1000: Remove unused mutex cfg_values_lock Thread-Topic: [PATCH v2 4/4] staging: wilc1000: Remove unused mutex cfg_values_lock Thread-Index: AQHUcAg97RI3p2yhdUyb1/kF1kmofQ== Date: Tue, 30 Oct 2018 04:22:59 +0000 Message-ID: <20181030042243.2153-5-adham.abozaeid@microchip.com> References: <20181030042243.2153-1-adham.abozaeid@microchip.com> In-Reply-To: <20181030042243.2153-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: BYAPR07CA0025.namprd07.prod.outlook.com (2603:10b6:a02:bc::38) To DM2PR11MB0255.namprd11.prod.outlook.com (2a01:111:e400:3c24::27) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Adham.Abozaeid@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM2PR11MB0256;6:T9ke4b98TVoX99bYl2CTTsTTUe3uTg3QwMdO3i94jbPaRecJv7at2nP14dkM6HJtKpI9I6r/9QznGwh9cBETOQQPUIt99nYF8nAXaamA3qOYvYWCNfKpUAOZunuyeXrzpbLptO0SuiXyckufF7f8BsMK/qBxQSW0eAgrhZDPVOh9NJBo0cY8nj+Vc+9GA1qAI3czntIeF3X5AASlcYRZm7TAKX0nQDKduNYsi8chHxSz4SQJu5EpRqJJmNpBXGv/11pvdWjtJffvcnWmNWNf/RaEp3d61nqKtrMjMykdNms5OzLpqMrLBSHnDEiUS33oK3oX1GckuJLOiSfPRWm+E9XL3Pm74/AVjwEQKSEnaSlismZBiVPXlHDRjF8G3RlGGU/g5uevF5j4uGZOa4fV1bRLkuaWtCY93cmPwiKplkXFJVaHLXyJKM92ouQcU6+yNP/EH92n+0T8He9x2Wn+gg==;5:a6xttoDYrNgng/yki6lv5YQ7zQl/vnXRPjI3YkTDW2AZcwjq39l/hycKZdLorxqK+0Rzs8f8W4KmrymjOXJezZkFzka027bV6ayNuebNKEvlqwBpv1oWVMybYTQlstXCFBYVb+csEtFIe9jMlrRHd0nJLIUWRy0x44utMZNIgiA=;7:fK0c3mnw3ifE/EIA+fSLOfsSE8Pcju0KbwDy6BsUhshNRfAjfRDf07DyzQQ16Gk1xkiU0ECXeNib+MRE4Xgkjqz0pfAo9mrICsunXH3zJ47pN/0jPvMCzpg9kKmXUlv4GW88CLAc3ePq+BmmhPqd7G/BVGl/5In2o3H/K4i8zLRG0KlFLqG4dgKkLqEKrkx9JS2jNPamkVkPsOyVkP7tJI0Gp6iPO8dOZQOxZVTLdXBmbTLu2kR4qGntYQ7WWRDD x-ms-office365-filtering-correlation-id: 3b3f961a-f4c0-4190-2a6b-08d63e1f5fd4 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DM2PR11MB0256; x-ms-traffictypediagnostic: DM2PR11MB0256: x-ld-processed: 3f4057f3-b418-4d4e-ba84-d55b4e897d88,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(21532816269658); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231382)(944501410)(52105095)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095);SRVR:DM2PR11MB0256;BCL:0;PCL:0;RULEID:;SRVR:DM2PR11MB0256; x-forefront-prvs: 08417837C5 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39860400002)(136003)(366004)(376002)(396003)(189003)(199004)(5660300001)(36756003)(106356001)(14454004)(6486002)(105586002)(72206003)(71200400001)(2351001)(71190400001)(186003)(66066001)(6916009)(446003)(3846002)(81156014)(8676002)(6116002)(1076002)(6512007)(81166006)(99286004)(5640700003)(26005)(97736004)(386003)(11346002)(476003)(6506007)(2900100001)(5250100002)(8936002)(25786009)(53936002)(486006)(102836004)(4326008)(54906003)(478600001)(86362001)(305945005)(68736007)(6436002)(316002)(52116002)(256004)(76176011)(14444005)(7736002)(2906002)(2501003)(2616005);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR11MB0256;H:DM2PR11MB0255.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-microsoft-antispam-message-info: vV5z8Zr34SaJ+QRbDXYzrR2MD+13f5sPUUXYlIC8OlnrRQh5liVMLVE5Bi0KG0x/UrXHSxDOYI7yJEN27od6sgAeb0vwM955e7wetxC+/FHeDy4an/Ul5QQxypPAxipyB0tKfjAJCcBZAQJ8DzHN3HIxBWtVEBAH4B7/a/bWb8GQsWWonl+O5kBelbg1kmbcgZlOBVQJURGbzFh5ZdtOI2t3qHgCHlYEz0F+DPDiQ3S/jZABGX9Mq6AXHavbp6Qr5UD8VoYqEAA/lVz5csvPeQMTr0UZ+RpdNbnTqh1ofdhW5UjTvEWdhAyVQbyxtOjKHX2dvT/PLI4ZTA6Ib4/mcJlyhqUUP2e11Ety4CAT+WY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 3b3f961a-f4c0-4190-2a6b-08d63e1f5fd4 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Oct 2018 04:22:59.6495 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR11MB0256 X-OriginatorOrg: microchip.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Adham Abozaeid After removing cfg_values member, cfg_values_lock that was used to protect it can also be removed. Signed-off-by: Adham Abozaeid --- drivers/staging/wilc1000/host_interface.c | 9 --------- drivers/staging/wilc1000/host_interface.h | 2 -- 2 files changed, 11 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index cdc495287949..165330b494f5 100755 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -369,11 +369,8 @@ static void handle_cfg_param(struct work_struct *work) struct cfg_param_attr *param = &msg->body.cfg_info; int ret; struct wid wid_list[32]; - struct host_if_drv *hif_drv = vif->hif_drv; int i = 0; - mutex_lock(&hif_drv->cfg_values_lock); - if (param->flag & RETRY_SHORT) { wid_list[i].id = WID_SHORT_RETRY_LIMIT; wid_list[i].val = (s8 *)¶m->short_retry_limit; @@ -409,7 +406,6 @@ static void handle_cfg_param(struct work_struct *work) if (ret) netdev_err(vif->ndev, "Error in setting CFG params\n"); - mutex_unlock(&hif_drv->cfg_values_lock); kfree(msg); } @@ -3123,15 +3119,10 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler) timer_setup(&hif_drv->connect_timer, timer_connect_cb, 0); timer_setup(&hif_drv->remain_on_ch_timer, listen_timer_cb, 0); - mutex_init(&hif_drv->cfg_values_lock); - mutex_lock(&hif_drv->cfg_values_lock); - hif_drv->hif_state = HOST_IF_IDLE; hif_drv->p2p_timeout = 0; - mutex_unlock(&hif_drv->cfg_values_lock); - wilc->clients_count++; return 0; diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 60cb1a1fee1a..c78e0682a248 100755 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -238,8 +238,6 @@ struct host_if_drv { enum host_if_state hif_state; u8 assoc_bssid[ETH_ALEN]; - /*lock to protect concurrent setting of cfg params*/ - struct mutex cfg_values_lock; struct timer_list scan_timer; struct wilc_vif *scan_timer_vif;