Lines Matching full:vif

354 	struct ieee80211_vif *vif = link_conf->vif;  in mt7925_mac_link_bss_add()  local
355 struct mt792x_vif *mvif = mconf->vif; in mt7925_mac_link_bss_add()
365 mconf->mt76.omac_idx = ieee80211_vif_is_mld(vif) ? in mt7925_mac_link_bss_add()
398 if (vif->txq) { in mt7925_mac_link_bss_add()
399 mtxq = (struct mt76_txq *)vif->txq->drv_priv; in mt7925_mac_link_bss_add()
408 mt7925_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) in mt7925_add_interface() argument
410 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_add_interface()
418 mvif->bss_conf.vif = mvif; in mt7925_add_interface()
419 mvif->sta.vif = mvif; in mt7925_add_interface()
422 ret = mt7925_mac_link_bss_add(dev, &vif->bss_conf, &mvif->sta.deflink); in mt7925_add_interface()
426 vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER; in mt7925_add_interface()
434 struct ieee80211_vif *vif) in mt7925_roc_iter() argument
436 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_roc_iter()
547 struct ieee80211_vif *vif, in mt7925_remain_on_channel() argument
552 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_remain_on_channel()
565 struct ieee80211_vif *vif) in mt7925_cancel_remain_on_channel() argument
567 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_cancel_remain_on_channel()
574 struct ieee80211_vif *vif, struct ieee80211_sta *sta, in mt7925_set_link_key() argument
578 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_set_link_key()
589 link_conf = mt792x_vif_to_bss_conf(vif, link_id); in mt7925_set_link_key()
590 link_sta = sta ? mt792x_sta_to_link_sta(vif, sta, link_id) : NULL; in mt7925_set_link_key()
636 err = mt7925_mcu_add_key(&dev->mt76, vif, &mlink->bip, in mt7925_set_link_key()
645 err = mt7925_mcu_add_key(&dev->mt76, vif, &mvif->wep_sta->deflink.bip, in mt7925_set_link_key()
653 struct ieee80211_vif *vif, struct ieee80211_sta *sta, in mt7925_set_key() argument
657 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_set_key()
665 if ((vif->type == NL80211_IFTYPE_ADHOC || in mt7925_set_key()
666 vif->type == NL80211_IFTYPE_MESH_POINT) && in mt7925_set_key()
674 if (ieee80211_vif_is_mld(vif)) { in mt7925_set_key()
681 err = mt7925_set_link_key(hw, cmd, vif, sta, key, link_id); in mt7925_set_key()
686 err = mt7925_set_link_key(hw, cmd, vif, sta, key, vif->bss_conf.link_id); in mt7925_set_key()
695 mt7925_pm_interface_iter(void *priv, u8 *mac, struct ieee80211_vif *vif) in mt7925_pm_interface_iter() argument
702 err = mt7925_mcu_set_beacon_filter(dev, vif, pm_enable); in mt7925_pm_interface_iter()
707 vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER; in mt7925_pm_interface_iter()
710 vif->driver_flags &= ~IEEE80211_VIF_BEACON_FILTER; in mt7925_pm_interface_iter()
716 mt7925_sniffer_interface_iter(void *priv, u8 *mac, struct ieee80211_vif *vif) in mt7925_sniffer_interface_iter() argument
723 mt7925_mcu_set_sniffer(dev, vif, monitor); in mt7925_sniffer_interface_iter()
730 mt7925_mcu_set_beacon_filter(dev, vif, false); in mt7925_sniffer_interface_iter()
801 mt7925_get_rates_table(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in mt7925_get_rates_table() argument
804 struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv; in mt7925_get_rates_table()
809 rate = mt76_connac2_mac_tx_rate_val(mphy, vif, beacon, mcast); in mt7925_get_rates_table()
830 struct ieee80211_vif *vif, in mt7925_mac_link_sta_add() argument
834 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_mac_link_sta_add()
866 link_conf = mt792x_vif_to_bss_conf(vif, link_id); in mt7925_mac_link_sta_add()
869 if (vif->type == NL80211_IFTYPE_STATION && !link_sta->sta->tdls) in mt7925_mac_link_sta_add()
873 if (ieee80211_vif_is_mld(vif) && in mt7925_mac_link_sta_add()
875 ret = mt7925_mcu_sta_update(dev, link_sta, vif, true, in mt7925_mac_link_sta_add()
879 } else if (ieee80211_vif_is_mld(vif) && in mt7925_mac_link_sta_add()
881 ret = mt7925_mcu_sta_update(dev, mlink->pri_link, vif, in mt7925_mac_link_sta_add()
886 ret = mt7925_mcu_sta_update(dev, link_sta, vif, true, in mt7925_mac_link_sta_add()
891 ret = mt7925_mcu_sta_update(dev, link_sta, vif, true, in mt7925_mac_link_sta_add()
903 mt7925_mac_sta_add_links(struct mt792x_dev *dev, struct ieee80211_vif *vif, in mt7925_mac_sta_add_links() argument
940 link_sta = mt792x_sta_to_link_sta(vif, sta, link_id); in mt7925_mac_sta_add_links()
941 mt7925_mac_link_sta_add(&dev->mt76, vif, link_sta); in mt7925_mac_sta_add_links()
947 int mt7925_mac_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif, in mt7925_mac_sta_add() argument
951 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_mac_sta_add()
955 msta->vif = mvif; in mt7925_mac_sta_add()
957 if (vif->type == NL80211_IFTYPE_STATION) in mt7925_mac_sta_add()
960 if (ieee80211_vif_is_mld(vif)) { in mt7925_mac_sta_add()
963 err = mt7925_mac_sta_add_links(dev, vif, sta, sta->valid_links); in mt7925_mac_sta_add()
965 err = mt7925_mac_link_sta_add(mdev, vif, &sta->deflink); in mt7925_mac_sta_add()
973 mt7925_mac_select_links(struct mt76_dev *mdev, struct ieee80211_vif *vif) in mt7925_mac_select_links() argument
975 unsigned long usable_links = ieee80211_vif_usable_links(vif); in mt7925_mac_select_links()
983 if (!ieee80211_vif_is_mld(vif)) in mt7925_mac_select_links()
986 if (vif->active_links == usable_links) in mt7925_mac_select_links()
987 return vif->active_links; in mt7925_mac_select_links()
992 rcu_dereference(vif->link_conf[link_id]); in mt7925_mac_select_links()
1004 if (!(BIT(data[i].link_id) & vif->active_links)) in mt7925_mac_select_links()
1023 mt7925_mac_set_links(struct mt76_dev *mdev, struct ieee80211_vif *vif) in mt7925_mac_set_links() argument
1026 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_mac_set_links()
1028 mt792x_vif_to_bss_conf(vif, mvif->deflink_id); in mt7925_mac_set_links()
1032 u16 sel_links = mt7925_mac_select_links(mdev, vif); in mt7925_mac_set_links()
1035 if (!ieee80211_vif_is_mld(vif) || hweight16(sel_links) < 2) in mt7925_mac_set_links()
1038 link_conf = mt792x_vif_to_bss_conf(vif, secondary_link_id); in mt7925_mac_set_links()
1052 ieee80211_set_active_links_async(vif, sel_links); in mt7925_mac_set_links()
1056 struct ieee80211_vif *vif, in mt7925_mac_link_sta_assoc() argument
1069 if (ieee80211_vif_is_mld(vif)) { in mt7925_mac_link_sta_assoc()
1070 link_conf = mt792x_vif_to_bss_conf(vif, msta->deflink_id); in mt7925_mac_link_sta_assoc()
1072 link_conf = mt792x_vif_to_bss_conf(vif, vif->bss_conf.link_id); in mt7925_mac_link_sta_assoc()
1075 if (vif->type == NL80211_IFTYPE_STATION && !link_sta->sta->tdls) { in mt7925_mac_link_sta_assoc()
1089 mt7925_mcu_sta_update(dev, link_sta, vif, true, MT76_STA_INFO_STATE_ASSOC); in mt7925_mac_link_sta_assoc()
1094 int mt7925_mac_sta_event(struct mt76_dev *mdev, struct ieee80211_vif *vif, in mt7925_mac_sta_event() argument
1102 if (ieee80211_vif_is_mld(vif)) { in mt7925_mac_sta_event()
1105 link_sta = mt792x_sta_to_link_sta(vif, sta, msta->deflink_id); in mt7925_mac_sta_event()
1106 mt7925_mac_set_links(mdev, vif); in mt7925_mac_sta_event()
1109 mt7925_mac_link_sta_assoc(mdev, vif, link_sta); in mt7925_mac_sta_event()
1116 struct ieee80211_vif *vif, in mt7925_mac_link_sta_remove() argument
1133 mt7925_mcu_sta_update(dev, link_sta, vif, false, in mt7925_mac_link_sta_remove()
1138 link_conf = mt792x_vif_to_bss_conf(vif, link_id); in mt7925_mac_link_sta_remove()
1140 if (vif->type == NL80211_IFTYPE_STATION && !link_sta->sta->tdls) { in mt7925_mac_link_sta_remove()
1157 mt7925_mac_sta_remove_links(struct mt792x_dev *dev, struct ieee80211_vif *vif, in mt7925_mac_sta_remove_links() argument
1169 link_sta = mt792x_sta_to_link_sta(vif, sta, link_id); in mt7925_mac_sta_remove_links()
1177 mt7925_mac_link_sta_remove(&dev->mt76, vif, link_sta); in mt7925_mac_sta_remove_links()
1198 void mt7925_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif, in mt7925_mac_sta_remove() argument
1205 rem = ieee80211_vif_is_mld(vif) ? msta->valid_links : BIT(0); in mt7925_mac_sta_remove()
1207 mt7925_mac_sta_remove_links(dev, vif, sta, rem); in mt7925_mac_sta_remove()
1209 if (vif->type == NL80211_IFTYPE_STATION) { in mt7925_mac_sta_remove()
1210 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_mac_sta_remove()
1230 mt7925_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in mt7925_ampdu_action() argument
1278 ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); in mt7925_ampdu_action()
1364 mt7925_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in mt7925_hw_scan() argument
1372 err = mt7925_mcu_hw_scan(mphy, vif, req); in mt7925_hw_scan()
1379 mt7925_cancel_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif) in mt7925_cancel_hw_scan() argument
1385 mt7925_mcu_cancel_hw_scan(mphy, vif); in mt7925_cancel_hw_scan()
1390 mt7925_start_sched_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in mt7925_start_sched_scan() argument
1400 err = mt7925_mcu_sched_scan_req(mphy, vif, req); in mt7925_start_sched_scan()
1404 err = mt7925_mcu_sched_scan_enable(mphy, vif, true); in mt7925_start_sched_scan()
1412 mt7925_stop_sched_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif) in mt7925_stop_sched_scan() argument
1419 err = mt7925_mcu_sched_scan_enable(mphy, vif, false); in mt7925_stop_sched_scan()
1500 struct ieee80211_vif *vif, in mt7925_set_rekey_data() argument
1506 mt76_connac_mcu_update_gtk_rekey(hw, vif, data); in mt7925_set_rekey_data()
1512 struct ieee80211_vif *vif, in mt7925_sta_set_decap_offload() argument
1517 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_sta_set_decap_offload()
1524 valid = ieee80211_vif_is_mld(vif) ? mvif->valid_links : BIT(0); in mt7925_sta_set_decap_offload()
1536 mt7925_mcu_wtbl_update_hdr_trans(dev, vif, sta, i); in mt7925_sta_set_decap_offload()
1599 struct ieee80211_vif *vif, in mt7925_ipv6_addr_change() argument
1602 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_ipv6_addr_change()
1603 unsigned long valid = ieee80211_vif_is_mld(vif) ? in mt7925_ipv6_addr_change()
1609 bss_conf = mt792x_vif_to_bss_conf(vif, i); in mt7925_ipv6_addr_change()
1653 struct ieee80211_vif *vif, in mt7925_channel_switch_beacon() argument
1659 mt7925_mcu_uni_add_beacon_offload(dev, hw, vif, true); in mt7925_channel_switch_beacon()
1664 mt7925_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in mt7925_conf_tx() argument
1668 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_conf_tx()
1684 mt7925_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in mt7925_start_ap() argument
1687 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_start_ap()
1702 err = mt7925_mcu_sta_update(dev, NULL, vif, true, in mt7925_start_ap()
1711 mt7925_stop_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in mt7925_stop_ap() argument
1714 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_stop_ap()
1752 struct ieee80211_vif *vif; in mt7925_change_chanctx() local
1759 mvif = mconf->vif; in mt7925_change_chanctx()
1760 vif = container_of((void *)mvif, struct ieee80211_vif, drv_priv); in mt7925_change_chanctx()
1763 if (vif->type == NL80211_IFTYPE_MONITOR) { in mt7925_change_chanctx()
1764 mt7925_mcu_set_sniffer(mvif->phy->dev, vif, true); in mt7925_change_chanctx()
1767 if (ieee80211_vif_is_mld(vif)) { in mt7925_change_chanctx()
1784 link_conf = mt792x_vif_to_bss_conf(vif, mconf->link_id); in mt7925_change_chanctx()
1794 struct ieee80211_vif *vif, in mt7925_mgd_prepare_tx() argument
1797 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_mgd_prepare_tx()
1810 struct ieee80211_vif *vif, in mt7925_mgd_complete_tx() argument
1813 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_mgd_complete_tx()
1819 struct ieee80211_vif *vif, in mt7925_vif_cfg_changed() argument
1822 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_vif_cfg_changed()
1824 unsigned long valid = ieee80211_vif_is_mld(vif) ? in mt7925_vif_cfg_changed()
1832 mt7925_mcu_sta_update(dev, NULL, vif, true, in mt7925_vif_cfg_changed()
1834 mt7925_mcu_set_beacon_filter(dev, vif, vif->cfg.assoc); in mt7925_vif_cfg_changed()
1839 bss_conf = mt792x_vif_to_bss_conf(vif, i); in mt7925_vif_cfg_changed()
1846 bss_conf = mt792x_vif_to_bss_conf(vif, i); in mt7925_vif_cfg_changed()
1855 struct ieee80211_vif *vif, in mt7925_link_info_changed() argument
1859 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_link_info_changed()
1879 mt7925_get_rates_table(hw, vif, false, true); in mt7925_link_info_changed()
1883 mt7925_get_rates_table(hw, vif, false, false); in mt7925_link_info_changed()
1888 mt7925_get_rates_table(hw, vif, true, false); in mt7925_link_info_changed()
1890 mt7925_mcu_uni_add_beacon_offload(dev, hw, vif, in mt7925_link_info_changed()
1902 mt7925_change_vif_links(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in mt7925_change_vif_links() argument
1908 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_change_vif_links()
1954 mconf->vif = mvif; in mt7925_change_vif_links()
1956 mlink->wcid.link_valid = !!vif->valid_links; in mt7925_change_vif_links()
1967 link_conf = mt792x_vif_to_bss_conf(vif, link_id); in mt7925_change_vif_links()
1978 vif->active_links); in mt7925_change_vif_links()
2007 mt7925_change_sta_links(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in mt7925_change_sta_links() argument
2020 err = mt7925_mac_sta_remove_links(dev, vif, sta, rem); in mt7925_change_sta_links()
2024 err = mt7925_mac_sta_add_links(dev, vif, sta, add); in mt7925_change_sta_links()
2035 struct ieee80211_vif *vif, in mt7925_assign_vif_chanctx() argument
2040 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_assign_vif_chanctx()
2047 if (ieee80211_vif_is_mld(vif)) { in mt7925_assign_vif_chanctx()
2049 pri_link_conf = mt792x_vif_to_bss_conf(vif, mvif->deflink_id); in mt7925_assign_vif_chanctx()
2051 if (vif->type == NL80211_IFTYPE_STATION && in mt7925_assign_vif_chanctx()
2067 struct ieee80211_vif *vif, in mt7925_unassign_vif_chanctx() argument
2072 struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv; in mt7925_unassign_vif_chanctx()
2079 if (ieee80211_vif_is_mld(vif)) { in mt7925_unassign_vif_chanctx()
2081 pri_link_conf = mt792x_vif_to_bss_conf(vif, mvif->deflink_id); in mt7925_unassign_vif_chanctx()
2083 if (vif->type == NL80211_IFTYPE_STATION && in mt7925_unassign_vif_chanctx()