Lines Matching refs:vif
28 struct wilc_vif *vif = netdev_priv(dev);
29 struct wilc *wilc = vif->wilc;
41 struct wilc_vif *vif = netdev_priv(userdata);
42 struct wilc *wilc = vif->wilc;
56 struct wilc_vif *vif = netdev_priv(dev);
57 struct wilc *wl = vif->wilc;
75 struct wilc_vif *vif = netdev_priv(dev);
76 struct wilc *wilc = vif->wilc;
99 struct wilc_vif *vif;
102 list_for_each_entry_rcu(vif, &wilc->vif_list, list) {
103 if (vif->mode == WILC_STATION_MODE)
104 if (ether_addr_equal_unaligned(h->addr2, vif->bssid)) {
105 ndev = vif->ndev;
108 if (vif->mode == WILC_AP_MODE)
109 if (ether_addr_equal_unaligned(h->addr1, vif->bssid)) {
110 ndev = vif->ndev;
120 struct wilc_vif *vif = netdev_priv(wilc_netdev);
123 ether_addr_copy(vif->bssid, bssid);
125 eth_zero_addr(vif->bssid);
127 vif->mode = mode;
134 struct wilc_vif *vif;
137 list_for_each_entry_rcu(vif, &wilc->vif_list, list) {
138 if (!is_zero_ether_addr(vif->bssid))
183 struct wilc_vif *vif = netdev_priv(dev);
184 struct wilc *wilc = vif->wilc;
208 struct wilc_vif *vif = netdev_priv(dev);
209 struct wilc *wilc = vif->wilc;
225 struct wilc_vif *vif = netdev_priv(dev);
226 struct wilc *wilc = vif->wilc;
247 static int wilc_init_fw_config(struct net_device *dev, struct wilc_vif *vif)
249 struct wilc_priv *priv = &vif->priv;
259 w = vif->iftype;
261 if (!wilc_wlan_cfg_set(vif, 1, WID_SET_OPERATION_MODE, (u8 *)&w, 4,
266 if (!wilc_wlan_cfg_set(vif, 0, WID_BSS_TYPE, &b, 1, 0, 0))
270 if (!wilc_wlan_cfg_set(vif, 0, WID_CURRENT_TX_RATE, &b, 1, 0, 0))
274 if (!wilc_wlan_cfg_set(vif, 0, WID_11G_OPERATING_MODE, &b, 1, 0, 0))
278 if (!wilc_wlan_cfg_set(vif, 0, WID_PREAMBLE, &b, 1, 0, 0))
282 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_PROT_MECH, &b, 1, 0, 0))
286 if (!wilc_wlan_cfg_set(vif, 0, WID_SCAN_TYPE, &b, 1, 0, 0))
290 if (!wilc_wlan_cfg_set(vif, 0, WID_SITE_SURVEY, &b, 1, 0, 0))
295 if (!wilc_wlan_cfg_set(vif, 0, WID_RTS_THRESHOLD, (u8 *)&hw, 2, 0, 0))
300 if (!wilc_wlan_cfg_set(vif, 0, WID_FRAG_THRESHOLD, (u8 *)&hw, 2, 0, 0))
304 if (!wilc_wlan_cfg_set(vif, 0, WID_BCAST_SSID, &b, 1, 0, 0))
308 if (!wilc_wlan_cfg_set(vif, 0, WID_QOS_ENABLE, &b, 1, 0, 0))
312 if (!wilc_wlan_cfg_set(vif, 0, WID_POWER_MANAGEMENT, &b, 1, 0, 0))
316 if (!wilc_wlan_cfg_set(vif, 0, WID_11I_MODE, &b, 1, 0, 0))
320 if (!wilc_wlan_cfg_set(vif, 0, WID_AUTH_TYPE, &b, 1, 0, 0))
324 if (!wilc_wlan_cfg_set(vif, 0, WID_LISTEN_INTERVAL, &b, 1, 0, 0))
328 if (!wilc_wlan_cfg_set(vif, 0, WID_DTIM_PERIOD, &b, 1, 0, 0))
332 if (!wilc_wlan_cfg_set(vif, 0, WID_ACK_POLICY, &b, 1, 0, 0))
336 if (!wilc_wlan_cfg_set(vif, 0, WID_USER_CONTROL_ON_TX_POWER, &b, 1,
341 if (!wilc_wlan_cfg_set(vif, 0, WID_TX_POWER_LEVEL_11A, &b, 1, 0, 0))
345 if (!wilc_wlan_cfg_set(vif, 0, WID_TX_POWER_LEVEL_11B, &b, 1, 0, 0))
350 if (!wilc_wlan_cfg_set(vif, 0, WID_BEACON_INTERVAL, (u8 *)&hw, 2, 0, 0))
354 if (!wilc_wlan_cfg_set(vif, 0, WID_REKEY_POLICY, &b, 1, 0, 0))
359 if (!wilc_wlan_cfg_set(vif, 0, WID_REKEY_PERIOD, (u8 *)&w, 4, 0, 0))
364 if (!wilc_wlan_cfg_set(vif, 0, WID_REKEY_PACKET_COUNT, (u8 *)&w, 4, 0,
369 if (!wilc_wlan_cfg_set(vif, 0, WID_SHORT_SLOT_ALLOWED, &b, 1, 0,
374 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_ERP_PROT_TYPE, &b, 1, 0, 0))
378 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_ENABLE, &b, 1, 0, 0))
382 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_OPERATING_MODE, &b, 1, 0, 0))
386 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_TXOP_PROT_DISABLE, &b, 1, 0, 0))
390 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_OBSS_NONHT_DETECTION, &b, 1,
395 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_HT_PROT_TYPE, &b, 1, 0, 0))
399 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_RIFS_PROT_ENABLE, &b, 1, 0,
404 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_CURRENT_TX_MCS, &b, 1, 0, 0))
408 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_IMMEDIATE_BA_ENABLED, &b, 1,
420 struct wilc_vif *vif = netdev_priv(dev);
421 struct wilc *wl = vif->wilc;
435 struct wilc_vif *vif = netdev_priv(dev);
436 struct wilc *wl = vif->wilc;
457 wilc_wlan_stop(wl, vif);
470 struct wilc_vif *vif = netdev_priv(dev);
471 struct wilc *wilc = vif->wilc;
485 static int wilc_wlan_initialize(struct net_device *dev, struct wilc_vif *vif)
488 struct wilc *wl = vif->wilc;
526 if (wilc_wlan_cfg_get(vif, 1, WID_FIRMWARE_VERSION, 1, 0)) {
537 ret = wilc_init_fw_config(dev, vif);
546 wilc_wlan_stop(wl, vif);
576 struct wilc_vif *vif = netdev_priv(ndev);
577 struct wilc *wl = vif->wilc;
593 ret = wilc_wlan_initialize(ndev, vif);
599 wilc_set_operation_mode(vif, wilc_get_vif_idx(vif), vif->iftype,
600 vif->idx);
601 wilc_get_mac_address(vif, mac_add);
612 mgmt_regs.interface_stypes = vif->mgmt_reg_stypes;
614 vif->mgmt_reg_stypes = 0;
615 wilc_update_mgmt_frame_registrations(vif->ndev->ieee80211_ptr->wiphy,
616 vif->ndev->ieee80211_ptr,
620 vif->mac_opened = 1;
626 struct wilc_vif *vif = netdev_priv(dev);
628 return &vif->netstats;
634 struct wilc_vif *vif = netdev_priv(dev);
644 wilc_setup_multicast_filter(vif, 0, 0, NULL);
649 wilc_setup_multicast_filter(vif, 1, 0, NULL);
666 if (wilc_setup_multicast_filter(vif, 1, dev->mc.count, mc_list))
680 struct wilc_vif *vif = netdev_priv(ndev);
681 struct wilc *wilc = vif->wilc;
702 vif->netstats.tx_packets++;
703 vif->netstats.tx_bytes += tx_data->size;
710 struct wilc_vif *vif;
713 list_for_each_entry_rcu(vif, &wilc->vif_list, list) {
714 if (vif->mac_opened)
715 netif_stop_queue(vif->ndev);
725 struct wilc_vif *vif = netdev_priv(ndev);
726 struct wilc *wl = vif->wilc;
735 if (vif->ndev) {
736 netif_stop_queue(vif->ndev);
738 wilc_deinit_host_int(vif->ndev);
747 vif->mac_opened = 0;
760 struct wilc_vif *vif;
770 vif = netdev_priv(wilc_netdev);
785 vif->netstats.rx_packets++;
786 vif->netstats.rx_bytes += frame_len;
796 struct wilc_vif *vif;
799 list_for_each_entry_rcu(vif, &wilc->vif_list, list) {
803 if (vif->priv.p2p_listen_state &&
804 vif->mgmt_reg_stypes & type_bit)
805 wilc_wfi_p2p_rx(vif, buff, size);
807 if (vif->monitor_flag)
824 struct wilc_vif *vif;
836 list_for_each_entry_rcu(vif, &wilc->vif_list, list) {
837 if (vif->ndev)
838 unregister_netdev(vif->ndev);
852 vif = wilc_get_wl_to_vif(wilc);
853 if (!IS_ERR(vif))
854 list_del_rcu(&vif->list);
873 struct wilc_vif *vif;
877 list_for_each_entry_rcu(vif, &wl->vif_list, list) {
878 if (vif->idx == 0)
892 struct wilc_vif *vif;
895 ndev = alloc_etherdev(sizeof(*vif));
899 vif = netdev_priv(ndev);
900 ndev->ieee80211_ptr = &vif->priv.wdev;
902 vif->wilc = wl;
903 vif->ndev = ndev;
904 ndev->ml_priv = vif;
910 vif->priv.wdev.wiphy = wl->wiphy;
911 vif->priv.wdev.netdev = ndev;
912 vif->priv.wdev.iftype = type;
913 vif->priv.dev = ndev;
926 vif->iftype = vif_type;
927 vif->idx = wilc_get_available_idx(wl);
928 vif->mac_opened = 0;
930 list_add_tail_rcu(&vif->list, &wl->vif_list);
935 return vif;