Lines Matching full: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 wilc_for_each_vif(wilc, vif) { 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 wilc_for_each_vif(wilc, vif) { in wilc_wlan_get_num_conn_ifcs()
136 if (!is_zero_ether_addr(vif->bssid)) in wilc_wlan_get_num_conn_ifcs()
196 struct wilc_vif *vif = netdev_priv(dev); in wilc_wlan_get_firmware() local
197 struct wilc *wilc = vif->wilc; in wilc_wlan_get_firmware()
221 struct wilc_vif *vif = netdev_priv(dev); in wilc_start_firmware() local
222 struct wilc *wilc = vif->wilc; in wilc_start_firmware()
238 struct wilc_vif *vif = netdev_priv(dev); in wilc1000_firmware_download() local
239 struct wilc *wilc = vif->wilc; in wilc1000_firmware_download()
260 static int wilc_init_fw_config(struct net_device *dev, struct wilc_vif *vif) in wilc_init_fw_config() argument
262 struct wilc_priv *priv = &vif->priv; in wilc_init_fw_config()
272 w = vif->iftype; in wilc_init_fw_config()
274 if (!wilc_wlan_cfg_set(vif, 1, WID_SET_OPERATION_MODE, (u8 *)&w, 4, in wilc_init_fw_config()
279 if (!wilc_wlan_cfg_set(vif, 0, WID_BSS_TYPE, &b, 1, 0, 0)) in wilc_init_fw_config()
283 if (!wilc_wlan_cfg_set(vif, 0, WID_CURRENT_TX_RATE, &b, 1, 0, 0)) in wilc_init_fw_config()
287 if (!wilc_wlan_cfg_set(vif, 0, WID_11G_OPERATING_MODE, &b, 1, 0, 0)) in wilc_init_fw_config()
291 if (!wilc_wlan_cfg_set(vif, 0, WID_PREAMBLE, &b, 1, 0, 0)) in wilc_init_fw_config()
295 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_PROT_MECH, &b, 1, 0, 0)) in wilc_init_fw_config()
299 if (!wilc_wlan_cfg_set(vif, 0, WID_SCAN_TYPE, &b, 1, 0, 0)) in wilc_init_fw_config()
303 if (!wilc_wlan_cfg_set(vif, 0, WID_SITE_SURVEY, &b, 1, 0, 0)) in wilc_init_fw_config()
308 if (!wilc_wlan_cfg_set(vif, 0, WID_RTS_THRESHOLD, (u8 *)&hw, 2, 0, 0)) in wilc_init_fw_config()
313 if (!wilc_wlan_cfg_set(vif, 0, WID_FRAG_THRESHOLD, (u8 *)&hw, 2, 0, 0)) in wilc_init_fw_config()
317 if (!wilc_wlan_cfg_set(vif, 0, WID_BCAST_SSID, &b, 1, 0, 0)) in wilc_init_fw_config()
321 if (!wilc_wlan_cfg_set(vif, 0, WID_QOS_ENABLE, &b, 1, 0, 0)) in wilc_init_fw_config()
325 if (!wilc_wlan_cfg_set(vif, 0, WID_POWER_MANAGEMENT, &b, 1, 0, 0)) in wilc_init_fw_config()
329 if (!wilc_wlan_cfg_set(vif, 0, WID_11I_MODE, &b, 1, 0, 0)) in wilc_init_fw_config()
333 if (!wilc_wlan_cfg_set(vif, 0, WID_AUTH_TYPE, &b, 1, 0, 0)) in wilc_init_fw_config()
337 if (!wilc_wlan_cfg_set(vif, 0, WID_LISTEN_INTERVAL, &b, 1, 0, 0)) in wilc_init_fw_config()
341 if (!wilc_wlan_cfg_set(vif, 0, WID_DTIM_PERIOD, &b, 1, 0, 0)) in wilc_init_fw_config()
345 if (!wilc_wlan_cfg_set(vif, 0, WID_ACK_POLICY, &b, 1, 0, 0)) in wilc_init_fw_config()
349 if (!wilc_wlan_cfg_set(vif, 0, WID_USER_CONTROL_ON_TX_POWER, &b, 1, in wilc_init_fw_config()
354 if (!wilc_wlan_cfg_set(vif, 0, WID_TX_POWER_LEVEL_11A, &b, 1, 0, 0)) in wilc_init_fw_config()
358 if (!wilc_wlan_cfg_set(vif, 0, WID_TX_POWER_LEVEL_11B, &b, 1, 0, 0)) in wilc_init_fw_config()
363 if (!wilc_wlan_cfg_set(vif, 0, WID_BEACON_INTERVAL, (u8 *)&hw, 2, 0, 0)) in wilc_init_fw_config()
367 if (!wilc_wlan_cfg_set(vif, 0, WID_REKEY_POLICY, &b, 1, 0, 0)) in wilc_init_fw_config()
372 if (!wilc_wlan_cfg_set(vif, 0, WID_REKEY_PERIOD, (u8 *)&w, 4, 0, 0)) in wilc_init_fw_config()
377 if (!wilc_wlan_cfg_set(vif, 0, WID_REKEY_PACKET_COUNT, (u8 *)&w, 4, 0, in wilc_init_fw_config()
382 if (!wilc_wlan_cfg_set(vif, 0, WID_SHORT_SLOT_ALLOWED, &b, 1, 0, in wilc_init_fw_config()
387 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_ERP_PROT_TYPE, &b, 1, 0, 0)) in wilc_init_fw_config()
391 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_ENABLE, &b, 1, 0, 0)) in wilc_init_fw_config()
395 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_OPERATING_MODE, &b, 1, 0, 0)) in wilc_init_fw_config()
399 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_TXOP_PROT_DISABLE, &b, 1, 0, 0)) in wilc_init_fw_config()
403 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_OBSS_NONHT_DETECTION, &b, 1, in wilc_init_fw_config()
408 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_HT_PROT_TYPE, &b, 1, 0, 0)) in wilc_init_fw_config()
412 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_RIFS_PROT_ENABLE, &b, 1, 0, in wilc_init_fw_config()
417 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_CURRENT_TX_MCS, &b, 1, 0, 0)) in wilc_init_fw_config()
421 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_IMMEDIATE_BA_ENABLED, &b, 1, in wilc_init_fw_config()
433 struct wilc_vif *vif = netdev_priv(dev); in wlan_deinitialize_threads() local
434 struct wilc *wl = vif->wilc; in wlan_deinitialize_threads()
448 struct wilc_vif *vif = netdev_priv(dev); in wilc_wlan_deinitialize() local
449 struct wilc *wl = vif->wilc; in wilc_wlan_deinitialize()
470 wilc_wlan_stop(wl, vif); in wilc_wlan_deinitialize()
483 struct wilc_vif *vif = netdev_priv(dev); in wlan_initialize_threads() local
484 struct wilc *wilc = vif->wilc; in wlan_initialize_threads()
498 static int wilc_wlan_initialize(struct net_device *dev, struct wilc_vif *vif) in wilc_wlan_initialize() argument
501 struct wilc *wl = vif->wilc; in wilc_wlan_initialize()
539 if (wilc_wlan_cfg_get(vif, 1, WID_FIRMWARE_VERSION, 1, 0)) { in wilc_wlan_initialize()
550 ret = wilc_init_fw_config(dev, vif); in wilc_wlan_initialize()
559 wilc_wlan_stop(wl, vif); in wilc_wlan_initialize()
589 struct wilc_vif *vif = netdev_priv(ndev); in wilc_mac_open() local
590 struct wilc *wl = vif->wilc; in wilc_mac_open()
605 ret = wilc_wlan_initialize(ndev, vif); in wilc_mac_open()
612 ret = wilc_set_mac_address(vif, ndev->dev_addr); in wilc_mac_open()
621 wilc_set_operation_mode(vif, wilc_get_vif_idx(vif), vif->iftype, in wilc_mac_open()
622 vif->idx); in wilc_mac_open()
624 mgmt_regs.interface_stypes = vif->mgmt_reg_stypes; in wilc_mac_open()
626 vif->mgmt_reg_stypes = 0; in wilc_mac_open()
627 wilc_update_mgmt_frame_registrations(vif->ndev->ieee80211_ptr->wiphy, in wilc_mac_open()
628 vif->ndev->ieee80211_ptr, in wilc_mac_open()
632 vif->mac_opened = 1; in wilc_mac_open()
638 struct wilc_vif *vif = netdev_priv(dev); in mac_stats() local
640 return &vif->netstats; in mac_stats()
646 struct wilc_vif *vif = netdev_priv(dev); in wilc_set_mac_addr() local
647 struct wilc *wilc = vif->wilc; in wilc_set_mac_addr()
656 if (!vif->mac_opened) { in wilc_set_mac_addr()
667 if (vif != tmp_vif) { in wilc_set_mac_addr()
677 result = wilc_set_mac_address(vif, addr->sa_data); in wilc_set_mac_addr()
688 struct wilc_vif *vif = netdev_priv(dev); in wilc_set_multicast_list() local
698 wilc_setup_multicast_filter(vif, 0, 0, NULL); in wilc_set_multicast_list()
703 wilc_setup_multicast_filter(vif, 1, 0, NULL); in wilc_set_multicast_list()
720 if (wilc_setup_multicast_filter(vif, 1, dev->mc.count, mc_list)) in wilc_set_multicast_list()
734 struct wilc_vif *vif = netdev_priv(ndev); in wilc_mac_xmit() local
735 struct wilc *wilc = vif->wilc; in wilc_mac_xmit()
756 vif->netstats.tx_packets++; in wilc_mac_xmit()
757 vif->netstats.tx_bytes += tx_data->size; in wilc_mac_xmit()
764 struct wilc_vif *vif; in wilc_mac_xmit() local
767 wilc_for_each_vif(wilc, vif) { in wilc_mac_xmit()
768 if (vif->mac_opened) in wilc_mac_xmit()
769 netif_stop_queue(vif->ndev); in wilc_mac_xmit()
779 struct wilc_vif *vif = netdev_priv(ndev); in wilc_mac_close() local
780 struct wilc *wl = vif->wilc; in wilc_mac_close()
789 if (vif->ndev) { in wilc_mac_close()
790 netif_stop_queue(vif->ndev); in wilc_mac_close()
792 wilc_handle_disconnect(vif); in wilc_mac_close()
793 wilc_deinit_host_int(vif->ndev); in wilc_mac_close()
802 vif->mac_opened = 0; in wilc_mac_close()
813 struct wilc_vif *vif; in wilc_frmw_to_host() local
827 vif = netdev_priv(wilc_netdev); in wilc_frmw_to_host()
842 vif->netstats.rx_packets++; in wilc_frmw_to_host()
843 vif->netstats.rx_bytes += frame_len; in wilc_frmw_to_host()
855 struct wilc_vif *vif; in wilc_wfi_mgmt_rx() local
858 wilc_for_each_vif(wilc, vif) { in wilc_wfi_mgmt_rx()
864 if ((vif->mgmt_reg_stypes & auth_bit && in wilc_wfi_mgmt_rx()
866 vif->iftype == WILC_STATION_MODE && is_auth) { in wilc_wfi_mgmt_rx()
867 wilc_wfi_mgmt_frame_rx(vif, buff, size); in wilc_wfi_mgmt_rx()
871 if (vif->priv.p2p_listen_state && in wilc_wfi_mgmt_rx()
872 vif->mgmt_reg_stypes & type_bit) in wilc_wfi_mgmt_rx()
873 wilc_wfi_p2p_rx(vif, buff, size); in wilc_wfi_mgmt_rx()
875 if (vif->monitor_flag) in wilc_wfi_mgmt_rx()
893 struct wilc_vif *vif, *vif_tmp; in wilc_netdev_cleanup() local
903 list_for_each_entry_safe(vif, vif_tmp, &wilc->vif_list, list) { in wilc_netdev_cleanup()
905 list_del_rcu(&vif->list); in wilc_netdev_cleanup()
909 if (vif->ndev) in wilc_netdev_cleanup()
910 unregister_netdev(vif->ndev); in wilc_netdev_cleanup()
926 struct wilc_vif *vif; in wilc_get_available_idx() local
930 wilc_for_each_vif(wl, vif) { in wilc_get_available_idx()
931 if (vif->idx == 0) in wilc_get_available_idx()
946 struct wilc_vif *vif; in wilc_netdev_ifc_init() local
949 ndev = alloc_etherdev(sizeof(*vif)); in wilc_netdev_ifc_init()
953 vif = netdev_priv(ndev); in wilc_netdev_ifc_init()
954 ndev->ieee80211_ptr = &vif->priv.wdev; in wilc_netdev_ifc_init()
956 vif->wilc = wl; in wilc_netdev_ifc_init()
957 vif->ndev = ndev; in wilc_netdev_ifc_init()
958 ndev->ml_priv = vif; in wilc_netdev_ifc_init()
964 vif->priv.wdev.wiphy = wl->wiphy; in wilc_netdev_ifc_init()
965 vif->priv.wdev.netdev = ndev; in wilc_netdev_ifc_init()
966 vif->priv.wdev.iftype = type; in wilc_netdev_ifc_init()
967 vif->priv.dev = ndev; in wilc_netdev_ifc_init()
970 vif->iftype = vif_type; in wilc_netdev_ifc_init()
971 vif->idx = wilc_get_available_idx(wl); in wilc_netdev_ifc_init()
972 vif->mac_opened = 0; in wilc_netdev_ifc_init()
980 if (vif->idx) in wilc_netdev_ifc_init()
983 eth_hw_addr_set(vif->ndev, mac_address); in wilc_netdev_ifc_init()
986 list_add_tail_rcu(&vif->list, &wl->vif_list); in wilc_netdev_ifc_init()
1001 return vif; in wilc_netdev_ifc_init()
1005 list_del_rcu(&vif->list); in wilc_netdev_ifc_init()