Commit ec62e6d1 authored by Glen Lee's avatar Glen Lee Committed by Greg Kroah-Hartman

staging: wilc1000: wilc_send_config_pkt: pass struct wilc

This patch passes struct wilc to wilc_send_config_pkt. The function
wilc_wlan_cfg_set and wilc_wlan_cfg_get function will get wilc to replace
wilc_dev with it.
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b82d940d
...@@ -588,7 +588,8 @@ s32 wilc_dealloc_assoc_resp_info(tstrConnectRespInfo *pstrConnectRespInfo) ...@@ -588,7 +588,8 @@ s32 wilc_dealloc_assoc_resp_info(tstrConnectRespInfo *pstrConnectRespInfo)
* @date 1 Mar 2012 * @date 1 Mar 2012
* @version 1.0 * @version 1.0
*/ */
s32 wilc_send_config_pkt(u8 mode, struct wid *wids, u32 count, u32 drv) s32 wilc_send_config_pkt(struct wilc *wilc, u8 mode, struct wid *wids,
u32 count, u32 drv)
{ {
s32 counter = 0, ret = 0; s32 counter = 0, ret = 0;
......
...@@ -127,7 +127,8 @@ typedef struct { ...@@ -127,7 +127,8 @@ typedef struct {
size_t ie_len; size_t ie_len;
} tstrDisconnectNotifInfo; } tstrDisconnectNotifInfo;
s32 wilc_send_config_pkt(u8 mode, struct wid *wids, u32 count, u32 drv); s32 wilc_send_config_pkt(struct wilc *wilc, u8 mode, struct wid *wids,
u32 count, u32 drv);
s32 wilc_parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo); s32 wilc_parse_network_info(u8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo);
s32 wilc_dealloc_network_info(tstrNetworkInfo *pstrNetworkInfo); s32 wilc_dealloc_network_info(tstrNetworkInfo *pstrNetworkInfo);
......
...@@ -329,7 +329,7 @@ static s32 handle_set_channel(struct host_if_drv *hif_drv, ...@@ -329,7 +329,7 @@ static s32 handle_set_channel(struct host_if_drv *hif_drv,
PRINT_D(HOSTINF_DBG, "Setting channel\n"); PRINT_D(HOSTINF_DBG, "Setting channel\n");
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) { if (result) {
...@@ -351,7 +351,8 @@ static s32 handle_set_wfi_drv_handler(struct host_if_drv *hif_drv, ...@@ -351,7 +351,8 @@ static s32 handle_set_wfi_drv_handler(struct host_if_drv *hif_drv,
wid.val = (s8 *)&hif_drv_handler->handler; wid.val = (s8 *)&hif_drv_handler->handler;
wid.size = sizeof(u32); wid.size = sizeof(u32);
result = wilc_send_config_pkt(SET_CFG, &wid, 1, hif_drv_handler->handler); result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
hif_drv_handler->handler);
if (!hif_drv) if (!hif_drv)
up(&hif_sema_driver); up(&hif_sema_driver);
...@@ -375,7 +376,7 @@ static s32 handle_set_operation_mode(struct host_if_drv *hif_drv, ...@@ -375,7 +376,7 @@ static s32 handle_set_operation_mode(struct host_if_drv *hif_drv,
wid.val = (s8 *)&hif_op_mode->mode; wid.val = (s8 *)&hif_op_mode->mode;
wid.size = sizeof(u32); wid.size = sizeof(u32);
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if ((hif_op_mode->mode) == IDLE_MODE) if ((hif_op_mode->mode) == IDLE_MODE)
...@@ -410,7 +411,7 @@ static s32 handle_set_ip_address(struct host_if_drv *hif_drv, u8 *ip_addr, u8 id ...@@ -410,7 +411,7 @@ static s32 handle_set_ip_address(struct host_if_drv *hif_drv, u8 *ip_addr, u8 id
wid.val = (u8 *)ip_addr; wid.val = (u8 *)ip_addr;
wid.size = IP_ALEN; wid.size = IP_ALEN;
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
host_int_get_ipaddress(hif_drv, firmware_ip_addr, idx); host_int_get_ipaddress(hif_drv, firmware_ip_addr, idx);
...@@ -435,7 +436,7 @@ static s32 handle_get_ip_address(struct host_if_drv *hif_drv, u8 idx) ...@@ -435,7 +436,7 @@ static s32 handle_get_ip_address(struct host_if_drv *hif_drv, u8 idx)
wid.val = kmalloc(IP_ALEN, GFP_KERNEL); wid.val = kmalloc(IP_ALEN, GFP_KERNEL);
wid.size = IP_ALEN; wid.size = IP_ALEN;
result = wilc_send_config_pkt(GET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, GET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
PRINT_INFO(HOSTINF_DBG, "%pI4\n", wid.val); PRINT_INFO(HOSTINF_DBG, "%pI4\n", wid.val);
...@@ -478,7 +479,7 @@ static s32 handle_set_mac_address(struct host_if_drv *hif_drv, ...@@ -478,7 +479,7 @@ static s32 handle_set_mac_address(struct host_if_drv *hif_drv,
wid.size = ETH_ALEN; wid.size = ETH_ALEN;
PRINT_D(GENERIC_DBG, "mac addr = :%pM\n", wid.val); PRINT_D(GENERIC_DBG, "mac addr = :%pM\n", wid.val);
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) { if (result) {
PRINT_ER("Failed to set mac address\n"); PRINT_ER("Failed to set mac address\n");
...@@ -500,7 +501,7 @@ static s32 handle_get_mac_address(struct host_if_drv *hif_drv, ...@@ -500,7 +501,7 @@ static s32 handle_get_mac_address(struct host_if_drv *hif_drv,
wid.val = get_mac_addr->mac_addr; wid.val = get_mac_addr->mac_addr;
wid.size = ETH_ALEN; wid.size = ETH_ALEN;
result = wilc_send_config_pkt(GET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, GET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) { if (result) {
...@@ -795,8 +796,8 @@ static s32 handle_cfg_param(struct host_if_drv *hif_drv, ...@@ -795,8 +796,8 @@ static s32 handle_cfg_param(struct host_if_drv *hif_drv,
wid_cnt++; wid_cnt++;
} }
result = wilc_send_config_pkt(SET_CFG, wid_list, wid_cnt, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, wid_list,
get_id_from_handler(hif_drv)); wid_cnt, get_id_from_handler(hif_drv));
if (result) if (result)
PRINT_ER("Error in setting CFG params\n"); PRINT_ER("Error in setting CFG params\n");
...@@ -918,7 +919,8 @@ static s32 Handle_Scan(struct host_if_drv *hif_drv, ...@@ -918,7 +919,8 @@ static s32 Handle_Scan(struct host_if_drv *hif_drv,
else if (hif_drv->hif_state == HOST_IF_IDLE) else if (hif_drv->hif_state == HOST_IF_IDLE)
scan_while_connected = false; scan_while_connected = false;
result = wilc_send_config_pkt(SET_CFG, strWIDList, u32WidsCount, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, strWIDList,
u32WidsCount,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) if (result)
...@@ -962,7 +964,7 @@ static s32 Handle_ScanDone(struct host_if_drv *hif_drv, ...@@ -962,7 +964,7 @@ static s32 Handle_ScanDone(struct host_if_drv *hif_drv,
wid.val = (s8 *)&u8abort_running_scan; wid.val = (s8 *)&u8abort_running_scan;
wid.size = sizeof(char); wid.size = sizeof(char);
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) { if (result) {
...@@ -1216,7 +1218,8 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv, ...@@ -1216,7 +1218,8 @@ static s32 Handle_Connect(struct host_if_drv *hif_drv,
PRINT_D(GENERIC_DBG, "save bssid = %pM\n", wilc_connected_SSID); PRINT_D(GENERIC_DBG, "save bssid = %pM\n", wilc_connected_SSID);
} }
result = wilc_send_config_pkt(SET_CFG, strWIDList, u32WidsCount, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, strWIDList,
u32WidsCount,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) { if (result) {
PRINT_ER("failed to send config packet\n"); PRINT_ER("failed to send config packet\n");
...@@ -1313,7 +1316,8 @@ static s32 Handle_FlushConnect(struct host_if_drv *hif_drv) ...@@ -1313,7 +1316,8 @@ static s32 Handle_FlushConnect(struct host_if_drv *hif_drv)
u32WidsCount++; u32WidsCount++;
result = wilc_send_config_pkt(SET_CFG, strWIDList, u32WidsCount, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, strWIDList,
u32WidsCount,
get_id_from_handler(join_req_drv)); get_id_from_handler(join_req_drv));
if (result) { if (result) {
PRINT_ER("failed to send config packet\n"); PRINT_ER("failed to send config packet\n");
...@@ -1374,7 +1378,7 @@ static s32 Handle_ConnectTimeout(struct host_if_drv *hif_drv) ...@@ -1374,7 +1378,7 @@ static s32 Handle_ConnectTimeout(struct host_if_drv *hif_drv)
PRINT_D(HOSTINF_DBG, "Sending disconnect request\n"); PRINT_D(HOSTINF_DBG, "Sending disconnect request\n");
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) if (result)
PRINT_ER("Failed to send dissconect config packet\n"); PRINT_ER("Failed to send dissconect config packet\n");
...@@ -1757,7 +1761,8 @@ static int Handle_Key(struct host_if_drv *hif_drv, ...@@ -1757,7 +1761,8 @@ static int Handle_Key(struct host_if_drv *hif_drv,
strWIDList[3].size = pstrHostIFkeyAttr->attr.wep.key_len; strWIDList[3].size = pstrHostIFkeyAttr->attr.wep.key_len;
strWIDList[3].val = (s8 *)pu8keybuf; strWIDList[3].val = (s8 *)pu8keybuf;
result = wilc_send_config_pkt(SET_CFG, strWIDList, 4, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG,
strWIDList, 4,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
kfree(pu8keybuf); kfree(pu8keybuf);
} }
...@@ -1780,7 +1785,8 @@ static int Handle_Key(struct host_if_drv *hif_drv, ...@@ -1780,7 +1785,8 @@ static int Handle_Key(struct host_if_drv *hif_drv,
wid.val = (s8 *)pu8keybuf; wid.val = (s8 *)pu8keybuf;
wid.size = pstrHostIFkeyAttr->attr.wep.key_len + 2; wid.size = pstrHostIFkeyAttr->attr.wep.key_len + 2;
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG,
&wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
kfree(pu8keybuf); kfree(pu8keybuf);
} else if (pstrHostIFkeyAttr->action & REMOVEKEY) { } else if (pstrHostIFkeyAttr->action & REMOVEKEY) {
...@@ -1792,7 +1798,8 @@ static int Handle_Key(struct host_if_drv *hif_drv, ...@@ -1792,7 +1798,8 @@ static int Handle_Key(struct host_if_drv *hif_drv,
wid.val = s8idxarray; wid.val = s8idxarray;
wid.size = 1; wid.size = 1;
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG,
&wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
} else { } else {
wid.id = (u16)WID_KEY_ID; wid.id = (u16)WID_KEY_ID;
...@@ -1802,7 +1809,8 @@ static int Handle_Key(struct host_if_drv *hif_drv, ...@@ -1802,7 +1809,8 @@ static int Handle_Key(struct host_if_drv *hif_drv,
PRINT_D(HOSTINF_DBG, "Setting default key index\n"); PRINT_D(HOSTINF_DBG, "Setting default key index\n");
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG,
&wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
} }
up(&hif_drv->sem_test_key_block); up(&hif_drv->sem_test_key_block);
...@@ -1835,7 +1843,8 @@ static int Handle_Key(struct host_if_drv *hif_drv, ...@@ -1835,7 +1843,8 @@ static int Handle_Key(struct host_if_drv *hif_drv,
strWIDList[1].val = (s8 *)pu8keybuf; strWIDList[1].val = (s8 *)pu8keybuf;
strWIDList[1].size = RX_MIC_KEY_MSG_LEN; strWIDList[1].size = RX_MIC_KEY_MSG_LEN;
result = wilc_send_config_pkt(SET_CFG, strWIDList, 2, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG,
strWIDList, 2,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
kfree(pu8keybuf); kfree(pu8keybuf);
...@@ -1868,7 +1877,8 @@ static int Handle_Key(struct host_if_drv *hif_drv, ...@@ -1868,7 +1877,8 @@ static int Handle_Key(struct host_if_drv *hif_drv,
wid.val = (s8 *)pu8keybuf; wid.val = (s8 *)pu8keybuf;
wid.size = RX_MIC_KEY_MSG_LEN; wid.size = RX_MIC_KEY_MSG_LEN;
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG,
&wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
kfree(pu8keybuf); kfree(pu8keybuf);
...@@ -1907,7 +1917,8 @@ static int Handle_Key(struct host_if_drv *hif_drv, ...@@ -1907,7 +1917,8 @@ static int Handle_Key(struct host_if_drv *hif_drv,
strWIDList[1].val = (s8 *)pu8keybuf; strWIDList[1].val = (s8 *)pu8keybuf;
strWIDList[1].size = PTK_KEY_MSG_LEN + 1; strWIDList[1].size = PTK_KEY_MSG_LEN + 1;
result = wilc_send_config_pkt(SET_CFG, strWIDList, 2, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG,
strWIDList, 2,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
kfree(pu8keybuf); kfree(pu8keybuf);
up(&hif_drv->sem_test_key_block); up(&hif_drv->sem_test_key_block);
...@@ -1930,7 +1941,8 @@ static int Handle_Key(struct host_if_drv *hif_drv, ...@@ -1930,7 +1941,8 @@ static int Handle_Key(struct host_if_drv *hif_drv,
wid.val = (s8 *)pu8keybuf; wid.val = (s8 *)pu8keybuf;
wid.size = PTK_KEY_MSG_LEN; wid.size = PTK_KEY_MSG_LEN;
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG,
&wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
kfree(pu8keybuf); kfree(pu8keybuf);
up(&hif_drv->sem_test_key_block); up(&hif_drv->sem_test_key_block);
...@@ -1965,7 +1977,7 @@ static int Handle_Key(struct host_if_drv *hif_drv, ...@@ -1965,7 +1977,7 @@ static int Handle_Key(struct host_if_drv *hif_drv,
wid.val = (s8 *)pu8keybuf; wid.val = (s8 *)pu8keybuf;
wid.size = (pstrHostIFkeyAttr->attr.pmkid.numpmkid * PMKSA_KEY_LEN) + 1; wid.size = (pstrHostIFkeyAttr->attr.pmkid.numpmkid * PMKSA_KEY_LEN) + 1;
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
kfree(pu8keybuf); kfree(pu8keybuf);
...@@ -1997,7 +2009,7 @@ static void Handle_Disconnect(struct host_if_drv *hif_drv) ...@@ -1997,7 +2009,7 @@ static void Handle_Disconnect(struct host_if_drv *hif_drv)
eth_zero_addr(wilc_connected_SSID); eth_zero_addr(wilc_connected_SSID);
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) { if (result) {
...@@ -2084,7 +2096,7 @@ static s32 Handle_GetChnl(struct host_if_drv *hif_drv) ...@@ -2084,7 +2096,7 @@ static s32 Handle_GetChnl(struct host_if_drv *hif_drv)
PRINT_D(HOSTINF_DBG, "Getting channel value\n"); PRINT_D(HOSTINF_DBG, "Getting channel value\n");
result = wilc_send_config_pkt(GET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, GET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) { if (result) {
...@@ -2109,7 +2121,7 @@ static void Handle_GetRssi(struct host_if_drv *hif_drv) ...@@ -2109,7 +2121,7 @@ static void Handle_GetRssi(struct host_if_drv *hif_drv)
PRINT_D(HOSTINF_DBG, "Getting RSSI value\n"); PRINT_D(HOSTINF_DBG, "Getting RSSI value\n");
result = wilc_send_config_pkt(GET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, GET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) { if (result) {
PRINT_ER("Failed to get RSSI value\n"); PRINT_ER("Failed to get RSSI value\n");
...@@ -2133,7 +2145,7 @@ static void Handle_GetLinkspeed(struct host_if_drv *hif_drv) ...@@ -2133,7 +2145,7 @@ static void Handle_GetLinkspeed(struct host_if_drv *hif_drv)
PRINT_D(HOSTINF_DBG, "Getting LINKSPEED value\n"); PRINT_D(HOSTINF_DBG, "Getting LINKSPEED value\n");
result = wilc_send_config_pkt(GET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, GET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) { if (result) {
PRINT_ER("Failed to get LINKSPEED value\n"); PRINT_ER("Failed to get LINKSPEED value\n");
...@@ -2178,7 +2190,8 @@ static s32 Handle_GetStatistics(struct host_if_drv *hif_drv, struct rf_info *pst ...@@ -2178,7 +2190,8 @@ static s32 Handle_GetStatistics(struct host_if_drv *hif_drv, struct rf_info *pst
strWIDList[u32WidsCount].val = (s8 *)&pstrStatistics->tx_fail_cnt; strWIDList[u32WidsCount].val = (s8 *)&pstrStatistics->tx_fail_cnt;
u32WidsCount++; u32WidsCount++;
result = wilc_send_config_pkt(GET_CFG, strWIDList, u32WidsCount, result = wilc_send_config_pkt(hif_drv->wilc, GET_CFG, strWIDList,
u32WidsCount,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) if (result)
...@@ -2205,7 +2218,7 @@ static s32 Handle_Get_InActiveTime(struct host_if_drv *hif_drv, ...@@ -2205,7 +2218,7 @@ static s32 Handle_Get_InActiveTime(struct host_if_drv *hif_drv,
PRINT_D(CFG80211_DBG, "SETING STA inactive time\n"); PRINT_D(CFG80211_DBG, "SETING STA inactive time\n");
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) { if (result) {
...@@ -2218,7 +2231,7 @@ static s32 Handle_Get_InActiveTime(struct host_if_drv *hif_drv, ...@@ -2218,7 +2231,7 @@ static s32 Handle_Get_InActiveTime(struct host_if_drv *hif_drv,
wid.val = (s8 *)&inactive_time; wid.val = (s8 *)&inactive_time;
wid.size = sizeof(u32); wid.size = sizeof(u32);
result = wilc_send_config_pkt(GET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, GET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) { if (result) {
...@@ -2277,7 +2290,7 @@ static void Handle_AddBeacon(struct host_if_drv *hif_drv, ...@@ -2277,7 +2290,7 @@ static void Handle_AddBeacon(struct host_if_drv *hif_drv,
memcpy(pu8CurrByte, pstrSetBeaconParam->tail, pstrSetBeaconParam->tail_len); memcpy(pu8CurrByte, pstrSetBeaconParam->tail, pstrSetBeaconParam->tail_len);
pu8CurrByte += pstrSetBeaconParam->tail_len; pu8CurrByte += pstrSetBeaconParam->tail_len;
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) if (result)
PRINT_ER("Failed to send add beacon config packet\n"); PRINT_ER("Failed to send add beacon config packet\n");
...@@ -2306,7 +2319,7 @@ static void Handle_DelBeacon(struct host_if_drv *hif_drv) ...@@ -2306,7 +2319,7 @@ static void Handle_DelBeacon(struct host_if_drv *hif_drv)
PRINT_D(HOSTINF_DBG, "Deleting BEACON\n"); PRINT_D(HOSTINF_DBG, "Deleting BEACON\n");
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) if (result)
PRINT_ER("Failed to send delete beacon config packet\n"); PRINT_ER("Failed to send delete beacon config packet\n");
...@@ -2379,7 +2392,7 @@ static void Handle_AddStation(struct host_if_drv *hif_drv, ...@@ -2379,7 +2392,7 @@ static void Handle_AddStation(struct host_if_drv *hif_drv,
pu8CurrByte = wid.val; pu8CurrByte = wid.val;
pu8CurrByte += WILC_HostIf_PackStaParam(pu8CurrByte, pstrStationParam); pu8CurrByte += WILC_HostIf_PackStaParam(pu8CurrByte, pstrStationParam);
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result != 0) if (result != 0)
PRINT_ER("Failed to send add station config packet\n"); PRINT_ER("Failed to send add station config packet\n");
...@@ -2421,7 +2434,7 @@ static void Handle_DelAllSta(struct host_if_drv *hif_drv, ...@@ -2421,7 +2434,7 @@ static void Handle_DelAllSta(struct host_if_drv *hif_drv,
pu8CurrByte += ETH_ALEN; pu8CurrByte += ETH_ALEN;
} }
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) if (result)
PRINT_ER("Failed to send add station config packet\n"); PRINT_ER("Failed to send add station config packet\n");
...@@ -2453,7 +2466,7 @@ static void Handle_DelStation(struct host_if_drv *hif_drv, ...@@ -2453,7 +2466,7 @@ static void Handle_DelStation(struct host_if_drv *hif_drv,
memcpy(pu8CurrByte, pstrDelStaParam->mac_addr, ETH_ALEN); memcpy(pu8CurrByte, pstrDelStaParam->mac_addr, ETH_ALEN);
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) if (result)
PRINT_ER("Failed to send add station config packet\n"); PRINT_ER("Failed to send add station config packet\n");
...@@ -2481,7 +2494,7 @@ static void Handle_EditStation(struct host_if_drv *hif_drv, ...@@ -2481,7 +2494,7 @@ static void Handle_EditStation(struct host_if_drv *hif_drv,
pu8CurrByte = wid.val; pu8CurrByte = wid.val;
pu8CurrByte += WILC_HostIf_PackStaParam(pu8CurrByte, pstrStationParam); pu8CurrByte += WILC_HostIf_PackStaParam(pu8CurrByte, pstrStationParam);
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) if (result)
PRINT_ER("Failed to send edit station config packet\n"); PRINT_ER("Failed to send edit station config packet\n");
...@@ -2542,7 +2555,7 @@ static int Handle_RemainOnChan(struct host_if_drv *hif_drv, ...@@ -2542,7 +2555,7 @@ static int Handle_RemainOnChan(struct host_if_drv *hif_drv,
wid.val[0] = u8remain_on_chan_flag; wid.val[0] = u8remain_on_chan_flag;
wid.val[1] = (s8)pstrHostIfRemainOnChan->ch; wid.val[1] = (s8)pstrHostIfRemainOnChan->ch;
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result != 0) if (result != 0)
PRINT_ER("Failed to set remain on channel\n"); PRINT_ER("Failed to set remain on channel\n");
...@@ -2590,7 +2603,7 @@ static int Handle_RegisterFrame(struct host_if_drv *hif_drv, ...@@ -2590,7 +2603,7 @@ static int Handle_RegisterFrame(struct host_if_drv *hif_drv,
wid.size = sizeof(u16) + 2; wid.size = sizeof(u16) + 2;
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) { if (result) {
PRINT_ER("Failed to frame register config packet\n"); PRINT_ER("Failed to frame register config packet\n");
...@@ -2622,7 +2635,7 @@ static u32 Handle_ListenStateExpired(struct host_if_drv *hif_drv, ...@@ -2622,7 +2635,7 @@ static u32 Handle_ListenStateExpired(struct host_if_drv *hif_drv,
wid.val[0] = u8remain_on_chan_flag; wid.val[0] = u8remain_on_chan_flag;
wid.val[1] = FALSE_FRMWR_CHANNEL; wid.val[1] = FALSE_FRMWR_CHANNEL;
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result != 0) { if (result != 0) {
PRINT_ER("Failed to set remain on channel\n"); PRINT_ER("Failed to set remain on channel\n");
...@@ -2680,7 +2693,7 @@ static void Handle_PowerManagement(struct host_if_drv *hif_drv, ...@@ -2680,7 +2693,7 @@ static void Handle_PowerManagement(struct host_if_drv *hif_drv,
PRINT_D(HOSTINF_DBG, "Handling Power Management\n"); PRINT_D(HOSTINF_DBG, "Handling Power Management\n");
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) if (result)
PRINT_ER("Failed to send power management config packet\n"); PRINT_ER("Failed to send power management config packet\n");
...@@ -2717,7 +2730,7 @@ static void Handle_SetMulticastFilter(struct host_if_drv *hif_drv, ...@@ -2717,7 +2730,7 @@ static void Handle_SetMulticastFilter(struct host_if_drv *hif_drv,
memcpy(pu8CurrByte, wilc_multicast_mac_addr_list, memcpy(pu8CurrByte, wilc_multicast_mac_addr_list,
((strHostIfSetMulti->cnt) * ETH_ALEN)); ((strHostIfSetMulti->cnt) * ETH_ALEN));
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) if (result)
PRINT_ER("Failed to send setup multicast config packet\n"); PRINT_ER("Failed to send setup multicast config packet\n");
...@@ -2763,7 +2776,7 @@ static s32 Handle_AddBASession(struct host_if_drv *hif_drv, ...@@ -2763,7 +2776,7 @@ static s32 Handle_AddBASession(struct host_if_drv *hif_drv,
*ptr++ = 8; *ptr++ = 8;
*ptr++ = 0; *ptr++ = 0;
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) if (result)
PRINT_D(HOSTINF_DBG, "Couldn't open BA Session\n"); PRINT_D(HOSTINF_DBG, "Couldn't open BA Session\n");
...@@ -2782,7 +2795,7 @@ static s32 Handle_AddBASession(struct host_if_drv *hif_drv, ...@@ -2782,7 +2795,7 @@ static s32 Handle_AddBASession(struct host_if_drv *hif_drv,
*ptr++ = (strHostIfBASessionInfo->buf_size & 0xFF); *ptr++ = (strHostIfBASessionInfo->buf_size & 0xFF);
*ptr++ = ((strHostIfBASessionInfo->time_out >> 16) & 0xFF); *ptr++ = ((strHostIfBASessionInfo->time_out >> 16) & 0xFF);
*ptr++ = 3; *ptr++ = 3;
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
kfree(wid.val); kfree(wid.val);
...@@ -2817,7 +2830,7 @@ static s32 Handle_DelAllRxBASessions(struct host_if_drv *hif_drv, ...@@ -2817,7 +2830,7 @@ static s32 Handle_DelAllRxBASessions(struct host_if_drv *hif_drv,
*ptr++ = 0; *ptr++ = 0;
*ptr++ = 32; *ptr++ = 32;
result = wilc_send_config_pkt(SET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) if (result)
PRINT_D(HOSTINF_DBG, "Couldn't delete BA Session\n"); PRINT_D(HOSTINF_DBG, "Couldn't delete BA Session\n");
...@@ -3551,7 +3564,7 @@ static s32 host_int_get_assoc_res_info(struct host_if_drv *hif_drv, ...@@ -3551,7 +3564,7 @@ static s32 host_int_get_assoc_res_info(struct host_if_drv *hif_drv,
wid.val = pu8AssocRespInfo; wid.val = pu8AssocRespInfo;
wid.size = u32MaxAssocRespInfoLen; wid.size = u32MaxAssocRespInfoLen;
result = wilc_send_config_pkt(GET_CFG, &wid, 1, result = wilc_send_config_pkt(hif_drv->wilc, GET_CFG, &wid, 1,
get_id_from_handler(hif_drv)); get_id_from_handler(hif_drv));
if (result) { if (result) {
*pu32RcvdAssocRespInfoLen = 0; *pu32RcvdAssocRespInfoLen = 0;
......
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