Lines Matching refs:vif
53 struct wilc_vif *vif = netdev_priv(dev); in init_irq() local
54 struct wilc *wl = vif->wilc; in init_irq()
72 struct wilc_vif *vif = netdev_priv(dev); in deinit_irq() local
73 struct wilc *wilc = vif->wilc; in deinit_irq()
96 struct wilc_vif *vif; in get_if_handler() local
99 list_for_each_entry_rcu(vif, &wilc->vif_list, list) { in get_if_handler()
100 if (vif->iftype == WILC_STATION_MODE) in get_if_handler()
101 if (ether_addr_equal_unaligned(h->addr2, vif->bssid)) { in get_if_handler()
102 ndev = vif->ndev; in get_if_handler()
105 if (vif->iftype == WILC_AP_MODE) in get_if_handler()
106 if (ether_addr_equal_unaligned(h->addr1, vif->bssid)) { in get_if_handler()
107 ndev = vif->ndev; in get_if_handler()
118 struct wilc_vif *vif = netdev_priv(wilc_netdev); in wilc_wlan_set_bssid() local
121 ether_addr_copy(vif->bssid, bssid); in wilc_wlan_set_bssid()
123 eth_zero_addr(vif->bssid); in wilc_wlan_set_bssid()
125 vif->iftype = mode; in wilc_wlan_set_bssid()
132 struct wilc_vif *vif; in wilc_wlan_get_num_conn_ifcs() local
135 list_for_each_entry_rcu(vif, &wilc->vif_list, list) { in wilc_wlan_get_num_conn_ifcs()
136 if (!is_zero_ether_addr(vif->bssid)) in wilc_wlan_get_num_conn_ifcs()
181 struct wilc_vif *vif = netdev_priv(dev); in wilc_wlan_get_firmware() local
182 struct wilc *wilc = vif->wilc; in wilc_wlan_get_firmware()
206 struct wilc_vif *vif = netdev_priv(dev); in wilc_start_firmware() local
207 struct wilc *wilc = vif->wilc; in wilc_start_firmware()
223 struct wilc_vif *vif = netdev_priv(dev); in wilc1000_firmware_download() local
224 struct wilc *wilc = vif->wilc; in wilc1000_firmware_download()
245 static int wilc_init_fw_config(struct net_device *dev, struct wilc_vif *vif) in wilc_init_fw_config() argument
247 struct wilc_priv *priv = &vif->priv; in wilc_init_fw_config()
257 w = vif->iftype; in wilc_init_fw_config()
259 if (!wilc_wlan_cfg_set(vif, 1, WID_SET_OPERATION_MODE, (u8 *)&w, 4, in wilc_init_fw_config()
264 if (!wilc_wlan_cfg_set(vif, 0, WID_BSS_TYPE, &b, 1, 0, 0)) in wilc_init_fw_config()
268 if (!wilc_wlan_cfg_set(vif, 0, WID_CURRENT_TX_RATE, &b, 1, 0, 0)) in wilc_init_fw_config()
272 if (!wilc_wlan_cfg_set(vif, 0, WID_11G_OPERATING_MODE, &b, 1, 0, 0)) in wilc_init_fw_config()
276 if (!wilc_wlan_cfg_set(vif, 0, WID_PREAMBLE, &b, 1, 0, 0)) in wilc_init_fw_config()
280 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_PROT_MECH, &b, 1, 0, 0)) in wilc_init_fw_config()
284 if (!wilc_wlan_cfg_set(vif, 0, WID_SCAN_TYPE, &b, 1, 0, 0)) in wilc_init_fw_config()
288 if (!wilc_wlan_cfg_set(vif, 0, WID_SITE_SURVEY, &b, 1, 0, 0)) in wilc_init_fw_config()
293 if (!wilc_wlan_cfg_set(vif, 0, WID_RTS_THRESHOLD, (u8 *)&hw, 2, 0, 0)) in wilc_init_fw_config()
298 if (!wilc_wlan_cfg_set(vif, 0, WID_FRAG_THRESHOLD, (u8 *)&hw, 2, 0, 0)) in wilc_init_fw_config()
302 if (!wilc_wlan_cfg_set(vif, 0, WID_BCAST_SSID, &b, 1, 0, 0)) in wilc_init_fw_config()
306 if (!wilc_wlan_cfg_set(vif, 0, WID_QOS_ENABLE, &b, 1, 0, 0)) in wilc_init_fw_config()
310 if (!wilc_wlan_cfg_set(vif, 0, WID_POWER_MANAGEMENT, &b, 1, 0, 0)) in wilc_init_fw_config()
314 if (!wilc_wlan_cfg_set(vif, 0, WID_11I_MODE, &b, 1, 0, 0)) in wilc_init_fw_config()
318 if (!wilc_wlan_cfg_set(vif, 0, WID_AUTH_TYPE, &b, 1, 0, 0)) in wilc_init_fw_config()
322 if (!wilc_wlan_cfg_set(vif, 0, WID_LISTEN_INTERVAL, &b, 1, 0, 0)) in wilc_init_fw_config()
326 if (!wilc_wlan_cfg_set(vif, 0, WID_DTIM_PERIOD, &b, 1, 0, 0)) in wilc_init_fw_config()
330 if (!wilc_wlan_cfg_set(vif, 0, WID_ACK_POLICY, &b, 1, 0, 0)) in wilc_init_fw_config()
334 if (!wilc_wlan_cfg_set(vif, 0, WID_USER_CONTROL_ON_TX_POWER, &b, 1, in wilc_init_fw_config()
339 if (!wilc_wlan_cfg_set(vif, 0, WID_TX_POWER_LEVEL_11A, &b, 1, 0, 0)) in wilc_init_fw_config()
343 if (!wilc_wlan_cfg_set(vif, 0, WID_TX_POWER_LEVEL_11B, &b, 1, 0, 0)) in wilc_init_fw_config()
348 if (!wilc_wlan_cfg_set(vif, 0, WID_BEACON_INTERVAL, (u8 *)&hw, 2, 0, 0)) in wilc_init_fw_config()
352 if (!wilc_wlan_cfg_set(vif, 0, WID_REKEY_POLICY, &b, 1, 0, 0)) in wilc_init_fw_config()
357 if (!wilc_wlan_cfg_set(vif, 0, WID_REKEY_PERIOD, (u8 *)&w, 4, 0, 0)) in wilc_init_fw_config()
362 if (!wilc_wlan_cfg_set(vif, 0, WID_REKEY_PACKET_COUNT, (u8 *)&w, 4, 0, in wilc_init_fw_config()
367 if (!wilc_wlan_cfg_set(vif, 0, WID_SHORT_SLOT_ALLOWED, &b, 1, 0, in wilc_init_fw_config()
372 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_ERP_PROT_TYPE, &b, 1, 0, 0)) in wilc_init_fw_config()
376 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_ENABLE, &b, 1, 0, 0)) in wilc_init_fw_config()
380 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_OPERATING_MODE, &b, 1, 0, 0)) in wilc_init_fw_config()
384 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_TXOP_PROT_DISABLE, &b, 1, 0, 0)) in wilc_init_fw_config()
388 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_OBSS_NONHT_DETECTION, &b, 1, in wilc_init_fw_config()
393 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_HT_PROT_TYPE, &b, 1, 0, 0)) in wilc_init_fw_config()
397 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_RIFS_PROT_ENABLE, &b, 1, 0, in wilc_init_fw_config()
402 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_CURRENT_TX_MCS, &b, 1, 0, 0)) in wilc_init_fw_config()
406 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_IMMEDIATE_BA_ENABLED, &b, 1, in wilc_init_fw_config()
418 struct wilc_vif *vif = netdev_priv(dev); in wlan_deinitialize_threads() local
419 struct wilc *wl = vif->wilc; in wlan_deinitialize_threads()
433 struct wilc_vif *vif = netdev_priv(dev); in wilc_wlan_deinitialize() local
434 struct wilc *wl = vif->wilc; in wilc_wlan_deinitialize()
455 wilc_wlan_stop(wl, vif); in wilc_wlan_deinitialize()
468 struct wilc_vif *vif = netdev_priv(dev); in wlan_initialize_threads() local
469 struct wilc *wilc = vif->wilc; in wlan_initialize_threads()
483 static int wilc_wlan_initialize(struct net_device *dev, struct wilc_vif *vif) in wilc_wlan_initialize() argument
486 struct wilc *wl = vif->wilc; in wilc_wlan_initialize()
524 if (wilc_wlan_cfg_get(vif, 1, WID_FIRMWARE_VERSION, 1, 0)) { in wilc_wlan_initialize()
535 ret = wilc_init_fw_config(dev, vif); in wilc_wlan_initialize()
544 wilc_wlan_stop(wl, vif); in wilc_wlan_initialize()
574 struct wilc_vif *vif = netdev_priv(ndev); in wilc_mac_open() local
575 struct wilc *wl = vif->wilc; in wilc_mac_open()
591 ret = wilc_wlan_initialize(ndev, vif); in wilc_mac_open()
597 wilc_set_operation_mode(vif, wilc_get_vif_idx(vif), vif->iftype, in wilc_mac_open()
598 vif->idx); in wilc_mac_open()
602 wilc_set_mac_address(vif, addr); in wilc_mac_open()
604 wilc_get_mac_address(vif, addr); in wilc_mac_open()
616 mgmt_regs.interface_stypes = vif->mgmt_reg_stypes; in wilc_mac_open()
618 vif->mgmt_reg_stypes = 0; in wilc_mac_open()
619 wilc_update_mgmt_frame_registrations(vif->ndev->ieee80211_ptr->wiphy, in wilc_mac_open()
620 vif->ndev->ieee80211_ptr, in wilc_mac_open()
624 vif->mac_opened = 1; in wilc_mac_open()
630 struct wilc_vif *vif = netdev_priv(dev); in mac_stats() local
632 return &vif->netstats; in mac_stats()
638 struct wilc_vif *vif = netdev_priv(dev); in wilc_set_mac_addr() local
639 struct wilc *wilc = vif->wilc; in wilc_set_mac_addr()
648 if (!vif->mac_opened) { in wilc_set_mac_addr()
659 if (vif != tmp_vif) { in wilc_set_mac_addr()
669 result = wilc_set_mac_address(vif, (u8 *)addr->sa_data); in wilc_set_mac_addr()
680 struct wilc_vif *vif = netdev_priv(dev); in wilc_set_multicast_list() local
690 wilc_setup_multicast_filter(vif, 0, 0, NULL); in wilc_set_multicast_list()
695 wilc_setup_multicast_filter(vif, 1, 0, NULL); in wilc_set_multicast_list()
712 if (wilc_setup_multicast_filter(vif, 1, dev->mc.count, mc_list)) in wilc_set_multicast_list()
726 struct wilc_vif *vif = netdev_priv(ndev); in wilc_mac_xmit() local
727 struct wilc *wilc = vif->wilc; in wilc_mac_xmit()
748 vif->netstats.tx_packets++; in wilc_mac_xmit()
749 vif->netstats.tx_bytes += tx_data->size; in wilc_mac_xmit()
756 struct wilc_vif *vif; in wilc_mac_xmit() local
759 list_for_each_entry_rcu(vif, &wilc->vif_list, list) { in wilc_mac_xmit()
760 if (vif->mac_opened) in wilc_mac_xmit()
761 netif_stop_queue(vif->ndev); in wilc_mac_xmit()
771 struct wilc_vif *vif = netdev_priv(ndev); in wilc_mac_close() local
772 struct wilc *wl = vif->wilc; in wilc_mac_close()
781 if (vif->ndev) { in wilc_mac_close()
782 netif_stop_queue(vif->ndev); in wilc_mac_close()
784 wilc_handle_disconnect(vif); in wilc_mac_close()
785 wilc_deinit_host_int(vif->ndev); in wilc_mac_close()
794 vif->mac_opened = 0; in wilc_mac_close()
807 struct wilc_vif *vif; in wilc_frmw_to_host() local
817 vif = netdev_priv(wilc_netdev); in wilc_frmw_to_host()
832 vif->netstats.rx_packets++; in wilc_frmw_to_host()
833 vif->netstats.rx_bytes += frame_len; in wilc_frmw_to_host()
843 struct wilc_vif *vif; in wilc_wfi_mgmt_rx() local
846 list_for_each_entry_rcu(vif, &wilc->vif_list, list) { in wilc_wfi_mgmt_rx()
852 if ((vif->mgmt_reg_stypes & auth_bit && in wilc_wfi_mgmt_rx()
854 vif->iftype == WILC_STATION_MODE && is_auth) { in wilc_wfi_mgmt_rx()
855 wilc_wfi_mgmt_frame_rx(vif, buff, size); in wilc_wfi_mgmt_rx()
859 if (vif->priv.p2p_listen_state && in wilc_wfi_mgmt_rx()
860 vif->mgmt_reg_stypes & type_bit) in wilc_wfi_mgmt_rx()
861 wilc_wfi_p2p_rx(vif, buff, size); in wilc_wfi_mgmt_rx()
863 if (vif->monitor_flag) in wilc_wfi_mgmt_rx()
881 struct wilc_vif *vif; in wilc_netdev_cleanup() local
893 list_for_each_entry_rcu(vif, &wilc->vif_list, list) { in wilc_netdev_cleanup()
894 if (vif->ndev) in wilc_netdev_cleanup()
895 unregister_netdev(vif->ndev); in wilc_netdev_cleanup()
908 vif = wilc_get_wl_to_vif(wilc); in wilc_netdev_cleanup()
909 if (!IS_ERR(vif)) in wilc_netdev_cleanup()
910 list_del_rcu(&vif->list); in wilc_netdev_cleanup()
928 struct wilc_vif *vif; in wilc_get_available_idx() local
932 list_for_each_entry_rcu(vif, &wl->vif_list, list) { in wilc_get_available_idx()
933 if (vif->idx == 0) in wilc_get_available_idx()
947 struct wilc_vif *vif; in wilc_netdev_ifc_init() local
950 ndev = alloc_etherdev(sizeof(*vif)); in wilc_netdev_ifc_init()
954 vif = netdev_priv(ndev); in wilc_netdev_ifc_init()
955 ndev->ieee80211_ptr = &vif->priv.wdev; in wilc_netdev_ifc_init()
957 vif->wilc = wl; in wilc_netdev_ifc_init()
958 vif->ndev = ndev; in wilc_netdev_ifc_init()
959 ndev->ml_priv = vif; in wilc_netdev_ifc_init()
965 vif->priv.wdev.wiphy = wl->wiphy; in wilc_netdev_ifc_init()
966 vif->priv.wdev.netdev = ndev; in wilc_netdev_ifc_init()
967 vif->priv.wdev.iftype = type; in wilc_netdev_ifc_init()
968 vif->priv.dev = ndev; in wilc_netdev_ifc_init()
988 vif->iftype = vif_type; in wilc_netdev_ifc_init()
989 vif->idx = wilc_get_available_idx(wl); in wilc_netdev_ifc_init()
990 vif->mac_opened = 0; in wilc_netdev_ifc_init()
992 list_add_tail_rcu(&vif->list, &wl->vif_list); in wilc_netdev_ifc_init()
997 return vif; in wilc_netdev_ifc_init()