Lines Matching refs:vif

53 	struct wilc_vif *vif = netdev_priv(dev);
54 struct wilc *wl = vif->wilc;
72 struct wilc_vif *vif = netdev_priv(dev);
73 struct wilc *wilc = vif->wilc;
96 struct wilc_vif *vif;
99 list_for_each_entry_rcu(vif, &wilc->vif_list, list) {
100 if (vif->iftype == WILC_STATION_MODE)
101 if (ether_addr_equal_unaligned(h->addr2, vif->bssid)) {
102 ndev = vif->ndev;
105 if (vif->iftype == WILC_AP_MODE)
106 if (ether_addr_equal_unaligned(h->addr1, vif->bssid)) {
107 ndev = vif->ndev;
118 struct wilc_vif *vif = netdev_priv(wilc_netdev);
121 ether_addr_copy(vif->bssid, bssid);
123 eth_zero_addr(vif->bssid);
125 vif->iftype = mode;
132 struct wilc_vif *vif;
135 list_for_each_entry_rcu(vif, &wilc->vif_list, list) {
136 if (!is_zero_ether_addr(vif->bssid))
181 struct wilc_vif *vif = netdev_priv(dev);
182 struct wilc *wilc = vif->wilc;
206 struct wilc_vif *vif = netdev_priv(dev);
207 struct wilc *wilc = vif->wilc;
223 struct wilc_vif *vif = netdev_priv(dev);
224 struct wilc *wilc = vif->wilc;
245 static int wilc_init_fw_config(struct net_device *dev, struct wilc_vif *vif)
247 struct wilc_priv *priv = &vif->priv;
257 w = vif->iftype;
259 if (!wilc_wlan_cfg_set(vif, 1, WID_SET_OPERATION_MODE, (u8 *)&w, 4,
264 if (!wilc_wlan_cfg_set(vif, 0, WID_BSS_TYPE, &b, 1, 0, 0))
268 if (!wilc_wlan_cfg_set(vif, 0, WID_CURRENT_TX_RATE, &b, 1, 0, 0))
272 if (!wilc_wlan_cfg_set(vif, 0, WID_11G_OPERATING_MODE, &b, 1, 0, 0))
276 if (!wilc_wlan_cfg_set(vif, 0, WID_PREAMBLE, &b, 1, 0, 0))
280 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_PROT_MECH, &b, 1, 0, 0))
284 if (!wilc_wlan_cfg_set(vif, 0, WID_SCAN_TYPE, &b, 1, 0, 0))
288 if (!wilc_wlan_cfg_set(vif, 0, WID_SITE_SURVEY, &b, 1, 0, 0))
293 if (!wilc_wlan_cfg_set(vif, 0, WID_RTS_THRESHOLD, (u8 *)&hw, 2, 0, 0))
298 if (!wilc_wlan_cfg_set(vif, 0, WID_FRAG_THRESHOLD, (u8 *)&hw, 2, 0, 0))
302 if (!wilc_wlan_cfg_set(vif, 0, WID_BCAST_SSID, &b, 1, 0, 0))
306 if (!wilc_wlan_cfg_set(vif, 0, WID_QOS_ENABLE, &b, 1, 0, 0))
310 if (!wilc_wlan_cfg_set(vif, 0, WID_POWER_MANAGEMENT, &b, 1, 0, 0))
314 if (!wilc_wlan_cfg_set(vif, 0, WID_11I_MODE, &b, 1, 0, 0))
318 if (!wilc_wlan_cfg_set(vif, 0, WID_AUTH_TYPE, &b, 1, 0, 0))
322 if (!wilc_wlan_cfg_set(vif, 0, WID_LISTEN_INTERVAL, &b, 1, 0, 0))
326 if (!wilc_wlan_cfg_set(vif, 0, WID_DTIM_PERIOD, &b, 1, 0, 0))
330 if (!wilc_wlan_cfg_set(vif, 0, WID_ACK_POLICY, &b, 1, 0, 0))
334 if (!wilc_wlan_cfg_set(vif, 0, WID_USER_CONTROL_ON_TX_POWER, &b, 1,
339 if (!wilc_wlan_cfg_set(vif, 0, WID_TX_POWER_LEVEL_11A, &b, 1, 0, 0))
343 if (!wilc_wlan_cfg_set(vif, 0, WID_TX_POWER_LEVEL_11B, &b, 1, 0, 0))
348 if (!wilc_wlan_cfg_set(vif, 0, WID_BEACON_INTERVAL, (u8 *)&hw, 2, 0, 0))
352 if (!wilc_wlan_cfg_set(vif, 0, WID_REKEY_POLICY, &b, 1, 0, 0))
357 if (!wilc_wlan_cfg_set(vif, 0, WID_REKEY_PERIOD, (u8 *)&w, 4, 0, 0))
362 if (!wilc_wlan_cfg_set(vif, 0, WID_REKEY_PACKET_COUNT, (u8 *)&w, 4, 0,
367 if (!wilc_wlan_cfg_set(vif, 0, WID_SHORT_SLOT_ALLOWED, &b, 1, 0,
372 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_ERP_PROT_TYPE, &b, 1, 0, 0))
376 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_ENABLE, &b, 1, 0, 0))
380 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_OPERATING_MODE, &b, 1, 0, 0))
384 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_TXOP_PROT_DISABLE, &b, 1, 0, 0))
388 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_OBSS_NONHT_DETECTION, &b, 1,
393 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_HT_PROT_TYPE, &b, 1, 0, 0))
397 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_RIFS_PROT_ENABLE, &b, 1, 0,
402 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_CURRENT_TX_MCS, &b, 1, 0, 0))
406 if (!wilc_wlan_cfg_set(vif, 0, WID_11N_IMMEDIATE_BA_ENABLED, &b, 1,
418 struct wilc_vif *vif = netdev_priv(dev);
419 struct wilc *wl = vif->wilc;
433 struct wilc_vif *vif = netdev_priv(dev);
434 struct wilc *wl = vif->wilc;
455 wilc_wlan_stop(wl, vif);
468 struct wilc_vif *vif = netdev_priv(dev);
469 struct wilc *wilc = vif->wilc;
483 static int wilc_wlan_initialize(struct net_device *dev, struct wilc_vif *vif)
486 struct wilc *wl = vif->wilc;
524 if (wilc_wlan_cfg_get(vif, 1, WID_FIRMWARE_VERSION, 1, 0)) {
535 ret = wilc_init_fw_config(dev, vif);
544 wilc_wlan_stop(wl, vif);
574 struct wilc_vif *vif = netdev_priv(ndev);
575 struct wilc *wl = vif->wilc;
591 ret = wilc_wlan_initialize(ndev, vif);
597 wilc_set_operation_mode(vif, wilc_get_vif_idx(vif), vif->iftype,
598 vif->idx);
602 wilc_set_mac_address(vif, addr);
604 wilc_get_mac_address(vif, addr);
616 mgmt_regs.interface_stypes = vif->mgmt_reg_stypes;
618 vif->mgmt_reg_stypes = 0;
619 wilc_update_mgmt_frame_registrations(vif->ndev->ieee80211_ptr->wiphy,
620 vif->ndev->ieee80211_ptr,
624 vif->mac_opened = 1;
630 struct wilc_vif *vif = netdev_priv(dev);
632 return &vif->netstats;
638 struct wilc_vif *vif = netdev_priv(dev);
639 struct wilc *wilc = vif->wilc;
648 if (!vif->mac_opened) {
659 if (vif != tmp_vif) {
669 result = wilc_set_mac_address(vif, (u8 *)addr->sa_data);
680 struct wilc_vif *vif = netdev_priv(dev);
690 wilc_setup_multicast_filter(vif, 0, 0, NULL);
695 wilc_setup_multicast_filter(vif, 1, 0, NULL);
712 if (wilc_setup_multicast_filter(vif, 1, dev->mc.count, mc_list))
726 struct wilc_vif *vif = netdev_priv(ndev);
727 struct wilc *wilc = vif->wilc;
748 vif->netstats.tx_packets++;
749 vif->netstats.tx_bytes += tx_data->size;
756 struct wilc_vif *vif;
759 list_for_each_entry_rcu(vif, &wilc->vif_list, list) {
760 if (vif->mac_opened)
761 netif_stop_queue(vif->ndev);
771 struct wilc_vif *vif = netdev_priv(ndev);
772 struct wilc *wl = vif->wilc;
781 if (vif->ndev) {
782 netif_stop_queue(vif->ndev);
784 wilc_handle_disconnect(vif);
785 wilc_deinit_host_int(vif->ndev);
794 vif->mac_opened = 0;
807 struct wilc_vif *vif;
817 vif = netdev_priv(wilc_netdev);
832 vif->netstats.rx_packets++;
833 vif->netstats.rx_bytes += frame_len;
843 struct wilc_vif *vif;
846 list_for_each_entry_rcu(vif, &wilc->vif_list, list) {
852 if ((vif->mgmt_reg_stypes & auth_bit &&
854 vif->iftype == WILC_STATION_MODE && is_auth) {
855 wilc_wfi_mgmt_frame_rx(vif, buff, size);
859 if (vif->priv.p2p_listen_state &&
860 vif->mgmt_reg_stypes & type_bit)
861 wilc_wfi_p2p_rx(vif, buff, size);
863 if (vif->monitor_flag)
881 struct wilc_vif *vif, *vif_tmp;
891 list_for_each_entry_safe(vif, vif_tmp, &wilc->vif_list, list) {
893 list_del_rcu(&vif->list);
897 if (vif->ndev)
898 unregister_netdev(vif->ndev);
914 struct wilc_vif *vif;
918 list_for_each_entry_rcu(vif, &wl->vif_list, list) {
919 if (vif->idx == 0)
933 struct wilc_vif *vif;
936 ndev = alloc_etherdev(sizeof(*vif));
940 vif = netdev_priv(ndev);
941 ndev->ieee80211_ptr = &vif->priv.wdev;
943 vif->wilc = wl;
944 vif->ndev = ndev;
945 ndev->ml_priv = vif;
951 vif->priv.wdev.wiphy = wl->wiphy;
952 vif->priv.wdev.netdev = ndev;
953 vif->priv.wdev.iftype = type;
954 vif->priv.dev = ndev;
967 vif->iftype = vif_type;
968 vif->idx = wilc_get_available_idx(wl);
969 vif->mac_opened = 0;
971 list_add_tail_rcu(&vif->list, &wl->vif_list);
976 return vif;