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

staging: wilc1000: rename strWILC_UsrScanReq of struct host_if_drv

This patch renames strWILC_UsrScanReq of struct host_if_drv to usr_scan_req
to avoid CamelCase naming convention.
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 6ceba0af
...@@ -822,8 +822,8 @@ static s32 Handle_Scan(struct host_if_drv *hif_drv, ...@@ -822,8 +822,8 @@ static s32 Handle_Scan(struct host_if_drv *hif_drv,
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->enuHostIFstate);
hif_drv->strWILC_UsrScanReq.pfUserScanResult = pstrHostIFscanAttr->result; hif_drv->usr_scan_req.pfUserScanResult = pstrHostIFscanAttr->result;
hif_drv->strWILC_UsrScanReq.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->enuHostIFstate >= HOST_IF_SCANNING) && (hif_drv->enuHostIFstate < HOST_IF_CONNECTED)) {
PRINT_D(GENERIC_DBG, "Don't scan we are already in [%d] state\n", hif_drv->enuHostIFstate); PRINT_D(GENERIC_DBG, "Don't scan we are already in [%d] state\n", hif_drv->enuHostIFstate);
...@@ -841,7 +841,7 @@ static s32 Handle_Scan(struct host_if_drv *hif_drv, ...@@ -841,7 +841,7 @@ static s32 Handle_Scan(struct host_if_drv *hif_drv,
PRINT_D(HOSTINF_DBG, "Setting SCAN params\n"); PRINT_D(HOSTINF_DBG, "Setting SCAN params\n");
hif_drv->strWILC_UsrScanReq.u32RcvdChCount = 0; hif_drv->usr_scan_req.u32RcvdChCount = 0;
strWIDList[u32WidsCount].id = (u16)WID_SSID_PROBE_REQ; strWIDList[u32WidsCount].id = (u16)WID_SSID_PROBE_REQ;
strWIDList[u32WidsCount].type = WID_STR; strWIDList[u32WidsCount].type = WID_STR;
...@@ -967,10 +967,10 @@ static s32 Handle_ScanDone(struct host_if_drv *hif_drv, ...@@ -967,10 +967,10 @@ static s32 Handle_ScanDone(struct host_if_drv *hif_drv,
return result; return result;
} }
if (hif_drv->strWILC_UsrScanReq.pfUserScanResult) { if (hif_drv->usr_scan_req.pfUserScanResult) {
hif_drv->strWILC_UsrScanReq.pfUserScanResult(enuEvent, NULL, hif_drv->usr_scan_req.pfUserScanResult(enuEvent, NULL,
hif_drv->strWILC_UsrScanReq.u32UserScanPvoid, NULL); hif_drv->usr_scan_req.u32UserScanPvoid, NULL);
hif_drv->strWILC_UsrScanReq.pfUserScanResult = NULL; hif_drv->usr_scan_req.pfUserScanResult = NULL;
} }
return result; return result;
...@@ -1402,26 +1402,26 @@ static s32 Handle_RcvdNtwrkInfo(struct host_if_drv *hif_drv, ...@@ -1402,26 +1402,26 @@ static s32 Handle_RcvdNtwrkInfo(struct host_if_drv *hif_drv,
bNewNtwrkFound = true; bNewNtwrkFound = true;
PRINT_INFO(HOSTINF_DBG, "Handling received network info\n"); PRINT_INFO(HOSTINF_DBG, "Handling received network info\n");
if (hif_drv->strWILC_UsrScanReq.pfUserScanResult) { if (hif_drv->usr_scan_req.pfUserScanResult) {
PRINT_D(HOSTINF_DBG, "State: Scanning, parsing network information received\n"); PRINT_D(HOSTINF_DBG, "State: Scanning, parsing network information received\n");
parse_network_info(pstrRcvdNetworkInfo->buffer, &pstrNetworkInfo); parse_network_info(pstrRcvdNetworkInfo->buffer, &pstrNetworkInfo);
if ((!pstrNetworkInfo) || if ((!pstrNetworkInfo) ||
(!hif_drv->strWILC_UsrScanReq.pfUserScanResult)) { (!hif_drv->usr_scan_req.pfUserScanResult)) {
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
result = -EINVAL; result = -EINVAL;
goto done; goto done;
} }
for (i = 0; i < hif_drv->strWILC_UsrScanReq.u32RcvdChCount; i++) { for (i = 0; i < hif_drv->usr_scan_req.u32RcvdChCount; i++) {
if ((hif_drv->strWILC_UsrScanReq.astrFoundNetworkInfo[i].au8bssid) && if ((hif_drv->usr_scan_req.astrFoundNetworkInfo[i].au8bssid) &&
(pstrNetworkInfo->au8bssid)) { (pstrNetworkInfo->au8bssid)) {
if (memcmp(hif_drv->strWILC_UsrScanReq.astrFoundNetworkInfo[i].au8bssid, if (memcmp(hif_drv->usr_scan_req.astrFoundNetworkInfo[i].au8bssid,
pstrNetworkInfo->au8bssid, 6) == 0) { pstrNetworkInfo->au8bssid, 6) == 0) {
if (pstrNetworkInfo->s8rssi <= hif_drv->strWILC_UsrScanReq.astrFoundNetworkInfo[i].s8rssi) { if (pstrNetworkInfo->s8rssi <= hif_drv->usr_scan_req.astrFoundNetworkInfo[i].s8rssi) {
PRINT_D(HOSTINF_DBG, "Network previously discovered\n"); PRINT_D(HOSTINF_DBG, "Network previously discovered\n");
goto done; goto done;
} else { } else {
hif_drv->strWILC_UsrScanReq.astrFoundNetworkInfo[i].s8rssi = pstrNetworkInfo->s8rssi; hif_drv->usr_scan_req.astrFoundNetworkInfo[i].s8rssi = pstrNetworkInfo->s8rssi;
bNewNtwrkFound = false; bNewNtwrkFound = false;
break; break;
} }
...@@ -1432,21 +1432,21 @@ static s32 Handle_RcvdNtwrkInfo(struct host_if_drv *hif_drv, ...@@ -1432,21 +1432,21 @@ static s32 Handle_RcvdNtwrkInfo(struct host_if_drv *hif_drv,
if (bNewNtwrkFound) { if (bNewNtwrkFound) {
PRINT_D(HOSTINF_DBG, "New network found\n"); PRINT_D(HOSTINF_DBG, "New network found\n");
if (hif_drv->strWILC_UsrScanReq.u32RcvdChCount < MAX_NUM_SCANNED_NETWORKS) { if (hif_drv->usr_scan_req.u32RcvdChCount < MAX_NUM_SCANNED_NETWORKS) {
hif_drv->strWILC_UsrScanReq.astrFoundNetworkInfo[hif_drv->strWILC_UsrScanReq.u32RcvdChCount].s8rssi = pstrNetworkInfo->s8rssi; hif_drv->usr_scan_req.astrFoundNetworkInfo[hif_drv->usr_scan_req.u32RcvdChCount].s8rssi = pstrNetworkInfo->s8rssi;
if (hif_drv->strWILC_UsrScanReq.astrFoundNetworkInfo[hif_drv->strWILC_UsrScanReq.u32RcvdChCount].au8bssid && if (hif_drv->usr_scan_req.astrFoundNetworkInfo[hif_drv->usr_scan_req.u32RcvdChCount].au8bssid &&
pstrNetworkInfo->au8bssid) { pstrNetworkInfo->au8bssid) {
memcpy(hif_drv->strWILC_UsrScanReq.astrFoundNetworkInfo[hif_drv->strWILC_UsrScanReq.u32RcvdChCount].au8bssid, memcpy(hif_drv->usr_scan_req.astrFoundNetworkInfo[hif_drv->usr_scan_req.u32RcvdChCount].au8bssid,
pstrNetworkInfo->au8bssid, 6); pstrNetworkInfo->au8bssid, 6);
hif_drv->strWILC_UsrScanReq.u32RcvdChCount++; hif_drv->usr_scan_req.u32RcvdChCount++;
pstrNetworkInfo->bNewNetwork = true; pstrNetworkInfo->bNewNetwork = true;
pJoinParams = host_int_ParseJoinBssParam(pstrNetworkInfo); pJoinParams = host_int_ParseJoinBssParam(pstrNetworkInfo);
hif_drv->strWILC_UsrScanReq.pfUserScanResult(SCAN_EVENT_NETWORK_FOUND, pstrNetworkInfo, hif_drv->usr_scan_req.pfUserScanResult(SCAN_EVENT_NETWORK_FOUND, pstrNetworkInfo,
hif_drv->strWILC_UsrScanReq.u32UserScanPvoid, hif_drv->usr_scan_req.u32UserScanPvoid,
pJoinParams); pJoinParams);
} }
} else { } else {
...@@ -1454,8 +1454,8 @@ static s32 Handle_RcvdNtwrkInfo(struct host_if_drv *hif_drv, ...@@ -1454,8 +1454,8 @@ static s32 Handle_RcvdNtwrkInfo(struct host_if_drv *hif_drv,
} }
} else { } else {
pstrNetworkInfo->bNewNetwork = false; pstrNetworkInfo->bNewNetwork = false;
hif_drv->strWILC_UsrScanReq.pfUserScanResult(SCAN_EVENT_NETWORK_FOUND, pstrNetworkInfo, hif_drv->usr_scan_req.pfUserScanResult(SCAN_EVENT_NETWORK_FOUND, pstrNetworkInfo,
hif_drv->strWILC_UsrScanReq.u32UserScanPvoid, NULL); hif_drv->usr_scan_req.u32UserScanPvoid, NULL);
} }
} }
...@@ -1496,7 +1496,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv, ...@@ -1496,7 +1496,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv,
if ((hif_drv->enuHostIFstate == HOST_IF_WAITING_CONN_RESP) || if ((hif_drv->enuHostIFstate == HOST_IF_WAITING_CONN_RESP) ||
(hif_drv->enuHostIFstate == HOST_IF_CONNECTED) || (hif_drv->enuHostIFstate == HOST_IF_CONNECTED) ||
hif_drv->strWILC_UsrScanReq.pfUserScanResult) { hif_drv->usr_scan_req.pfUserScanResult) {
if (!pstrRcvdGnrlAsyncInfo->buffer || if (!pstrRcvdGnrlAsyncInfo->buffer ||
!hif_drv->strWILC_UsrConnReq.pfUserConnectResult) { !hif_drv->strWILC_UsrConnReq.pfUserConnectResult) {
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
...@@ -1632,7 +1632,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv, ...@@ -1632,7 +1632,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv,
memset(&strDisconnectNotifInfo, 0, sizeof(tstrDisconnectNotifInfo)); memset(&strDisconnectNotifInfo, 0, sizeof(tstrDisconnectNotifInfo));
if (hif_drv->strWILC_UsrScanReq.pfUserScanResult) { if (hif_drv->usr_scan_req.pfUserScanResult) {
PRINT_D(HOSTINF_DBG, "\n\n<< Abort the running OBSS Scan >>\n\n"); PRINT_D(HOSTINF_DBG, "\n\n<< Abort the running OBSS Scan >>\n\n");
del_timer(&hif_drv->hScanTimer); del_timer(&hif_drv->hScanTimer);
Handle_ScanDone((void *)hif_drv, SCAN_EVENT_ABORTED); Handle_ScanDone((void *)hif_drv, SCAN_EVENT_ABORTED);
...@@ -1678,12 +1678,12 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv, ...@@ -1678,12 +1678,12 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv,
scan_while_connected = false; scan_while_connected = false;
} else if ((u8MacStatus == MAC_DISCONNECTED) && } else if ((u8MacStatus == MAC_DISCONNECTED) &&
(hif_drv->strWILC_UsrScanReq.pfUserScanResult)) { (hif_drv->usr_scan_req.pfUserScanResult)) {
PRINT_D(HOSTINF_DBG, "Received MAC_DISCONNECTED from the FW while scanning\n"); PRINT_D(HOSTINF_DBG, "Received MAC_DISCONNECTED from the FW while scanning\n");
PRINT_D(HOSTINF_DBG, "\n\n<< Abort the running Scan >>\n\n"); PRINT_D(HOSTINF_DBG, "\n\n<< Abort the running Scan >>\n\n");
del_timer(&hif_drv->hScanTimer); del_timer(&hif_drv->hScanTimer);
if (hif_drv->strWILC_UsrScanReq.pfUserScanResult) if (hif_drv->usr_scan_req.pfUserScanResult)
Handle_ScanDone(hif_drv, SCAN_EVENT_ABORTED); Handle_ScanDone(hif_drv, SCAN_EVENT_ABORTED);
} }
} }
...@@ -1997,12 +1997,12 @@ static void Handle_Disconnect(struct host_if_drv *hif_drv) ...@@ -1997,12 +1997,12 @@ static void Handle_Disconnect(struct host_if_drv *hif_drv)
strDisconnectNotifInfo.ie = NULL; strDisconnectNotifInfo.ie = NULL;
strDisconnectNotifInfo.ie_len = 0; strDisconnectNotifInfo.ie_len = 0;
if (hif_drv->strWILC_UsrScanReq.pfUserScanResult) { if (hif_drv->usr_scan_req.pfUserScanResult) {
del_timer(&hif_drv->hScanTimer); del_timer(&hif_drv->hScanTimer);
hif_drv->strWILC_UsrScanReq.pfUserScanResult(SCAN_EVENT_ABORTED, NULL, hif_drv->usr_scan_req.pfUserScanResult(SCAN_EVENT_ABORTED, NULL,
hif_drv->strWILC_UsrScanReq.u32UserScanPvoid, NULL); hif_drv->usr_scan_req.u32UserScanPvoid, NULL);
hif_drv->strWILC_UsrScanReq.pfUserScanResult = NULL; hif_drv->usr_scan_req.pfUserScanResult = NULL;
} }
if (hif_drv->strWILC_UsrConnReq.pfUserConnectResult) { if (hif_drv->strWILC_UsrConnReq.pfUserConnectResult) {
...@@ -2487,7 +2487,7 @@ static int Handle_RemainOnChan(struct host_if_drv *hif_drv, ...@@ -2487,7 +2487,7 @@ static int Handle_RemainOnChan(struct host_if_drv *hif_drv,
pstrHostIfRemainOnChan->u16Channel = hif_drv->strHostIfRemainOnChan.u16Channel; pstrHostIfRemainOnChan->u16Channel = hif_drv->strHostIfRemainOnChan.u16Channel;
} }
if (hif_drv->strWILC_UsrScanReq.pfUserScanResult) { if (hif_drv->usr_scan_req.pfUserScanResult) {
PRINT_INFO(GENERIC_DBG, "Required to remain on chan while scanning return\n"); PRINT_INFO(GENERIC_DBG, "Required to remain on chan while scanning return\n");
hif_drv->u8RemainOnChan_pendingreq = 1; hif_drv->u8RemainOnChan_pendingreq = 1;
result = -EBUSY; result = -EBUSY;
...@@ -2829,7 +2829,7 @@ static int hostIFthread(void *pvArg) ...@@ -2829,7 +2829,7 @@ static int hostIFthread(void *pvArg)
} }
if (msg.id == HOST_IF_MSG_CONNECT && if (msg.id == HOST_IF_MSG_CONNECT &&
hif_drv->strWILC_UsrScanReq.pfUserScanResult) { hif_drv->usr_scan_req.pfUserScanResult) {
PRINT_D(HOSTINF_DBG, "Requeue connect request till scan done received\n"); PRINT_D(HOSTINF_DBG, "Requeue connect request till scan done received\n");
wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg)); wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
usleep_range(2 * 1000, 2 * 1000); usleep_range(2 * 1000, 2 * 1000);
...@@ -4201,11 +4201,11 @@ s32 host_int_deinit(struct host_if_drv *hif_drv) ...@@ -4201,11 +4201,11 @@ s32 host_int_deinit(struct host_if_drv *hif_drv)
host_int_set_wfi_drv_handler(NULL); host_int_set_wfi_drv_handler(NULL);
down(&hif_sema_driver); down(&hif_sema_driver);
if (hif_drv->strWILC_UsrScanReq.pfUserScanResult) { if (hif_drv->usr_scan_req.pfUserScanResult) {
hif_drv->strWILC_UsrScanReq.pfUserScanResult(SCAN_EVENT_ABORTED, NULL, hif_drv->usr_scan_req.pfUserScanResult(SCAN_EVENT_ABORTED, NULL,
hif_drv->strWILC_UsrScanReq.u32UserScanPvoid, NULL); hif_drv->usr_scan_req.u32UserScanPvoid, NULL);
hif_drv->strWILC_UsrScanReq.pfUserScanResult = NULL; hif_drv->usr_scan_req.pfUserScanResult = NULL;
} }
hif_drv->enuHostIFstate = HOST_IF_IDLE; hif_drv->enuHostIFstate = HOST_IF_IDLE;
...@@ -4329,7 +4329,7 @@ void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length) ...@@ -4329,7 +4329,7 @@ void host_int_ScanCompleteReceived(u8 *pu8Buffer, u32 u32Length)
if (!hif_drv || hif_drv == terminated_handle) if (!hif_drv || hif_drv == terminated_handle)
return; return;
if (hif_drv->strWILC_UsrScanReq.pfUserScanResult) { if (hif_drv->usr_scan_req.pfUserScanResult) {
memset(&msg, 0, sizeof(struct host_if_msg)); memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_RCVD_SCAN_COMPLETE; msg.id = HOST_IF_MSG_RCVD_SCAN_COMPLETE;
......
...@@ -292,7 +292,7 @@ enum p2p_listen_state { ...@@ -292,7 +292,7 @@ enum p2p_listen_state {
}; };
struct host_if_drv { struct host_if_drv {
struct user_scan_req strWILC_UsrScanReq; struct user_scan_req usr_scan_req;
struct user_conn_req strWILC_UsrConnReq; struct user_conn_req strWILC_UsrConnReq;
/*Remain on channel struvture*/ /*Remain on channel struvture*/
......
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