};
struct del_all_sta {
- u8 del_all_sta[MAX_NUM_STA][ETH_ALEN];
+ u8 del_all_sta[WILC_MAX_NUM_STA][ETH_ALEN];
u8 assoc_sta;
};
{
int index = idx - 1;
- if (index < 0 || index >= NUM_CONCURRENT_IFC)
+ if (index < 0 || index >= WILC_NUM_CONCURRENT_IFC)
return NULL;
return wilc->vif[index];
wid.val = (char *)&hif_set_ch->set_ch;
wid.size = sizeof(char);
- ret = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ ret = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (ret)
hif_drv = vif->hif_drv;
- buffer = kzalloc(DRV_HANDLER_SIZE, GFP_KERNEL);
+ buffer = kzalloc(WILC_DRV_HANDLER_SIZE, GFP_KERNEL);
if (!buffer)
goto free_msg;
wid.id = WID_SET_DRV_HANDLER;
wid.type = WID_STR;
wid.val = (s8 *)buffer;
- wid.size = DRV_HANDLER_SIZE;
+ wid.size = WILC_DRV_HANDLER_SIZE;
- ret = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ ret = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
hif_drv->driver_handler_id);
if (ret)
netdev_err(vif->ndev, "Failed to set driver handler\n");
wid.val = (s8 *)&hif_op_mode->mode;
wid.size = sizeof(u32);
- ret = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ ret = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (ret)
wid.val = get_mac_addr->mac_addr;
wid.size = ETH_ALEN;
- ret = wilc_send_config_pkt(vif, GET_CFG, &wid, 1,
+ ret = wilc_send_config_pkt(vif, WILC_GET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (ret)
struct wid wid_list[32];
int i = 0;
- if (param->flag & RETRY_SHORT) {
+ if (param->flag & WILC_CFG_PARAM_RETRY_SHORT) {
wid_list[i].id = WID_SHORT_RETRY_LIMIT;
wid_list[i].val = (s8 *)¶m->short_retry_limit;
wid_list[i].type = WID_SHORT;
wid_list[i].size = sizeof(u16);
i++;
}
- if (param->flag & RETRY_LONG) {
+ if (param->flag & WILC_CFG_PARAM_RETRY_LONG) {
wid_list[i].id = WID_LONG_RETRY_LIMIT;
wid_list[i].val = (s8 *)¶m->long_retry_limit;
wid_list[i].type = WID_SHORT;
wid_list[i].size = sizeof(u16);
i++;
}
- if (param->flag & FRAG_THRESHOLD) {
+ if (param->flag & WILC_CFG_PARAM_FRAG_THRESHOLD) {
wid_list[i].id = WID_FRAG_THRESHOLD;
wid_list[i].val = (s8 *)¶m->frag_threshold;
wid_list[i].type = WID_SHORT;
wid_list[i].size = sizeof(u16);
i++;
}
- if (param->flag & RTS_THRESHOLD) {
+ if (param->flag & WILC_CFG_PARAM_RTS_THRESHOLD) {
wid_list[i].id = WID_RTS_THRESHOLD;
wid_list[i].val = (s8 *)¶m->rts_threshold;
wid_list[i].type = WID_SHORT;
i++;
}
- ret = wilc_send_config_pkt(vif, SET_CFG, wid_list,
+ ret = wilc_send_config_pkt(vif, WILC_SET_CFG, wid_list,
i, wilc_get_vif_idx(vif));
if (ret)
wid.val = (s8 *)&abort_running_scan;
wid.size = sizeof(char);
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result) {
wid_list[index].val = (s8 *)&scan_info->src;
index++;
- result = wilc_send_config_pkt(vif, SET_CFG, wid_list,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, wid_list,
index,
wilc_get_vif_idx(vif));
cur_byte = wid_list[wid_cnt].val;
wid_cnt++;
- result = wilc_send_config_pkt(vif, SET_CFG, wid_list,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, wid_list,
wid_cnt,
wilc_get_vif_idx(vif));
if (result) {
wid.val = (s8 *)&dummy_reason_code;
wid.size = sizeof(char);
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result)
netdev_err(vif->ndev, "Failed to send disconnect\n");
wid.val = assoc_resp_info;
wid.size = max_assoc_resp_info_len;
- result = wilc_send_config_pkt(vif, GET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_GET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result) {
*rcvd_assoc_resp_info_len = 0;
if (mac_status == WILC_MAC_STATUS_CONNECTED) {
u32 assoc_resp_info_len;
- memset(hif_drv->assoc_resp, 0, MAX_ASSOC_RESP_FRAME_SIZE);
+ memset(hif_drv->assoc_resp, 0, WILC_MAX_ASSOC_RESP_FRAME_SIZE);
host_int_get_assoc_res_info(vif, hif_drv->assoc_resp,
- MAX_ASSOC_RESP_FRAME_SIZE,
+ WILC_MAX_ASSOC_RESP_FRAME_SIZE,
&assoc_resp_info_len);
if (assoc_resp_info_len != 0) {
wid.val = (s8 *)key_buf;
wid.size = (hif_key->attr.pmkid.numpmkid * PMKSA_KEY_LEN) + 1;
- ret = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ ret = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
kfree(key_buf);
struct host_if_drv *hif_drv = vif->hif_drv;
switch (hif_key->type) {
- case WEP:
+ case WILC_KEY_TYPE_WEP:
- if (hif_key->action & ADDKEY_AP) {
+ if (hif_key->action & WILC_ADD_KEY_AP) {
wid_list[0].id = WID_11I_MODE;
wid_list[0].type = WID_CHAR;
wid_list[0].size = sizeof(char);
wid_list[2].size = hif_key->attr.wep.key_len + 2;
wid_list[2].val = (s8 *)key_buf;
- result = wilc_send_config_pkt(vif, SET_CFG,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG,
wid_list, 3,
wilc_get_vif_idx(vif));
kfree(key_buf);
- } else if (hif_key->action & ADDKEY) {
+ } else if (hif_key->action & WILC_ADD_KEY) {
key_buf = kmalloc(hif_key->attr.wep.key_len + 2,
GFP_KERNEL);
if (!key_buf) {
wid.val = (s8 *)key_buf;
wid.size = hif_key->attr.wep.key_len + 2;
- result = wilc_send_config_pkt(vif, SET_CFG,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG,
&wid, 1,
wilc_get_vif_idx(vif));
kfree(key_buf);
- } else if (hif_key->action & REMOVEKEY) {
+ } else if (hif_key->action & WILC_REMOVE_KEY) {
wid.id = WID_REMOVE_WEP_KEY;
wid.type = WID_STR;
wid.val = (s8 *)&hif_key->attr.wep.index;
wid.size = 1;
- result = wilc_send_config_pkt(vif, SET_CFG,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG,
&wid, 1,
wilc_get_vif_idx(vif));
- } else if (hif_key->action & DEFAULTKEY) {
+ } else if (hif_key->action & WILC_DEFAULT_KEY) {
wid.id = WID_KEY_ID;
wid.type = WID_CHAR;
wid.val = (s8 *)&hif_key->attr.wep.index;
wid.size = sizeof(char);
- result = wilc_send_config_pkt(vif, SET_CFG,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG,
&wid, 1,
wilc_get_vif_idx(vif));
}
complete(&msg->work_comp);
break;
- case WPA_RX_GTK:
- if (hif_key->action & ADDKEY_AP) {
+ case WILC_KEY_TYPE_WPA_RX_GTK:
+ if (hif_key->action & WILC_ADD_KEY_AP) {
key_buf = kzalloc(RX_MIC_KEY_MSG_LEN, GFP_KERNEL);
if (!key_buf) {
result = -ENOMEM;
wid_list[1].val = (s8 *)key_buf;
wid_list[1].size = RX_MIC_KEY_MSG_LEN;
- result = wilc_send_config_pkt(vif, SET_CFG,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG,
wid_list, 2,
wilc_get_vif_idx(vif));
kfree(key_buf);
- } else if (hif_key->action & ADDKEY) {
+ } else if (hif_key->action & WILC_ADD_KEY) {
key_buf = kzalloc(RX_MIC_KEY_MSG_LEN, GFP_KERNEL);
if (!key_buf) {
result = -ENOMEM;
wid.val = (s8 *)key_buf;
wid.size = RX_MIC_KEY_MSG_LEN;
- result = wilc_send_config_pkt(vif, SET_CFG,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG,
&wid, 1,
wilc_get_vif_idx(vif));
complete(&msg->work_comp);
break;
- case WPA_PTK:
- if (hif_key->action & ADDKEY_AP) {
+ case WILC_KEY_TYPE_WPA_PTK:
+ if (hif_key->action & WILC_ADD_KEY_AP) {
key_buf = kmalloc(PTK_KEY_MSG_LEN + 1, GFP_KERNEL);
if (!key_buf) {
result = -ENOMEM;
wid_list[1].val = (s8 *)key_buf;
wid_list[1].size = PTK_KEY_MSG_LEN + 1;
- result = wilc_send_config_pkt(vif, SET_CFG,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG,
wid_list, 2,
wilc_get_vif_idx(vif));
kfree(key_buf);
- } else if (hif_key->action & ADDKEY) {
+ } else if (hif_key->action & WILC_ADD_KEY) {
key_buf = kmalloc(PTK_KEY_MSG_LEN, GFP_KERNEL);
if (!key_buf) {
result = -ENOMEM;
wid.val = (s8 *)key_buf;
wid.size = PTK_KEY_MSG_LEN;
- result = wilc_send_config_pkt(vif, SET_CFG,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG,
&wid, 1,
wilc_get_vif_idx(vif));
kfree(key_buf);
complete(&msg->work_comp);
break;
- case PMKSA:
+ case WILC_KEY_TYPE_PMKSA:
result = wilc_pmksa_key_copy(vif, hif_key);
/*free 'msg', this case it not a sync call*/
kfree(msg);
vif->obtaining_ip = false;
wilc_set_power_mgmt(vif, 0, 0);
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result) {
wid.val = msg->body.data;
wid.size = sizeof(char);
- result = wilc_send_config_pkt(vif, GET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_GET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result)
netdev_err(vif->ndev, "Failed to get RSSI value\n");
wid_list[wid_cnt].val = (s8 *)&stats->tx_fail_cnt;
wid_cnt++;
- result = wilc_send_config_pkt(vif, GET_CFG, wid_list,
+ result = wilc_send_config_pkt(vif, WILC_GET_CFG, wid_list,
wid_cnt,
wilc_get_vif_idx(vif));
ether_addr_copy(wid.val, hif_sta_inactive->mac);
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
kfree(wid.val);
wid.val = (s8 *)&hif_sta_inactive->inactive_time;
wid.size = sizeof(u32);
- result = wilc_send_config_pkt(vif, GET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_GET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result)
memcpy(cur_byte, param->tail, param->tail_len);
cur_byte += param->tail_len;
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result)
netdev_err(vif->ndev, "Failed to send add beacon\n");
wid.size = sizeof(char);
wid.val = &del_beacon;
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result)
netdev_err(vif->ndev, "Failed to send delete beacon\n");
cur_byte = wid.val;
cur_byte += wilc_hif_pack_sta_param(cur_byte, param);
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result != 0)
netdev_err(vif->ndev, "Failed to send add station\n");
*(curr_byte++) = param->assoc_sta;
- for (i = 0; i < MAX_NUM_STA; i++) {
+ for (i = 0; i < WILC_MAX_NUM_STA; i++) {
if (memcmp(param->del_all_sta[i], zero_buff, ETH_ALEN))
memcpy(curr_byte, param->del_all_sta[i], ETH_ALEN);
else
curr_byte += ETH_ALEN;
}
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result)
netdev_err(vif->ndev, "Failed to send delete all station\n");
ether_addr_copy(wid.val, param->mac_addr);
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result)
netdev_err(vif->ndev, "Failed to del station\n");
cur_byte = wid.val;
cur_byte += wilc_hif_pack_sta_param(cur_byte, param);
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result)
netdev_err(vif->ndev, "Failed to send edit station\n");
wid.val[0] = remain_on_chan_flag;
wid.val[1] = (s8)hif_remain_ch->ch;
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
kfree(wid.val);
if (result != 0)
wid.size = sizeof(u16) + 2;
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
kfree(wid.val);
if (result)
wid.val[0] = remain_on_chan_flag;
wid.val[1] = FALSE_FRMWR_CHANNEL;
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
kfree(wid.val);
if (result != 0) {
wid.val = &power_mode;
wid.size = sizeof(char);
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result)
netdev_err(vif->ndev, "Failed to send power management\n");
memcpy(cur_byte, hif_set_mc->mc_list,
((hif_set_mc->cnt) * ETH_ALEN));
- result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ result = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result)
netdev_err(vif->ndev, "Failed to send setup multicast\n");
wid.val = &tx_pwr;
wid.size = sizeof(char);
- ret = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
+ ret = wilc_send_config_pkt(vif, WILC_SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (ret)
netdev_err(vif->ndev, "Failed to set TX PWR\n");
wid.val = (s8 *)tx_pwr;
wid.size = sizeof(char);
- ret = wilc_send_config_pkt(vif, GET_CFG, &wid, 1,
+ ret = wilc_send_config_pkt(vif, WILC_GET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (ret)
netdev_err(vif->ndev, "Failed to get TX PWR\n");
if (IS_ERR(msg))
return PTR_ERR(msg);
- msg->body.key_info.type = WEP;
- msg->body.key_info.action = REMOVEKEY;
+ msg->body.key_info.type = WILC_KEY_TYPE_WEP;
+ msg->body.key_info.action = WILC_REMOVE_KEY;
msg->body.key_info.attr.wep.index = index;
result = wilc_enqueue_work(msg);
if (IS_ERR(msg))
return PTR_ERR(msg);
- msg->body.key_info.type = WEP;
- msg->body.key_info.action = DEFAULTKEY;
+ msg->body.key_info.type = WILC_KEY_TYPE_WEP;
+ msg->body.key_info.action = WILC_DEFAULT_KEY;
msg->body.key_info.attr.wep.index = index;
result = wilc_enqueue_work(msg);
if (IS_ERR(msg))
return PTR_ERR(msg);
- msg->body.key_info.type = WEP;
- msg->body.key_info.action = ADDKEY;
+ msg->body.key_info.type = WILC_KEY_TYPE_WEP;
+ msg->body.key_info.action = WILC_ADD_KEY;
msg->body.key_info.attr.wep.key = kmemdup(key, len, GFP_KERNEL);
if (!msg->body.key_info.attr.wep.key) {
result = -ENOMEM;
if (IS_ERR(msg))
return PTR_ERR(msg);
- msg->body.key_info.type = WEP;
- msg->body.key_info.action = ADDKEY_AP;
+ msg->body.key_info.type = WILC_KEY_TYPE_WEP;
+ msg->body.key_info.action = WILC_ADD_KEY_AP;
msg->body.key_info.attr.wep.key = kmemdup(key, len, GFP_KERNEL);
if (!msg->body.key_info.attr.wep.key) {
result = -ENOMEM;
if (IS_ERR(msg))
return PTR_ERR(msg);
- msg->body.key_info.type = WPA_PTK;
- if (mode == AP_MODE) {
- msg->body.key_info.action = ADDKEY_AP;
+ msg->body.key_info.type = WILC_KEY_TYPE_WPA_PTK;
+ if (mode == WILC_AP_MODE) {
+ msg->body.key_info.action = WILC_ADD_KEY_AP;
msg->body.key_info.attr.wpa.index = index;
}
- if (mode == STATION_MODE)
- msg->body.key_info.action = ADDKEY;
+ if (mode == WILC_STATION_MODE)
+ msg->body.key_info.action = WILC_ADD_KEY;
msg->body.key_info.attr.wpa.key = kmemdup(ptk, ptk_key_len, GFP_KERNEL);
if (!msg->body.key_info.attr.wpa.key) {
}
}
- msg->body.key_info.type = WPA_RX_GTK;
+ msg->body.key_info.type = WILC_KEY_TYPE_WPA_RX_GTK;
- if (mode == AP_MODE) {
- msg->body.key_info.action = ADDKEY_AP;
+ if (mode == WILC_AP_MODE) {
+ msg->body.key_info.action = WILC_ADD_KEY_AP;
msg->body.key_info.attr.wpa.mode = cipher_mode;
}
- if (mode == STATION_MODE)
- msg->body.key_info.action = ADDKEY;
+ if (mode == WILC_STATION_MODE)
+ msg->body.key_info.action = WILC_ADD_KEY;
msg->body.key_info.attr.wpa.key = kmemdup(rx_gtk, key_len, GFP_KERNEL);
if (!msg->body.key_info.attr.wpa.key) {
if (IS_ERR(msg))
return PTR_ERR(msg);
- msg->body.key_info.type = PMKSA;
- msg->body.key_info.action = ADDKEY;
+ msg->body.key_info.type = WILC_KEY_TYPE_PMKSA;
+ msg->body.key_info.action = WILC_ADD_KEY;
for (i = 0; i < pmkid->numpmkid; i++) {
memcpy(msg->body.key_info.attr.pmkid.pmkidlist[i].bssid,
del_all_sta_info = &msg->body.del_all_sta_info;
- for (i = 0; i < MAX_NUM_STA; i++) {
+ for (i = 0; i < WILC_MAX_NUM_STA; i++) {
if (memcmp(mac_addr[i], zero_addr, ETH_ALEN)) {
memcpy(del_all_sta_info->del_all_sta[i], mac_addr[i],
ETH_ALEN);
conn_info->status == WLAN_STATUS_SUCCESS) {
connect_status = WLAN_STATUS_UNSPECIFIED_FAILURE;
wilc_wlan_set_bssid(priv->dev, null_bssid,
- STATION_MODE);
+ WILC_STATION_MODE);
if (!wfi_drv->p2p_connect)
wlan_channel = INVALID_CHANNEL;
priv->p2p.recv_random = 0x00;
priv->p2p.is_wilc_ie = false;
eth_zero_addr(priv->associated_bss);
- wilc_wlan_set_bssid(priv->dev, null_bssid, STATION_MODE);
+ wilc_wlan_set_bssid(priv->dev, null_bssid, WILC_STATION_MODE);
if (!wfi_drv->p2p_connect)
wlan_channel = INVALID_CHANNEL;
if (!wfi_drv->p2p_connect)
wlan_channel = nw_info->ch;
- wilc_wlan_set_bssid(dev, nw_info->bssid, STATION_MODE);
+ wilc_wlan_set_bssid(dev, nw_info->bssid, WILC_STATION_MODE);
ret = wilc_set_join_req(vif, nw_info->bssid, sme->ssid,
sme->ssid_len, sme->ie, sme->ie_len,
netdev_err(dev, "wilc_set_join_req(): Error\n");
ret = -ENOENT;
- wilc_wlan_set_bssid(dev, null_bssid, STATION_MODE);
+ wilc_wlan_set_bssid(dev, null_bssid, WILC_STATION_MODE);
goto out_error;
}
return 0;
wfi_drv = (struct host_if_drv *)priv->hif_drv;
if (!wfi_drv->p2p_connect)
wlan_channel = INVALID_CHANNEL;
- wilc_wlan_set_bssid(priv->dev, null_bssid, STATION_MODE);
+ wilc_wlan_set_bssid(priv->dev, null_bssid, WILC_STATION_MODE);
priv->p2p.local_random = 0x01;
priv->p2p.recv_random = 0x00;
if (ret)
return -ENOMEM;
- op_mode = AP_MODE;
+ op_mode = WILC_AP_MODE;
} else {
if (params->key_len > 16 &&
params->cipher == WLAN_CIPHER_SUITE_TKIP) {
keylen = params->key_len - 16;
}
- op_mode = STATION_MODE;
+ op_mode = WILC_STATION_MODE;
}
if (!pairwise)
u32 associatedsta = ~0;
u32 inactive_time = 0;
- if (vif->iftype == AP_MODE || vif->iftype == GO_MODE) {
+ if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) {
for (i = 0; i < NUM_STA_ASSOCIATED; i++) {
if (!(memcmp(mac,
priv->assoc_stainfo.sta_associated_bss[i],
wilc_get_inactive_time(vif, mac, &inactive_time);
sinfo->inactive_time = 1000 * inactive_time;
- } else if (vif->iftype == STATION_MODE) {
+ } else if (vif->iftype == WILC_STATION_MODE) {
struct rf_info stats;
wilc_get_statistics(vif, &stats, true);
netdev_dbg(vif->ndev,
"Setting WIPHY_PARAM_RETRY_SHORT %d\n",
wiphy->retry_short);
- cfg_param_val.flag |= RETRY_SHORT;
+ cfg_param_val.flag |= WILC_CFG_PARAM_RETRY_SHORT;
cfg_param_val.short_retry_limit = wiphy->retry_short;
}
if (changed & WIPHY_PARAM_RETRY_LONG) {
netdev_dbg(vif->ndev,
"Setting WIPHY_PARAM_RETRY_LONG %d\n",
wiphy->retry_long);
- cfg_param_val.flag |= RETRY_LONG;
+ cfg_param_val.flag |= WILC_CFG_PARAM_RETRY_LONG;
cfg_param_val.long_retry_limit = wiphy->retry_long;
}
if (changed & WIPHY_PARAM_FRAG_THRESHOLD) {
netdev_dbg(vif->ndev,
"Setting WIPHY_PARAM_FRAG_THRESHOLD %d\n",
wiphy->frag_threshold);
- cfg_param_val.flag |= FRAG_THRESHOLD;
+ cfg_param_val.flag |= WILC_CFG_PARAM_FRAG_THRESHOLD;
cfg_param_val.frag_threshold = wiphy->frag_threshold;
} else {
netdev_err(vif->ndev,
netdev_dbg(vif->ndev,
"Setting WIPHY_PARAM_RTS_THRESHOLD %d\n",
wiphy->rts_threshold);
- cfg_param_val.flag |= RTS_THRESHOLD;
+ cfg_param_val.flag |= WILC_CFG_PARAM_RTS_THRESHOLD;
cfg_param_val.rts_threshold = wiphy->rts_threshold;
} else {
netdev_err(vif->ndev, "RTS threshold out of range\n");
dev->ieee80211_ptr->iftype = type;
priv->wdev->iftype = type;
vif->monitor_flag = 0;
- vif->iftype = STATION_MODE;
- wilc_set_operation_mode(vif, STATION_MODE);
+ vif->iftype = WILC_STATION_MODE;
+ wilc_set_operation_mode(vif, WILC_STATION_MODE);
memset(priv->assoc_stainfo.sta_associated_bss, 0,
- MAX_NUM_STA * ETH_ALEN);
+ WILC_MAX_NUM_STA * ETH_ALEN);
wl->enable_ps = true;
wilc_set_power_mgmt(vif, 1, 0);
dev->ieee80211_ptr->iftype = type;
priv->wdev->iftype = type;
vif->monitor_flag = 0;
- vif->iftype = CLIENT_MODE;
- wilc_set_operation_mode(vif, STATION_MODE);
+ vif->iftype = WILC_CLIENT_MODE;
+ wilc_set_operation_mode(vif, WILC_STATION_MODE);
wl->enable_ps = false;
wilc_set_power_mgmt(vif, 0, 0);
wl->enable_ps = false;
dev->ieee80211_ptr->iftype = type;
priv->wdev->iftype = type;
- vif->iftype = AP_MODE;
+ vif->iftype = WILC_AP_MODE;
if (wl->initialized) {
wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif),
0, vif->ifc_id, false);
- wilc_set_operation_mode(vif, AP_MODE);
+ wilc_set_operation_mode(vif, WILC_AP_MODE);
wilc_set_power_mgmt(vif, 0, 0);
}
break;
vif->obtaining_ip = true;
mod_timer(&vif->during_ip_timer,
jiffies + msecs_to_jiffies(DURING_IP_TIME_OUT));
- wilc_set_operation_mode(vif, AP_MODE);
+ wilc_set_operation_mode(vif, WILC_AP_MODE);
dev->ieee80211_ptr->iftype = type;
priv->wdev->iftype = type;
- vif->iftype = GO_MODE;
+ vif->iftype = WILC_GO_MODE;
wl->enable_ps = false;
wilc_set_power_mgmt(vif, 0, 0);
if (ret != 0)
netdev_err(dev, "Error in setting channel\n");
- wilc_wlan_set_bssid(dev, wl->vif[vif->idx]->src_addr, AP_MODE);
+ wilc_wlan_set_bssid(dev, wl->vif[vif->idx]->src_addr, WILC_AP_MODE);
wilc_set_power_mgmt(vif, 0, 0);
return wilc_add_beacon(vif, settings->beacon_interval,
struct wilc_vif *vif = netdev_priv(priv->dev);
u8 null_bssid[ETH_ALEN] = {0};
- wilc_wlan_set_bssid(dev, null_bssid, AP_MODE);
+ wilc_wlan_set_bssid(dev, null_bssid, WILC_AP_MODE);
ret = wilc_del_beacon(vif);
struct add_sta_param sta_params = { {0} };
struct wilc_vif *vif = netdev_priv(dev);
- if (vif->iftype == AP_MODE || vif->iftype == GO_MODE) {
+ if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) {
memcpy(sta_params.bssid, mac, ETH_ALEN);
memcpy(priv->assoc_stainfo.sta_associated_bss[params->aid], mac,
ETH_ALEN);
struct wilc_vif *vif = netdev_priv(dev);
struct sta_info *info;
- if (!(vif->iftype == AP_MODE || vif->iftype == GO_MODE))
+ if (!(vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE))
return ret;
info = &priv->assoc_stainfo;
struct add_sta_param sta_params = { {0} };
struct wilc_vif *vif = netdev_priv(dev);
- if (vif->iftype == AP_MODE || vif->iftype == GO_MODE) {
+ if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) {
memcpy(sta_params.bssid, mac, ETH_ALEN);
sta_params.aid = params->aid;
sta_params.rates_len = params->supported_rates_len;
priv = wdev_priv(wdev);
priv->wdev = wdev;
- wdev->wiphy->max_scan_ssids = MAX_NUM_PROBED_SSID;
+ wdev->wiphy->max_scan_ssids = WILC_MAX_NUM_PROBED_SSID;
#ifdef CONFIG_PM
wdev->wiphy->wowlan = &wowlan_support;
#endif