Commit ec90c21b authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: rename pstrHostIFconnectAttr to avoid camelCase issue

Fix 'Avoid camelCase' issue found by checkpatch.pl script.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Reviewed-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 648cd9a6
...@@ -917,7 +917,7 @@ static s32 handle_scan_done(struct wilc_vif *vif, enum scan_event evt) ...@@ -917,7 +917,7 @@ static s32 handle_scan_done(struct wilc_vif *vif, enum scan_event evt)
u8 wilc_connected_ssid[6] = {0}; u8 wilc_connected_ssid[6] = {0};
static s32 handle_connect(struct wilc_vif *vif, static s32 handle_connect(struct wilc_vif *vif,
struct connect_attr *pstrHostIFconnectAttr) struct connect_attr *conn_attr)
{ {
s32 result = 0; s32 result = 0;
struct wid wid_list[8]; struct wid wid_list[8];
...@@ -926,45 +926,45 @@ static s32 handle_connect(struct wilc_vif *vif, ...@@ -926,45 +926,45 @@ static s32 handle_connect(struct wilc_vif *vif,
struct join_bss_param *bss_param; struct join_bss_param *bss_param;
struct host_if_drv *hif_drv = vif->hif_drv; struct host_if_drv *hif_drv = vif->hif_drv;
if (memcmp(pstrHostIFconnectAttr->bssid, wilc_connected_ssid, ETH_ALEN) == 0) { if (memcmp(conn_attr->bssid, wilc_connected_ssid, ETH_ALEN) == 0) {
result = 0; result = 0;
netdev_err(vif->ndev, "Discard connect request\n"); netdev_err(vif->ndev, "Discard connect request\n");
return result; return result;
} }
bss_param = pstrHostIFconnectAttr->params; bss_param = conn_attr->params;
if (!bss_param) { if (!bss_param) {
netdev_err(vif->ndev, "Required BSSID not found\n"); netdev_err(vif->ndev, "Required BSSID not found\n");
result = -ENOENT; result = -ENOENT;
goto ERRORHANDLER; goto ERRORHANDLER;
} }
if (pstrHostIFconnectAttr->bssid) { if (conn_attr->bssid) {
hif_drv->usr_conn_req.bssid = kmalloc(6, GFP_KERNEL); hif_drv->usr_conn_req.bssid = kmalloc(6, GFP_KERNEL);
memcpy(hif_drv->usr_conn_req.bssid, pstrHostIFconnectAttr->bssid, 6); memcpy(hif_drv->usr_conn_req.bssid, conn_attr->bssid, 6);
} }
hif_drv->usr_conn_req.ssid_len = pstrHostIFconnectAttr->ssid_len; hif_drv->usr_conn_req.ssid_len = conn_attr->ssid_len;
if (pstrHostIFconnectAttr->ssid) { if (conn_attr->ssid) {
hif_drv->usr_conn_req.ssid = kmalloc(pstrHostIFconnectAttr->ssid_len + 1, GFP_KERNEL); hif_drv->usr_conn_req.ssid = kmalloc(conn_attr->ssid_len + 1, GFP_KERNEL);
memcpy(hif_drv->usr_conn_req.ssid, memcpy(hif_drv->usr_conn_req.ssid,
pstrHostIFconnectAttr->ssid, conn_attr->ssid,
pstrHostIFconnectAttr->ssid_len); conn_attr->ssid_len);
hif_drv->usr_conn_req.ssid[pstrHostIFconnectAttr->ssid_len] = '\0'; hif_drv->usr_conn_req.ssid[conn_attr->ssid_len] = '\0';
} }
hif_drv->usr_conn_req.ies_len = pstrHostIFconnectAttr->ies_len; hif_drv->usr_conn_req.ies_len = conn_attr->ies_len;
if (pstrHostIFconnectAttr->ies) { if (conn_attr->ies) {
hif_drv->usr_conn_req.ies = kmalloc(pstrHostIFconnectAttr->ies_len, GFP_KERNEL); hif_drv->usr_conn_req.ies = kmalloc(conn_attr->ies_len, GFP_KERNEL);
memcpy(hif_drv->usr_conn_req.ies, memcpy(hif_drv->usr_conn_req.ies,
pstrHostIFconnectAttr->ies, conn_attr->ies,
pstrHostIFconnectAttr->ies_len); conn_attr->ies_len);
} }
hif_drv->usr_conn_req.security = pstrHostIFconnectAttr->security; hif_drv->usr_conn_req.security = conn_attr->security;
hif_drv->usr_conn_req.auth_type = pstrHostIFconnectAttr->auth_type; hif_drv->usr_conn_req.auth_type = conn_attr->auth_type;
hif_drv->usr_conn_req.conn_result = pstrHostIFconnectAttr->result; hif_drv->usr_conn_req.conn_result = conn_attr->result;
hif_drv->usr_conn_req.arg = pstrHostIFconnectAttr->arg; hif_drv->usr_conn_req.arg = conn_attr->arg;
wid_list[wid_cnt].id = WID_SUCCESS_FRAME_COUNT; wid_list[wid_cnt].id = WID_SUCCESS_FRAME_COUNT;
wid_list[wid_cnt].type = WID_INT; wid_list[wid_cnt].type = WID_INT;
...@@ -991,7 +991,7 @@ static s32 handle_connect(struct wilc_vif *vif, ...@@ -991,7 +991,7 @@ static s32 handle_connect(struct wilc_vif *vif,
wid_list[wid_cnt].size = hif_drv->usr_conn_req.ies_len; wid_list[wid_cnt].size = hif_drv->usr_conn_req.ies_len;
wid_cnt++; wid_cnt++;
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) { if (memcmp("DIRECT-", conn_attr->ssid, 7)) {
info_element_size = hif_drv->usr_conn_req.ies_len; info_element_size = hif_drv->usr_conn_req.ies_len;
info_element = kmalloc(info_element_size, GFP_KERNEL); info_element = kmalloc(info_element_size, GFP_KERNEL);
memcpy(info_element, hif_drv->usr_conn_req.ies, memcpy(info_element, hif_drv->usr_conn_req.ies,
...@@ -1004,7 +1004,7 @@ static s32 handle_connect(struct wilc_vif *vif, ...@@ -1004,7 +1004,7 @@ static s32 handle_connect(struct wilc_vif *vif,
wid_list[wid_cnt].val = (s8 *)&hif_drv->usr_conn_req.security; wid_list[wid_cnt].val = (s8 *)&hif_drv->usr_conn_req.security;
wid_cnt++; wid_cnt++;
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) if (memcmp("DIRECT-", conn_attr->ssid, 7))
mode_11i = hif_drv->usr_conn_req.security; mode_11i = hif_drv->usr_conn_req.security;
wid_list[wid_cnt].id = (u16)WID_AUTH_TYPE; wid_list[wid_cnt].id = (u16)WID_AUTH_TYPE;
...@@ -1013,7 +1013,7 @@ static s32 handle_connect(struct wilc_vif *vif, ...@@ -1013,7 +1013,7 @@ static s32 handle_connect(struct wilc_vif *vif,
wid_list[wid_cnt].val = (s8 *)&hif_drv->usr_conn_req.auth_type; wid_list[wid_cnt].val = (s8 *)&hif_drv->usr_conn_req.auth_type;
wid_cnt++; wid_cnt++;
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) if (memcmp("DIRECT-", conn_attr->ssid, 7))
auth_type = (u8)hif_drv->usr_conn_req.auth_type; auth_type = (u8)hif_drv->usr_conn_req.auth_type;
wid_list[wid_cnt].id = (u16)WID_JOIN_REQ_EXTENDED; wid_list[wid_cnt].id = (u16)WID_JOIN_REQ_EXTENDED;
...@@ -1021,7 +1021,7 @@ static s32 handle_connect(struct wilc_vif *vif, ...@@ -1021,7 +1021,7 @@ static s32 handle_connect(struct wilc_vif *vif,
wid_list[wid_cnt].size = 112; wid_list[wid_cnt].size = 112;
wid_list[wid_cnt].val = kmalloc(wid_list[wid_cnt].size, GFP_KERNEL); wid_list[wid_cnt].val = kmalloc(wid_list[wid_cnt].size, GFP_KERNEL);
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) { if (memcmp("DIRECT-", conn_attr->ssid, 7)) {
join_req_size = wid_list[wid_cnt].size; join_req_size = wid_list[wid_cnt].size;
join_req = kmalloc(join_req_size, GFP_KERNEL); join_req = kmalloc(join_req_size, GFP_KERNEL);
} }
...@@ -1032,15 +1032,15 @@ static s32 handle_connect(struct wilc_vif *vif, ...@@ -1032,15 +1032,15 @@ static s32 handle_connect(struct wilc_vif *vif,
cur_byte = wid_list[wid_cnt].val; cur_byte = wid_list[wid_cnt].val;
if (pstrHostIFconnectAttr->ssid) { if (conn_attr->ssid) {
memcpy(cur_byte, pstrHostIFconnectAttr->ssid, pstrHostIFconnectAttr->ssid_len); memcpy(cur_byte, conn_attr->ssid, conn_attr->ssid_len);
cur_byte[pstrHostIFconnectAttr->ssid_len] = '\0'; cur_byte[conn_attr->ssid_len] = '\0';
} }
cur_byte += MAX_SSID_LEN; cur_byte += MAX_SSID_LEN;
*(cur_byte++) = INFRASTRUCTURE; *(cur_byte++) = INFRASTRUCTURE;
if (pstrHostIFconnectAttr->ch >= 1 && pstrHostIFconnectAttr->ch <= 14) { if (conn_attr->ch >= 1 && conn_attr->ch <= 14) {
*(cur_byte++) = pstrHostIFconnectAttr->ch; *(cur_byte++) = conn_attr->ch;
} else { } else {
netdev_err(vif->ndev, "Channel out of range\n"); netdev_err(vif->ndev, "Channel out of range\n");
*(cur_byte++) = 0xFF; *(cur_byte++) = 0xFF;
...@@ -1048,12 +1048,12 @@ static s32 handle_connect(struct wilc_vif *vif, ...@@ -1048,12 +1048,12 @@ static s32 handle_connect(struct wilc_vif *vif,
*(cur_byte++) = (bss_param->cap_info) & 0xFF; *(cur_byte++) = (bss_param->cap_info) & 0xFF;
*(cur_byte++) = ((bss_param->cap_info) >> 8) & 0xFF; *(cur_byte++) = ((bss_param->cap_info) >> 8) & 0xFF;
if (pstrHostIFconnectAttr->bssid) if (conn_attr->bssid)
memcpy(cur_byte, pstrHostIFconnectAttr->bssid, 6); memcpy(cur_byte, conn_attr->bssid, 6);
cur_byte += 6; cur_byte += 6;
if (pstrHostIFconnectAttr->bssid) if (conn_attr->bssid)
memcpy(cur_byte, pstrHostIFconnectAttr->bssid, 6); memcpy(cur_byte, conn_attr->bssid, 6);
cur_byte += 6; cur_byte += 6;
*(cur_byte++) = (bss_param->beacon_period) & 0xFF; *(cur_byte++) = (bss_param->beacon_period) & 0xFF;
...@@ -1112,14 +1112,14 @@ static s32 handle_connect(struct wilc_vif *vif, ...@@ -1112,14 +1112,14 @@ static s32 handle_connect(struct wilc_vif *vif,
cur_byte = wid_list[wid_cnt].val; cur_byte = wid_list[wid_cnt].val;
wid_cnt++; wid_cnt++;
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) { if (memcmp("DIRECT-", conn_attr->ssid, 7)) {
memcpy(join_req, cur_byte, join_req_size); memcpy(join_req, cur_byte, join_req_size);
join_req_vif = vif; join_req_vif = vif;
} }
if (pstrHostIFconnectAttr->bssid) if (conn_attr->bssid)
memcpy(wilc_connected_ssid, memcpy(wilc_connected_ssid,
pstrHostIFconnectAttr->bssid, ETH_ALEN); conn_attr->bssid, ETH_ALEN);
result = wilc_send_config_pkt(vif, SET_CFG, wid_list, result = wilc_send_config_pkt(vif, SET_CFG, wid_list,
wid_cnt, wid_cnt,
...@@ -1140,23 +1140,23 @@ static s32 handle_connect(struct wilc_vif *vif, ...@@ -1140,23 +1140,23 @@ static s32 handle_connect(struct wilc_vif *vif,
memset(&strConnectInfo, 0, sizeof(struct connect_info)); memset(&strConnectInfo, 0, sizeof(struct connect_info));
if (pstrHostIFconnectAttr->result) { if (conn_attr->result) {
if (pstrHostIFconnectAttr->bssid) if (conn_attr->bssid)
memcpy(strConnectInfo.bssid, pstrHostIFconnectAttr->bssid, 6); memcpy(strConnectInfo.bssid, conn_attr->bssid, 6);
if (pstrHostIFconnectAttr->ies) { if (conn_attr->ies) {
strConnectInfo.req_ies_len = pstrHostIFconnectAttr->ies_len; strConnectInfo.req_ies_len = conn_attr->ies_len;
strConnectInfo.req_ies = kmalloc(pstrHostIFconnectAttr->ies_len, GFP_KERNEL); strConnectInfo.req_ies = kmalloc(conn_attr->ies_len, GFP_KERNEL);
memcpy(strConnectInfo.req_ies, memcpy(strConnectInfo.req_ies,
pstrHostIFconnectAttr->ies, conn_attr->ies,
pstrHostIFconnectAttr->ies_len); conn_attr->ies_len);
} }
pstrHostIFconnectAttr->result(CONN_DISCONN_EVENT_CONN_RESP, conn_attr->result(CONN_DISCONN_EVENT_CONN_RESP,
&strConnectInfo, &strConnectInfo,
MAC_DISCONNECTED, MAC_DISCONNECTED,
NULL, NULL,
pstrHostIFconnectAttr->arg); conn_attr->arg);
hif_drv->hif_state = HOST_IF_IDLE; hif_drv->hif_state = HOST_IF_IDLE;
kfree(strConnectInfo.req_ies); kfree(strConnectInfo.req_ies);
strConnectInfo.req_ies = NULL; strConnectInfo.req_ies = NULL;
...@@ -1166,14 +1166,14 @@ static s32 handle_connect(struct wilc_vif *vif, ...@@ -1166,14 +1166,14 @@ static s32 handle_connect(struct wilc_vif *vif,
} }
} }
kfree(pstrHostIFconnectAttr->bssid); kfree(conn_attr->bssid);
pstrHostIFconnectAttr->bssid = NULL; conn_attr->bssid = NULL;
kfree(pstrHostIFconnectAttr->ssid); kfree(conn_attr->ssid);
pstrHostIFconnectAttr->ssid = NULL; conn_attr->ssid = NULL;
kfree(pstrHostIFconnectAttr->ies); kfree(conn_attr->ies);
pstrHostIFconnectAttr->ies = NULL; conn_attr->ies = NULL;
kfree(cur_byte); kfree(cur_byte);
return result; return result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment