From patchwork Thu Feb 7 11:29:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Singh X-Patchwork-Id: 10800879 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 CAC956C2 for ; Thu, 7 Feb 2019 11:29:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9C6D2A859 for ; Thu, 7 Feb 2019 11:29:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADA192A862; Thu, 7 Feb 2019 11:29:07 +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 7ED0A2A859 for ; Thu, 7 Feb 2019 11:29:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726974AbfBGL3F (ORCPT ); Thu, 7 Feb 2019 06:29:05 -0500 Received: from esa5.microchip.iphmx.com ([216.71.150.166]:42837 "EHLO esa5.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726740AbfBGL3F (ORCPT ); Thu, 7 Feb 2019 06:29:05 -0500 X-IronPort-AV: E=Sophos;i="5.56,564,1539673200"; d="scan'208";a="24333086" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Feb 2019 04:29:04 -0700 Received: from NAM05-CO1-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; Thu, 7 Feb 2019 04:29:03 -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=I4ICCQWT/wydC+ychRlHjAkiSOwS/HLjstbw2+YOVXU=; b=ZPZhbf176vyeEO9zH4ca3+LBdnXACLowHK4IkBDpwrkmGnltaEAVgm31HeHEO3d3svVCPSon2z4xcowgq9Yhmi2xp0j/VuEmPK8qNRkKN1Fzh4psfJ8NF7X3S/uyi2Ho9TFOxEVX3kCfutvQ3v97f1ukrpDEkfcOrgEn42og8Pg= Received: from BYAPR11MB2567.namprd11.prod.outlook.com (52.135.226.160) by BYAPR11MB2792.namprd11.prod.outlook.com (52.135.228.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.21; Thu, 7 Feb 2019 11:29:01 +0000 Received: from BYAPR11MB2567.namprd11.prod.outlook.com ([fe80::cc6d:bc31:d5b:a27d]) by BYAPR11MB2567.namprd11.prod.outlook.com ([fe80::cc6d:bc31:d5b:a27d%5]) with mapi id 15.20.1601.016; Thu, 7 Feb 2019 11:29:01 +0000 From: To: CC: , , , , Subject: [PATCH v2 2/8] staging: wilc1000: add 'wilc_' prefix to have proper namespace Thread-Topic: [PATCH v2 2/8] staging: wilc1000: add 'wilc_' prefix to have proper namespace Thread-Index: AQHUvthTaXeExNI/i0W2fgH/vGPO6Q== Date: Thu, 7 Feb 2019 11:29:01 +0000 Message-ID: <1549538913-17463-3-git-send-email-ajay.kathat@microchip.com> References: <1549538913-17463-1-git-send-email-ajay.kathat@microchip.com> In-Reply-To: <1549538913-17463-1-git-send-email-ajay.kathat@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MA1PR0101CA0060.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:20::22) To BYAPR11MB2567.namprd11.prod.outlook.com (2603:10b6:a02:c5::32) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Ajay.Kathat@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.7.4 x-originating-ip: [27.59.126.210] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BYAPR11MB2792;6:uZd2bLHFfyRTVhKkuWmEO3lI85fMNu0rurLuZlBrsqzkYTYgA4kT8FhHHXJUaJbIfhjI+Zbh/ZI42OaQYYN+nY6HUUgRiaIY8maAQioxnED8VekzOj/uewdoXUePnssBguTuI4p8VE06SsxgScUBNJ2a2WGBKIbU1MCZGW7W7+HfVVko6nGzjSCCtqBUoGDpGrpFhDbfQPmwWSSo/FpD918ZWm8jKxTzn5WivYosY+Ln4zq58/UQ/iPBROnZC8Y5YYH7SCqlBToCWKwhroo0rIvTUap4zFcbmmAEhU0z1DozHUZumiXb0BztbODi9865u43iNJFLGkZBU/paI1RorXS1tdfsIozZfaBXXdkv/9Dlm6/XyQYoyFHamJisyIpnvlLW0yHul/uIRxoM2z4D+rr2/jD47BQfKWDTT//wJd1ZSe/yY7/ltdIzTILiJL1tIksYdcudXOZSfVyEYNq8vg==;5:hKowhJvcMFV3s5oNcHTh1W1om/KMwW+9DLggparmMKTolDYZ/zdTnKYBGgsUctbRZU2LV1IzF5YUDzLsWg3vX6Uz9jxHmgSsTisHzAwsH0zuU8jkZX5RQqCdlWY7SNvjl0go5n3Yvy0P8Qc3Vo3y/nnFvBT33LuygbndqSSNaNObjtRfstlBGRMS/XxI9+UOOkzFubRBfq3pfRSHEmHCFg==;7:o4QvTn8PWyyxV0VGT0T2RGGe470ym9L62mCOyYz4lyVw4Xf08yyy5D1hrb6jNyl/rTW/CB+Ga/3PSNNkviQkqZPlzMzp9/iYsh8Wn0+1wFGMNmsulVOaMFD91GXRdJ0sbVJ3rYfu8UBEX4TbYtYb7g== x-ms-office365-filtering-correlation-id: ae5cb829-5363-437b-24d3-08d68cef7560 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(2017052603328)(7153060)(7193020);SRVR:BYAPR11MB2792; x-ms-traffictypediagnostic: BYAPR11MB2792: x-microsoft-antispam-prvs: x-forefront-prvs: 0941B96580 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(979002)(396003)(136003)(346002)(366004)(376002)(39860400002)(189003)(199004)(2501003)(256004)(14444005)(7736002)(68736007)(107886003)(81166006)(81156014)(305945005)(186003)(8676002)(8936002)(66066001)(50226002)(97736004)(52116002)(4326008)(11346002)(86362001)(30864003)(316002)(25786009)(476003)(2616005)(54906003)(478600001)(6486002)(105586002)(486006)(6916009)(106356001)(6436002)(14454004)(53946003)(6512007)(53936002)(2906002)(2351001)(71200400001)(71190400001)(6116002)(3846002)(386003)(6506007)(446003)(76176011)(36756003)(26005)(5640700003)(102836004)(99286004)(72206003)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR11MB2792;H:BYAPR11MB2567.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-message-info: q36E0TPvMHr9LTHse4cV9YFPUwxEdJWTC4ytYqb2U49COpo+Wp8hC9YHverIr+0/WY8ypogBfq67oBlg2Lt4GajuWcxjDqCo79oGIq+yNXhyhG35y9d3XK/kOb94akYGImYF78hXZCLwXYZNKSgOIZh0mjhdmNyt8UyvbUtDdbWfORQ+TroMQY3v8napSadIuNe58qeJ/DHHo/hNN+kKIZi+PFjqBkVes3WIC31SX+G3mjtY5tH5N6X47Bl+4msPWujBrnb5FzFNghgctIoLCR7VtGtxug3ESO1XGhN4hRokddwIHfhQujHan+fJ2FlBXFp0fqLTAcKKwcEuvvrtYAHQ0EipN98yo3TiEOiW9jdIY9jhjwCzh0oC1+279A5akDQ8q+55yd03q8x1zwIFpuaM2w8iO0IAl9chEYkRsS0= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: ae5cb829-5363-437b-24d3-08d68cef7560 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Feb 2019 11:28:59.0254 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2792 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: Ajay Singh Cleanup patch to rename data structure and function name to have 'wilc_' prefix. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 54 +++++++++++------------ drivers/staging/wilc1000/host_interface.h | 12 ++--- drivers/staging/wilc1000/wilc_spi.c | 4 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 22 ++++----- drivers/staging/wilc1000/wilc_wlan.c | 8 ++-- drivers/staging/wilc1000/wilc_wlan.h | 8 ++-- drivers/staging/wilc1000/wilc_wlan_cfg.c | 12 ++--- drivers/staging/wilc1000/wilc_wlan_if.h | 2 +- 8 files changed, 61 insertions(+), 61 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 0fb6ca3..9abe341 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -9,7 +9,7 @@ #define WILC_HIF_SCAN_TIMEOUT_MS 4000 #define WILC_HIF_CONNECT_TIMEOUT_MS 9500 -#define FALSE_FRMWR_CHANNEL 100 +#define WILC_FALSE_FRMWR_CHANNEL 100 struct wilc_rcvd_mac_info { u8 status; @@ -21,7 +21,7 @@ struct wilc_set_multicast { u8 *mc_list; }; -struct del_all_sta { +struct wilc_del_all_sta { u8 assoc_sta; u8 mac[WILC_MAX_NUM_STA][ETH_ALEN]; }; @@ -68,16 +68,16 @@ struct wilc_gtk_key { u8 key[0]; } __packed; -union message_body { +union wilc_message_body { struct wilc_rcvd_net_info net_info; struct wilc_rcvd_mac_info mac_info; struct wilc_set_multicast mc_info; - struct remain_ch remain_on_ch; + struct wilc_remain_ch remain_on_ch; char *data; }; struct host_if_msg { - union message_body body; + union wilc_message_body body; struct wilc_vif *vif; struct work_struct work; void (*fn)(struct work_struct *ws); @@ -110,7 +110,7 @@ struct wilc_join_bss_param { u8 bssid[ETH_ALEN]; __le16 beacon_period; u8 dtim_period; - u8 supp_rates[MAX_RATES_SUPPORTED + 1]; + u8 supp_rates[WILC_MAX_RATES_SUPPORTED + 1]; u8 wmm_cap; u8 uapsd_cap; u8 ht_capable; @@ -195,7 +195,7 @@ static int handle_scan_done(struct wilc_vif *vif, enum scan_event evt) u8 abort_running_scan; struct wid wid; struct host_if_drv *hif_drv = vif->hif_drv; - struct user_scan_req *scan_req; + struct wilc_user_scan_req *scan_req; if (evt == SCAN_EVENT_ABORTED) { abort_running_scan = 1; @@ -475,8 +475,8 @@ void *wilc_parse_join_bss_param(struct cfg80211_bss *bss, supp_rates_ie = cfg80211_find_ie(WLAN_EID_EXT_SUPP_RATES, ies->data, ies->len); if (supp_rates_ie) { - if (supp_rates_ie[1] > (MAX_RATES_SUPPORTED - rates_len)) - param->supp_rates[0] = MAX_RATES_SUPPORTED; + if (supp_rates_ie[1] > (WILC_MAX_RATES_SUPPORTED - rates_len)) + param->supp_rates[0] = WILC_MAX_RATES_SUPPORTED; else param->supp_rates[0] += supp_rates_ie[1]; @@ -563,7 +563,7 @@ static void handle_rcvd_ntwrk_info(struct work_struct *work) { struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_rcvd_net_info *rcvd_info = &msg->body.net_info; - struct user_scan_req *scan_req = &msg->vif->hif_drv->usr_scan_req; + struct wilc_user_scan_req *scan_req = &msg->vif->hif_drv->usr_scan_req; const u8 *ch_elm; u8 *ies; int ies_len; @@ -758,7 +758,7 @@ int wilc_disconnect(struct wilc_vif *vif) { struct wid wid; struct host_if_drv *hif_drv = vif->hif_drv; - struct user_scan_req *scan_req; + struct wilc_user_scan_req *scan_req; struct wilc_conn_info *conn_info; int result; u16 dummy_reason_code = 0; @@ -911,7 +911,7 @@ static void wilc_hif_pack_sta_param(u8 *cur_byte, const u8 *mac, } static int handle_remain_on_chan(struct wilc_vif *vif, - struct remain_ch *hif_remain_ch) + struct wilc_remain_ch *hif_remain_ch) { int result; u8 remain_on_chan_flag; @@ -957,7 +957,7 @@ static void handle_listen_state_expired(struct work_struct *work) { struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct wilc_vif *vif = msg->vif; - struct remain_ch *hif_remain_ch = &msg->body.remain_on_ch; + struct wilc_remain_ch *hif_remain_ch = &msg->body.remain_on_ch; u8 remain_on_chan_flag; struct wid wid; int result; @@ -975,7 +975,7 @@ static void handle_listen_state_expired(struct work_struct *work) goto free_msg; wid.val[0] = remain_on_chan_flag; - wid.val[1] = FALSE_FRMWR_CHANNEL; + wid.val[1] = WILC_FALSE_FRMWR_CHANNEL; result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1, wilc_get_vif_idx(vif)); @@ -1224,7 +1224,7 @@ int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 ptk_key_len, u8 mode, u8 cipher_mode, u8 index) { int result = 0; - u8 t_key_len = ptk_key_len + RX_MIC_KEY_LEN + TX_MIC_KEY_LEN; + u8 t_key_len = ptk_key_len + WILC_RX_MIC_KEY_LEN + WILC_TX_MIC_KEY_LEN; if (mode == WILC_AP_MODE) { struct wid wid_list[2]; @@ -1246,11 +1246,11 @@ int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 ptk_key_len, if (rx_mic) memcpy(&key_buf->key[ptk_key_len], rx_mic, - RX_MIC_KEY_LEN); + WILC_RX_MIC_KEY_LEN); if (tx_mic) - memcpy(&key_buf->key[ptk_key_len + RX_MIC_KEY_LEN], - tx_mic, TX_MIC_KEY_LEN); + memcpy(&key_buf->key[ptk_key_len + WILC_RX_MIC_KEY_LEN], + tx_mic, WILC_TX_MIC_KEY_LEN); wid_list[1].id = WID_ADD_PTK; wid_list[1].type = WID_STR; @@ -1274,11 +1274,11 @@ int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 ptk_key_len, if (rx_mic) memcpy(&key_buf->key[ptk_key_len], rx_mic, - RX_MIC_KEY_LEN); + WILC_RX_MIC_KEY_LEN); if (tx_mic) - memcpy(&key_buf->key[ptk_key_len + RX_MIC_KEY_LEN], - tx_mic, TX_MIC_KEY_LEN); + memcpy(&key_buf->key[ptk_key_len + WILC_RX_MIC_KEY_LEN], + tx_mic, WILC_TX_MIC_KEY_LEN); wid.id = WID_ADD_PTK; wid.type = WID_STR; @@ -1299,7 +1299,7 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len, { int result = 0; struct wilc_gtk_key *gtk_key; - int t_key_len = gtk_key_len + RX_MIC_KEY_LEN + TX_MIC_KEY_LEN; + int t_key_len = gtk_key_len + WILC_RX_MIC_KEY_LEN + WILC_TX_MIC_KEY_LEN; gtk_key = kzalloc(sizeof(*gtk_key) + t_key_len, GFP_KERNEL); if (!gtk_key) @@ -1317,11 +1317,11 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len, memcpy(>k_key->key[0], rx_gtk, gtk_key_len); if (rx_mic) - memcpy(>k_key->key[gtk_key_len], rx_mic, RX_MIC_KEY_LEN); + memcpy(>k_key->key[gtk_key_len], rx_mic, WILC_RX_MIC_KEY_LEN); if (tx_mic) - memcpy(>k_key->key[gtk_key_len + RX_MIC_KEY_LEN], - tx_mic, TX_MIC_KEY_LEN); + memcpy(>k_key->key[gtk_key_len + WILC_RX_MIC_KEY_LEN], + tx_mic, WILC_TX_MIC_KEY_LEN); if (mode == WILC_AP_MODE) { struct wid wid_list[2]; @@ -1819,7 +1819,7 @@ int wilc_remain_on_channel(struct wilc_vif *vif, u64 cookie, void (*expired)(void *, u64), void *user_arg) { - struct remain_ch roc; + struct wilc_remain_ch roc; int result; roc.ch = chan; @@ -2017,7 +2017,7 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN]) int result; int i; u8 assoc_sta = 0; - struct del_all_sta del_sta; + struct wilc_del_all_sta del_sta; memset(&del_sta, 0x0, sizeof(del_sta)); for (i = 0; i < WILC_MAX_NUM_STA; i++) { diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 790f83e..a007625 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -21,8 +21,8 @@ enum { #define WILC_MAX_NUM_SCANNED_CH 14 #define WILC_MAX_NUM_PROBED_SSID 10 -#define TX_MIC_KEY_LEN 8 -#define RX_MIC_KEY_LEN 8 +#define WILC_TX_MIC_KEY_LEN 8 +#define WILC_RX_MIC_KEY_LEN 8 #define WILC_MAX_NUM_PMKIDS 16 #define WILC_ADD_STA_LENGTH 40 @@ -115,7 +115,7 @@ struct wilc_probe_ssid { u32 size; }; -struct user_scan_req { +struct wilc_user_scan_req { void (*scan_result)(enum scan_event evt, struct wilc_rcvd_net_info *info, void *priv); void *arg; @@ -137,7 +137,7 @@ struct wilc_conn_info { void *param; }; -struct remain_ch { +struct wilc_remain_ch { u16 ch; u32 duration; void (*expired)(void *priv, u64 cookie); @@ -147,9 +147,9 @@ struct remain_ch { struct wilc; struct host_if_drv { - struct user_scan_req usr_scan_req; + struct wilc_user_scan_req usr_scan_req; struct wilc_conn_info conn_info; - struct remain_ch remain_on_ch; + struct wilc_remain_ch remain_on_ch; u64 p2p_timeout; enum host_if_state hif_state; diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index 153e120..4a1be9e 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -814,7 +814,7 @@ static int wilc_spi_read(struct wilc *wilc, u32 addr, u8 *buf, u32 size) * ********************************************/ -static int _wilc_spi_deinit(struct wilc *wilc) +static int wilc_spi_deinit(struct wilc *wilc) { /* * TODO: @@ -1122,7 +1122,7 @@ static int wilc_spi_sync_ext(struct wilc *wilc, int nint) /* Global spi HIF function table */ static const struct wilc_hif_func wilc_hif_spi = { .hif_init = wilc_spi_init, - .hif_deinit = _wilc_spi_deinit, + .hif_deinit = wilc_spi_deinit, .hif_read_reg = wilc_spi_read_reg, .hif_write_reg = wilc_spi_write_reg, .hif_block_rx = wilc_spi_read, diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 8fb4bd4..5e7a467 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -27,7 +27,7 @@ #define GAS_INITIAL_REQ 0x0a #define GAS_INITIAL_RSP 0x0b -#define INVALID_CHANNEL 0 +#define WILC_INVALID_CHANNEL 0 static const struct ieee80211_txrx_stypes wilc_wfi_cfg80211_mgmt_types[NUM_NL80211_IFTYPES] = { @@ -62,7 +62,7 @@ static const struct wiphy_wowlan_support wowlan_support = { .flags = WIPHY_WOWLAN_ANY }; -struct p2p_mgmt_data { +struct wilc_p2p_mgmt_data { int size; u8 *buff; }; @@ -158,7 +158,7 @@ static void cfg_connect_result(enum conn_event conn_disconn_evt, u8 mac_status, wilc_wlan_set_bssid(priv->dev, NULL, WILC_STATION_MODE); if (vif->iftype != WILC_CLIENT_MODE) - wl->sta_ch = INVALID_CHANNEL; + wl->sta_ch = WILC_INVALID_CHANNEL; netdev_err(dev, "Unspecified failure\n"); } @@ -184,7 +184,7 @@ static void cfg_connect_result(enum conn_event conn_disconn_evt, u8 mac_status, wilc_wlan_set_bssid(priv->dev, NULL, WILC_STATION_MODE); if (vif->iftype != WILC_CLIENT_MODE) - wl->sta_ch = INVALID_CHANNEL; + wl->sta_ch = WILC_INVALID_CHANNEL; if (wfi_drv->ifc_up && dev == wl->vif[1]->ndev) reason = 3; @@ -446,7 +446,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, netdev_err(dev, "wilc_set_join_req(): Error\n"); ret = -ENOENT; if (vif->iftype != WILC_CLIENT_MODE) - vif->wilc->sta_ch = INVALID_CHANNEL; + vif->wilc->sta_ch = WILC_INVALID_CHANNEL; wilc_wlan_set_bssid(dev, NULL, WILC_STATION_MODE); wfi_drv->conn_info.conn_result = NULL; kfree(join_params); @@ -484,7 +484,7 @@ static int disconnect(struct wiphy *wiphy, struct net_device *dev, } if (vif->iftype != WILC_CLIENT_MODE) - wilc->sta_ch = INVALID_CHANNEL; + wilc->sta_ch = WILC_INVALID_CHANNEL; wilc_wlan_set_bssid(priv->dev, NULL, WILC_STATION_MODE); priv->p2p.local_random = 0x01; @@ -974,7 +974,7 @@ static void wilc_wfi_cfg_parse_rx_action(u8 *buf, u32 len, u8 sta_ch) op_channel_attr_index = index; index += buf[index + 1] + 3; } - if (sta_ch != INVALID_CHANNEL) + if (sta_ch != WILC_INVALID_CHANNEL) wilc_wfi_cfg_parse_ch_attr(buf, channel_list_attr_index, op_channel_attr_index, sta_ch); } @@ -999,7 +999,7 @@ static void wilc_wfi_cfg_parse_tx_action(u8 *buf, u32 len, bool oper_ch, op_channel_attr_index = index; index += buf[index + 1] + 3; } - if (sta_ch != INVALID_CHANNEL && oper_ch) + if (sta_ch != WILC_INVALID_CHANNEL && oper_ch) wilc_wfi_cfg_parse_ch_attr(buf, channel_list_attr_index, op_channel_attr_index, sta_ch); } @@ -1115,7 +1115,7 @@ void wilc_wfi_p2p_rx(struct net_device *dev, u8 *buff, u32 size) static void wilc_wfi_mgmt_tx_complete(void *priv, int status) { - struct p2p_mgmt_data *pv_data = priv; + struct wilc_p2p_mgmt_data *pv_data = priv; kfree(pv_data->buff); kfree(pv_data); @@ -1189,7 +1189,7 @@ static int cancel_remain_on_channel(struct wiphy *wiphy, } static void wilc_wfi_cfg_tx_vendor_spec(struct wilc_priv *priv, - struct p2p_mgmt_data *mgmt_tx, + struct wilc_p2p_mgmt_data *mgmt_tx, struct cfg80211_mgmt_tx_params *params, u8 iftype, u32 buf_len) { @@ -1249,7 +1249,7 @@ static int mgmt_tx(struct wiphy *wiphy, const u8 *buf = params->buf; size_t len = params->len; const struct ieee80211_mgmt *mgmt; - struct p2p_mgmt_data *mgmt_tx; + struct wilc_p2p_mgmt_data *mgmt_tx; struct wilc_priv *priv = wiphy_priv(wiphy); struct host_if_drv *wfi_drv = priv->hif_drv; struct wilc_vif *vif = netdev_priv(wdev->netdev); diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 7a757c9..af1c4d8 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -523,7 +523,7 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count) if (vmm_sz & 0x3) vmm_sz = (vmm_sz + 4) & ~0x3; - if ((sum + vmm_sz) > LINUX_TX_SIZE) + if ((sum + vmm_sz) > WILC_TX_BUFF_SIZE) break; vmm_table[i] = vmm_sz / 4; @@ -811,7 +811,7 @@ static void wilc_wlan_handle_isr_ext(struct wilc *wilc, u32 int_status) if (size <= 0) return; - if (LINUX_RX_SIZE - offset < size) + if (WILC_RX_BUFF_SIZE - offset < size) offset = 0; buffer = &wilc->rx_buffer[offset]; @@ -1314,7 +1314,7 @@ int wilc_wlan_init(struct net_device *dev) } if (!wilc->tx_buffer) - wilc->tx_buffer = kmalloc(LINUX_TX_SIZE, GFP_KERNEL); + wilc->tx_buffer = kmalloc(WILC_TX_BUFF_SIZE, GFP_KERNEL); if (!wilc->tx_buffer) { ret = -ENOBUFS; @@ -1322,7 +1322,7 @@ int wilc_wlan_init(struct net_device *dev) } if (!wilc->rx_buffer) - wilc->rx_buffer = kmalloc(LINUX_RX_SIZE, GFP_KERNEL); + wilc->rx_buffer = kmalloc(WILC_RX_BUFF_SIZE, GFP_KERNEL); if (!wilc->rx_buffer) { ret = -ENOBUFS; diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h index 1d61e20..d8fabe8 100644 --- a/drivers/staging/wilc1000/wilc_wlan.h +++ b/drivers/staging/wilc1000/wilc_wlan.h @@ -131,8 +131,8 @@ #define WILC_PLL_TO_SPI 2 #define ABORT_INT BIT(31) -#define LINUX_RX_SIZE (96 * 1024) -#define LINUX_TX_SIZE (64 * 1024) +#define WILC_RX_BUFF_SIZE (96 * 1024) +#define WILC_TX_BUFF_SIZE (64 * 1024) #define MODALIAS "WILC_SPI" #define GPIO_NUM 0x44 @@ -248,7 +248,7 @@ struct wilc_hif_func { void (*disable_interrupt)(struct wilc *nic); }; -#define MAX_CFG_FRAME_SIZE 1468 +#define WILC_MAX_CFG_FRAME_SIZE 1468 struct wilc_cfg_cmd_hdr { u8 cmd_type; @@ -259,7 +259,7 @@ struct wilc_cfg_cmd_hdr { struct wilc_cfg_frame { struct wilc_cfg_cmd_hdr hdr; - u8 frame[MAX_CFG_FRAME_SIZE]; + u8 frame[WILC_MAX_CFG_FRAME_SIZE]; }; struct wilc_cfg_rsp { diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c index 67e9f93..9dc5de4 100644 --- a/drivers/staging/wilc1000/wilc_wlan_cfg.c +++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c @@ -54,7 +54,7 @@ static int wilc_wlan_cfg_set_byte(u8 *frame, u32 offset, u16 id, u8 val8) { u8 *buf; - if ((offset + 4) >= MAX_CFG_FRAME_SIZE) + if ((offset + 4) >= WILC_MAX_CFG_FRAME_SIZE) return 0; buf = &frame[offset]; @@ -71,7 +71,7 @@ static int wilc_wlan_cfg_set_hword(u8 *frame, u32 offset, u16 id, u16 val16) { u8 *buf; - if ((offset + 5) >= MAX_CFG_FRAME_SIZE) + if ((offset + 5) >= WILC_MAX_CFG_FRAME_SIZE) return 0; buf = &frame[offset]; @@ -90,7 +90,7 @@ static int wilc_wlan_cfg_set_word(u8 *frame, u32 offset, u16 id, u32 val32) { u8 *buf; - if ((offset + 7) >= MAX_CFG_FRAME_SIZE) + if ((offset + 7) >= WILC_MAX_CFG_FRAME_SIZE) return 0; buf = &frame[offset]; @@ -112,7 +112,7 @@ static int wilc_wlan_cfg_set_str(u8 *frame, u32 offset, u16 id, u8 *str, { u8 *buf; - if ((offset + size + 4) >= MAX_CFG_FRAME_SIZE) + if ((offset + size + 4) >= WILC_MAX_CFG_FRAME_SIZE) return 0; buf = &frame[offset]; @@ -134,7 +134,7 @@ static int wilc_wlan_cfg_set_bin(u8 *frame, u32 offset, u16 id, u8 *b, u32 size) u32 i; u8 checksum = 0; - if ((offset + size + 5) >= MAX_CFG_FRAME_SIZE) + if ((offset + size + 5) >= WILC_MAX_CFG_FRAME_SIZE) return 0; buf = &frame[offset]; @@ -309,7 +309,7 @@ int wilc_wlan_cfg_get_wid(u8 *frame, u32 offset, u16 id) { u8 *buf; - if ((offset + 2) >= MAX_CFG_FRAME_SIZE) + if ((offset + 2) >= WILC_MAX_CFG_FRAME_SIZE) return 0; buf = &frame[offset]; diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 26aad49..9b8cce8 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -45,7 +45,7 @@ struct tx_complete_data { * ********************************************/ #define WILC_MULTICAST_TABLE_SIZE 8 -#define MAX_RATES_SUPPORTED 12 +#define WILC_MAX_RATES_SUPPORTED 12 enum bss_types { WILC_FW_BSS_TYPE_INFRA = 0,