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()
259 struct qtnf_vif *vif; in qtnf_mac_get_free_vif() local
263 vif = &mac->iflist[i]; in qtnf_mac_get_free_vif()
264 if (vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED) in qtnf_mac_get_free_vif()
265 return vif; in qtnf_mac_get_free_vif()
273 struct qtnf_vif *vif; in qtnf_mac_get_base_vif() local
275 vif = &mac->iflist[QTNF_PRIMARY_VIF_IDX]; in qtnf_mac_get_base_vif()
277 if (vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED) in qtnf_mac_get_base_vif()
280 return vif; in qtnf_mac_get_base_vif()
315 struct qtnf_vif *vif = container_of(work, struct qtnf_vif, reset_work); in qtnf_vif_reset_handler() local
319 if (vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED) { in qtnf_vif_reset_handler()
325 netif_tx_stop_all_queues(vif->netdev); in qtnf_vif_reset_handler()
326 if (netif_carrier_ok(vif->netdev)) in qtnf_vif_reset_handler()
327 netif_carrier_off(vif->netdev); in qtnf_vif_reset_handler()
329 qtnf_cfg80211_vif_reset(vif); in qtnf_vif_reset_handler()
336 struct qtnf_vif *vif = &mac->iflist[QTNF_PRIMARY_VIF_IDX]; in qtnf_mac_init_primary_intf() local
338 vif->wdev.iftype = NL80211_IFTYPE_STATION; in qtnf_mac_init_primary_intf()
339 vif->bss_priority = QTNF_DEF_BSS_PRIORITY; in qtnf_mac_init_primary_intf()
340 vif->wdev.wiphy = priv_to_wiphy(mac); in qtnf_mac_init_primary_intf()
341 INIT_WORK(&vif->reset_work, qtnf_vif_reset_handler); in qtnf_mac_init_primary_intf()
342 vif->cons_tx_timeout_cnt = 0; in qtnf_mac_init_primary_intf()
378 struct qtnf_vif *vif = in qtnf_vif_send_data_high_pri() local
382 if (!vif->netdev || in qtnf_vif_send_data_high_pri()
383 vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED) in qtnf_vif_send_data_high_pri()
386 while ((skb = skb_dequeue(&vif->high_pri_tx_queue))) { in qtnf_vif_send_data_high_pri()
387 qtnf_cmd_send_frame(vif, 0, QLINK_FRAME_TX_FLAG_8023, in qtnf_vif_send_data_high_pri()
398 struct qtnf_vif *vif; in qtnf_core_mac_alloc() local
426 vif = &mac->iflist[i]; in qtnf_core_mac_alloc()
428 memset(vif, 0, sizeof(*vif)); in qtnf_core_mac_alloc()
429 vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED; in qtnf_core_mac_alloc()
430 vif->mac = mac; in qtnf_core_mac_alloc()
431 vif->vifid = i; in qtnf_core_mac_alloc()
432 qtnf_sta_list_init(&vif->sta_list); in qtnf_core_mac_alloc()
433 INIT_WORK(&vif->high_pri_tx_work, qtnf_vif_send_data_high_pri); in qtnf_core_mac_alloc()
434 skb_queue_head_init(&vif->high_pri_tx_queue); in qtnf_core_mac_alloc()
447 int qtnf_core_net_attach(struct qtnf_wmac *mac, struct qtnf_vif *vif, in qtnf_core_net_attach() argument
460 vif->netdev = dev; in qtnf_core_net_attach()
465 dev->ieee80211_ptr = &vif->wdev; in qtnf_core_net_attach()
466 eth_hw_addr_set(dev, vif->mac_addr); in qtnf_core_net_attach()
477 *((void **)qdev_vif) = vif; in qtnf_core_net_attach()
484 vif->netdev = NULL; in qtnf_core_net_attach()
494 struct qtnf_vif *vif; in qtnf_core_mac_detach() local
506 vif = &mac->iflist[i]; in qtnf_core_mac_detach()
508 if (vif->netdev && in qtnf_core_mac_detach()
509 vif->wdev.iftype != NL80211_IFTYPE_UNSPECIFIED) { in qtnf_core_mac_detach()
510 qtnf_virtual_intf_cleanup(vif->netdev); in qtnf_core_mac_detach()
511 qtnf_del_virtual_intf(wiphy, &vif->wdev); in qtnf_core_mac_detach()
514 qtnf_sta_list_free(&vif->sta_list); in qtnf_core_mac_detach()
547 struct qtnf_vif *vif; in qtnf_core_mac_attach() local
561 vif = qtnf_mac_get_base_vif(mac); in qtnf_core_mac_attach()
562 if (!vif) { in qtnf_core_mac_attach()
563 pr_err("MAC%u: primary VIF is not ready\n", macid); in qtnf_core_mac_attach()
568 ret = qtnf_cmd_send_add_intf(vif, vif->wdev.iftype, in qtnf_core_mac_attach()
569 vif->wdev.use_4addr, vif->mac_addr); in qtnf_core_mac_attach()
571 pr_err("MAC%u: failed to add VIF\n", macid); in qtnf_core_mac_attach()
601 ret = qtnf_core_net_attach(mac, vif, "wlan%d", NET_NAME_ENUM); in qtnf_core_mac_attach()
611 ret = qtnf_cmd_netdev_changeupper(vif, vif->netdev->ifindex); in qtnf_core_mac_attach()
621 qtnf_cmd_send_del_intf(vif); in qtnf_core_mac_attach()
622 vif->wdev.iftype = NL80211_IFTYPE_UNSPECIFIED; in qtnf_core_mac_attach()
653 struct qtnf_vif *vif; in qtnf_core_netdevice_event() local
664 vif = qtnf_netdev_get_priv(ndev); in qtnf_core_netdevice_event()
665 bus = vif->mac->bus; in qtnf_core_netdevice_event()
675 pr_debug("[VIF%u.%u] change bridge: %s %s\n", in qtnf_core_netdevice_event()
676 vif->mac->macid, vif->vifid, netdev_name(brdev), in qtnf_core_netdevice_event()
687 ret = qtnf_cmd_netdev_changeupper(vif, br_domain); in qtnf_core_netdevice_event()
824 struct qtnf_vif *vif; in qtnf_classify_skb() local
844 pr_err_ratelimited("invalid vif(%u)\n", meta->ifidx); in qtnf_classify_skb()
855 vif = &mac->iflist[meta->ifidx]; in qtnf_classify_skb()
857 if (unlikely(vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED)) { in qtnf_classify_skb()
858 pr_err_ratelimited("vif(%u) does not exists\n", meta->ifidx); in qtnf_classify_skb()
862 ndev = vif->netdev; in qtnf_classify_skb()
881 struct qtnf_vif *vif = qtnf_netdev_get_priv(ndev); in qtnf_wake_all_queues() local
887 if (unlikely(!vif || !vif->mac || !vif->mac->bus)) in qtnf_wake_all_queues()
890 bus = vif->mac->bus; in qtnf_wake_all_queues()
898 vif = &mac->iflist[i]; in qtnf_wake_all_queues()
899 if (vif->netdev && netif_queue_stopped(vif->netdev)) in qtnf_wake_all_queues()
900 netif_tx_wake_all_queues(vif->netdev); in qtnf_wake_all_queues()