for (i = 0; i < g_linux_wlan->vif_num; i++)
if (!memcmp(Bssid1, g_linux_wlan->vif[i].bssid, ETH_ALEN) ||
!memcmp(Bssid, g_linux_wlan->vif[i].bssid, ETH_ALEN))
- return g_linux_wlan->vif[i].wilc_netdev;
+ return g_linux_wlan->vif[i].ndev;
PRINT_INFO(INIT_DBG, "Invalide handle\n");
for (i = 0; i < 25; i++)
for (i = 0; i < g_linux_wlan->vif_num; i++)
if (!memcmp(Bssid1, g_linux_wlan->vif[i].bssid, ETH_ALEN) ||
!memcmp(Bssid, g_linux_wlan->vif[i].bssid, ETH_ALEN))
- return g_linux_wlan->vif[i].wilc_netdev;
+ return g_linux_wlan->vif[i].ndev;
PRINT_INFO(INIT_DBG, "\n");
return NULL;
int ret = -1;
for (i = 0; i < g_linux_wlan->vif_num; i++)
- if (g_linux_wlan->vif[i].wilc_netdev == wilc_netdev) {
+ if (g_linux_wlan->vif[i].ndev == wilc_netdev) {
memcpy(g_linux_wlan->vif[i].bssid, pBSSID, 6);
ret = 0;
break;
if (txq_count < FLOW_CONTROL_LOWER_THRESHOLD /* && netif_queue_stopped(pd->wilc_netdev)*/) {
PRINT_D(TX_DBG, "Waking up queue\n");
/* netif_wake_queue(pd->wilc_netdev); */
- if (netif_queue_stopped(g_linux_wlan->vif[0].wilc_netdev))
- netif_wake_queue(g_linux_wlan->vif[0].wilc_netdev);
- if (netif_queue_stopped(g_linux_wlan->vif[1].wilc_netdev))
- netif_wake_queue(g_linux_wlan->vif[1].wilc_netdev);
+ if (netif_queue_stopped(g_linux_wlan->vif[0].ndev))
+ netif_wake_queue(g_linux_wlan->vif[0].ndev);
+ if (netif_queue_stopped(g_linux_wlan->vif[1].ndev))
+ netif_wake_queue(g_linux_wlan->vif[1].ndev);
}
if (ret == WILC_TX_ERR_NO_BUF) { /* failed to allocate buffers in chip. */
/* loop through the NUM of supported devices and set the MAC address */
for (i = 0; i < g_linux_wlan->vif_num; i++) {
- if (ndev == g_linux_wlan->vif[i].wilc_netdev) {
+ if (ndev == g_linux_wlan->vif[i].ndev) {
memcpy(g_linux_wlan->vif[i].src_addr, mac_add, ETH_ALEN);
g_linux_wlan->vif[i].hif_drv = priv->hWILCWFIDrv;
break;
linux_wlan_tx_complete);
if (QueueCount > FLOW_CONTROL_UPPER_THRESHOLD) {
- netif_stop_queue(g_linux_wlan->vif[0].wilc_netdev);
- netif_stop_queue(g_linux_wlan->vif[1].wilc_netdev);
+ netif_stop_queue(g_linux_wlan->vif[0].ndev);
+ netif_stop_queue(g_linux_wlan->vif[1].ndev);
}
return 0;
/*Pass the frame on the monitor interface, if any.*/
/*Otherwise, pass it on p2p0 netdev, if registered on it*/
for (i = 0; i < g_linux_wlan->vif_num; i++) {
- nic = netdev_priv(g_linux_wlan->vif[i].wilc_netdev);
+ nic = netdev_priv(g_linux_wlan->vif[i].ndev);
if (nic->monitor_flag) {
WILC_WFI_monitor_rx(buff, size);
return;
}
}
- nic = netdev_priv(g_linux_wlan->vif[1].wilc_netdev); /* p2p0 */
+ nic = netdev_priv(g_linux_wlan->vif[1].ndev); /* p2p0 */
if ((buff[0] == nic->g_struct_frame_reg[0].frame_type && nic->g_struct_frame_reg[0].reg) ||
(buff[0] == nic->g_struct_frame_reg[1].frame_type && nic->g_struct_frame_reg[1].reg))
- WILC_WFI_p2p_rx(g_linux_wlan->vif[1].wilc_netdev, buff, size);
+ WILC_WFI_p2p_rx(g_linux_wlan->vif[1].ndev, buff, size);
}
int wilc_netdev_init(void)
nic->u8IfIdx = g_linux_wlan->vif_num;
nic->wilc_netdev = ndev;
- g_linux_wlan->vif[g_linux_wlan->vif_num].wilc_netdev = ndev;
+ g_linux_wlan->vif[g_linux_wlan->vif_num].ndev = ndev;
g_linux_wlan->vif_num++;
ndev->netdev_ops = &wilc_netdev_ops;
perInterface_wlan_t *nic[NUM_CONCURRENT_IFC] = {NULL,};
#define CLOSE_TIMEOUT (12 * 1000)
- if ((g_linux_wlan != NULL) && (((g_linux_wlan->vif[0].wilc_netdev) != NULL)
- || ((g_linux_wlan->vif[1].wilc_netdev) != NULL))) {
+ if ((g_linux_wlan != NULL) && (((g_linux_wlan->vif[0].ndev) != NULL)
+ || ((g_linux_wlan->vif[1].ndev) != NULL))) {
unregister_inetaddr_notifier(&g_dev_notifier);
for (i = 0; i < NUM_CONCURRENT_IFC; i++)
- nic[i] = netdev_priv(g_linux_wlan->vif[i].wilc_netdev);
+ nic[i] = netdev_priv(g_linux_wlan->vif[i].ndev);
}
if ((g_linux_wlan != NULL) && g_linux_wlan->wilc_firmware != NULL) {
g_linux_wlan->wilc_firmware = NULL;
}
- if ((g_linux_wlan != NULL) && (((g_linux_wlan->vif[0].wilc_netdev) != NULL)
- || ((g_linux_wlan->vif[1].wilc_netdev) != NULL))) {
+ if ((g_linux_wlan != NULL) && (((g_linux_wlan->vif[0].ndev) != NULL)
+ || ((g_linux_wlan->vif[1].ndev) != NULL))) {
PRINT_D(INIT_DBG, "Waiting for mac_close ....\n");
if (linux_wlan_lock_timeout(&close_exit_sync, CLOSE_TIMEOUT) < 0)
for (i = 0; i < NUM_CONCURRENT_IFC; i++) {
/* close all opened interfaces */
- if (g_linux_wlan->vif[i].wilc_netdev != NULL) {
+ if (g_linux_wlan->vif[i].ndev != NULL) {
if (nic[i]->mac_opened)
- mac_close(g_linux_wlan->vif[i].wilc_netdev);
+ mac_close(g_linux_wlan->vif[i].ndev);
}
}
for (i = 0; i < NUM_CONCURRENT_IFC; i++) {
- PRINT_D(INIT_DBG, "Unregistering netdev %p\n", g_linux_wlan->vif[i].wilc_netdev);
- unregister_netdev(g_linux_wlan->vif[i].wilc_netdev);
+ PRINT_D(INIT_DBG, "Unregistering netdev %p\n", g_linux_wlan->vif[i].ndev);
+ unregister_netdev(g_linux_wlan->vif[i].ndev);
PRINT_D(INIT_DBG, "Freeing Wiphy...\n");
- wilc_free_wiphy(g_linux_wlan->vif[i].wilc_netdev);
+ wilc_free_wiphy(g_linux_wlan->vif[i].ndev);
PRINT_D(INIT_DBG, "Freeing netdev...\n");
- free_netdev(g_linux_wlan->vif[i].wilc_netdev);
+ free_netdev(g_linux_wlan->vif[i].ndev);
}
}
u8WLANChannel = INVALID_CHANNEL;
/*Incase "P2P CLIENT Connected" send deauthentication reason by 3 to force the WPA_SUPPLICANT to directly change
* virtual interface to station*/
- if ((pstrWFIDrv->IFC_UP) && (dev == g_linux_wlan->vif[1].wilc_netdev)) {
+ if ((pstrWFIDrv->IFC_UP) && (dev == g_linux_wlan->vif[1].ndev)) {
pstrDisconnectNotifInfo->u16reason = 3;
}
/*Incase "P2P CLIENT during connection(not connected)" send deauthentication reason by 1 to force the WPA_SUPPLICANT
* to scan again and retry the connection*/
- else if ((!pstrWFIDrv->IFC_UP) && (dev == g_linux_wlan->vif[1].wilc_netdev)) {
+ else if ((!pstrWFIDrv->IFC_UP) && (dev == g_linux_wlan->vif[1].ndev)) {
pstrDisconnectNotifInfo->u16reason = 1;
}
cfg80211_disconnected(dev, pstrDisconnectNotifInfo->u16reason, pstrDisconnectNotifInfo->ie,
}
/*save keys only on interface 0 (wifi interface)*/
- if (!g_gtk_keys_saved && netdev == g_linux_wlan->vif[0].wilc_netdev) {
+ if (!g_gtk_keys_saved && netdev == g_linux_wlan->vif[0].ndev) {
g_add_gtk_key_params.key_idx = key_index;
g_add_gtk_key_params.pairwise = pairwise;
if (!mac_addr) {
}
/*save keys only on interface 0 (wifi interface)*/
- if (!g_ptk_keys_saved && netdev == g_linux_wlan->vif[0].wilc_netdev) {
+ if (!g_ptk_keys_saved && netdev == g_linux_wlan->vif[0].ndev) {
g_add_ptk_key_params.key_idx = key_index;
g_add_ptk_key_params.pairwise = pairwise;
if (!mac_addr) {
priv = wiphy_priv(wiphy);
/*delete saved keys, if any*/
- if (netdev == g_linux_wlan->vif[0].wilc_netdev) {
+ if (netdev == g_linux_wlan->vif[0].ndev) {
g_ptk_keys_saved = false;
g_gtk_keys_saved = false;
g_wep_keys_saved = false;
PRINT_D(CFG80211_DBG, "gtk %x %x %x\n", g_key_gtk_params.key[0],
g_key_gtk_params.key[1],
g_key_gtk_params.key[2]);
- add_key(g_linux_wlan->vif[0].wilc_netdev->ieee80211_ptr->wiphy,
- g_linux_wlan->vif[0].wilc_netdev,
+ add_key(g_linux_wlan->vif[0].ndev->ieee80211_ptr->wiphy,
+ g_linux_wlan->vif[0].ndev,
g_add_ptk_key_params.key_idx,
g_add_ptk_key_params.pairwise,
g_add_ptk_key_params.mac_addr,
(struct key_params *)(&g_key_ptk_params));
- add_key(g_linux_wlan->vif[0].wilc_netdev->ieee80211_ptr->wiphy,
- g_linux_wlan->vif[0].wilc_netdev,
+ add_key(g_linux_wlan->vif[0].ndev->ieee80211_ptr->wiphy,
+ g_linux_wlan->vif[0].ndev,
g_add_gtk_key_params.key_idx,
g_add_gtk_key_params.pairwise,
g_add_gtk_key_params.mac_addr,
PRINT_D(CFG80211_DBG, "gtk %x %x %x\n", g_key_gtk_params.key[0],
g_key_gtk_params.key[1],
g_key_gtk_params.key[2]);
- add_key(g_linux_wlan->vif[0].wilc_netdev->ieee80211_ptr->wiphy,
- g_linux_wlan->vif[0].wilc_netdev,
+ add_key(g_linux_wlan->vif[0].ndev->ieee80211_ptr->wiphy,
+ g_linux_wlan->vif[0].ndev,
g_add_ptk_key_params.key_idx,
g_add_ptk_key_params.pairwise,
g_add_ptk_key_params.mac_addr,
(struct key_params *)(&g_key_ptk_params));
- add_key(g_linux_wlan->vif[0].wilc_netdev->ieee80211_ptr->wiphy,
- g_linux_wlan->vif[0].wilc_netdev,
+ add_key(g_linux_wlan->vif[0].ndev->ieee80211_ptr->wiphy,
+ g_linux_wlan->vif[0].ndev,
g_add_gtk_key_params.key_idx,
g_add_gtk_key_params.pairwise,
g_add_gtk_key_params.mac_addr,
g_key_gtk_params.key[1],
g_key_gtk_params.key[2],
g_key_gtk_params.cipher);
- add_key(g_linux_wlan->vif[0].wilc_netdev->ieee80211_ptr->wiphy,
- g_linux_wlan->vif[0].wilc_netdev,
+ add_key(g_linux_wlan->vif[0].ndev->ieee80211_ptr->wiphy,
+ g_linux_wlan->vif[0].ndev,
g_add_ptk_key_params.key_idx,
g_add_ptk_key_params.pairwise,
g_add_ptk_key_params.mac_addr,
(struct key_params *)(&g_key_ptk_params));
- add_key(g_linux_wlan->vif[0].wilc_netdev->ieee80211_ptr->wiphy,
- g_linux_wlan->vif[0].wilc_netdev,
+ add_key(g_linux_wlan->vif[0].ndev->ieee80211_ptr->wiphy,
+ g_linux_wlan->vif[0].ndev,
g_add_gtk_key_params.key_idx,
g_add_gtk_key_params.pairwise,
g_add_gtk_key_params.mac_addr,