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

staging: wilc1000: remove argument hif_drv

In previous patch we add new argument vif which has hif_drv in it's member.
Therefore, no need to pass hif_drv in those functions. Remove argument
struct host_if_drv and use hif_drv of vif.
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cf60106b
...@@ -451,7 +451,7 @@ static s32 handle_get_ip_address(struct wilc_vif *vif, ...@@ -451,7 +451,7 @@ static s32 handle_get_ip_address(struct wilc_vif *vif,
kfree(wid.val); kfree(wid.val);
if (memcmp(get_ip[idx], set_ip[idx], IP_ALEN) != 0) if (memcmp(get_ip[idx], set_ip[idx], IP_ALEN) != 0)
wilc_setup_ipaddress(vif, hif_drv, set_ip[idx], idx); wilc_setup_ipaddress(vif, set_ip[idx], idx);
if (result != 0) { if (result != 0) {
PRINT_ER("Failed to get IP address\n"); PRINT_ER("Failed to get IP address\n");
...@@ -1629,7 +1629,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif, ...@@ -1629,7 +1629,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
if ((u8MacStatus == MAC_CONNECTED) && if ((u8MacStatus == MAC_CONNECTED) &&
(strConnectInfo.u16ConnectStatus == SUCCESSFUL_STATUSCODE)) { (strConnectInfo.u16ConnectStatus == SUCCESSFUL_STATUSCODE)) {
wilc_set_power_mgmt(vif, hif_drv, 0, 0); wilc_set_power_mgmt(vif, 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->hif_state = HOST_IF_CONNECTED; hif_drv->hif_state = HOST_IF_CONNECTED;
...@@ -1675,7 +1675,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif, ...@@ -1675,7 +1675,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
if (hif_drv->usr_conn_req.conn_result) { if (hif_drv->usr_conn_req.conn_result) {
wilc_optaining_ip = false; wilc_optaining_ip = false;
wilc_set_power_mgmt(vif, hif_drv, 0, 0); wilc_set_power_mgmt(vif, 0, 0);
hif_drv->usr_conn_req.conn_result(CONN_DISCONN_EVENT_DISCONN_NOTIF, hif_drv->usr_conn_req.conn_result(CONN_DISCONN_EVENT_DISCONN_NOTIF,
NULL, NULL,
...@@ -2016,7 +2016,7 @@ static void Handle_Disconnect(struct wilc_vif *vif, ...@@ -2016,7 +2016,7 @@ static void Handle_Disconnect(struct wilc_vif *vif,
PRINT_D(HOSTINF_DBG, "Sending disconnect request\n"); PRINT_D(HOSTINF_DBG, "Sending disconnect request\n");
wilc_optaining_ip = false; wilc_optaining_ip = false;
wilc_set_power_mgmt(vif, hif_drv, 0, 0); wilc_set_power_mgmt(vif, 0, 0);
eth_zero_addr(wilc_connected_ssid); eth_zero_addr(wilc_connected_ssid);
...@@ -2087,15 +2087,14 @@ static void Handle_Disconnect(struct wilc_vif *vif, ...@@ -2087,15 +2087,14 @@ static void Handle_Disconnect(struct wilc_vif *vif,
up(&hif_drv->sem_test_disconn_block); up(&hif_drv->sem_test_disconn_block);
} }
void wilc_resolve_disconnect_aberration(struct wilc_vif *vif, void wilc_resolve_disconnect_aberration(struct wilc_vif *vif)
struct host_if_drv *hif_drv)
{ {
if (!hif_drv) if (!vif->hif_drv)
return; return;
if ((hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) || if ((vif->hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) ||
(hif_drv->hif_state == HOST_IF_CONNECTING)) { (vif->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");
wilc_disconnect(vif, hif_drv, 1); wilc_disconnect(vif, 1);
} }
} }
...@@ -3045,11 +3044,11 @@ s32 wilc_remove_key(struct host_if_drv *hif_drv, const u8 *pu8StaAddress) ...@@ -3045,11 +3044,11 @@ s32 wilc_remove_key(struct host_if_drv *hif_drv, const u8 *pu8StaAddress)
return 0; return 0;
} }
int wilc_remove_wep_key(struct wilc_vif *vif, int wilc_remove_wep_key(struct wilc_vif *vif, u8 index)
struct host_if_drv *hif_drv, u8 index)
{ {
int result = 0; int result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
result = -EFAULT; result = -EFAULT;
...@@ -3074,11 +3073,11 @@ int wilc_remove_wep_key(struct wilc_vif *vif, ...@@ -3074,11 +3073,11 @@ int wilc_remove_wep_key(struct wilc_vif *vif,
return result; return result;
} }
int wilc_set_wep_default_keyid(struct wilc_vif *vif, int wilc_set_wep_default_keyid(struct wilc_vif *vif, u8 index)
struct host_if_drv *hif_drv, u8 index)
{ {
int result = 0; int result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
result = -EFAULT; result = -EFAULT;
...@@ -3103,11 +3102,12 @@ int wilc_set_wep_default_keyid(struct wilc_vif *vif, ...@@ -3103,11 +3102,12 @@ int wilc_set_wep_default_keyid(struct wilc_vif *vif,
return result; return result;
} }
int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, struct host_if_drv *hif_drv, int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, const u8 *key, u8 len,
const u8 *key, u8 len, u8 index) u8 index)
{ {
int result = 0; int result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
...@@ -3136,12 +3136,12 @@ int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -3136,12 +3136,12 @@ int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, struct host_if_drv *hif_drv, int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, const u8 *key, u8 len,
const u8 *key, u8 len, u8 index, u8 mode, u8 index, u8 mode, enum AUTHTYPE auth_type)
enum AUTHTYPE auth_type)
{ {
int result = 0; int result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
int i; int i;
if (!hif_drv) { if (!hif_drv) {
...@@ -3178,13 +3178,13 @@ int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -3178,13 +3178,13 @@ int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
int wilc_add_ptk(struct wilc_vif *vif, struct host_if_drv *hif_drv, int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 ptk_key_len,
const u8 *ptk, u8 ptk_key_len, const u8 *mac_addr, const u8 *mac_addr, const u8 *rx_mic, const u8 *tx_mic,
const u8 *rx_mic, const u8 *tx_mic, u8 mode, u8 cipher_mode, u8 mode, u8 cipher_mode, u8 index)
u8 index)
{ {
int result = 0; int result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
u8 key_len = ptk_key_len; u8 key_len = ptk_key_len;
int i; int i;
...@@ -3245,13 +3245,14 @@ int wilc_add_ptk(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -3245,13 +3245,14 @@ int wilc_add_ptk(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
int wilc_add_rx_gtk(struct wilc_vif *vif, struct host_if_drv *hif_drv, int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len,
const u8 *rx_gtk, u8 gtk_key_len, u8 index, u8 index, u32 key_rsc_len, const u8 *key_rsc,
u32 key_rsc_len, const u8 *key_rsc, const u8 *rx_mic, const u8 *rx_mic, const u8 *tx_mic, u8 mode,
const u8 *tx_mic, u8 mode, u8 cipher_mode) u8 cipher_mode)
{ {
int result = 0; int result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
u8 key_len = gtk_key_len; u8 key_len = gtk_key_len;
if (!hif_drv) { if (!hif_drv) {
...@@ -3313,11 +3314,12 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -3313,11 +3314,12 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_set_pmkid_info(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_set_pmkid_info(struct wilc_vif *vif,
struct host_if_pmkid_attr *pu8PmkidInfoArray) struct host_if_pmkid_attr *pu8PmkidInfoArray)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
u32 i; u32 i;
if (!hif_drv) { if (!hif_drv) {
...@@ -3347,11 +3349,11 @@ s32 wilc_set_pmkid_info(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -3347,11 +3349,11 @@ s32 wilc_set_pmkid_info(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_get_mac_address(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_get_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress)
u8 *pu8MacAddress)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
memset(&msg, 0, sizeof(struct host_if_msg)); memset(&msg, 0, sizeof(struct host_if_msg));
...@@ -3370,11 +3372,11 @@ s32 wilc_get_mac_address(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -3370,11 +3372,11 @@ s32 wilc_get_mac_address(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_set_mac_address(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_set_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress)
u8 *pu8MacAddress)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
PRINT_D(GENERIC_DBG, "mac addr = %x:%x:%x\n", pu8MacAddress[0], pu8MacAddress[1], pu8MacAddress[2]); PRINT_D(GENERIC_DBG, "mac addr = %x:%x:%x\n", pu8MacAddress[0], pu8MacAddress[1], pu8MacAddress[2]);
...@@ -3391,15 +3393,15 @@ s32 wilc_set_mac_address(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -3391,15 +3393,15 @@ s32 wilc_set_mac_address(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_set_join_req(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid,
u8 *pu8bssid, const u8 *pu8ssid, size_t ssidLen, size_t ssidLen, const u8 *pu8IEs, size_t IEsLen,
const u8 *pu8IEs, size_t IEsLen,
wilc_connect_result pfConnectResult, void *pvUserArg, wilc_connect_result pfConnectResult, void *pvUserArg,
u8 u8security, enum AUTHTYPE tenuAuth_type, u8 u8security, enum AUTHTYPE tenuAuth_type,
u8 u8channel, void *pJoinParams) u8 u8channel, void *pJoinParams)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv || !pfConnectResult) { if (!hif_drv || !pfConnectResult) {
PRINT_ER("Driver is null\n"); PRINT_ER("Driver is null\n");
...@@ -3459,10 +3461,11 @@ s32 wilc_set_join_req(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -3459,10 +3461,11 @@ s32 wilc_set_join_req(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_flush_join_req(struct wilc_vif *vif, struct host_if_drv *hif_drv) s32 wilc_flush_join_req(struct wilc_vif *vif)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!join_req) if (!join_req)
return -EFAULT; return -EFAULT;
...@@ -3485,11 +3488,11 @@ s32 wilc_flush_join_req(struct wilc_vif *vif, struct host_if_drv *hif_drv) ...@@ -3485,11 +3488,11 @@ s32 wilc_flush_join_req(struct wilc_vif *vif, struct host_if_drv *hif_drv)
return result; return result;
} }
s32 wilc_disconnect(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_disconnect(struct wilc_vif *vif, u16 u16ReasonCode)
u16 u16ReasonCode)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
PRINT_ER("Driver is null\n"); PRINT_ER("Driver is null\n");
...@@ -3542,11 +3545,11 @@ static s32 host_int_get_assoc_res_info(struct host_if_drv *hif_drv, ...@@ -3542,11 +3545,11 @@ static s32 host_int_get_assoc_res_info(struct host_if_drv *hif_drv,
return result; return result;
} }
int wilc_set_mac_chnl_num(struct wilc_vif *vif, struct host_if_drv *hif_drv, int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel)
u8 channel)
{ {
int result; int result;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
...@@ -3606,11 +3609,11 @@ int wilc_set_wfi_drv_handler(struct wilc_vif *vif, struct host_if_drv *hif_drv) ...@@ -3606,11 +3609,11 @@ int wilc_set_wfi_drv_handler(struct wilc_vif *vif, struct host_if_drv *hif_drv)
return result; return result;
} }
int wilc_set_operation_mode(struct wilc_vif *vif, struct host_if_drv *hif_drv, int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode)
u32 mode)
{ {
int result = 0; int result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
memset(&msg, 0, sizeof(struct host_if_msg)); memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_SET_OPERATION_MODE; msg.id = HOST_IF_MSG_SET_OPERATION_MODE;
...@@ -3627,11 +3630,12 @@ int wilc_set_operation_mode(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -3627,11 +3630,12 @@ int wilc_set_operation_mode(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_get_inactive_time(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac,
const u8 *mac, u32 *pu32InactiveTime) u32 *pu32InactiveTime)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
...@@ -3656,11 +3660,11 @@ s32 wilc_get_inactive_time(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -3656,11 +3660,11 @@ s32 wilc_get_inactive_time(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_get_rssi(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_get_rssi(struct wilc_vif *vif, s8 *ps8Rssi)
s8 *ps8Rssi)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
memset(&msg, 0, sizeof(struct host_if_msg)); memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_GET_RSSI; msg.id = HOST_IF_MSG_GET_RSSI;
...@@ -3685,11 +3689,11 @@ s32 wilc_get_rssi(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -3685,11 +3689,11 @@ s32 wilc_get_rssi(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_get_statistics(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_get_statistics(struct wilc_vif *vif, struct rf_info *pstrStatistics)
struct rf_info *pstrStatistics)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
memset(&msg, 0, sizeof(struct host_if_msg)); memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_GET_STATISTICS; msg.id = HOST_IF_MSG_GET_STATISTICS;
...@@ -3707,14 +3711,14 @@ s32 wilc_get_statistics(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -3707,14 +3711,14 @@ s32 wilc_get_statistics(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_scan(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_scan(struct wilc_vif *vif, u8 u8ScanSource, u8 u8ScanType,
u8 u8ScanSource, u8 u8ScanType, u8 *pu8ChnlFreqList, u8 *pu8ChnlFreqList, u8 u8ChnlListLen, const u8 *pu8IEs,
u8 u8ChnlListLen, const u8 *pu8IEs, size_t IEsLen, wilc_scan_result ScanResult, void *pvUserArg,
size_t IEsLen, wilc_scan_result ScanResult, struct hidden_network *pstrHiddenNetwork)
void *pvUserArg, struct hidden_network *pstrHiddenNetwork)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv || !ScanResult) { if (!hif_drv || !ScanResult) {
PRINT_ER("hif_drv or ScanResult = NULL\n"); PRINT_ER("hif_drv or ScanResult = NULL\n");
...@@ -3761,11 +3765,12 @@ s32 wilc_scan(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -3761,11 +3765,12 @@ s32 wilc_scan(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_hif_set_cfg(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_hif_set_cfg(struct wilc_vif *vif,
struct cfg_param_val *pstrCfgParamVal) struct cfg_param_val *pstrCfgParamVal)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
PRINT_ER("hif_drv NULL\n"); PRINT_ER("hif_drv NULL\n");
...@@ -3919,10 +3924,11 @@ s32 wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler) ...@@ -3919,10 +3924,11 @@ s32 wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
return result; return result;
} }
s32 wilc_deinit(struct wilc_vif *vif, struct host_if_drv *hif_drv) s32 wilc_deinit(struct wilc_vif *vif)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
int ret; int ret;
if (!hif_drv) { if (!hif_drv) {
...@@ -4089,14 +4095,15 @@ void wilc_scan_complete_received(u8 *pu8Buffer, u32 u32Length) ...@@ -4089,14 +4095,15 @@ void wilc_scan_complete_received(u8 *pu8Buffer, u32 u32Length)
return; return;
} }
s32 wilc_remain_on_channel(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 u32SessionID,
u32 u32SessionID, u32 u32duration, u16 chan, u32 u32duration, u16 chan,
wilc_remain_on_chan_expired RemainOnChanExpired, wilc_remain_on_chan_expired RemainOnChanExpired,
wilc_remain_on_chan_ready RemainOnChanReady, wilc_remain_on_chan_ready RemainOnChanReady,
void *pvUserArg) void *pvUserArg)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
...@@ -4122,11 +4129,11 @@ s32 wilc_remain_on_channel(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -4122,11 +4129,11 @@ s32 wilc_remain_on_channel(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_listen_state_expired(struct wilc_vif *vif, s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 u32SessionID)
struct host_if_drv *hif_drv, u32 u32SessionID)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
...@@ -4148,11 +4155,11 @@ s32 wilc_listen_state_expired(struct wilc_vif *vif, ...@@ -4148,11 +4155,11 @@ s32 wilc_listen_state_expired(struct wilc_vif *vif,
return result; return result;
} }
s32 wilc_frame_register(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_frame_register(struct wilc_vif *vif, u16 u16FrameType, bool bReg)
u16 u16FrameType, bool bReg)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
...@@ -4189,14 +4196,13 @@ s32 wilc_frame_register(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -4189,14 +4196,13 @@ s32 wilc_frame_register(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_add_beacon(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_add_beacon(struct wilc_vif *vif, u32 u32Interval, u32 u32DTIMPeriod,
u32 u32Interval, u32 u32HeadLen, u8 *pu8Head, u32 u32TailLen, u8 *pu8Tail)
u32 u32DTIMPeriod, u32 u32HeadLen, u8 *pu8Head,
u32 u32TailLen, u8 *pu8Tail)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct beacon_attr *pstrSetBeaconParam = &msg.body.beacon_info; struct beacon_attr *pstrSetBeaconParam = &msg.body.beacon_info;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
...@@ -4245,10 +4251,11 @@ s32 wilc_add_beacon(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -4245,10 +4251,11 @@ s32 wilc_add_beacon(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
int wilc_del_beacon(struct wilc_vif *vif, struct host_if_drv *hif_drv) int wilc_del_beacon(struct wilc_vif *vif)
{ {
int result = 0; int result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
...@@ -4267,12 +4274,12 @@ int wilc_del_beacon(struct wilc_vif *vif, struct host_if_drv *hif_drv) ...@@ -4267,12 +4274,12 @@ int wilc_del_beacon(struct wilc_vif *vif, struct host_if_drv *hif_drv)
return result; return result;
} }
int wilc_add_station(struct wilc_vif *vif, struct host_if_drv *hif_drv, int wilc_add_station(struct wilc_vif *vif, struct add_sta_param *sta_param)
struct add_sta_param *sta_param)
{ {
int result = 0; int result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct add_sta_param *add_sta_info = &msg.body.add_sta_info; struct add_sta_param *add_sta_info = &msg.body.add_sta_info;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
...@@ -4302,12 +4309,12 @@ int wilc_add_station(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -4302,12 +4309,12 @@ int wilc_add_station(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
int wilc_del_station(struct wilc_vif *vif, struct host_if_drv *hif_drv, int wilc_del_station(struct wilc_vif *vif, const u8 *mac_addr)
const u8 *mac_addr)
{ {
int result = 0; int result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct del_sta *del_sta_info = &msg.body.del_sta_info; struct del_sta *del_sta_info = &msg.body.del_sta_info;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
...@@ -4333,12 +4340,12 @@ int wilc_del_station(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -4333,12 +4340,12 @@ int wilc_del_station(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_del_allstation(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_del_allstation(struct wilc_vif *vif, u8 pu8MacAddr[][ETH_ALEN])
u8 pu8MacAddr[][ETH_ALEN])
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct del_all_sta *pstrDelAllStationMsg = &msg.body.del_all_sta_info; struct del_all_sta *pstrDelAllStationMsg = &msg.body.del_all_sta_info;
struct host_if_drv *hif_drv = vif->hif_drv;
u8 au8Zero_Buff[ETH_ALEN] = {0}; u8 au8Zero_Buff[ETH_ALEN] = {0};
u32 i; u32 i;
u8 u8AssocNumb = 0; u8 u8AssocNumb = 0;
...@@ -4385,12 +4392,13 @@ s32 wilc_del_allstation(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -4385,12 +4392,13 @@ s32 wilc_del_allstation(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_edit_station(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_edit_station(struct wilc_vif *vif,
struct add_sta_param *pstrStaParams) struct add_sta_param *pstrStaParams)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct add_sta_param *pstrAddStationMsg = &msg.body.add_sta_info; struct add_sta_param *pstrAddStationMsg = &msg.body.add_sta_info;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
...@@ -4424,12 +4432,12 @@ s32 wilc_edit_station(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -4424,12 +4432,12 @@ s32 wilc_edit_station(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_set_power_mgmt(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_set_power_mgmt(struct wilc_vif *vif, bool bIsEnabled, u32 u32Timeout)
bool bIsEnabled, u32 u32Timeout)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct power_mgmt_param *pstrPowerMgmtParam = &msg.body.pwr_mgmt_info; struct power_mgmt_param *pstrPowerMgmtParam = &msg.body.pwr_mgmt_info;
struct host_if_drv *hif_drv = vif->hif_drv;
PRINT_INFO(HOSTINF_DBG, "\n\n>> Setting PS to %d <<\n\n", bIsEnabled); PRINT_INFO(HOSTINF_DBG, "\n\n>> Setting PS to %d <<\n\n", bIsEnabled);
...@@ -4455,14 +4463,13 @@ s32 wilc_set_power_mgmt(struct wilc_vif *vif, struct host_if_drv *hif_drv, ...@@ -4455,14 +4463,13 @@ s32 wilc_set_power_mgmt(struct wilc_vif *vif, struct host_if_drv *hif_drv,
return result; return result;
} }
s32 wilc_setup_multicast_filter(struct wilc_vif *vif, s32 wilc_setup_multicast_filter(struct wilc_vif *vif, bool bIsEnabled,
struct host_if_drv *hif_drv,
bool bIsEnabled,
u32 u32count) u32 u32count)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct set_multicast *pstrMulticastFilterParam = &msg.body.multicast_info; struct set_multicast *pstrMulticastFilterParam = &msg.body.multicast_info;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
...@@ -4651,14 +4658,12 @@ void wilc_free_join_params(void *pJoinParams) ...@@ -4651,14 +4658,12 @@ void wilc_free_join_params(void *pJoinParams)
PRINT_ER("Unable to FREE null pointer\n"); PRINT_ER("Unable to FREE null pointer\n");
} }
s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID)
struct host_if_drv *hif_drv,
char *pBSSID,
char TID)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct ba_session_info *pBASessionInfo = &msg.body.session_info; struct ba_session_info *pBASessionInfo = &msg.body.session_info;
struct host_if_drv *hif_drv = vif->hif_drv;
if (!hif_drv) { if (!hif_drv) {
PRINT_ER("driver is null\n"); PRINT_ER("driver is null\n");
...@@ -4683,11 +4688,11 @@ s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, ...@@ -4683,11 +4688,11 @@ s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif,
return result; return result;
} }
s32 wilc_setup_ipaddress(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx)
u8 *u16ipadd, u8 idx)
{ {
s32 result = 0; s32 result = 0;
struct host_if_msg msg; struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
return 0; return 0;
......
...@@ -307,102 +307,73 @@ struct add_sta_param { ...@@ -307,102 +307,73 @@ struct add_sta_param {
struct wilc_vif; struct wilc_vif;
s32 wilc_remove_key(struct host_if_drv *hWFIDrv, const u8 *pu8StaAddress); s32 wilc_remove_key(struct host_if_drv *hWFIDrv, const u8 *pu8StaAddress);
int wilc_remove_wep_key(struct wilc_vif *vif, int wilc_remove_wep_key(struct wilc_vif *vif, u8 index);
struct host_if_drv *hif_drv, u8 index); int wilc_set_wep_default_keyid(struct wilc_vif *vif, u8 index);
int wilc_set_wep_default_keyid(struct wilc_vif *vif, int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, const u8 *key, u8 len,
struct host_if_drv *hif_drv, u8 index); u8 index);
int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, struct host_if_drv *hif_drv, int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, const u8 *key, u8 len,
const u8 *key, u8 len, u8 index); u8 index, u8 mode, enum AUTHTYPE auth_type);
int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_add_ptk(struct wilc_vif *vif, const u8 *pu8Ptk, u8 u8PtkKeylen,
const u8 *key, u8 len, u8 index, u8 mode, const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic,
enum AUTHTYPE auth_type);
s32 wilc_add_ptk(struct wilc_vif *vif, struct host_if_drv *hif_drv,
const u8 *pu8Ptk, u8 u8PtkKeylen, const u8 *mac_addr,
const u8 *pu8RxMic, const u8 *pu8TxMic,
u8 mode, u8 u8Ciphermode, u8 u8Idx); u8 mode, u8 u8Ciphermode, u8 u8Idx);
s32 wilc_get_inactive_time(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac,
const u8 *mac, u32 *pu32InactiveTime); u32 *pu32InactiveTime);
s32 wilc_add_rx_gtk(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *pu8RxGtk, u8 u8GtkKeylen,
const u8 *pu8RxGtk, u8 u8GtkKeylen, u8 u8KeyIdx, u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC,
u32 u32KeyRSClen, const u8 *KeyRSC, const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode,
const u8 *pu8RxMic, const u8 *pu8TxMic, u8 u8Ciphermode);
u8 mode, u8 u8Ciphermode);
s32 wilc_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen, s32 wilc_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen,
u8 *pu8TxGtk, u8 u8KeyIdx); u8 *pu8TxGtk, u8 u8KeyIdx);
s32 wilc_set_pmkid_info(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_set_pmkid_info(struct wilc_vif *vif,
struct host_if_pmkid_attr *pu8PmkidInfoArray); struct host_if_pmkid_attr *pu8PmkidInfoArray);
s32 wilc_get_mac_address(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_get_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
u8 *pu8MacAddress); s32 wilc_set_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
s32 wilc_set_mac_address(struct wilc_vif *vif, struct host_if_drv *hif_drv,
u8 *pu8MacAddress);
int wilc_wait_msg_queue_idle(void); int wilc_wait_msg_queue_idle(void);
s32 wilc_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource); s32 wilc_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource);
s32 wilc_set_join_req(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid,
u8 *pu8bssid, const u8 *pu8ssid, size_t ssidLen, size_t ssidLen, const u8 *pu8IEs, size_t IEsLen,
const u8 *pu8IEs, size_t IEsLen,
wilc_connect_result pfConnectResult, void *pvUserArg, wilc_connect_result pfConnectResult, void *pvUserArg,
u8 u8security, enum AUTHTYPE tenuAuth_type, u8 u8security, enum AUTHTYPE tenuAuth_type,
u8 u8channel, void *pJoinParams); u8 u8channel, void *pJoinParams);
s32 wilc_flush_join_req(struct wilc_vif *vif, struct host_if_drv *hif_drv); s32 wilc_flush_join_req(struct wilc_vif *vif);
s32 wilc_disconnect(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_disconnect(struct wilc_vif *vif, u16 u16ReasonCode);
u16 u16ReasonCode); int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel);
int wilc_set_mac_chnl_num(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_get_rssi(struct wilc_vif *vif, s8 *ps8Rssi);
u8 channel); s32 wilc_scan(struct wilc_vif *vif, u8 u8ScanSource, u8 u8ScanType,
s32 wilc_get_rssi(struct wilc_vif *vif, struct host_if_drv *hif_drv, u8 *pu8ChnlFreqList, u8 u8ChnlListLen, const u8 *pu8IEs,
s8 *ps8Rssi); size_t IEsLen, wilc_scan_result ScanResult, void *pvUserArg,
s32 wilc_scan(struct wilc_vif *vif, struct host_if_drv *hif_drv, struct hidden_network *pstrHiddenNetwork);
u8 u8ScanSource, u8 u8ScanType, u8 *pu8ChnlFreqList, s32 wilc_hif_set_cfg(struct wilc_vif *vif,
u8 u8ChnlListLen, const u8 *pu8IEs,
size_t IEsLen, wilc_scan_result ScanResult,
void *pvUserArg, struct hidden_network *pstrHiddenNetwork);
s32 wilc_hif_set_cfg(struct wilc_vif *vif, struct host_if_drv *hif_drv,
struct cfg_param_val *pstrCfgParamVal); struct cfg_param_val *pstrCfgParamVal);
s32 wilc_init(struct net_device *dev, struct host_if_drv **phWFIDrv); s32 wilc_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
s32 wilc_deinit(struct wilc_vif *vif, struct host_if_drv *hif_drv); s32 wilc_deinit(struct wilc_vif *vif);
s32 wilc_add_beacon(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_add_beacon(struct wilc_vif *vif, u32 u32Interval, u32 u32DTIMPeriod,
u32 u32Interval, u32 u32HeadLen, u8 *pu8Head, u32 u32TailLen, u8 *pu8Tail);
u32 u32DTIMPeriod, u32 u32HeadLen, u8 *pu8Head, int wilc_del_beacon(struct wilc_vif *vif);
u32 u32TailLen, u8 *pu8Tail); int wilc_add_station(struct wilc_vif *vif, struct add_sta_param *sta_param);
int wilc_del_beacon(struct wilc_vif *vif, struct host_if_drv *hif_drv); s32 wilc_del_allstation(struct wilc_vif *vif, u8 pu8MacAddr[][ETH_ALEN]);
int wilc_add_station(struct wilc_vif *vif, struct host_if_drv *hif_drv, int wilc_del_station(struct wilc_vif *vif, const u8 *mac_addr);
struct add_sta_param *sta_param); s32 wilc_edit_station(struct wilc_vif *vif,
s32 wilc_del_allstation(struct wilc_vif *vif, struct host_if_drv *hif_drv,
u8 pu8MacAddr[][ETH_ALEN]);
int wilc_del_station(struct wilc_vif *vif, struct host_if_drv *hif_drv,
const u8 *mac_addr);
s32 wilc_edit_station(struct wilc_vif *vif, struct host_if_drv *hif_drv,
struct add_sta_param *pstrStaParams); struct add_sta_param *pstrStaParams);
s32 wilc_set_power_mgmt(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_set_power_mgmt(struct wilc_vif *vif, bool bIsEnabled, u32 u32Timeout);
bool bIsEnabled, u32 u32Timeout); s32 wilc_setup_multicast_filter(struct wilc_vif *vif, bool bIsEnabled,
s32 wilc_setup_multicast_filter(struct wilc_vif *vif,
struct host_if_drv *hif_drv,
bool bIsEnabled,
u32 u32count); u32 u32count);
s32 wilc_setup_ipaddress(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx);
u8 *u16ipadd, u8 idx); s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID);
s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 u32SessionID,
struct host_if_drv *hif_drv, u32 u32duration, u16 chan,
char *pBSSID,
char TID);
s32 wilc_remain_on_channel(struct wilc_vif *vif, struct host_if_drv *hif_drv,
u32 u32SessionID, u32 u32duration, u16 chan,
wilc_remain_on_chan_expired RemainOnChanExpired, wilc_remain_on_chan_expired RemainOnChanExpired,
wilc_remain_on_chan_ready RemainOnChanReady, wilc_remain_on_chan_ready RemainOnChanReady,
void *pvUserArg); void *pvUserArg);
s32 wilc_listen_state_expired(struct wilc_vif *vif, s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 u32SessionID);
struct host_if_drv *hif_drv, u32 u32SessionID); s32 wilc_frame_register(struct wilc_vif *vif, u16 u16FrameType, bool bReg);
s32 wilc_frame_register(struct wilc_vif *vif, struct host_if_drv *hif_drv,
u16 u16FrameType, bool bReg);
int wilc_set_wfi_drv_handler(struct wilc_vif *vif, struct host_if_drv *hif_drv); int wilc_set_wfi_drv_handler(struct wilc_vif *vif, struct host_if_drv *hif_drv);
int wilc_set_operation_mode(struct wilc_vif *vif, struct host_if_drv *hif_drv, int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode);
u32 mode);
void wilc_free_join_params(void *pJoinParams); void wilc_free_join_params(void *pJoinParams);
s32 wilc_get_statistics(struct wilc_vif *vif, struct host_if_drv *hif_drv, s32 wilc_get_statistics(struct wilc_vif *vif, struct rf_info *pstrStatistics);
struct rf_info *pstrStatistics); void wilc_resolve_disconnect_aberration(struct wilc_vif *vif);
void wilc_resolve_disconnect_aberration(struct wilc_vif *vif,
struct host_if_drv *hif_drv);
extern bool wilc_optaining_ip; extern bool wilc_optaining_ip;
extern u8 wilc_connected_ssid[6]; extern u8 wilc_connected_ssid[6];
......
...@@ -112,7 +112,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event ...@@ -112,7 +112,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event
} }
if (wilc_enable_ps) if (wilc_enable_ps)
wilc_set_power_mgmt(vif, hif_drv, 1, 0); wilc_set_power_mgmt(vif, 1, 0);
PRINT_D(GENERIC_DBG, "[%s] Up IP\n", dev_iface->ifa_label); PRINT_D(GENERIC_DBG, "[%s] Up IP\n", dev_iface->ifa_label);
...@@ -120,7 +120,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event ...@@ -120,7 +120,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event
PRINT_D(GENERIC_DBG, "IP add=%d:%d:%d:%d\n", PRINT_D(GENERIC_DBG, "IP add=%d:%d:%d:%d\n",
ip_addr_buf[0], ip_addr_buf[1], ip_addr_buf[0], ip_addr_buf[1],
ip_addr_buf[2], ip_addr_buf[3]); ip_addr_buf[2], ip_addr_buf[3]);
wilc_setup_ipaddress(vif, hif_drv, ip_addr_buf, vif->u8IfIdx); wilc_setup_ipaddress(vif, ip_addr_buf, vif->u8IfIdx);
break; break;
...@@ -134,9 +134,9 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event ...@@ -134,9 +134,9 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event
} }
if (memcmp(dev_iface->ifa_label, wlan_dev_name, 5) == 0) if (memcmp(dev_iface->ifa_label, wlan_dev_name, 5) == 0)
wilc_set_power_mgmt(vif, hif_drv, 0, 0); wilc_set_power_mgmt(vif, 0, 0);
wilc_resolve_disconnect_aberration(vif, hif_drv); wilc_resolve_disconnect_aberration(vif);
PRINT_D(GENERIC_DBG, "[%s] Down IP\n", dev_iface->ifa_label); PRINT_D(GENERIC_DBG, "[%s] Down IP\n", dev_iface->ifa_label);
...@@ -145,7 +145,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event ...@@ -145,7 +145,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event
ip_addr_buf[0], ip_addr_buf[1], ip_addr_buf[0], ip_addr_buf[1],
ip_addr_buf[2], ip_addr_buf[3]); ip_addr_buf[2], ip_addr_buf[3]);
wilc_setup_ipaddress(vif, hif_drv, ip_addr_buf, vif->u8IfIdx); wilc_setup_ipaddress(vif, ip_addr_buf, vif->u8IfIdx);
break; break;
...@@ -1030,7 +1030,7 @@ int wilc_mac_open(struct net_device *ndev) ...@@ -1030,7 +1030,7 @@ int wilc_mac_open(struct net_device *ndev)
wilc_set_machw_change_vir_if(ndev, false); wilc_set_machw_change_vir_if(ndev, false);
wilc_get_mac_address(vif, priv->hWILCWFIDrv, mac_add); wilc_get_mac_address(vif, mac_add);
PRINT_D(INIT_DBG, "Mac address: %pM\n", mac_add); PRINT_D(INIT_DBG, "Mac address: %pM\n", mac_add);
for (i = 0; i < wl->vif_num; i++) { for (i = 0; i < wl->vif_num; i++) {
...@@ -1097,13 +1097,13 @@ static void wilc_set_multicast_list(struct net_device *dev) ...@@ -1097,13 +1097,13 @@ static void wilc_set_multicast_list(struct net_device *dev)
if ((dev->flags & IFF_ALLMULTI) || if ((dev->flags & IFF_ALLMULTI) ||
(dev->mc.count) > WILC_MULTICAST_TABLE_SIZE) { (dev->mc.count) > WILC_MULTICAST_TABLE_SIZE) {
PRINT_D(INIT_DBG, "Disable multicast filter, retrive all multicast packets\n"); PRINT_D(INIT_DBG, "Disable multicast filter, retrive all multicast packets\n");
wilc_setup_multicast_filter(vif, hif_drv, false, 0); wilc_setup_multicast_filter(vif, false, 0);
return; return;
} }
if ((dev->mc.count) == 0) { if ((dev->mc.count) == 0) {
PRINT_D(INIT_DBG, "Enable multicast filter, retrive directed packets only.\n"); PRINT_D(INIT_DBG, "Enable multicast filter, retrive directed packets only.\n");
wilc_setup_multicast_filter(vif, hif_drv, true, 0); wilc_setup_multicast_filter(vif, true, 0);
return; return;
} }
...@@ -1119,7 +1119,7 @@ static void wilc_set_multicast_list(struct net_device *dev) ...@@ -1119,7 +1119,7 @@ static void wilc_set_multicast_list(struct net_device *dev)
i++; i++;
} }
wilc_setup_multicast_filter(vif, hif_drv, true, (dev->mc.count)); wilc_setup_multicast_filter(vif, true, (dev->mc.count));
return; return;
} }
...@@ -1291,7 +1291,7 @@ static int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd) ...@@ -1291,7 +1291,7 @@ static int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd)
if (strncasecmp(buff, "RSSI", length) == 0) { if (strncasecmp(buff, "RSSI", length) == 0) {
priv = wiphy_priv(vif->ndev->ieee80211_ptr->wiphy); priv = wiphy_priv(vif->ndev->ieee80211_ptr->wiphy);
ret = wilc_get_rssi(vif, priv->hWILCWFIDrv, &rssi); ret = wilc_get_rssi(vif, &rssi);
if (ret) if (ret)
PRINT_ER("Failed to send get rssi param's message queue "); PRINT_ER("Failed to send get rssi param's message queue ");
PRINT_INFO(GENERIC_DBG, "RSSI :%d\n", rssi); PRINT_INFO(GENERIC_DBG, "RSSI :%d\n", rssi);
......
...@@ -604,7 +604,7 @@ static int set_channel(struct wiphy *wiphy, ...@@ -604,7 +604,7 @@ static int set_channel(struct wiphy *wiphy,
PRINT_D(CFG80211_DBG, "Setting channel %d with frequency %d\n", channelnum, chandef->chan->center_freq); PRINT_D(CFG80211_DBG, "Setting channel %d with frequency %d\n", channelnum, chandef->chan->center_freq);
curr_channel = channelnum; curr_channel = channelnum;
result = wilc_set_mac_chnl_num(vif, priv->hWILCWFIDrv, channelnum); result = wilc_set_mac_chnl_num(vif, channelnum);
if (result != 0) if (result != 0)
PRINT_ER("Error in setting channel %d\n", channelnum); PRINT_ER("Error in setting channel %d\n", channelnum);
...@@ -660,16 +660,20 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request) ...@@ -660,16 +660,20 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
} }
} }
PRINT_D(CFG80211_DBG, "Trigger Scan Request\n"); PRINT_D(CFG80211_DBG, "Trigger Scan Request\n");
s32Error = wilc_scan(vif, priv->hWILCWFIDrv, USER_SCAN, ACTIVE_SCAN, s32Error = wilc_scan(vif, USER_SCAN, ACTIVE_SCAN,
au8ScanChanList, request->n_channels, au8ScanChanList,
(const u8 *)request->ie, request->ie_len, request->n_channels,
CfgScanResult, (void *)priv, &strHiddenNetwork); (const u8 *)request->ie,
request->ie_len, CfgScanResult,
(void *)priv, &strHiddenNetwork);
} else { } else {
PRINT_D(CFG80211_DBG, "Trigger Scan Request\n"); PRINT_D(CFG80211_DBG, "Trigger Scan Request\n");
s32Error = wilc_scan(vif, priv->hWILCWFIDrv, USER_SCAN, ACTIVE_SCAN, s32Error = wilc_scan(vif, USER_SCAN, ACTIVE_SCAN,
au8ScanChanList, request->n_channels, au8ScanChanList,
(const u8 *)request->ie, request->ie_len, request->n_channels,
CfgScanResult, (void *)priv, NULL); (const u8 *)request->ie,
request->ie_len, CfgScanResult,
(void *)priv, NULL);
} }
} else { } else {
PRINT_ER("Requested num of scanned channels is greater than the max, supported" PRINT_ER("Requested num of scanned channels is greater than the max, supported"
...@@ -792,8 +796,9 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -792,8 +796,9 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
g_key_wep_params.key_idx = sme->key_idx; g_key_wep_params.key_idx = sme->key_idx;
g_wep_keys_saved = true; g_wep_keys_saved = true;
wilc_set_wep_default_keyid(vif, priv->hWILCWFIDrv, sme->key_idx); wilc_set_wep_default_keyid(vif, sme->key_idx);
wilc_add_wep_key_bss_sta(vif, priv->hWILCWFIDrv, sme->key, sme->key_len, sme->key_idx); wilc_add_wep_key_bss_sta(vif, sme->key, sme->key_len,
sme->key_idx);
} else if (sme->crypto.cipher_group == WLAN_CIPHER_SUITE_WEP104) { } else if (sme->crypto.cipher_group == WLAN_CIPHER_SUITE_WEP104) {
u8security = ENCRYPT_ENABLED | WEP | WEP_EXTENDED; u8security = ENCRYPT_ENABLED | WEP | WEP_EXTENDED;
pcgroup_encrypt_val = "WEP104"; pcgroup_encrypt_val = "WEP104";
...@@ -809,8 +814,9 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -809,8 +814,9 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
g_key_wep_params.key_idx = sme->key_idx; g_key_wep_params.key_idx = sme->key_idx;
g_wep_keys_saved = true; g_wep_keys_saved = true;
wilc_set_wep_default_keyid(vif, priv->hWILCWFIDrv, sme->key_idx); wilc_set_wep_default_keyid(vif, sme->key_idx);
wilc_add_wep_key_bss_sta(vif, priv->hWILCWFIDrv, sme->key, sme->key_len, sme->key_idx); wilc_add_wep_key_bss_sta(vif, sme->key, sme->key_len,
sme->key_idx);
} else if (sme->crypto.wpa_versions & NL80211_WPA_VERSION_2) { } else if (sme->crypto.wpa_versions & NL80211_WPA_VERSION_2) {
if (sme->crypto.cipher_group == WLAN_CIPHER_SUITE_TKIP) { if (sme->crypto.cipher_group == WLAN_CIPHER_SUITE_TKIP) {
u8security = ENCRYPT_ENABLED | WPA2 | TKIP; u8security = ENCRYPT_ENABLED | WPA2 | TKIP;
...@@ -895,10 +901,11 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -895,10 +901,11 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
wilc_wlan_set_bssid(dev, pstrNetworkInfo->au8bssid); wilc_wlan_set_bssid(dev, pstrNetworkInfo->au8bssid);
s32Error = wilc_set_join_req(vif, priv->hWILCWFIDrv, pstrNetworkInfo->au8bssid, sme->ssid, s32Error = wilc_set_join_req(vif, pstrNetworkInfo->au8bssid, sme->ssid,
sme->ssid_len, sme->ie, sme->ie_len, sme->ssid_len, sme->ie, sme->ie_len,
CfgConnectResult, (void *)priv, u8security, CfgConnectResult, (void *)priv,
tenuAuth_type, pstrNetworkInfo->u8channel, u8security, tenuAuth_type,
pstrNetworkInfo->u8channel,
pstrNetworkInfo->pJoinParams); pstrNetworkInfo->pJoinParams);
if (s32Error != 0) { if (s32Error != 0) {
PRINT_ER("wilc_set_join_req(): Error(%d)\n", s32Error); PRINT_ER("wilc_set_join_req(): Error(%d)\n", s32Error);
...@@ -935,7 +942,7 @@ static int disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_co ...@@ -935,7 +942,7 @@ static int disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_co
wilc_ie = false; wilc_ie = false;
pstrWFIDrv->p2p_timeout = 0; pstrWFIDrv->p2p_timeout = 0;
s32Error = wilc_disconnect(vif, priv->hWILCWFIDrv, reason_code); s32Error = wilc_disconnect(vif, reason_code);
if (s32Error != 0) { if (s32Error != 0) {
PRINT_ER("Error in disconnecting: Error(%d)\n", s32Error); PRINT_ER("Error in disconnecting: Error(%d)\n", s32Error);
s32Error = -EINVAL; s32Error = -EINVAL;
...@@ -995,7 +1002,9 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -995,7 +1002,9 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
else else
u8mode = ENCRYPT_ENABLED | WEP | WEP_EXTENDED; u8mode = ENCRYPT_ENABLED | WEP | WEP_EXTENDED;
wilc_add_wep_key_bss_ap(vif, priv->hWILCWFIDrv, params->key, params->key_len, key_index, u8mode, tenuAuth_type); wilc_add_wep_key_bss_ap(vif, params->key,
params->key_len, key_index,
u8mode, tenuAuth_type);
break; break;
} }
if (memcmp(params->key, priv->WILC_WFI_wep_key[key_index], params->key_len)) { if (memcmp(params->key, priv->WILC_WFI_wep_key[key_index], params->key_len)) {
...@@ -1009,7 +1018,8 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -1009,7 +1018,8 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
for (i = 0; i < params->key_len; i++) for (i = 0; i < params->key_len; i++)
PRINT_INFO(CFG80211_DBG, "WEP key value[%d] = %d\n", i, params->key[i]); PRINT_INFO(CFG80211_DBG, "WEP key value[%d] = %d\n", i, params->key[i]);
} }
wilc_add_wep_key_bss_sta(vif, priv->hWILCWFIDrv, params->key, params->key_len, key_index); wilc_add_wep_key_bss_sta(vif, params->key,
params->key_len, key_index);
} }
break; break;
...@@ -1066,8 +1076,10 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -1066,8 +1076,10 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
} }
wilc_add_rx_gtk(vif, priv->hWILCWFIDrv, params->key, KeyLen, wilc_add_rx_gtk(vif, params->key, KeyLen,
key_index, params->seq_len, params->seq, pu8RxMic, pu8TxMic, AP_MODE, u8gmode); key_index, params->seq_len,
params->seq, pu8RxMic,
pu8TxMic, AP_MODE, u8gmode);
} else { } else {
PRINT_INFO(CFG80211_DBG, "STA Address: %x%x%x%x%x\n", mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4]); PRINT_INFO(CFG80211_DBG, "STA Address: %x%x%x%x%x\n", mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4]);
...@@ -1110,8 +1122,9 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -1110,8 +1122,9 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
priv->wilc_ptk[key_index]->key_len = params->key_len; priv->wilc_ptk[key_index]->key_len = params->key_len;
priv->wilc_ptk[key_index]->seq_len = params->seq_len; priv->wilc_ptk[key_index]->seq_len = params->seq_len;
wilc_add_ptk(vif, priv->hWILCWFIDrv, params->key, KeyLen, mac_addr, wilc_add_ptk(vif, params->key, KeyLen,
pu8RxMic, pu8TxMic, AP_MODE, u8pmode, key_index); mac_addr, pu8RxMic, pu8TxMic,
AP_MODE, u8pmode, key_index);
} }
break; break;
} }
...@@ -1150,8 +1163,11 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -1150,8 +1163,11 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
g_gtk_keys_saved = true; g_gtk_keys_saved = true;
} }
wilc_add_rx_gtk(vif, priv->hWILCWFIDrv, params->key, KeyLen, wilc_add_rx_gtk(vif, params->key, KeyLen,
key_index, params->seq_len, params->seq, pu8RxMic, pu8TxMic, STATION_MODE, u8mode); key_index, params->seq_len,
params->seq, pu8RxMic,
pu8TxMic, STATION_MODE,
u8mode);
} else { } else {
if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) { if (params->key_len > 16 && params->cipher == WLAN_CIPHER_SUITE_TKIP) {
pu8RxMic = params->key + 24; pu8RxMic = params->key + 24;
...@@ -1184,8 +1200,9 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, ...@@ -1184,8 +1200,9 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
g_ptk_keys_saved = true; g_ptk_keys_saved = true;
} }
wilc_add_ptk(vif, priv->hWILCWFIDrv, params->key, KeyLen, mac_addr, wilc_add_ptk(vif, params->key, KeyLen,
pu8RxMic, pu8TxMic, STATION_MODE, u8mode, key_index); mac_addr, pu8RxMic, pu8TxMic,
STATION_MODE, u8mode, key_index);
PRINT_D(CFG80211_DBG, "Adding pairwise key\n"); PRINT_D(CFG80211_DBG, "Adding pairwise key\n");
if (INFO) { if (INFO) {
for (i = 0; i < params->key_len; i++) for (i = 0; i < params->key_len; i++)
...@@ -1261,7 +1278,7 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev, ...@@ -1261,7 +1278,7 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev,
priv->WILC_WFI_wep_key_len[key_index] = 0; priv->WILC_WFI_wep_key_len[key_index] = 0;
PRINT_D(CFG80211_DBG, "Removing WEP key with index = %d\n", key_index); PRINT_D(CFG80211_DBG, "Removing WEP key with index = %d\n", key_index);
wilc_remove_wep_key(vif, priv->hWILCWFIDrv, key_index); wilc_remove_wep_key(vif, key_index);
} else { } else {
PRINT_D(CFG80211_DBG, "Removing all installed keys\n"); PRINT_D(CFG80211_DBG, "Removing all installed keys\n");
wilc_remove_key(priv->hWILCWFIDrv, mac_addr); wilc_remove_key(priv->hWILCWFIDrv, mac_addr);
...@@ -1320,7 +1337,7 @@ static int set_default_key(struct wiphy *wiphy, struct net_device *netdev, u8 ke ...@@ -1320,7 +1337,7 @@ static int set_default_key(struct wiphy *wiphy, struct net_device *netdev, u8 ke
PRINT_D(CFG80211_DBG, "Setting default key with idx = %d\n", key_index); PRINT_D(CFG80211_DBG, "Setting default key with idx = %d\n", key_index);
if (key_index != priv->WILC_WFI_wep_default) { if (key_index != priv->WILC_WFI_wep_default) {
wilc_set_wep_default_keyid(vif, priv->hWILCWFIDrv, key_index); wilc_set_wep_default_keyid(vif, key_index);
} }
return 0; return 0;
...@@ -1356,7 +1373,7 @@ static int get_station(struct wiphy *wiphy, struct net_device *dev, ...@@ -1356,7 +1373,7 @@ static int get_station(struct wiphy *wiphy, struct net_device *dev,
sinfo->filled |= BIT(NL80211_STA_INFO_INACTIVE_TIME); sinfo->filled |= BIT(NL80211_STA_INFO_INACTIVE_TIME);
wilc_get_inactive_time(vif, priv->hWILCWFIDrv, mac, &(inactive_time)); wilc_get_inactive_time(vif, mac, &inactive_time);
sinfo->inactive_time = 1000 * inactive_time; sinfo->inactive_time = 1000 * inactive_time;
PRINT_D(CFG80211_DBG, "Inactive time %d\n", sinfo->inactive_time); PRINT_D(CFG80211_DBG, "Inactive time %d\n", sinfo->inactive_time);
} }
...@@ -1364,7 +1381,7 @@ static int get_station(struct wiphy *wiphy, struct net_device *dev, ...@@ -1364,7 +1381,7 @@ static int get_station(struct wiphy *wiphy, struct net_device *dev,
if (vif->iftype == STATION_MODE) { if (vif->iftype == STATION_MODE) {
struct rf_info strStatistics; struct rf_info strStatistics;
wilc_get_statistics(vif, priv->hWILCWFIDrv, &strStatistics); wilc_get_statistics(vif, &strStatistics);
sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL) | sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL) |
BIT(NL80211_STA_INFO_RX_PACKETS) | BIT(NL80211_STA_INFO_RX_PACKETS) |
...@@ -1435,7 +1452,7 @@ static int set_wiphy_params(struct wiphy *wiphy, u32 changed) ...@@ -1435,7 +1452,7 @@ static int set_wiphy_params(struct wiphy *wiphy, u32 changed)
} }
PRINT_D(CFG80211_DBG, "Setting CFG params in the host interface\n"); PRINT_D(CFG80211_DBG, "Setting CFG params in the host interface\n");
s32Error = wilc_hif_set_cfg(vif, priv->hWILCWFIDrv, &pstrCfgParamVal); s32Error = wilc_hif_set_cfg(vif, &pstrCfgParamVal);
if (s32Error) if (s32Error)
PRINT_ER("Error in setting WIPHY PARAMS\n"); PRINT_ER("Error in setting WIPHY PARAMS\n");
...@@ -1479,7 +1496,7 @@ static int set_pmksa(struct wiphy *wiphy, struct net_device *netdev, ...@@ -1479,7 +1496,7 @@ static int set_pmksa(struct wiphy *wiphy, struct net_device *netdev,
if (!s32Error) { if (!s32Error) {
PRINT_D(CFG80211_DBG, "Setting pmkid in the host interface\n"); PRINT_D(CFG80211_DBG, "Setting pmkid in the host interface\n");
s32Error = wilc_set_pmkid_info(vif, priv->hWILCWFIDrv, &priv->pmkid_list); s32Error = wilc_set_pmkid_info(vif, &priv->pmkid_list);
} }
return s32Error; return s32Error;
} }
...@@ -1789,13 +1806,11 @@ static int remain_on_channel(struct wiphy *wiphy, ...@@ -1789,13 +1806,11 @@ static int remain_on_channel(struct wiphy *wiphy,
priv->strRemainOnChanParams.u32ListenDuration = duration; priv->strRemainOnChanParams.u32ListenDuration = duration;
priv->strRemainOnChanParams.u32ListenSessionID++; priv->strRemainOnChanParams.u32ListenSessionID++;
s32Error = wilc_remain_on_channel(vif, priv->hWILCWFIDrv s32Error = wilc_remain_on_channel(vif,
, priv->strRemainOnChanParams.u32ListenSessionID priv->strRemainOnChanParams.u32ListenSessionID,
, duration duration, chan->hw_value,
, chan->hw_value WILC_WFI_RemainOnChannelExpired,
, WILC_WFI_RemainOnChannelExpired WILC_WFI_RemainOnChannelReady, (void *)priv);
, WILC_WFI_RemainOnChannelReady
, (void *)priv);
return s32Error; return s32Error;
} }
...@@ -1813,7 +1828,7 @@ static int cancel_remain_on_channel(struct wiphy *wiphy, ...@@ -1813,7 +1828,7 @@ static int cancel_remain_on_channel(struct wiphy *wiphy,
PRINT_D(CFG80211_DBG, "Cancel remain on channel\n"); PRINT_D(CFG80211_DBG, "Cancel remain on channel\n");
s32Error = wilc_listen_state_expired(vif, priv->hWILCWFIDrv, priv->strRemainOnChanParams.u32ListenSessionID); s32Error = wilc_listen_state_expired(vif, priv->strRemainOnChanParams.u32ListenSessionID);
return s32Error; return s32Error;
} }
...@@ -1861,7 +1876,7 @@ static int mgmt_tx(struct wiphy *wiphy, ...@@ -1861,7 +1876,7 @@ static int mgmt_tx(struct wiphy *wiphy,
if (ieee80211_is_probe_resp(mgmt->frame_control)) { if (ieee80211_is_probe_resp(mgmt->frame_control)) {
PRINT_D(GENERIC_DBG, "TX: Probe Response\n"); PRINT_D(GENERIC_DBG, "TX: Probe Response\n");
PRINT_D(GENERIC_DBG, "Setting channel: %d\n", chan->hw_value); PRINT_D(GENERIC_DBG, "Setting channel: %d\n", chan->hw_value);
wilc_set_mac_chnl_num(vif, priv->hWILCWFIDrv, chan->hw_value); wilc_set_mac_chnl_num(vif, chan->hw_value);
curr_channel = chan->hw_value; curr_channel = chan->hw_value;
} else if (ieee80211_is_action(mgmt->frame_control)) { } else if (ieee80211_is_action(mgmt->frame_control)) {
PRINT_D(GENERIC_DBG, "ACTION FRAME:%x\n", (u16)mgmt->frame_control); PRINT_D(GENERIC_DBG, "ACTION FRAME:%x\n", (u16)mgmt->frame_control);
...@@ -1871,7 +1886,8 @@ static int mgmt_tx(struct wiphy *wiphy, ...@@ -1871,7 +1886,8 @@ static int mgmt_tx(struct wiphy *wiphy,
if (buf[ACTION_SUBTYPE_ID] != PUBLIC_ACT_VENDORSPEC || if (buf[ACTION_SUBTYPE_ID] != PUBLIC_ACT_VENDORSPEC ||
buf[P2P_PUB_ACTION_SUBTYPE] != GO_NEG_CONF) { buf[P2P_PUB_ACTION_SUBTYPE] != GO_NEG_CONF) {
PRINT_D(GENERIC_DBG, "Setting channel: %d\n", chan->hw_value); PRINT_D(GENERIC_DBG, "Setting channel: %d\n", chan->hw_value);
wilc_set_mac_chnl_num(vif, priv->hWILCWFIDrv, chan->hw_value); wilc_set_mac_chnl_num(vif,
chan->hw_value);
curr_channel = chan->hw_value; curr_channel = chan->hw_value;
} }
switch (buf[ACTION_SUBTYPE_ID]) { switch (buf[ACTION_SUBTYPE_ID]) {
...@@ -2017,7 +2033,7 @@ void wilc_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev, ...@@ -2017,7 +2033,7 @@ void wilc_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev,
PRINT_D(GENERIC_DBG, "Return since mac is closed\n"); PRINT_D(GENERIC_DBG, "Return since mac is closed\n");
return; return;
} }
wilc_frame_register(vif, priv->hWILCWFIDrv, frame_type, reg); wilc_frame_register(vif, frame_type, reg);
} }
static int set_cqm_rssi_config(struct wiphy *wiphy, struct net_device *dev, static int set_cqm_rssi_config(struct wiphy *wiphy, struct net_device *dev,
...@@ -2043,7 +2059,7 @@ static int dump_station(struct wiphy *wiphy, struct net_device *dev, ...@@ -2043,7 +2059,7 @@ static int dump_station(struct wiphy *wiphy, struct net_device *dev,
sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL); sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
wilc_get_rssi(vif, priv->hWILCWFIDrv, &(sinfo->signal)); wilc_get_rssi(vif, &sinfo->signal);
return 0; return 0;
} }
...@@ -2067,7 +2083,7 @@ static int set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, ...@@ -2067,7 +2083,7 @@ static int set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
} }
if (wilc_enable_ps) if (wilc_enable_ps)
wilc_set_power_mgmt(vif, priv->hWILCWFIDrv, enabled, timeout); wilc_set_power_mgmt(vif, enabled, timeout);
return 0; return 0;
...@@ -2115,8 +2131,8 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, ...@@ -2115,8 +2131,8 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
vif->iftype = STATION_MODE; vif->iftype = STATION_MODE;
if (wl->initialized) { if (wl->initialized) {
wilc_del_all_rx_ba_session(vif, priv->hWILCWFIDrv, wilc_del_all_rx_ba_session(vif, wl->vif[0]->bssid,
wl->vif[0]->bssid, TID); TID);
wilc_wait_msg_queue_idle(); wilc_wait_msg_queue_idle();
up(&wl->cfg_event); up(&wl->cfg_event);
...@@ -2127,20 +2143,19 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, ...@@ -2127,20 +2143,19 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
vif->iftype = interface_type; vif->iftype = interface_type;
wilc_set_wfi_drv_handler(vif, wl->vif[0]->hif_drv); wilc_set_wfi_drv_handler(vif, wl->vif[0]->hif_drv);
wilc_set_mac_address(vif, wl->vif[0]->hif_drv, wilc_set_mac_address(wl->vif[0], wl->vif[0]->src_addr);
wl->vif[0]->src_addr); wilc_set_operation_mode(vif, STATION_MODE);
wilc_set_operation_mode(vif, priv->hWILCWFIDrv, STATION_MODE);
if (g_wep_keys_saved) { if (g_wep_keys_saved) {
wilc_set_wep_default_keyid(vif, wl->vif[0]->hif_drv, wilc_set_wep_default_keyid(wl->vif[0],
g_key_wep_params.key_idx); g_key_wep_params.key_idx);
wilc_add_wep_key_bss_sta(vif, wl->vif[0]->hif_drv, wilc_add_wep_key_bss_sta(wl->vif[0],
g_key_wep_params.key, g_key_wep_params.key,
g_key_wep_params.key_len, g_key_wep_params.key_len,
g_key_wep_params.key_idx); g_key_wep_params.key_idx);
} }
wilc_flush_join_req(vif, priv->hWILCWFIDrv); wilc_flush_join_req(vif);
if (g_ptk_keys_saved && g_gtk_keys_saved) { if (g_ptk_keys_saved && g_gtk_keys_saved) {
PRINT_D(CFG80211_DBG, "ptk %x %x %x\n", g_key_ptk_params.key[0], PRINT_D(CFG80211_DBG, "ptk %x %x %x\n", g_key_ptk_params.key[0],
...@@ -2168,25 +2183,24 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, ...@@ -2168,25 +2183,24 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
for (i = 0; i < num_reg_frame; i++) { for (i = 0; i < num_reg_frame; i++) {
PRINT_D(INIT_DBG, "Frame registering Type: %x - Reg: %d\n", vif->g_struct_frame_reg[i].frame_type, PRINT_D(INIT_DBG, "Frame registering Type: %x - Reg: %d\n", vif->g_struct_frame_reg[i].frame_type,
vif->g_struct_frame_reg[i].reg); vif->g_struct_frame_reg[i].reg);
wilc_frame_register(vif, priv->hWILCWFIDrv, wilc_frame_register(vif,
vif->g_struct_frame_reg[i].frame_type, vif->g_struct_frame_reg[i].frame_type,
vif->g_struct_frame_reg[i].reg); vif->g_struct_frame_reg[i].reg);
} }
} }
wilc_enable_ps = true; wilc_enable_ps = true;
wilc_set_power_mgmt(vif, priv->hWILCWFIDrv, 1, 0); wilc_set_power_mgmt(vif, 1, 0);
} }
break; break;
case NL80211_IFTYPE_P2P_CLIENT: case NL80211_IFTYPE_P2P_CLIENT:
wilc_enable_ps = false; wilc_enable_ps = false;
wilc_set_power_mgmt(vif, priv->hWILCWFIDrv, 0, 0); wilc_set_power_mgmt(vif, 0, 0);
wilc_connecting = 0; wilc_connecting = 0;
PRINT_D(HOSTAPD_DBG, "Interface type = NL80211_IFTYPE_P2P_CLIENT\n"); PRINT_D(HOSTAPD_DBG, "Interface type = NL80211_IFTYPE_P2P_CLIENT\n");
wilc_del_all_rx_ba_session(vif, priv->hWILCWFIDrv, wilc_del_all_rx_ba_session(vif, wl->vif[0]->bssid, TID);
wl->vif[0]->bssid, TID);
dev->ieee80211_ptr->iftype = type; dev->ieee80211_ptr->iftype = type;
priv->wdev->iftype = type; priv->wdev->iftype = type;
...@@ -2204,20 +2218,19 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, ...@@ -2204,20 +2218,19 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
wilc_initialized = 1; wilc_initialized = 1;
wilc_set_wfi_drv_handler(vif, wl->vif[0]->hif_drv); wilc_set_wfi_drv_handler(vif, wl->vif[0]->hif_drv);
wilc_set_mac_address(vif, wl->vif[0]->hif_drv, wilc_set_mac_address(wl->vif[0], wl->vif[0]->src_addr);
wl->vif[0]->src_addr); wilc_set_operation_mode(vif, STATION_MODE);
wilc_set_operation_mode(vif, priv->hWILCWFIDrv, STATION_MODE);
if (g_wep_keys_saved) { if (g_wep_keys_saved) {
wilc_set_wep_default_keyid(vif, wl->vif[0]->hif_drv, wilc_set_wep_default_keyid(wl->vif[0],
g_key_wep_params.key_idx); g_key_wep_params.key_idx);
wilc_add_wep_key_bss_sta(vif, wl->vif[0]->hif_drv, wilc_add_wep_key_bss_sta(wl->vif[0],
g_key_wep_params.key, g_key_wep_params.key,
g_key_wep_params.key_len, g_key_wep_params.key_len,
g_key_wep_params.key_idx); g_key_wep_params.key_idx);
} }
wilc_flush_join_req(vif, priv->hWILCWFIDrv); wilc_flush_join_req(vif);
if (g_ptk_keys_saved && g_gtk_keys_saved) { if (g_ptk_keys_saved && g_gtk_keys_saved) {
PRINT_D(CFG80211_DBG, "ptk %x %x %x\n", g_key_ptk_params.key[0], PRINT_D(CFG80211_DBG, "ptk %x %x %x\n", g_key_ptk_params.key[0],
...@@ -2248,7 +2261,7 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, ...@@ -2248,7 +2261,7 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
for (i = 0; i < num_reg_frame; i++) { for (i = 0; i < num_reg_frame; i++) {
PRINT_D(INIT_DBG, "Frame registering Type: %x - Reg: %d\n", vif->g_struct_frame_reg[i].frame_type, PRINT_D(INIT_DBG, "Frame registering Type: %x - Reg: %d\n", vif->g_struct_frame_reg[i].frame_type,
vif->g_struct_frame_reg[i].reg); vif->g_struct_frame_reg[i].reg);
wilc_frame_register(vif, priv->hWILCWFIDrv, wilc_frame_register(vif,
vif->g_struct_frame_reg[i].frame_type, vif->g_struct_frame_reg[i].frame_type,
vif->g_struct_frame_reg[i].reg); vif->g_struct_frame_reg[i].reg);
} }
...@@ -2275,7 +2288,7 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, ...@@ -2275,7 +2288,7 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
for (i = 0; i < num_reg_frame; i++) { for (i = 0; i < num_reg_frame; i++) {
PRINT_D(INIT_DBG, "Frame registering Type: %x - Reg: %d\n", vif->g_struct_frame_reg[i].frame_type, PRINT_D(INIT_DBG, "Frame registering Type: %x - Reg: %d\n", vif->g_struct_frame_reg[i].frame_type,
vif->g_struct_frame_reg[i].reg); vif->g_struct_frame_reg[i].reg);
wilc_frame_register(vif, priv->hWILCWFIDrv, wilc_frame_register(vif,
vif->g_struct_frame_reg[i].frame_type, vif->g_struct_frame_reg[i].frame_type,
vif->g_struct_frame_reg[i].reg); vif->g_struct_frame_reg[i].reg);
} }
...@@ -2288,9 +2301,8 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, ...@@ -2288,9 +2301,8 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
wilc_optaining_ip = true; wilc_optaining_ip = true;
mod_timer(&wilc_during_ip_timer, mod_timer(&wilc_during_ip_timer,
jiffies + msecs_to_jiffies(during_ip_time)); jiffies + msecs_to_jiffies(during_ip_time));
wilc_set_power_mgmt(vif, priv->hWILCWFIDrv, 0, 0); wilc_set_power_mgmt(vif, 0, 0);
wilc_del_all_rx_ba_session(vif, priv->hWILCWFIDrv, wilc_del_all_rx_ba_session(vif, wl->vif[0]->bssid, TID);
wl->vif[0]->bssid, TID);
wilc_enable_ps = false; wilc_enable_ps = false;
PRINT_D(HOSTAPD_DBG, "Interface type = NL80211_IFTYPE_GO\n"); PRINT_D(HOSTAPD_DBG, "Interface type = NL80211_IFTYPE_GO\n");
dev->ieee80211_ptr->iftype = type; dev->ieee80211_ptr->iftype = type;
...@@ -2309,20 +2321,19 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, ...@@ -2309,20 +2321,19 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
wilc_initialized = 1; wilc_initialized = 1;
wilc_set_wfi_drv_handler(vif, wl->vif[0]->hif_drv); wilc_set_wfi_drv_handler(vif, wl->vif[0]->hif_drv);
wilc_set_mac_address(vif, wl->vif[0]->hif_drv, wilc_set_mac_address(wl->vif[0], wl->vif[0]->src_addr);
wl->vif[0]->src_addr); wilc_set_operation_mode(vif, AP_MODE);
wilc_set_operation_mode(vif, priv->hWILCWFIDrv, AP_MODE);
if (g_wep_keys_saved) { if (g_wep_keys_saved) {
wilc_set_wep_default_keyid(vif, wl->vif[0]->hif_drv, wilc_set_wep_default_keyid(wl->vif[0],
g_key_wep_params.key_idx); g_key_wep_params.key_idx);
wilc_add_wep_key_bss_sta(vif, wl->vif[0]->hif_drv, wilc_add_wep_key_bss_sta(wl->vif[0],
g_key_wep_params.key, g_key_wep_params.key,
g_key_wep_params.key_len, g_key_wep_params.key_len,
g_key_wep_params.key_idx); g_key_wep_params.key_idx);
} }
wilc_flush_join_req(vif, priv->hWILCWFIDrv); wilc_flush_join_req(vif);
if (g_ptk_keys_saved && g_gtk_keys_saved) { if (g_ptk_keys_saved && g_gtk_keys_saved) {
PRINT_D(CFG80211_DBG, "ptk %x %x %x cipher %x\n", g_key_ptk_params.key[0], PRINT_D(CFG80211_DBG, "ptk %x %x %x cipher %x\n", g_key_ptk_params.key[0],
...@@ -2352,7 +2363,7 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, ...@@ -2352,7 +2363,7 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
for (i = 0; i < num_reg_frame; i++) { for (i = 0; i < num_reg_frame; i++) {
PRINT_D(INIT_DBG, "Frame registering Type: %x - Reg: %d\n", vif->g_struct_frame_reg[i].frame_type, PRINT_D(INIT_DBG, "Frame registering Type: %x - Reg: %d\n", vif->g_struct_frame_reg[i].frame_type,
vif->g_struct_frame_reg[i].reg); vif->g_struct_frame_reg[i].reg);
wilc_frame_register(vif, priv->hWILCWFIDrv, wilc_frame_register(vif,
vif->g_struct_frame_reg[i].frame_type, vif->g_struct_frame_reg[i].frame_type,
vif->g_struct_frame_reg[i].reg); vif->g_struct_frame_reg[i].reg);
} }
...@@ -2391,11 +2402,10 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev, ...@@ -2391,11 +2402,10 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev,
wilc_wlan_set_bssid(dev, wl->vif[0]->src_addr); wilc_wlan_set_bssid(dev, wl->vif[0]->src_addr);
s32Error = wilc_add_beacon(vif, priv->hWILCWFIDrv, s32Error = wilc_add_beacon(vif, settings->beacon_interval,
settings->beacon_interval, settings->dtim_period, beacon->head_len,
settings->dtim_period, (u8 *)beacon->head, beacon->tail_len,
beacon->head_len, (u8 *)beacon->head, (u8 *)beacon->tail);
beacon->tail_len, (u8 *)beacon->tail);
return s32Error; return s32Error;
} }
...@@ -2412,11 +2422,9 @@ static int change_beacon(struct wiphy *wiphy, struct net_device *dev, ...@@ -2412,11 +2422,9 @@ static int change_beacon(struct wiphy *wiphy, struct net_device *dev,
PRINT_D(HOSTAPD_DBG, "Setting beacon\n"); PRINT_D(HOSTAPD_DBG, "Setting beacon\n");
s32Error = wilc_add_beacon(vif, priv->hWILCWFIDrv, s32Error = wilc_add_beacon(vif, 0, 0, beacon->head_len,
0, (u8 *)beacon->head, beacon->tail_len,
0, (u8 *)beacon->tail);
beacon->head_len, (u8 *)beacon->head,
beacon->tail_len, (u8 *)beacon->tail);
return s32Error; return s32Error;
} }
...@@ -2438,7 +2446,7 @@ static int stop_ap(struct wiphy *wiphy, struct net_device *dev) ...@@ -2438,7 +2446,7 @@ static int stop_ap(struct wiphy *wiphy, struct net_device *dev)
wilc_wlan_set_bssid(dev, NullBssid); wilc_wlan_set_bssid(dev, NullBssid);
s32Error = wilc_del_beacon(vif, priv->hWILCWFIDrv); s32Error = wilc_del_beacon(vif);
if (s32Error) if (s32Error)
PRINT_ER("Host delete beacon fail\n"); PRINT_ER("Host delete beacon fail\n");
...@@ -2509,8 +2517,7 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev, ...@@ -2509,8 +2517,7 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev,
PRINT_D(HOSTAPD_DBG, "Flag Set = %d\n", PRINT_D(HOSTAPD_DBG, "Flag Set = %d\n",
strStaParams.flags_set); strStaParams.flags_set);
s32Error = wilc_add_station(vif, priv->hWILCWFIDrv, s32Error = wilc_add_station(vif, &strStaParams);
&strStaParams);
if (s32Error) if (s32Error)
PRINT_ER("Host add station fail\n"); PRINT_ER("Host add station fail\n");
} }
...@@ -2538,12 +2545,13 @@ static int del_station(struct wiphy *wiphy, struct net_device *dev, ...@@ -2538,12 +2545,13 @@ static int del_station(struct wiphy *wiphy, struct net_device *dev,
if (!mac) { if (!mac) {
PRINT_D(HOSTAPD_DBG, "All associated stations\n"); PRINT_D(HOSTAPD_DBG, "All associated stations\n");
s32Error = wilc_del_allstation(vif, priv->hWILCWFIDrv, priv->assoc_stainfo.au8Sta_AssociatedBss); s32Error = wilc_del_allstation(vif,
priv->assoc_stainfo.au8Sta_AssociatedBss);
} else { } else {
PRINT_D(HOSTAPD_DBG, "With mac address: %x%x%x%x%x%x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); PRINT_D(HOSTAPD_DBG, "With mac address: %x%x%x%x%x%x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
} }
s32Error = wilc_del_station(vif, priv->hWILCWFIDrv, mac); s32Error = wilc_del_station(vif, mac);
if (s32Error) if (s32Error)
PRINT_ER("Host delete station fail\n"); PRINT_ER("Host delete station fail\n");
...@@ -2616,8 +2624,7 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev, ...@@ -2616,8 +2624,7 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev,
PRINT_D(HOSTAPD_DBG, "Flag Set = %d\n", PRINT_D(HOSTAPD_DBG, "Flag Set = %d\n",
strStaParams.flags_set); strStaParams.flags_set);
s32Error = wilc_edit_station(vif, priv->hWILCWFIDrv, s32Error = wilc_edit_station(vif, &strStaParams);
&strStaParams);
if (s32Error) if (s32Error)
PRINT_ER("Host edit station fail\n"); PRINT_ER("Host edit station fail\n");
} }
...@@ -2862,7 +2869,7 @@ int wilc_deinit_host_int(struct net_device *net) ...@@ -2862,7 +2869,7 @@ int wilc_deinit_host_int(struct net_device *net)
op_ifcs--; op_ifcs--;
s32Error = wilc_deinit(vif, priv->hWILCWFIDrv); s32Error = wilc_deinit(vif);
clear_shadow_scan(); clear_shadow_scan();
if (op_ifcs == 0) { if (op_ifcs == 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