Commit b60005a8 authored by Leo Kim's avatar Leo Kim Committed by Greg Kroah-Hartman

staging: wilc1000: rename enuHostIFstate of struct host_if_drv

This patch renames enuHostIFstate of struct host_if_drv to hif_state
to avoid CamelCase naming convention.
And, some comments modification that has been included name 'enuHostIFstate'.
Signed-off-by: default avatarLeo Kim <leo.kim@atmel.com>
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5ec21368
...@@ -820,13 +820,15 @@ static s32 Handle_Scan(struct host_if_drv *hif_drv, ...@@ -820,13 +820,15 @@ static s32 Handle_Scan(struct host_if_drv *hif_drv,
u8 *pu8HdnNtwrksWidVal = NULL; u8 *pu8HdnNtwrksWidVal = NULL;
PRINT_D(HOSTINF_DBG, "Setting SCAN params\n"); PRINT_D(HOSTINF_DBG, "Setting SCAN params\n");
PRINT_D(HOSTINF_DBG, "Scanning: In [%d] state\n", hif_drv->enuHostIFstate); PRINT_D(HOSTINF_DBG, "Scanning: In [%d] state\n", hif_drv->hif_state);
hif_drv->usr_scan_req.pfUserScanResult = pstrHostIFscanAttr->result; hif_drv->usr_scan_req.pfUserScanResult = pstrHostIFscanAttr->result;
hif_drv->usr_scan_req.u32UserScanPvoid = pstrHostIFscanAttr->arg; hif_drv->usr_scan_req.u32UserScanPvoid = pstrHostIFscanAttr->arg;
if ((hif_drv->enuHostIFstate >= HOST_IF_SCANNING) && (hif_drv->enuHostIFstate < HOST_IF_CONNECTED)) { if ((hif_drv->hif_state >= HOST_IF_SCANNING) &&
PRINT_D(GENERIC_DBG, "Don't scan we are already in [%d] state\n", hif_drv->enuHostIFstate); (hif_drv->hif_state < HOST_IF_CONNECTED)) {
PRINT_D(GENERIC_DBG, "Don't scan already in [%d] state\n",
hif_drv->hif_state);
PRINT_ER("Already scan\n"); PRINT_ER("Already scan\n");
result = -EBUSY; result = -EBUSY;
goto ERRORHANDLER; goto ERRORHANDLER;
...@@ -904,9 +906,9 @@ static s32 Handle_Scan(struct host_if_drv *hif_drv, ...@@ -904,9 +906,9 @@ static s32 Handle_Scan(struct host_if_drv *hif_drv,
strWIDList[u32WidsCount].val = (s8 *)&pstrHostIFscanAttr->src; strWIDList[u32WidsCount].val = (s8 *)&pstrHostIFscanAttr->src;
u32WidsCount++; u32WidsCount++;
if (hif_drv->enuHostIFstate == HOST_IF_CONNECTED) if (hif_drv->hif_state == HOST_IF_CONNECTED)
scan_while_connected = true; scan_while_connected = true;
else if (hif_drv->enuHostIFstate == HOST_IF_IDLE) else if (hif_drv->hif_state == HOST_IF_IDLE)
scan_while_connected = false; scan_while_connected = false;
result = send_config_pkt(SET_CFG, strWIDList, u32WidsCount, result = send_config_pkt(SET_CFG, strWIDList, u32WidsCount,
...@@ -1214,7 +1216,7 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv, ...@@ -1214,7 +1216,7 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
goto ERRORHANDLER; goto ERRORHANDLER;
} else { } else {
PRINT_D(GENERIC_DBG, "set HOST_IF_WAITING_CONN_RESP\n"); PRINT_D(GENERIC_DBG, "set HOST_IF_WAITING_CONN_RESP\n");
hif_drv->enuHostIFstate = HOST_IF_WAITING_CONN_RESP; hif_drv->hif_state = HOST_IF_WAITING_CONN_RESP;
} }
ERRORHANDLER: ERRORHANDLER:
...@@ -1244,7 +1246,7 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv, ...@@ -1244,7 +1246,7 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
MAC_DISCONNECTED, MAC_DISCONNECTED,
NULL, NULL,
pstrHostIFconnectAttr->arg); pstrHostIFconnectAttr->arg);
hif_drv->enuHostIFstate = HOST_IF_IDLE; hif_drv->hif_state = HOST_IF_IDLE;
kfree(strConnectInfo.pu8ReqIEs); kfree(strConnectInfo.pu8ReqIEs);
strConnectInfo.pu8ReqIEs = NULL; strConnectInfo.pu8ReqIEs = NULL;
...@@ -1325,7 +1327,7 @@ static s32 Handle_ConnectTimeout(struct host_if_drv *hif_drv) ...@@ -1325,7 +1327,7 @@ static s32 Handle_ConnectTimeout(struct host_if_drv *hif_drv)
return result; return result;
} }
hif_drv->enuHostIFstate = HOST_IF_IDLE; hif_drv->hif_state = HOST_IF_IDLE;
scan_while_connected = false; scan_while_connected = false;
...@@ -1491,11 +1493,11 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv, ...@@ -1491,11 +1493,11 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv,
PRINT_ER("Driver handler is NULL\n"); PRINT_ER("Driver handler is NULL\n");
return -ENODEV; return -ENODEV;
} }
PRINT_D(GENERIC_DBG, "Current State = %d,Received state = %d\n", hif_drv->enuHostIFstate, PRINT_D(GENERIC_DBG, "Current State = %d,Received state = %d\n",
pstrRcvdGnrlAsyncInfo->buffer[7]); hif_drv->hif_state, pstrRcvdGnrlAsyncInfo->buffer[7]);
if ((hif_drv->enuHostIFstate == HOST_IF_WAITING_CONN_RESP) || if ((hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) ||
(hif_drv->enuHostIFstate == HOST_IF_CONNECTED) || (hif_drv->hif_state == HOST_IF_CONNECTED) ||
hif_drv->usr_scan_req.pfUserScanResult) { hif_drv->usr_scan_req.pfUserScanResult) {
if (!pstrRcvdGnrlAsyncInfo->buffer || if (!pstrRcvdGnrlAsyncInfo->buffer ||
!hif_drv->usr_conn_req.pfUserConnectResult) { !hif_drv->usr_conn_req.pfUserConnectResult) {
...@@ -1518,7 +1520,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv, ...@@ -1518,7 +1520,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv,
u8MacStatusReasonCode = pstrRcvdGnrlAsyncInfo->buffer[8]; u8MacStatusReasonCode = pstrRcvdGnrlAsyncInfo->buffer[8];
u8MacStatusAdditionalInfo = pstrRcvdGnrlAsyncInfo->buffer[9]; u8MacStatusAdditionalInfo = pstrRcvdGnrlAsyncInfo->buffer[9];
PRINT_INFO(HOSTINF_DBG, "Recieved MAC status = %d with Reason = %d , Info = %d\n", u8MacStatus, u8MacStatusReasonCode, u8MacStatusAdditionalInfo); PRINT_INFO(HOSTINF_DBG, "Recieved MAC status = %d with Reason = %d , Info = %d\n", u8MacStatus, u8MacStatusReasonCode, u8MacStatusAdditionalInfo);
if (hif_drv->enuHostIFstate == HOST_IF_WAITING_CONN_RESP) { if (hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) {
u32 u32RcvdAssocRespInfoLen; u32 u32RcvdAssocRespInfoLen;
tstrConnectRespInfo *pstrConnectRespInfo = NULL; tstrConnectRespInfo *pstrConnectRespInfo = NULL;
...@@ -1604,7 +1606,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv, ...@@ -1604,7 +1606,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv,
host_int_set_power_mgmt(hif_drv, 0, 0); host_int_set_power_mgmt(hif_drv, 0, 0);
PRINT_D(HOSTINF_DBG, "MAC status : CONNECTED and Connect Status : Successful\n"); PRINT_D(HOSTINF_DBG, "MAC status : CONNECTED and Connect Status : Successful\n");
hif_drv->enuHostIFstate = HOST_IF_CONNECTED; hif_drv->hif_state = HOST_IF_CONNECTED;
PRINT_D(GENERIC_DBG, "Obtaining an IP, Disable Scan\n"); PRINT_D(GENERIC_DBG, "Obtaining an IP, Disable Scan\n");
g_obtainingIP = true; g_obtainingIP = true;
...@@ -1612,7 +1614,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv, ...@@ -1612,7 +1614,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv,
jiffies + msecs_to_jiffies(10000)); jiffies + msecs_to_jiffies(10000));
} else { } else {
PRINT_D(HOSTINF_DBG, "MAC status : %d and Connect Status : %d\n", u8MacStatus, strConnectInfo.u16ConnectStatus); PRINT_D(HOSTINF_DBG, "MAC status : %d and Connect Status : %d\n", u8MacStatus, strConnectInfo.u16ConnectStatus);
hif_drv->enuHostIFstate = HOST_IF_IDLE; hif_drv->hif_state = HOST_IF_IDLE;
scan_while_connected = false; scan_while_connected = false;
} }
...@@ -1627,7 +1629,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv, ...@@ -1627,7 +1629,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv,
hif_drv->usr_conn_req.ConnReqIEsLen = 0; hif_drv->usr_conn_req.ConnReqIEsLen = 0;
kfree(hif_drv->usr_conn_req.pu8ConnReqIEs); kfree(hif_drv->usr_conn_req.pu8ConnReqIEs);
} else if ((u8MacStatus == MAC_DISCONNECTED) && } else if ((u8MacStatus == MAC_DISCONNECTED) &&
(hif_drv->enuHostIFstate == HOST_IF_CONNECTED)) { (hif_drv->hif_state == HOST_IF_CONNECTED)) {
PRINT_D(HOSTINF_DBG, "Received MAC_DISCONNECTED from the FW\n"); PRINT_D(HOSTINF_DBG, "Received MAC_DISCONNECTED from the FW\n");
memset(&strDisconnectNotifInfo, 0, sizeof(tstrDisconnectNotifInfo)); memset(&strDisconnectNotifInfo, 0, sizeof(tstrDisconnectNotifInfo));
...@@ -1673,7 +1675,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv, ...@@ -1673,7 +1675,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv,
info_element = NULL; info_element = NULL;
} }
hif_drv->enuHostIFstate = HOST_IF_IDLE; hif_drv->hif_state = HOST_IF_IDLE;
scan_while_connected = false; scan_while_connected = false;
} else if ((u8MacStatus == MAC_DISCONNECTED) && } else if ((u8MacStatus == MAC_DISCONNECTED) &&
...@@ -1837,10 +1839,10 @@ static int Handle_Key(struct host_if_drv *hif_drv, ...@@ -1837,10 +1839,10 @@ static int Handle_Key(struct host_if_drv *hif_drv,
goto _WPARxGtk_end_case_; goto _WPARxGtk_end_case_;
} }
if (hif_drv->enuHostIFstate == HOST_IF_CONNECTED) if (hif_drv->hif_state == HOST_IF_CONNECTED)
memcpy(pu8keybuf, hif_drv->au8AssociatedBSSID, ETH_ALEN); memcpy(pu8keybuf, hif_drv->au8AssociatedBSSID, ETH_ALEN);
else else
PRINT_ER("Couldn't handle WPARxGtk while enuHostIFstate is not HOST_IF_CONNECTED\n"); PRINT_ER("Couldn't handle WPARxGtk while state is not HOST_IF_CONNECTED\n");
memcpy(pu8keybuf + 6, pstrHostIFkeyAttr->attr.wpa.seq, 8); memcpy(pu8keybuf + 6, pstrHostIFkeyAttr->attr.wpa.seq, 8);
memcpy(pu8keybuf + 14, &pstrHostIFkeyAttr->attr.wpa.index, 1); memcpy(pu8keybuf + 14, &pstrHostIFkeyAttr->attr.wpa.index, 1);
...@@ -2005,7 +2007,7 @@ static void Handle_Disconnect(struct host_if_drv *hif_drv) ...@@ -2005,7 +2007,7 @@ static void Handle_Disconnect(struct host_if_drv *hif_drv)
} }
if (hif_drv->usr_conn_req.pfUserConnectResult) { if (hif_drv->usr_conn_req.pfUserConnectResult) {
if (hif_drv->enuHostIFstate == HOST_IF_WAITING_CONN_RESP) { if (hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) {
PRINT_D(HOSTINF_DBG, "Upper layer requested termination of connection\n"); PRINT_D(HOSTINF_DBG, "Upper layer requested termination of connection\n");
del_timer(&hif_drv->hConnectTimer); del_timer(&hif_drv->hConnectTimer);
} }
...@@ -2018,7 +2020,7 @@ static void Handle_Disconnect(struct host_if_drv *hif_drv) ...@@ -2018,7 +2020,7 @@ static void Handle_Disconnect(struct host_if_drv *hif_drv)
scan_while_connected = false; scan_while_connected = false;
hif_drv->enuHostIFstate = HOST_IF_IDLE; hif_drv->hif_state = HOST_IF_IDLE;
eth_zero_addr(hif_drv->au8AssociatedBSSID); eth_zero_addr(hif_drv->au8AssociatedBSSID);
...@@ -2046,7 +2048,8 @@ void resolve_disconnect_aberration(struct host_if_drv *hif_drv) ...@@ -2046,7 +2048,8 @@ void resolve_disconnect_aberration(struct host_if_drv *hif_drv)
{ {
if (!hif_drv) if (!hif_drv)
return; return;
if ((hif_drv->enuHostIFstate == HOST_IF_WAITING_CONN_RESP) || (hif_drv->enuHostIFstate == HOST_IF_CONNECTING)) { if ((hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) ||
(hif_drv->hif_state == HOST_IF_CONNECTING)) {
PRINT_D(HOSTINF_DBG, "\n\n<< correcting Supplicant state machine >>\n\n"); PRINT_D(HOSTINF_DBG, "\n\n<< correcting Supplicant state machine >>\n\n");
host_int_disconnect(hif_drv, 1); host_int_disconnect(hif_drv, 1);
} }
...@@ -2492,7 +2495,7 @@ static int Handle_RemainOnChan(struct host_if_drv *hif_drv, ...@@ -2492,7 +2495,7 @@ static int Handle_RemainOnChan(struct host_if_drv *hif_drv,
result = -EBUSY; result = -EBUSY;
goto ERRORHANDLER; goto ERRORHANDLER;
} }
if (hif_drv->enuHostIFstate == HOST_IF_WAITING_CONN_RESP) { if (hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) {
PRINT_INFO(GENERIC_DBG, "Required to remain on chan while connecting return\n"); PRINT_INFO(GENERIC_DBG, "Required to remain on chan while connecting return\n");
result = -EBUSY; result = -EBUSY;
goto ERRORHANDLER; goto ERRORHANDLER;
...@@ -3497,10 +3500,11 @@ s32 host_int_set_join_req(struct host_if_drv *hif_drv, u8 *pu8bssid, ...@@ -3497,10 +3500,11 @@ s32 host_int_set_join_req(struct host_if_drv *hif_drv, u8 *pu8bssid,
msg.body.con_info.ies = kmalloc(IEsLen, GFP_KERNEL); msg.body.con_info.ies = kmalloc(IEsLen, GFP_KERNEL);
memcpy(msg.body.con_info.ies, pu8IEs, IEsLen); memcpy(msg.body.con_info.ies, pu8IEs, IEsLen);
} }
if (hif_drv->enuHostIFstate < HOST_IF_CONNECTING) if (hif_drv->hif_state < HOST_IF_CONNECTING)
hif_drv->enuHostIFstate = HOST_IF_CONNECTING; hif_drv->hif_state = HOST_IF_CONNECTING;
else else
PRINT_D(GENERIC_DBG, "Don't set state to 'connecting' as state is %d\n", hif_drv->enuHostIFstate); PRINT_D(GENERIC_DBG, "Don't set state to 'connecting' : %d\n",
hif_drv->hif_state);
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg)); result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (result) { if (result) {
...@@ -4046,7 +4050,7 @@ static void GetPeriodicRSSI(unsigned long arg) ...@@ -4046,7 +4050,7 @@ static void GetPeriodicRSSI(unsigned long arg)
return; return;
} }
if (hif_drv->enuHostIFstate == HOST_IF_CONNECTED) { if (hif_drv->hif_state == HOST_IF_CONNECTED) {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
...@@ -4142,7 +4146,7 @@ s32 host_int_init(struct net_device *dev, struct host_if_drv **hif_drv_handler) ...@@ -4142,7 +4146,7 @@ s32 host_int_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
sema_init(&hif_drv->gtOsCfgValuesSem, 1); sema_init(&hif_drv->gtOsCfgValuesSem, 1);
down(&hif_drv->gtOsCfgValuesSem); down(&hif_drv->gtOsCfgValuesSem);
hif_drv->enuHostIFstate = HOST_IF_IDLE; hif_drv->hif_state = HOST_IF_IDLE;
hif_drv->strCfgValues.site_survey_enabled = SITE_SURVEY_OFF; hif_drv->strCfgValues.site_survey_enabled = SITE_SURVEY_OFF;
hif_drv->strCfgValues.scan_source = DEFAULT_SCAN; hif_drv->strCfgValues.scan_source = DEFAULT_SCAN;
hif_drv->strCfgValues.active_scan_time = ACTIVE_SCAN_TIME; hif_drv->strCfgValues.active_scan_time = ACTIVE_SCAN_TIME;
...@@ -4211,7 +4215,7 @@ s32 host_int_deinit(struct host_if_drv *hif_drv) ...@@ -4211,7 +4215,7 @@ s32 host_int_deinit(struct host_if_drv *hif_drv)
hif_drv->usr_scan_req.pfUserScanResult = NULL; hif_drv->usr_scan_req.pfUserScanResult = NULL;
} }
hif_drv->enuHostIFstate = HOST_IF_IDLE; hif_drv->hif_state = HOST_IF_IDLE;
scan_while_connected = false; scan_while_connected = false;
......
...@@ -299,7 +299,7 @@ struct host_if_drv { ...@@ -299,7 +299,7 @@ struct host_if_drv {
u64 u64P2p_MgmtTimeout; u64 u64P2p_MgmtTimeout;
u8 u8P2PConnect; u8 u8P2PConnect;
enum host_if_state enuHostIFstate; enum host_if_state hif_state;
u8 au8AssociatedBSSID[ETH_ALEN]; u8 au8AssociatedBSSID[ETH_ALEN];
struct cfg_param_val strCfgValues; struct cfg_param_val strCfgValues;
......
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