2018-02-20 14:58:09

by Ajay Singh

[permalink] [raw]
Subject: [PATCH 00/12] staging: wilc1000: fixes to avoid use of camelCase in host interface

This patch series contains fixes for "Avoid camelCase" issues found by
checkpatch.pl script.

Ajay Singh (12):
staging: wilc1000: rename pu8HdnNtwrksWidVal to avoid camelCase
staging: wilc1000: rename ptstrJoinBssParam to avoid camelCase
staging: wilc1000: rename variables using camelCase in
handle_rcvd_ntwrk_info()
staging: wilc1000: rename pu32InactiveTime to avoid camelCase
staging: wilc1000: rename Handle_SetMulticastFilter to avoid camelCase
staging: wilc1000: rename pstrSetBeaconParam to avoid camelCase
staging: wilc1000: rename pstrStatistics to avoid camelCase
staging: wilc1000: rename strDisconnectNotifInfo to avoid camelCase
staging: wilc1000: rename pstrDelStaParam to avoid camelCase
staging: wilc1000: rename pstrStationParam to avoid camelCase
staging: wilc1000: rename _WPAPtk_end_case_ label to avoid camelCase
staging: wilc1000: rename _WPARxGtk_end_case_ label to avoid camelCase

drivers/staging/wilc1000/host_interface.c | 299 +++++++++++++++---------------
1 file changed, 147 insertions(+), 152 deletions(-)

--
2.7.4


2018-02-20 14:58:16

by Ajay Singh

[permalink] [raw]
Subject: [PATCH 02/12] staging: wilc1000: rename ptstrJoinBssParam to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <[email protected]>
---
drivers/staging/wilc1000/host_interface.c | 78 +++++++++++++++----------------
1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index f3a56e5..0f1eb17 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -909,7 +909,7 @@ static s32 handle_connect(struct wilc_vif *vif,
struct wid wid_list[8];
u32 wid_cnt = 0, dummyval = 0;
u8 *cur_byte = NULL;
- struct join_bss_param *ptstrJoinBssParam;
+ struct join_bss_param *bss_param;
struct host_if_drv *hif_drv = vif->hif_drv;

if (memcmp(pstrHostIFconnectAttr->bssid, wilc_connected_ssid, ETH_ALEN) == 0) {
@@ -918,8 +918,8 @@ static s32 handle_connect(struct wilc_vif *vif,
return result;
}

- ptstrJoinBssParam = pstrHostIFconnectAttr->params;
- if (!ptstrJoinBssParam) {
+ bss_param = pstrHostIFconnectAttr->params;
+ if (!bss_param) {
netdev_err(vif->ndev, "Required BSSID not found\n");
result = -ENOENT;
goto ERRORHANDLER;
@@ -1031,8 +1031,8 @@ static s32 handle_connect(struct wilc_vif *vif,
netdev_err(vif->ndev, "Channel out of range\n");
*(cur_byte++) = 0xFF;
}
- *(cur_byte++) = (ptstrJoinBssParam->cap_info) & 0xFF;
- *(cur_byte++) = ((ptstrJoinBssParam->cap_info) >> 8) & 0xFF;
+ *(cur_byte++) = (bss_param->cap_info) & 0xFF;
+ *(cur_byte++) = ((bss_param->cap_info) >> 8) & 0xFF;

if (pstrHostIFconnectAttr->bssid)
memcpy(cur_byte, pstrHostIFconnectAttr->bssid, 6);
@@ -1042,57 +1042,57 @@ static s32 handle_connect(struct wilc_vif *vif,
memcpy(cur_byte, pstrHostIFconnectAttr->bssid, 6);
cur_byte += 6;

- *(cur_byte++) = (ptstrJoinBssParam->beacon_period) & 0xFF;
- *(cur_byte++) = ((ptstrJoinBssParam->beacon_period) >> 8) & 0xFF;
- *(cur_byte++) = ptstrJoinBssParam->dtim_period;
+ *(cur_byte++) = (bss_param->beacon_period) & 0xFF;
+ *(cur_byte++) = ((bss_param->beacon_period) >> 8) & 0xFF;
+ *(cur_byte++) = bss_param->dtim_period;

- memcpy(cur_byte, ptstrJoinBssParam->supp_rates, MAX_RATES_SUPPORTED + 1);
+ memcpy(cur_byte, bss_param->supp_rates, MAX_RATES_SUPPORTED + 1);
cur_byte += (MAX_RATES_SUPPORTED + 1);

- *(cur_byte++) = ptstrJoinBssParam->wmm_cap;
- *(cur_byte++) = ptstrJoinBssParam->uapsd_cap;
+ *(cur_byte++) = bss_param->wmm_cap;
+ *(cur_byte++) = bss_param->uapsd_cap;

- *(cur_byte++) = ptstrJoinBssParam->ht_capable;
- hif_drv->usr_conn_req.ht_capable = ptstrJoinBssParam->ht_capable;
+ *(cur_byte++) = bss_param->ht_capable;
+ hif_drv->usr_conn_req.ht_capable = bss_param->ht_capable;

- *(cur_byte++) = ptstrJoinBssParam->rsn_found;
- *(cur_byte++) = ptstrJoinBssParam->rsn_grp_policy;
- *(cur_byte++) = ptstrJoinBssParam->mode_802_11i;
+ *(cur_byte++) = bss_param->rsn_found;
+ *(cur_byte++) = bss_param->rsn_grp_policy;
+ *(cur_byte++) = bss_param->mode_802_11i;

- memcpy(cur_byte, ptstrJoinBssParam->rsn_pcip_policy, sizeof(ptstrJoinBssParam->rsn_pcip_policy));
- cur_byte += sizeof(ptstrJoinBssParam->rsn_pcip_policy);
+ memcpy(cur_byte, bss_param->rsn_pcip_policy, sizeof(bss_param->rsn_pcip_policy));
+ cur_byte += sizeof(bss_param->rsn_pcip_policy);

- memcpy(cur_byte, ptstrJoinBssParam->rsn_auth_policy, sizeof(ptstrJoinBssParam->rsn_auth_policy));
- cur_byte += sizeof(ptstrJoinBssParam->rsn_auth_policy);
+ memcpy(cur_byte, bss_param->rsn_auth_policy, sizeof(bss_param->rsn_auth_policy));
+ cur_byte += sizeof(bss_param->rsn_auth_policy);

- memcpy(cur_byte, ptstrJoinBssParam->rsn_cap, sizeof(ptstrJoinBssParam->rsn_cap));
- cur_byte += sizeof(ptstrJoinBssParam->rsn_cap);
+ memcpy(cur_byte, bss_param->rsn_cap, sizeof(bss_param->rsn_cap));
+ cur_byte += sizeof(bss_param->rsn_cap);

*(cur_byte++) = REAL_JOIN_REQ;
- *(cur_byte++) = ptstrJoinBssParam->noa_enabled;
+ *(cur_byte++) = bss_param->noa_enabled;

- if (ptstrJoinBssParam->noa_enabled) {
- *(cur_byte++) = (ptstrJoinBssParam->tsf) & 0xFF;
- *(cur_byte++) = ((ptstrJoinBssParam->tsf) >> 8) & 0xFF;
- *(cur_byte++) = ((ptstrJoinBssParam->tsf) >> 16) & 0xFF;
- *(cur_byte++) = ((ptstrJoinBssParam->tsf) >> 24) & 0xFF;
+ if (bss_param->noa_enabled) {
+ *(cur_byte++) = (bss_param->tsf) & 0xFF;
+ *(cur_byte++) = ((bss_param->tsf) >> 8) & 0xFF;
+ *(cur_byte++) = ((bss_param->tsf) >> 16) & 0xFF;
+ *(cur_byte++) = ((bss_param->tsf) >> 24) & 0xFF;

- *(cur_byte++) = ptstrJoinBssParam->opp_enabled;
- *(cur_byte++) = ptstrJoinBssParam->idx;
+ *(cur_byte++) = bss_param->opp_enabled;
+ *(cur_byte++) = bss_param->idx;

- if (ptstrJoinBssParam->opp_enabled)
- *(cur_byte++) = ptstrJoinBssParam->ct_window;
+ if (bss_param->opp_enabled)
+ *(cur_byte++) = bss_param->ct_window;

- *(cur_byte++) = ptstrJoinBssParam->cnt;
+ *(cur_byte++) = bss_param->cnt;

- memcpy(cur_byte, ptstrJoinBssParam->duration, sizeof(ptstrJoinBssParam->duration));
- cur_byte += sizeof(ptstrJoinBssParam->duration);
+ memcpy(cur_byte, bss_param->duration, sizeof(bss_param->duration));
+ cur_byte += sizeof(bss_param->duration);

- memcpy(cur_byte, ptstrJoinBssParam->interval, sizeof(ptstrJoinBssParam->interval));
- cur_byte += sizeof(ptstrJoinBssParam->interval);
+ memcpy(cur_byte, bss_param->interval, sizeof(bss_param->interval));
+ cur_byte += sizeof(bss_param->interval);

- memcpy(cur_byte, ptstrJoinBssParam->start_time, sizeof(ptstrJoinBssParam->start_time));
- cur_byte += sizeof(ptstrJoinBssParam->start_time);
+ memcpy(cur_byte, bss_param->start_time, sizeof(bss_param->start_time));
+ cur_byte += sizeof(bss_param->start_time);
}

cur_byte = wid_list[wid_cnt].val;
--
2.7.4

2018-02-20 14:58:48

by Ajay Singh

[permalink] [raw]
Subject: [PATCH 11/12] staging: wilc1000: rename _WPAPtk_end_case_ label to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <[email protected]>
---
drivers/staging/wilc1000/host_interface.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 8528ff8..0cfb79d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1690,7 +1690,7 @@ static int handle_key(struct wilc_vif *vif,
pu8keybuf = kmalloc(PTK_KEY_MSG_LEN + 1, GFP_KERNEL);
if (!pu8keybuf) {
ret = -ENOMEM;
- goto _WPAPtk_end_case_;
+ goto out_wpa_ptk;
}

memcpy(pu8keybuf, pstrHostIFkeyAttr->attr.wpa.mac_addr, 6);
@@ -1719,7 +1719,7 @@ static int handle_key(struct wilc_vif *vif,
if (!pu8keybuf) {
netdev_err(vif->ndev, "No buffer send PTK\n");
ret = -ENOMEM;
- goto _WPAPtk_end_case_;
+ goto out_wpa_ptk;
}

memcpy(pu8keybuf, pstrHostIFkeyAttr->attr.wpa.mac_addr, 6);
@@ -1739,7 +1739,7 @@ static int handle_key(struct wilc_vif *vif,
complete(&hif_drv->comp_test_key_block);
}

-_WPAPtk_end_case_:
+out_wpa_ptk:
kfree(pstrHostIFkeyAttr->attr.wpa.key);
if (ret)
return ret;
--
2.7.4

2018-02-20 14:58:19

by Ajay Singh

[permalink] [raw]
Subject: [PATCH 03/12] staging: wilc1000: rename variables using camelCase in handle_rcvd_ntwrk_info()

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <[email protected]>
---
drivers/staging/wilc1000/host_interface.c | 45 +++++++++++++++----------------
1 file changed, 22 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 0f1eb17..f79618a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1248,18 +1248,17 @@ static s32 handle_rcvd_ntwrk_info(struct wilc_vif *vif,
struct rcvd_net_info *rcvd_info)
{
u32 i;
- bool bNewNtwrkFound;
+ bool found;
s32 result = 0;
- struct network_info *pstrNetworkInfo = NULL;
- void *pJoinParams = NULL;
+ struct network_info *info = NULL;
+ void *params = NULL;
struct host_if_drv *hif_drv = vif->hif_drv;

- bNewNtwrkFound = true;
+ found = true;

if (hif_drv->usr_scan_req.scan_result) {
- wilc_parse_network_info(rcvd_info->buffer, &pstrNetworkInfo);
- if (!pstrNetworkInfo ||
- !hif_drv->usr_scan_req.scan_result) {
+ wilc_parse_network_info(rcvd_info->buffer, &info);
+ if (!info || !hif_drv->usr_scan_req.scan_result) {
netdev_err(vif->ndev, "driver is null\n");
result = -EINVAL;
goto done;
@@ -1267,36 +1266,36 @@ static s32 handle_rcvd_ntwrk_info(struct wilc_vif *vif,

for (i = 0; i < hif_drv->usr_scan_req.rcvd_ch_cnt; i++) {
if (memcmp(hif_drv->usr_scan_req.net_info[i].bssid,
- pstrNetworkInfo->bssid, 6) == 0) {
- if (pstrNetworkInfo->rssi <= hif_drv->usr_scan_req.net_info[i].rssi) {
+ info->bssid, 6) == 0) {
+ if (info->rssi <= hif_drv->usr_scan_req.net_info[i].rssi) {
goto done;
} else {
- hif_drv->usr_scan_req.net_info[i].rssi = pstrNetworkInfo->rssi;
- bNewNtwrkFound = false;
+ hif_drv->usr_scan_req.net_info[i].rssi = info->rssi;
+ found = false;
break;
}
}
}

- if (bNewNtwrkFound) {
+ if (found) {
if (hif_drv->usr_scan_req.rcvd_ch_cnt < MAX_NUM_SCANNED_NETWORKS) {
- hif_drv->usr_scan_req.net_info[hif_drv->usr_scan_req.rcvd_ch_cnt].rssi = pstrNetworkInfo->rssi;
+ hif_drv->usr_scan_req.net_info[hif_drv->usr_scan_req.rcvd_ch_cnt].rssi = info->rssi;

memcpy(hif_drv->usr_scan_req.net_info[hif_drv->usr_scan_req.rcvd_ch_cnt].bssid,
- pstrNetworkInfo->bssid, 6);
+ info->bssid, 6);

hif_drv->usr_scan_req.rcvd_ch_cnt++;

- pstrNetworkInfo->new_network = true;
- pJoinParams = host_int_parse_join_bss_param(pstrNetworkInfo);
+ info->new_network = true;
+ params = host_int_parse_join_bss_param(info);

- hif_drv->usr_scan_req.scan_result(SCAN_EVENT_NETWORK_FOUND, pstrNetworkInfo,
+ hif_drv->usr_scan_req.scan_result(SCAN_EVENT_NETWORK_FOUND, info,
hif_drv->usr_scan_req.arg,
- pJoinParams);
+ params);
}
} else {
- pstrNetworkInfo->new_network = false;
- hif_drv->usr_scan_req.scan_result(SCAN_EVENT_NETWORK_FOUND, pstrNetworkInfo,
+ info->new_network = false;
+ hif_drv->usr_scan_req.scan_result(SCAN_EVENT_NETWORK_FOUND, info,
hif_drv->usr_scan_req.arg, NULL);
}
}
@@ -1305,9 +1304,9 @@ static s32 handle_rcvd_ntwrk_info(struct wilc_vif *vif,
kfree(rcvd_info->buffer);
rcvd_info->buffer = NULL;

- if (pstrNetworkInfo) {
- kfree(pstrNetworkInfo->ies);
- kfree(pstrNetworkInfo);
+ if (info) {
+ kfree(info->ies);
+ kfree(info);
}

return result;
--
2.7.4

2018-02-20 14:58:40

by Ajay Singh

[permalink] [raw]
Subject: [PATCH 09/12] staging: wilc1000: rename pstrDelStaParam to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <[email protected]>
---
drivers/staging/wilc1000/host_interface.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 64a2060..8ec33b3 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -2162,8 +2162,7 @@ static void handle_del_all_sta(struct wilc_vif *vif,
complete(&hif_wait_response);
}

-static void handle_del_station(struct wilc_vif *vif,
- struct del_sta *pstrDelStaParam)
+static void handle_del_station(struct wilc_vif *vif, struct del_sta *param)
{
s32 result = 0;
struct wid wid;
@@ -2179,7 +2178,7 @@ static void handle_del_station(struct wilc_vif *vif,

cur_byte = wid.val;

- ether_addr_copy(cur_byte, pstrDelStaParam->mac_addr);
+ ether_addr_copy(cur_byte, param->mac_addr);

result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
--
2.7.4

2018-02-20 14:58:51

by Ajay Singh

[permalink] [raw]
Subject: [PATCH 12/12] staging: wilc1000: rename _WPARxGtk_end_case_ label to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <[email protected]>
---
drivers/staging/wilc1000/host_interface.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 0cfb79d..253225c 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1620,7 +1620,7 @@ static int handle_key(struct wilc_vif *vif,
pu8keybuf = kzalloc(RX_MIC_KEY_MSG_LEN, GFP_KERNEL);
if (!pu8keybuf) {
ret = -ENOMEM;
- goto _WPARxGtk_end_case_;
+ goto out_wpa_rx_gtk;
}

if (pstrHostIFkeyAttr->attr.wpa.seq)
@@ -1651,7 +1651,7 @@ static int handle_key(struct wilc_vif *vif,
pu8keybuf = kzalloc(RX_MIC_KEY_MSG_LEN, GFP_KERNEL);
if (!pu8keybuf) {
ret = -ENOMEM;
- goto _WPARxGtk_end_case_;
+ goto out_wpa_rx_gtk;
}

if (hif_drv->hif_state == HOST_IF_CONNECTED)
@@ -1677,7 +1677,7 @@ static int handle_key(struct wilc_vif *vif,
kfree(pu8keybuf);
complete(&hif_drv->comp_test_key_block);
}
-_WPARxGtk_end_case_:
+out_wpa_rx_gtk:
kfree(pstrHostIFkeyAttr->attr.wpa.key);
kfree(pstrHostIFkeyAttr->attr.wpa.seq);
if (ret)
--
2.7.4

2018-02-20 14:58:33

by Ajay Singh

[permalink] [raw]
Subject: [PATCH 07/12] staging: wilc1000: rename pstrStatistics to avoid camelCase

Fix "Avoid caseCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <[email protected]>
---
drivers/staging/wilc1000/host_interface.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 9eb808e..593f7f1 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1889,7 +1889,7 @@ static void handle_get_rssi(struct wilc_vif *vif)
}

static s32 handle_get_statistics(struct wilc_vif *vif,
- struct rf_info *pstrStatistics)
+ struct rf_info *stats)
{
struct wid wid_list[5];
u32 wid_cnt = 0, result = 0;
@@ -1897,31 +1897,31 @@ static s32 handle_get_statistics(struct wilc_vif *vif,
wid_list[wid_cnt].id = WID_LINKSPEED;
wid_list[wid_cnt].type = WID_CHAR;
wid_list[wid_cnt].size = sizeof(char);
- wid_list[wid_cnt].val = (s8 *)&pstrStatistics->link_speed;
+ wid_list[wid_cnt].val = (s8 *)&stats->link_speed;
wid_cnt++;

wid_list[wid_cnt].id = WID_RSSI;
wid_list[wid_cnt].type = WID_CHAR;
wid_list[wid_cnt].size = sizeof(char);
- wid_list[wid_cnt].val = (s8 *)&pstrStatistics->rssi;
+ wid_list[wid_cnt].val = (s8 *)&stats->rssi;
wid_cnt++;

wid_list[wid_cnt].id = WID_SUCCESS_FRAME_COUNT;
wid_list[wid_cnt].type = WID_INT;
wid_list[wid_cnt].size = sizeof(u32);
- wid_list[wid_cnt].val = (s8 *)&pstrStatistics->tx_cnt;
+ wid_list[wid_cnt].val = (s8 *)&stats->tx_cnt;
wid_cnt++;

wid_list[wid_cnt].id = WID_RECEIVED_FRAGMENT_COUNT;
wid_list[wid_cnt].type = WID_INT;
wid_list[wid_cnt].size = sizeof(u32);
- wid_list[wid_cnt].val = (s8 *)&pstrStatistics->rx_cnt;
+ wid_list[wid_cnt].val = (s8 *)&stats->rx_cnt;
wid_cnt++;

wid_list[wid_cnt].id = WID_FAILED_COUNT;
wid_list[wid_cnt].type = WID_INT;
wid_list[wid_cnt].size = sizeof(u32);
- wid_list[wid_cnt].val = (s8 *)&pstrStatistics->tx_fail_cnt;
+ wid_list[wid_cnt].val = (s8 *)&stats->tx_fail_cnt;
wid_cnt++;

result = wilc_send_config_pkt(vif, GET_CFG, wid_list,
@@ -1931,13 +1931,13 @@ static s32 handle_get_statistics(struct wilc_vif *vif,
if (result)
netdev_err(vif->ndev, "Failed to send scan parameters\n");

- if (pstrStatistics->link_speed > TCP_ACK_FILTER_LINK_SPEED_THRESH &&
- pstrStatistics->link_speed != DEFAULT_LINK_SPEED)
+ if (stats->link_speed > TCP_ACK_FILTER_LINK_SPEED_THRESH &&
+ stats->link_speed != DEFAULT_LINK_SPEED)
wilc_enable_tcp_ack_filter(true);
- else if (pstrStatistics->link_speed != DEFAULT_LINK_SPEED)
+ else if (stats->link_speed != DEFAULT_LINK_SPEED)
wilc_enable_tcp_ack_filter(false);

- if (pstrStatistics != &vif->wilc->dummy_statistics)
+ if (stats != &vif->wilc->dummy_statistics)
complete(&hif_wait_response);
return 0;
}
--
2.7.4

2018-02-20 14:58:12

by Ajay Singh

[permalink] [raw]
Subject: [PATCH 01/12] staging: wilc1000: rename pu8HdnNtwrksWidVal to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <[email protected]>
---
drivers/staging/wilc1000/host_interface.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 6f93966..f3a56e5 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -754,7 +754,7 @@ static s32 handle_scan(struct wilc_vif *vif, struct scan_attr *scan_info)
u32 i;
u8 *buffer;
u8 valuesize = 0;
- u8 *pu8HdnNtwrksWidVal = NULL;
+ u8 *hdn_ntwk_wid_val = NULL;
struct host_if_drv *hif_drv = vif->hif_drv;

hif_drv->usr_scan_req.scan_result = scan_info->result;
@@ -780,8 +780,8 @@ static s32 handle_scan(struct wilc_vif *vif, struct scan_attr *scan_info)

for (i = 0; i < scan_info->hidden_network.n_ssids; i++)
valuesize += ((scan_info->hidden_network.net_info[i].ssid_len) + 1);
- pu8HdnNtwrksWidVal = kmalloc(valuesize + 1, GFP_KERNEL);
- wid_list[index].val = pu8HdnNtwrksWidVal;
+ hdn_ntwk_wid_val = kmalloc(valuesize + 1, GFP_KERNEL);
+ wid_list[index].val = hdn_ntwk_wid_val;
if (wid_list[index].val) {
buffer = wid_list[index].val;

@@ -858,7 +858,7 @@ static s32 handle_scan(struct wilc_vif *vif, struct scan_attr *scan_info)
kfree(scan_info->hidden_network.net_info);
scan_info->hidden_network.net_info = NULL;

- kfree(pu8HdnNtwrksWidVal);
+ kfree(hdn_ntwk_wid_val);

return result;
}
--
2.7.4

2018-02-20 14:58:30

by Ajay Singh

[permalink] [raw]
Subject: [PATCH 06/12] staging: wilc1000: rename pstrSetBeaconParam to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <[email protected]>
---
drivers/staging/wilc1000/host_interface.c | 51 +++++++++++++++----------------
1 file changed, 25 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 57f0201..9eb808e 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1986,8 +1986,7 @@ static s32 handle_get_inactive_time(struct wilc_vif *vif,
return result;
}

-static void handle_add_beacon(struct wilc_vif *vif,
- struct beacon_attr *pstrSetBeaconParam)
+static void handle_add_beacon(struct wilc_vif *vif, struct beacon_attr *param)
{
s32 result = 0;
struct wid wid;
@@ -1995,38 +1994,38 @@ static void handle_add_beacon(struct wilc_vif *vif,

wid.id = (u16)WID_ADD_BEACON;
wid.type = WID_BIN;
- wid.size = pstrSetBeaconParam->head_len + pstrSetBeaconParam->tail_len + 16;
+ wid.size = param->head_len + param->tail_len + 16;
wid.val = kmalloc(wid.size, GFP_KERNEL);
if (!wid.val)
goto ERRORHANDLER;

cur_byte = wid.val;
- *cur_byte++ = (pstrSetBeaconParam->interval & 0xFF);
- *cur_byte++ = ((pstrSetBeaconParam->interval >> 8) & 0xFF);
- *cur_byte++ = ((pstrSetBeaconParam->interval >> 16) & 0xFF);
- *cur_byte++ = ((pstrSetBeaconParam->interval >> 24) & 0xFF);
+ *cur_byte++ = (param->interval & 0xFF);
+ *cur_byte++ = ((param->interval >> 8) & 0xFF);
+ *cur_byte++ = ((param->interval >> 16) & 0xFF);
+ *cur_byte++ = ((param->interval >> 24) & 0xFF);

- *cur_byte++ = (pstrSetBeaconParam->dtim_period & 0xFF);
- *cur_byte++ = ((pstrSetBeaconParam->dtim_period >> 8) & 0xFF);
- *cur_byte++ = ((pstrSetBeaconParam->dtim_period >> 16) & 0xFF);
- *cur_byte++ = ((pstrSetBeaconParam->dtim_period >> 24) & 0xFF);
+ *cur_byte++ = (param->dtim_period & 0xFF);
+ *cur_byte++ = ((param->dtim_period >> 8) & 0xFF);
+ *cur_byte++ = ((param->dtim_period >> 16) & 0xFF);
+ *cur_byte++ = ((param->dtim_period >> 24) & 0xFF);

- *cur_byte++ = (pstrSetBeaconParam->head_len & 0xFF);
- *cur_byte++ = ((pstrSetBeaconParam->head_len >> 8) & 0xFF);
- *cur_byte++ = ((pstrSetBeaconParam->head_len >> 16) & 0xFF);
- *cur_byte++ = ((pstrSetBeaconParam->head_len >> 24) & 0xFF);
+ *cur_byte++ = (param->head_len & 0xFF);
+ *cur_byte++ = ((param->head_len >> 8) & 0xFF);
+ *cur_byte++ = ((param->head_len >> 16) & 0xFF);
+ *cur_byte++ = ((param->head_len >> 24) & 0xFF);

- memcpy(cur_byte, pstrSetBeaconParam->head, pstrSetBeaconParam->head_len);
- cur_byte += pstrSetBeaconParam->head_len;
+ memcpy(cur_byte, param->head, param->head_len);
+ cur_byte += param->head_len;

- *cur_byte++ = (pstrSetBeaconParam->tail_len & 0xFF);
- *cur_byte++ = ((pstrSetBeaconParam->tail_len >> 8) & 0xFF);
- *cur_byte++ = ((pstrSetBeaconParam->tail_len >> 16) & 0xFF);
- *cur_byte++ = ((pstrSetBeaconParam->tail_len >> 24) & 0xFF);
+ *cur_byte++ = (param->tail_len & 0xFF);
+ *cur_byte++ = ((param->tail_len >> 8) & 0xFF);
+ *cur_byte++ = ((param->tail_len >> 16) & 0xFF);
+ *cur_byte++ = ((param->tail_len >> 24) & 0xFF);

- if (pstrSetBeaconParam->tail)
- memcpy(cur_byte, pstrSetBeaconParam->tail, pstrSetBeaconParam->tail_len);
- cur_byte += pstrSetBeaconParam->tail_len;
+ if (param->tail)
+ memcpy(cur_byte, param->tail, param->tail_len);
+ cur_byte += param->tail_len;

result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
@@ -2035,8 +2034,8 @@ static void handle_add_beacon(struct wilc_vif *vif,

ERRORHANDLER:
kfree(wid.val);
- kfree(pstrSetBeaconParam->head);
- kfree(pstrSetBeaconParam->tail);
+ kfree(param->head);
+ kfree(param->tail);
}

static void handle_del_beacon(struct wilc_vif *vif)
--
2.7.4

2018-02-20 14:58:23

by Ajay Singh

[permalink] [raw]
Subject: [PATCH 04/12] staging: wilc1000: rename pu32InactiveTime to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <[email protected]>
---
drivers/staging/wilc1000/host_interface.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index f79618a..fd21765 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3164,7 +3164,7 @@ int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode)
}

s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac,
- u32 *pu32InactiveTime)
+ u32 *out_val)
{
s32 result = 0;
struct host_if_msg msg;
@@ -3187,7 +3187,7 @@ s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac,
else
wait_for_completion(&hif_drv->comp_inactive_time);

- *pu32InactiveTime = inactive_time;
+ *out_val = inactive_time;

return result;
}
--
2.7.4

2018-02-20 14:58:37

by Ajay Singh

[permalink] [raw]
Subject: [PATCH 08/12] staging: wilc1000: rename strDisconnectNotifInfo to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <[email protected]>
---
drivers/staging/wilc1000/host_interface.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 593f7f1..64a2060 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1330,7 +1330,7 @@ static s32 handle_rcvd_gnrl_async_info(struct wilc_vif *vif,
u8 u8MacStatusReasonCode;
u8 u8MacStatusAdditionalInfo;
struct connect_info strConnectInfo;
- struct disconnect_info strDisconnectNotifInfo;
+ struct disconnect_info disconn_info;
s32 s32Err = 0;
struct host_if_drv *hif_drv = vif->hif_drv;

@@ -1462,16 +1462,16 @@ static s32 handle_rcvd_gnrl_async_info(struct wilc_vif *vif,
hif_drv->usr_conn_req.ies = NULL;
} else if ((u8MacStatus == MAC_DISCONNECTED) &&
(hif_drv->hif_state == HOST_IF_CONNECTED)) {
- memset(&strDisconnectNotifInfo, 0, sizeof(struct disconnect_info));
+ memset(&disconn_info, 0, sizeof(struct disconnect_info));

if (hif_drv->usr_scan_req.scan_result) {
del_timer(&hif_drv->scan_timer);
handle_scan_done(vif, SCAN_EVENT_ABORTED);
}

- strDisconnectNotifInfo.reason = 0;
- strDisconnectNotifInfo.ie = NULL;
- strDisconnectNotifInfo.ie_len = 0;
+ disconn_info.reason = 0;
+ disconn_info.ie = NULL;
+ disconn_info.ie_len = 0;

if (hif_drv->usr_conn_req.conn_result) {
wilc_optaining_ip = false;
@@ -1480,7 +1480,7 @@ static s32 handle_rcvd_gnrl_async_info(struct wilc_vif *vif,
hif_drv->usr_conn_req.conn_result(CONN_DISCONN_EVENT_DISCONN_NOTIF,
NULL,
0,
- &strDisconnectNotifInfo,
+ &disconn_info,
hif_drv->usr_conn_req.arg);
} else {
netdev_err(vif->ndev, "Connect result NULL\n");
@@ -1800,13 +1800,13 @@ static void handle_disconnect(struct wilc_vif *vif)
if (result) {
netdev_err(vif->ndev, "Failed to send dissconect\n");
} else {
- struct disconnect_info strDisconnectNotifInfo;
+ struct disconnect_info disconn_info;

- memset(&strDisconnectNotifInfo, 0, sizeof(struct disconnect_info));
+ memset(&disconn_info, 0, sizeof(struct disconnect_info));

- strDisconnectNotifInfo.reason = 0;
- strDisconnectNotifInfo.ie = NULL;
- strDisconnectNotifInfo.ie_len = 0;
+ disconn_info.reason = 0;
+ disconn_info.ie = NULL;
+ disconn_info.ie_len = 0;

if (hif_drv->usr_scan_req.scan_result) {
del_timer(&hif_drv->scan_timer);
@@ -1824,7 +1824,7 @@ static void handle_disconnect(struct wilc_vif *vif)
hif_drv->usr_conn_req.conn_result(CONN_DISCONN_EVENT_DISCONN_NOTIF,
NULL,
0,
- &strDisconnectNotifInfo,
+ &disconn_info,
hif_drv->usr_conn_req.arg);
} else {
netdev_err(vif->ndev, "conn_result = NULL\n");
--
2.7.4

2018-02-20 14:58:44

by Ajay Singh

[permalink] [raw]
Subject: [PATCH 10/12] staging: wilc1000: rename pstrStationParam to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <[email protected]>
---
drivers/staging/wilc1000/host_interface.c | 46 +++++++++++++++----------------
1 file changed, 22 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 8ec33b3..8528ff8 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -2061,40 +2061,38 @@ static void handle_del_beacon(struct wilc_vif *vif)
}

static u32 WILC_HostIf_PackStaParam(u8 *pu8Buffer,
- struct add_sta_param *pstrStationParam)
+ struct add_sta_param *param)
{
u8 *cur_byte;

cur_byte = pu8Buffer;

- memcpy(cur_byte, pstrStationParam->bssid, ETH_ALEN);
+ memcpy(cur_byte, param->bssid, ETH_ALEN);
cur_byte += ETH_ALEN;

- *cur_byte++ = pstrStationParam->aid & 0xFF;
- *cur_byte++ = (pstrStationParam->aid >> 8) & 0xFF;
+ *cur_byte++ = param->aid & 0xFF;
+ *cur_byte++ = (param->aid >> 8) & 0xFF;

- *cur_byte++ = pstrStationParam->rates_len;
- if (pstrStationParam->rates_len > 0)
- memcpy(cur_byte, pstrStationParam->rates,
- pstrStationParam->rates_len);
- cur_byte += pstrStationParam->rates_len;
+ *cur_byte++ = param->rates_len;
+ if (param->rates_len > 0)
+ memcpy(cur_byte, param->rates, param->rates_len);
+ cur_byte += param->rates_len;

- *cur_byte++ = pstrStationParam->ht_supported;
- memcpy(cur_byte, &pstrStationParam->ht_capa,
- sizeof(struct ieee80211_ht_cap));
+ *cur_byte++ = param->ht_supported;
+ memcpy(cur_byte, &param->ht_capa, sizeof(struct ieee80211_ht_cap));
cur_byte += sizeof(struct ieee80211_ht_cap);

- *cur_byte++ = pstrStationParam->flags_mask & 0xFF;
- *cur_byte++ = (pstrStationParam->flags_mask >> 8) & 0xFF;
+ *cur_byte++ = param->flags_mask & 0xFF;
+ *cur_byte++ = (param->flags_mask >> 8) & 0xFF;

- *cur_byte++ = pstrStationParam->flags_set & 0xFF;
- *cur_byte++ = (pstrStationParam->flags_set >> 8) & 0xFF;
+ *cur_byte++ = param->flags_set & 0xFF;
+ *cur_byte++ = (param->flags_set >> 8) & 0xFF;

return cur_byte - pu8Buffer;
}

static void handle_add_station(struct wilc_vif *vif,
- struct add_sta_param *pstrStationParam)
+ struct add_sta_param *param)
{
s32 result = 0;
struct wid wid;
@@ -2102,14 +2100,14 @@ static void handle_add_station(struct wilc_vif *vif,

wid.id = (u16)WID_ADD_STA;
wid.type = WID_BIN;
- wid.size = WILC_ADD_STA_LENGTH + pstrStationParam->rates_len;
+ wid.size = WILC_ADD_STA_LENGTH + param->rates_len;

wid.val = kmalloc(wid.size, GFP_KERNEL);
if (!wid.val)
goto ERRORHANDLER;

cur_byte = wid.val;
- cur_byte += WILC_HostIf_PackStaParam(cur_byte, pstrStationParam);
+ cur_byte += WILC_HostIf_PackStaParam(cur_byte, param);

result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
@@ -2117,7 +2115,7 @@ static void handle_add_station(struct wilc_vif *vif,
netdev_err(vif->ndev, "Failed to send add station\n");

ERRORHANDLER:
- kfree(pstrStationParam->rates);
+ kfree(param->rates);
kfree(wid.val);
}

@@ -2190,7 +2188,7 @@ static void handle_del_station(struct wilc_vif *vif, struct del_sta *param)
}

static void handle_edit_station(struct wilc_vif *vif,
- struct add_sta_param *pstrStationParam)
+ struct add_sta_param *param)
{
s32 result = 0;
struct wid wid;
@@ -2198,14 +2196,14 @@ static void handle_edit_station(struct wilc_vif *vif,

wid.id = (u16)WID_EDIT_STA;
wid.type = WID_BIN;
- wid.size = WILC_ADD_STA_LENGTH + pstrStationParam->rates_len;
+ wid.size = WILC_ADD_STA_LENGTH + param->rates_len;

wid.val = kmalloc(wid.size, GFP_KERNEL);
if (!wid.val)
goto ERRORHANDLER;

cur_byte = wid.val;
- cur_byte += WILC_HostIf_PackStaParam(cur_byte, pstrStationParam);
+ cur_byte += WILC_HostIf_PackStaParam(cur_byte, param);

result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
@@ -2213,7 +2211,7 @@ static void handle_edit_station(struct wilc_vif *vif,
netdev_err(vif->ndev, "Failed to send edit station\n");

ERRORHANDLER:
- kfree(pstrStationParam->rates);
+ kfree(param->rates);
kfree(wid.val);
}

--
2.7.4

2018-02-20 14:58:26

by Ajay Singh

[permalink] [raw]
Subject: [PATCH 05/12] staging: wilc1000: rename Handle_SetMulticastFilter to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <[email protected]>
---
drivers/staging/wilc1000/host_interface.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index fd21765..57f0201 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -2404,8 +2404,8 @@ static void handle_power_management(struct wilc_vif *vif,
netdev_err(vif->ndev, "Failed to send power management\n");
}

-static void Handle_SetMulticastFilter(struct wilc_vif *vif,
- struct set_multicast *hif_set_mc)
+static void handle_set_mcast_filter(struct wilc_vif *vif,
+ struct set_multicast *hif_set_mc)
{
s32 result = 0;
struct wid wid;
@@ -2621,7 +2621,7 @@ static void host_if_work(struct work_struct *work)
break;

case HOST_IF_MSG_SET_MULTICAST_FILTER:
- Handle_SetMulticastFilter(msg->vif, &msg->body.multicast_info);
+ handle_set_mcast_filter(msg->vif, &msg->body.multicast_info);
break;

case HOST_IF_MSG_DEL_ALL_STA:
--
2.7.4