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

staging: wilc1000: rename CfgConnectResult() and its local variable names

This is cleanup patch,to avoid use of camelCase for variable name
and function names in CfgConnectResult().
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ffde2670
...@@ -469,92 +469,92 @@ static void CfgScanResult(enum scan_event scan_event, ...@@ -469,92 +469,92 @@ static void CfgScanResult(enum scan_event scan_event,
int wilc_connecting; int wilc_connecting;
static void CfgConnectResult(enum conn_event enuConnDisconnEvent, static void cfg_connect_result(enum conn_event conn_disconn_evt,
struct connect_info *pstrConnectInfo, struct connect_info *conn_info,
u8 u8MacStatus, u8 mac_status,
struct disconnect_info *pstrDisconnectNotifInfo, struct disconnect_info *disconn_info,
void *pUserVoid) void *priv_data)
{ {
struct wilc_priv *priv; struct wilc_priv *priv;
struct net_device *dev; struct net_device *dev;
struct host_if_drv *pstrWFIDrv; struct host_if_drv *wfi_drv;
u8 NullBssid[ETH_ALEN] = {0}; u8 null_bssid[ETH_ALEN] = {0};
struct wilc *wl; struct wilc *wl;
struct wilc_vif *vif; struct wilc_vif *vif;
wilc_connecting = 0; wilc_connecting = 0;
priv = pUserVoid; priv = priv_data;
dev = priv->dev; dev = priv->dev;
vif = netdev_priv(dev); vif = netdev_priv(dev);
wl = vif->wilc; wl = vif->wilc;
pstrWFIDrv = (struct host_if_drv *)priv->hif_drv; wfi_drv = (struct host_if_drv *)priv->hif_drv;
if (enuConnDisconnEvent == CONN_DISCONN_EVENT_CONN_RESP) { if (conn_disconn_evt == CONN_DISCONN_EVENT_CONN_RESP) {
u16 u16ConnectStatus; u16 connect_status;
u16ConnectStatus = pstrConnectInfo->status; connect_status = conn_info->status;
if ((u8MacStatus == MAC_DISCONNECTED) && if ((mac_status == MAC_DISCONNECTED) &&
(pstrConnectInfo->status == SUCCESSFUL_STATUSCODE)) { (conn_info->status == SUCCESSFUL_STATUSCODE)) {
u16ConnectStatus = WLAN_STATUS_UNSPECIFIED_FAILURE; connect_status = WLAN_STATUS_UNSPECIFIED_FAILURE;
wilc_wlan_set_bssid(priv->dev, NullBssid, wilc_wlan_set_bssid(priv->dev, null_bssid,
STATION_MODE); STATION_MODE);
eth_zero_addr(wilc_connected_ssid); eth_zero_addr(wilc_connected_ssid);
if (!pstrWFIDrv->p2p_connect) if (!wfi_drv->p2p_connect)
wlan_channel = INVALID_CHANNEL; wlan_channel = INVALID_CHANNEL;
netdev_err(dev, "Unspecified failure\n"); netdev_err(dev, "Unspecified failure\n");
} }
if (u16ConnectStatus == WLAN_STATUS_SUCCESS) { if (connect_status == WLAN_STATUS_SUCCESS) {
bool bNeedScanRefresh = false; bool scan_refresh = false;
u32 i; u32 i;
memcpy(priv->associated_bss, pstrConnectInfo->bssid, ETH_ALEN); memcpy(priv->associated_bss, conn_info->bssid, ETH_ALEN);
for (i = 0; i < last_scanned_cnt; i++) { for (i = 0; i < last_scanned_cnt; i++) {
if (memcmp(last_scanned_shadow[i].bssid, if (memcmp(last_scanned_shadow[i].bssid,
pstrConnectInfo->bssid, conn_info->bssid,
ETH_ALEN) == 0) { ETH_ALEN) == 0) {
unsigned long now = jiffies; unsigned long now = jiffies;
if (time_after(now, if (time_after(now,
last_scanned_shadow[i].time_scan_cached + last_scanned_shadow[i].time_scan_cached +
(unsigned long)(nl80211_SCAN_RESULT_EXPIRE - (1 * HZ)))) (unsigned long)(nl80211_SCAN_RESULT_EXPIRE - (1 * HZ))))
bNeedScanRefresh = true; scan_refresh = true;
break; break;
} }
} }
if (bNeedScanRefresh) if (scan_refresh)
refresh_scan(priv, true); refresh_scan(priv, true);
} }
cfg80211_connect_result(dev, pstrConnectInfo->bssid, cfg80211_connect_result(dev, conn_info->bssid,
pstrConnectInfo->req_ies, pstrConnectInfo->req_ies_len, conn_info->req_ies, conn_info->req_ies_len,
pstrConnectInfo->resp_ies, pstrConnectInfo->resp_ies_len, conn_info->resp_ies, conn_info->resp_ies_len,
u16ConnectStatus, GFP_KERNEL); connect_status, GFP_KERNEL);
} else if (enuConnDisconnEvent == CONN_DISCONN_EVENT_DISCONN_NOTIF) { } else if (conn_disconn_evt == CONN_DISCONN_EVENT_DISCONN_NOTIF) {
wilc_optaining_ip = false; wilc_optaining_ip = false;
p2p_local_random = 0x01; p2p_local_random = 0x01;
p2p_recv_random = 0x00; p2p_recv_random = 0x00;
wilc_ie = false; wilc_ie = false;
eth_zero_addr(priv->associated_bss); eth_zero_addr(priv->associated_bss);
wilc_wlan_set_bssid(priv->dev, NullBssid, STATION_MODE); wilc_wlan_set_bssid(priv->dev, null_bssid, STATION_MODE);
eth_zero_addr(wilc_connected_ssid); eth_zero_addr(wilc_connected_ssid);
if (!pstrWFIDrv->p2p_connect) if (!wfi_drv->p2p_connect)
wlan_channel = INVALID_CHANNEL; wlan_channel = INVALID_CHANNEL;
if ((pstrWFIDrv->IFC_UP) && (dev == wl->vif[1]->ndev)) if ((wfi_drv->IFC_UP) && (dev == wl->vif[1]->ndev))
pstrDisconnectNotifInfo->reason = 3; disconn_info->reason = 3;
else if ((!pstrWFIDrv->IFC_UP) && (dev == wl->vif[1]->ndev)) else if ((!wfi_drv->IFC_UP) && (dev == wl->vif[1]->ndev))
pstrDisconnectNotifInfo->reason = 1; disconn_info->reason = 1;
cfg80211_disconnected(dev, pstrDisconnectNotifInfo->reason, pstrDisconnectNotifInfo->ie, cfg80211_disconnected(dev, disconn_info->reason, disconn_info->ie,
pstrDisconnectNotifInfo->ie_len, false, disconn_info->ie_len, false,
GFP_KERNEL); GFP_KERNEL);
} }
} }
...@@ -794,7 +794,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -794,7 +794,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
ret = wilc_set_join_req(vif, pstrNetworkInfo->bssid, sme->ssid, ret = wilc_set_join_req(vif, pstrNetworkInfo->bssid, sme->ssid,
sme->ssid_len, sme->ie, sme->ie_len, sme->ssid_len, sme->ie, sme->ie_len,
CfgConnectResult, (void *)priv, cfg_connect_result, (void *)priv,
u8security, tenuAuth_type, u8security, tenuAuth_type,
pstrNetworkInfo->ch, pstrNetworkInfo->ch,
pstrNetworkInfo->join_params); pstrNetworkInfo->join_params);
......
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