Lines Matching full:vif
81 struct qtnf_vif *vif = qtnf_netdev_get_priv(skb->dev); in qtnf_packet_send_hi_pri() local
83 skb_queue_tail(&vif->high_pri_tx_queue, skb); in qtnf_packet_send_hi_pri()
84 queue_work(vif->mac->bus->hprio_workqueue, &vif->high_pri_tx_work); in qtnf_packet_send_hi_pri()
92 struct qtnf_vif *vif; in qtnf_netdev_hard_start_xmit() local
95 vif = qtnf_netdev_get_priv(ndev); in qtnf_netdev_hard_start_xmit()
103 if (unlikely(vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED)) { in qtnf_netdev_hard_start_xmit()
104 pr_err_ratelimited("%s: VIF not initialized\n", ndev->name); in qtnf_netdev_hard_start_xmit()
109 mac = vif->mac; in qtnf_netdev_hard_start_xmit()
124 /* tx path is enabled: reset vif timeout */ in qtnf_netdev_hard_start_xmit()
125 vif->cons_tx_timeout_cnt = 0; in qtnf_netdev_hard_start_xmit()
133 return qtnf_bus_data_tx(mac->bus, skb, mac->macid, vif->vifid); in qtnf_netdev_hard_start_xmit()
140 struct qtnf_vif *vif = qtnf_netdev_get_priv(ndev); in qtnf_netdev_tx_timeout() local
144 if (unlikely(!vif || !vif->mac || !vif->mac->bus)) in qtnf_netdev_tx_timeout()
147 mac = vif->mac; in qtnf_netdev_tx_timeout()
150 pr_warn("VIF%u.%u: Tx timeout- %lu\n", mac->macid, vif->vifid, jiffies); in qtnf_netdev_tx_timeout()
155 if (++vif->cons_tx_timeout_cnt > QTNF_TX_TIMEOUT_TRSHLD) { in qtnf_netdev_tx_timeout()
158 queue_work(bus->workqueue, &vif->reset_work); in qtnf_netdev_tx_timeout()
164 struct qtnf_vif *vif = qtnf_netdev_get_priv(ndev); in qtnf_netdev_set_mac_address() local
175 qtnf_scan_done(vif->mac, true); in qtnf_netdev_set_mac_address()
177 ret = qtnf_cmd_send_change_intf_type(vif, vif->wdev.iftype, in qtnf_netdev_set_mac_address()
178 vif->wdev.use_4addr, in qtnf_netdev_set_mac_address()
190 const struct qtnf_vif *vif = qtnf_netdev_get_priv(ndev); in qtnf_netdev_port_parent_id() local
191 const struct qtnf_bus *bus = vif->mac->bus; in qtnf_netdev_port_parent_id()
274 struct qtnf_vif *vif; in qtnf_mac_get_free_vif() local
278 vif = &mac->iflist[i]; in qtnf_mac_get_free_vif()
279 if (vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED) in qtnf_mac_get_free_vif()
280 return vif; in qtnf_mac_get_free_vif()
288 struct qtnf_vif *vif; in qtnf_mac_get_base_vif() local
290 vif = &mac->iflist[QTNF_PRIMARY_VIF_IDX]; in qtnf_mac_get_base_vif()
292 if (vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED) in qtnf_mac_get_base_vif()
295 return vif; in qtnf_mac_get_base_vif()
330 struct qtnf_vif *vif = container_of(work, struct qtnf_vif, reset_work); in qtnf_vif_reset_handler() local
334 if (vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED) { in qtnf_vif_reset_handler()
340 netif_tx_stop_all_queues(vif->netdev); in qtnf_vif_reset_handler()
341 if (netif_carrier_ok(vif->netdev)) in qtnf_vif_reset_handler()
342 netif_carrier_off(vif->netdev); in qtnf_vif_reset_handler()
344 qtnf_cfg80211_vif_reset(vif); in qtnf_vif_reset_handler()
351 struct qtnf_vif *vif = &mac->iflist[QTNF_PRIMARY_VIF_IDX]; in qtnf_mac_init_primary_intf() local
353 vif->wdev.iftype = NL80211_IFTYPE_STATION; in qtnf_mac_init_primary_intf()
354 vif->bss_priority = QTNF_DEF_BSS_PRIORITY; in qtnf_mac_init_primary_intf()
355 vif->wdev.wiphy = priv_to_wiphy(mac); in qtnf_mac_init_primary_intf()
356 INIT_WORK(&vif->reset_work, qtnf_vif_reset_handler); in qtnf_mac_init_primary_intf()
357 vif->cons_tx_timeout_cnt = 0; in qtnf_mac_init_primary_intf()
393 struct qtnf_vif *vif = in qtnf_vif_send_data_high_pri() local
397 if (!vif->netdev || in qtnf_vif_send_data_high_pri()
398 vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED) in qtnf_vif_send_data_high_pri()
401 while ((skb = skb_dequeue(&vif->high_pri_tx_queue))) { in qtnf_vif_send_data_high_pri()
402 qtnf_cmd_send_frame(vif, 0, QLINK_FRAME_TX_FLAG_8023, in qtnf_vif_send_data_high_pri()
413 struct qtnf_vif *vif; in qtnf_core_mac_alloc() local
441 vif = &mac->iflist[i]; in qtnf_core_mac_alloc()
443 memset(vif, 0, sizeof(*vif)); in qtnf_core_mac_alloc()
444 vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED; in qtnf_core_mac_alloc()
445 vif->mac = mac; in qtnf_core_mac_alloc()
446 vif->vifid = i; in qtnf_core_mac_alloc()
447 qtnf_sta_list_init(&vif->sta_list); in qtnf_core_mac_alloc()
448 INIT_WORK(&vif->high_pri_tx_work, qtnf_vif_send_data_high_pri); in qtnf_core_mac_alloc()
449 skb_queue_head_init(&vif->high_pri_tx_queue); in qtnf_core_mac_alloc()
462 int qtnf_core_net_attach(struct qtnf_wmac *mac, struct qtnf_vif *vif, in qtnf_core_net_attach() argument
475 vif->netdev = dev; in qtnf_core_net_attach()
480 dev->ieee80211_ptr = &vif->wdev; in qtnf_core_net_attach()
481 eth_hw_addr_set(dev, vif->mac_addr); in qtnf_core_net_attach()
491 *((void **)qdev_vif) = vif; in qtnf_core_net_attach()
498 vif->netdev = NULL; in qtnf_core_net_attach()
508 struct qtnf_vif *vif; in qtnf_core_mac_detach() local
520 vif = &mac->iflist[i]; in qtnf_core_mac_detach()
522 if (vif->netdev && in qtnf_core_mac_detach()
523 vif->wdev.iftype != NL80211_IFTYPE_UNSPECIFIED) { in qtnf_core_mac_detach()
524 qtnf_virtual_intf_cleanup(vif->netdev); in qtnf_core_mac_detach()
525 qtnf_del_virtual_intf(wiphy, &vif->wdev); in qtnf_core_mac_detach()
528 qtnf_sta_list_free(&vif->sta_list); in qtnf_core_mac_detach()
561 struct qtnf_vif *vif; in qtnf_core_mac_attach() local
575 vif = qtnf_mac_get_base_vif(mac); in qtnf_core_mac_attach()
576 if (!vif) { in qtnf_core_mac_attach()
577 pr_err("MAC%u: primary VIF is not ready\n", macid); in qtnf_core_mac_attach()
582 ret = qtnf_cmd_send_add_intf(vif, vif->wdev.iftype, in qtnf_core_mac_attach()
583 vif->wdev.use_4addr, vif->mac_addr); in qtnf_core_mac_attach()
585 pr_err("MAC%u: failed to add VIF\n", macid); in qtnf_core_mac_attach()
615 ret = qtnf_core_net_attach(mac, vif, "wlan%d", NET_NAME_ENUM); in qtnf_core_mac_attach()
625 ret = qtnf_cmd_netdev_changeupper(vif, vif->netdev->ifindex); in qtnf_core_mac_attach()
635 qtnf_cmd_send_del_intf(vif); in qtnf_core_mac_attach()
636 vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED; in qtnf_core_mac_attach()
667 struct qtnf_vif *vif; in qtnf_core_netdevice_event() local
678 vif = qtnf_netdev_get_priv(ndev); in qtnf_core_netdevice_event()
679 bus = vif->mac->bus; in qtnf_core_netdevice_event()
689 pr_debug("[VIF%u.%u] change bridge: %s %s\n", in qtnf_core_netdevice_event()
690 vif->mac->macid, vif->vifid, netdev_name(brdev), in qtnf_core_netdevice_event()
701 ret = qtnf_cmd_netdev_changeupper(vif, br_domain); in qtnf_core_netdevice_event()
838 struct qtnf_vif *vif; in qtnf_classify_skb() local
858 pr_err_ratelimited("invalid vif(%u)\n", meta->ifidx); in qtnf_classify_skb()
869 vif = &mac->iflist[meta->ifidx]; in qtnf_classify_skb()
871 if (unlikely(vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED)) { in qtnf_classify_skb()
872 pr_err_ratelimited("vif(%u) does not exists\n", meta->ifidx); in qtnf_classify_skb()
876 ndev = vif->netdev; in qtnf_classify_skb()
895 struct qtnf_vif *vif = qtnf_netdev_get_priv(ndev); in qtnf_wake_all_queues() local
901 if (unlikely(!vif || !vif->mac || !vif->mac->bus)) in qtnf_wake_all_queues()
904 bus = vif->mac->bus; in qtnf_wake_all_queues()
912 vif = &mac->iflist[i]; in qtnf_wake_all_queues()
913 if (vif->netdev && netif_queue_stopped(vif->netdev)) in qtnf_wake_all_queues()
914 netif_tx_wake_all_queues(vif->netdev); in qtnf_wake_all_queues()