Lines Matching full:vif
8 struct ieee80211_vif *vif) in iwl_mvm_mld_mac_add_interface() argument
11 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mld_mac_add_interface()
31 ret = iwl_mvm_mac_ctxt_init(mvm, vif); in iwl_mvm_mld_mac_add_interface()
35 rcu_assign_pointer(mvm->vif_id_to_mac[mvmvif->id], vif); in iwl_mvm_mld_mac_add_interface()
43 ret = iwl_mvm_mld_mac_ctxt_add(mvm, vif); in iwl_mvm_mld_mac_add_interface()
48 ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0); in iwl_mvm_mld_mac_add_interface()
53 vif->type == NL80211_IFTYPE_STATION && !vif->p2p) { in iwl_mvm_mld_mac_add_interface()
55 vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER | in iwl_mvm_mld_mac_add_interface()
65 !ieee80211_vif_is_mld(vif)) { in iwl_mvm_mld_mac_add_interface()
68 ret = iwl_mvm_add_link(mvm, vif, &vif->bss_conf); in iwl_mvm_mld_mac_add_interface()
73 /* Save a pointer to p2p device vif, so it can later be used to in iwl_mvm_mld_mac_add_interface()
76 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) in iwl_mvm_mld_mac_add_interface()
77 mvm->p2p_device_vif = vif; in iwl_mvm_mld_mac_add_interface()
83 iwl_mvm_tcm_add_vif(mvm, vif); in iwl_mvm_mld_mac_add_interface()
85 if (vif->type == NL80211_IFTYPE_MONITOR) { in iwl_mvm_mld_mac_add_interface()
90 iwl_mvm_vif_dbgfs_register(mvm, vif); in iwl_mvm_mld_mac_add_interface()
93 vif->type == NL80211_IFTYPE_STATION && !vif->p2p && in iwl_mvm_mld_mac_add_interface()
95 iwl_mei_set_nic_info(vif->addr, mvm->nvm_data->hw_addr); in iwl_mvm_mld_mac_add_interface()
96 iwl_mei_set_netdev(ieee80211_vif_to_wdev(vif)->netdev); in iwl_mvm_mld_mac_add_interface()
97 mvm->csme_vif = vif; in iwl_mvm_mld_mac_add_interface()
105 vif->driver_flags &= ~(IEEE80211_VIF_BEACON_FILTER | in iwl_mvm_mld_mac_add_interface()
110 iwl_mvm_mld_mac_ctxt_remove(mvm, vif); in iwl_mvm_mld_mac_add_interface()
118 struct ieee80211_vif *vif) in iwl_mvm_mld_mac_remove_interface() argument
121 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mld_mac_remove_interface()
124 iwl_mvm_prepare_mac_removal(mvm, vif); in iwl_mvm_mld_mac_remove_interface()
126 if (!(vif->type == NL80211_IFTYPE_AP || in iwl_mvm_mld_mac_remove_interface()
127 vif->type == NL80211_IFTYPE_ADHOC)) in iwl_mvm_mld_mac_remove_interface()
128 iwl_mvm_tcm_rm_vif(mvm, vif); in iwl_mvm_mld_mac_remove_interface()
132 if (vif == mvm->csme_vif) { in iwl_mvm_mld_mac_remove_interface()
139 vif->driver_flags &= ~(IEEE80211_VIF_BEACON_FILTER | in iwl_mvm_mld_mac_remove_interface()
143 if (vif->bss_conf.ftm_responder) in iwl_mvm_mld_mac_remove_interface()
146 iwl_mvm_vif_dbgfs_clean(mvm, vif); in iwl_mvm_mld_mac_remove_interface()
151 if (vif->type == NL80211_IFTYPE_AP || in iwl_mvm_mld_mac_remove_interface()
152 vif->type == NL80211_IFTYPE_ADHOC) { in iwl_mvm_mld_mac_remove_interface()
154 if (vif == mvm->noa_vif) { in iwl_mvm_mld_mac_remove_interface()
168 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_mld_mac_remove_interface()
174 iwl_mvm_remove_link(mvm, vif, &vif->bss_conf); in iwl_mvm_mld_mac_remove_interface()
176 iwl_mvm_disable_link(mvm, vif, &vif->bss_conf); in iwl_mvm_mld_mac_remove_interface()
179 iwl_mvm_mld_mac_ctxt_remove(mvm, vif); in iwl_mvm_mld_mac_remove_interface()
189 if (vif->type == NL80211_IFTYPE_MONITOR) { in iwl_mvm_mld_mac_remove_interface()
197 static unsigned int iwl_mvm_mld_count_active_links(struct ieee80211_vif *vif) in iwl_mvm_mld_count_active_links() argument
205 link_conf = link_conf_dereference_protected(vif, i); in iwl_mvm_mld_count_active_links()
215 struct ieee80211_vif *vif) in iwl_mvm_esr_mode_active() argument
217 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_esr_mode_active()
223 vif->driver_flags |= IEEE80211_VIF_DISABLE_SMPS_OVERRIDE; in iwl_mvm_esr_mode_active()
225 iwl_mvm_update_smps_on_active_links(mvm, vif, IWL_MVM_SMPS_REQ_FW, in iwl_mvm_esr_mode_active()
246 struct ieee80211_vif *vif, in __iwl_mvm_mld_assign_vif_chanctx() argument
253 unsigned int n_active = iwl_mvm_mld_count_active_links(vif); in __iwl_mvm_mld_assign_vif_chanctx()
254 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in __iwl_mvm_mld_assign_vif_chanctx()
262 if (n_active > iwl_mvm_max_active_links(mvm, vif)) in __iwl_mvm_mld_assign_vif_chanctx()
272 if (vif->type == NL80211_IFTYPE_AP) { in __iwl_mvm_mld_assign_vif_chanctx()
273 ret = iwl_mvm_mld_mac_ctxt_changed(mvm, vif, false); in __iwl_mvm_mld_assign_vif_chanctx()
275 IWL_ERR(mvm, "failed to update MAC %pM\n", vif->addr); in __iwl_mvm_mld_assign_vif_chanctx()
284 ret = iwl_mvm_esr_mode_active(mvm, vif); in __iwl_mvm_mld_assign_vif_chanctx()
293 if (vif->type == NL80211_IFTYPE_AP) in __iwl_mvm_mld_assign_vif_chanctx()
298 ret = iwl_mvm_link_changed(mvm, vif, link_conf, 0, false); in __iwl_mvm_mld_assign_vif_chanctx()
315 iwl_mvm_rs_rate_init(mvm, vif, mvmvif->ap_sta, in __iwl_mvm_mld_assign_vif_chanctx()
322 ret = iwl_mvm_link_changed(mvm, vif, link_conf, in __iwl_mvm_mld_assign_vif_chanctx()
335 if (vif->type == NL80211_IFTYPE_MONITOR) { in __iwl_mvm_mld_assign_vif_chanctx()
336 ret = iwl_mvm_mld_add_snif_sta(mvm, vif, link_conf); in __iwl_mvm_mld_assign_vif_chanctx()
344 iwl_mvm_link_changed(mvm, vif, link_conf, LINK_CONTEXT_MODIFY_ACTIVE, in __iwl_mvm_mld_assign_vif_chanctx()
353 struct ieee80211_vif *vif, in iwl_mvm_mld_assign_vif_chanctx() argument
361 ret = __iwl_mvm_mld_assign_vif_chanctx(mvm, vif, link_conf, ctx, false); in iwl_mvm_mld_assign_vif_chanctx()
368 struct ieee80211_vif *vif) in iwl_mvm_esr_mode_inactive() argument
370 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_esr_mode_inactive()
376 vif->driver_flags &= ~IEEE80211_VIF_DISABLE_SMPS_OVERRIDE; in iwl_mvm_esr_mode_inactive()
378 iwl_mvm_update_smps_on_active_links(mvm, vif, IWL_MVM_SMPS_REQ_FW, in iwl_mvm_esr_mode_inactive()
381 for_each_vif_active_link(vif, link_conf, link_id) { in iwl_mvm_esr_mode_inactive()
415 struct ieee80211_vif *vif, in __iwl_mvm_mld_unassign_vif_chanctx() argument
421 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in __iwl_mvm_mld_unassign_vif_chanctx()
422 unsigned int n_active = iwl_mvm_mld_count_active_links(vif); in __iwl_mvm_mld_unassign_vif_chanctx()
429 if (vif->type == NL80211_IFTYPE_AP && switching_chanctx) { in __iwl_mvm_mld_unassign_vif_chanctx()
436 rcu_assign_pointer(mvm->csa_tx_blocked_vif, vif); in __iwl_mvm_mld_unassign_vif_chanctx()
441 iwl_mvm_link_changed(mvm, vif, link_conf, in __iwl_mvm_mld_unassign_vif_chanctx()
445 int ret = iwl_mvm_esr_mode_inactive(mvm, vif); in __iwl_mvm_mld_unassign_vif_chanctx()
452 if (vif->type == NL80211_IFTYPE_MONITOR) in __iwl_mvm_mld_unassign_vif_chanctx()
453 iwl_mvm_mld_rm_snif_sta(mvm, vif); in __iwl_mvm_mld_unassign_vif_chanctx()
462 struct ieee80211_vif *vif, in iwl_mvm_mld_unassign_vif_chanctx() argument
469 __iwl_mvm_mld_unassign_vif_chanctx(mvm, vif, link_conf, ctx, false); in iwl_mvm_mld_unassign_vif_chanctx()
474 struct ieee80211_vif *vif, in iwl_mvm_mld_start_ap_ibss() argument
478 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mld_start_ap_ibss()
483 ret = iwl_mvm_mac_ctxt_beacon_changed(mvm, vif, link_conf); in iwl_mvm_mld_start_ap_ibss()
488 ret = iwl_mvm_link_changed(mvm, vif, link_conf, in iwl_mvm_mld_start_ap_ibss()
495 ret = iwl_mvm_mld_add_mcast_sta(mvm, vif, link_conf); in iwl_mvm_mld_start_ap_ibss()
502 ret = iwl_mvm_mld_add_bcast_sta(mvm, vif, link_conf); in iwl_mvm_mld_start_ap_ibss()
506 if (iwl_mvm_start_ap_ibss_common(hw, vif, &ret)) in iwl_mvm_mld_start_ap_ibss()
509 /* Need to update the P2P Device MAC (only GO, IBSS is single vif) */ in iwl_mvm_mld_start_ap_ibss()
510 if (vif->p2p && mvm->p2p_device_vif) in iwl_mvm_mld_start_ap_ibss()
519 iwl_mvm_ftm_restart_responder(mvm, vif, link_conf); in iwl_mvm_mld_start_ap_ibss()
526 iwl_mvm_mld_rm_bcast_sta(mvm, vif, link_conf); in iwl_mvm_mld_start_ap_ibss()
528 iwl_mvm_mld_rm_mcast_sta(mvm, vif, link_conf); in iwl_mvm_mld_start_ap_ibss()
535 struct ieee80211_vif *vif, in iwl_mvm_mld_start_ap() argument
538 return iwl_mvm_mld_start_ap_ibss(hw, vif, link_conf); in iwl_mvm_mld_start_ap()
542 struct ieee80211_vif *vif) in iwl_mvm_mld_start_ibss() argument
544 return iwl_mvm_mld_start_ap_ibss(hw, vif, &vif->bss_conf); in iwl_mvm_mld_start_ibss()
548 struct ieee80211_vif *vif, in iwl_mvm_mld_stop_ap_ibss() argument
555 iwl_mvm_stop_ap_ibss_common(mvm, vif); in iwl_mvm_mld_stop_ap_ibss()
557 /* Need to update the P2P Device MAC (only GO, IBSS is single vif) */ in iwl_mvm_mld_stop_ap_ibss()
558 if (vif->p2p && mvm->p2p_device_vif) in iwl_mvm_mld_stop_ap_ibss()
561 iwl_mvm_ftm_responder_clear(mvm, vif); in iwl_mvm_mld_stop_ap_ibss()
563 iwl_mvm_mld_rm_bcast_sta(mvm, vif, link_conf); in iwl_mvm_mld_stop_ap_ibss()
564 iwl_mvm_mld_rm_mcast_sta(mvm, vif, link_conf); in iwl_mvm_mld_stop_ap_ibss()
571 struct ieee80211_vif *vif, in iwl_mvm_mld_stop_ap() argument
574 iwl_mvm_mld_stop_ap_ibss(hw, vif, link_conf); in iwl_mvm_mld_stop_ap()
578 struct ieee80211_vif *vif) in iwl_mvm_mld_stop_ibss() argument
580 iwl_mvm_mld_stop_ap_ibss(hw, vif, &vif->bss_conf); in iwl_mvm_mld_stop_ibss()
584 struct ieee80211_vif *vif, in iwl_mvm_mld_mac_sta_state() argument
596 return iwl_mvm_mac_sta_state_common(hw, vif, sta, old_state, new_state, in iwl_mvm_mld_mac_sta_state()
602 struct ieee80211_vif *vif, in iwl_mvm_mld_link_info_changed_station() argument
606 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mld_link_info_changed_station()
618 if (changes & BSS_CHANGED_QOS && vif->cfg.assoc && link_conf->qos) in iwl_mvm_mld_link_info_changed_station()
624 if (vif->cfg.assoc && (has_he || has_eht)) { in iwl_mvm_mld_link_info_changed_station()
630 if (changes & BSS_CHANGED_EHT_PUNCTURING && vif->cfg.assoc) in iwl_mvm_mld_link_info_changed_station()
634 ret = iwl_mvm_link_changed(mvm, vif, link_conf, link_changes, in iwl_mvm_mld_link_info_changed_station()
640 ret = iwl_mvm_mld_mac_ctxt_changed(mvm, vif, false); in iwl_mvm_mld_link_info_changed_station()
642 IWL_ERR(mvm, "failed to update MAC %pM\n", vif->addr); in iwl_mvm_mld_link_info_changed_station()
647 iwl_mvm_bss_info_changed_station_common(mvm, vif, link_conf, changes); in iwl_mvm_mld_link_info_changed_station()
663 struct ieee80211_vif *vif) in iwl_mvm_mld_vif_delete_all_stas() argument
665 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mld_vif_delete_all_stas()
677 iwl_mvm_sec_key_remove_ap(mvm, vif, link, i); in iwl_mvm_mld_vif_delete_all_stas()
687 struct ieee80211_vif *vif, in iwl_mvm_mld_vif_cfg_changed_station() argument
690 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mld_vif_cfg_changed_station()
702 ret = iwl_mvm_mld_mac_ctxt_changed(mvm, vif, false); in iwl_mvm_mld_vif_cfg_changed_station()
704 IWL_ERR(mvm, "failed to update MAC %pM\n", vif->addr); in iwl_mvm_mld_vif_cfg_changed_station()
706 mvmvif->associated = vif->cfg.assoc; in iwl_mvm_mld_vif_cfg_changed_station()
709 if (vif->cfg.assoc) { in iwl_mvm_mld_vif_cfg_changed_station()
712 iwl_mvm_sf_update(mvm, vif, false); in iwl_mvm_mld_vif_cfg_changed_station()
713 iwl_mvm_power_vif_assoc(mvm, vif); in iwl_mvm_mld_vif_cfg_changed_station()
719 if (vif->p2p) { in iwl_mvm_mld_vif_cfg_changed_station()
720 iwl_mvm_update_smps(mvm, vif, in iwl_mvm_mld_vif_cfg_changed_station()
726 link_conf = rcu_dereference(vif->link_conf[i]); in iwl_mvm_mld_vif_cfg_changed_station()
743 iwl_mvm_protect_assoc(mvm, vif, 0); in iwl_mvm_mld_vif_cfg_changed_station()
746 iwl_mvm_sf_update(mvm, vif, false); in iwl_mvm_mld_vif_cfg_changed_station()
749 iwl_mvm_power_vif_assoc(mvm, vif); in iwl_mvm_mld_vif_cfg_changed_station()
756 ret = iwl_mvm_sf_update(mvm, vif, false); in iwl_mvm_mld_vif_cfg_changed_station()
763 * station has been added, but before the vif is set in iwl_mvm_mld_vif_cfg_changed_station()
765 * then configure the vif. Since the vif is not in iwl_mvm_mld_vif_cfg_changed_station()
769 iwl_mvm_mld_vif_delete_all_stas(mvm, vif); in iwl_mvm_mld_vif_cfg_changed_station()
772 iwl_mvm_bss_info_changed_station_assoc(mvm, vif, changes); in iwl_mvm_mld_vif_cfg_changed_station()
784 struct ieee80211_vif *vif, in iwl_mvm_mld_link_info_changed_ap_ibss() argument
788 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mld_link_info_changed_ap_ibss()
806 iwl_mvm_link_changed(mvm, vif, link_conf, in iwl_mvm_mld_link_info_changed_ap_ibss()
808 IWL_ERR(mvm, "failed to update MAC %pM\n", vif->addr); in iwl_mvm_mld_link_info_changed_ap_ibss()
812 iwl_mvm_mac_ctxt_beacon_changed(mvm, vif, link_conf)) in iwl_mvm_mld_link_info_changed_ap_ibss()
817 int ret = iwl_mvm_ftm_start_responder(mvm, vif, link_conf); in iwl_mvm_mld_link_info_changed_ap_ibss()
826 struct ieee80211_vif *vif, in iwl_mvm_mld_link_info_changed() argument
834 switch (vif->type) { in iwl_mvm_mld_link_info_changed()
836 iwl_mvm_mld_link_info_changed_station(mvm, vif, link_conf, in iwl_mvm_mld_link_info_changed()
841 iwl_mvm_mld_link_info_changed_ap_ibss(mvm, vif, link_conf, in iwl_mvm_mld_link_info_changed()
846 iwl_mvm_update_mu_groups(mvm, vif); in iwl_mvm_mld_link_info_changed()
856 iwl_mvm_set_tx_power(mvm, vif, link_conf->txpower); in iwl_mvm_mld_link_info_changed()
863 struct ieee80211_vif *vif, in iwl_mvm_mld_vif_cfg_changed() argument
870 if (changes & BSS_CHANGED_IDLE && !vif->cfg.idle) in iwl_mvm_mld_vif_cfg_changed()
873 if (vif->type == NL80211_IFTYPE_STATION) in iwl_mvm_mld_vif_cfg_changed()
874 iwl_mvm_mld_vif_cfg_changed_station(mvm, vif, changes); in iwl_mvm_mld_vif_cfg_changed()
894 struct ieee80211_vif *vif, in iwl_mvm_mld_config_iface_filter() argument
905 if (vif->type != NL80211_IFTYPE_STATION || !vif->cfg.assoc || in iwl_mvm_mld_config_iface_filter()
906 !vif->p2p) in iwl_mvm_mld_config_iface_filter()
910 iwl_mvm_mld_mac_ctxt_changed(mvm, vif, false); in iwl_mvm_mld_config_iface_filter()
916 struct ieee80211_vif *vif, in iwl_mvm_mld_mac_conf_tx() argument
921 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mld_mac_conf_tx()
932 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_mld_mac_conf_tx()
936 ret = iwl_mvm_link_changed(mvm, vif, &vif->bss_conf, in iwl_mvm_mld_mac_conf_tx()
945 static int iwl_mvm_mld_roc_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif) in iwl_mvm_mld_roc_link() argument
952 ret = iwl_mvm_link_changed(mvm, vif, &vif->bss_conf, 0, false); in iwl_mvm_mld_roc_link()
956 ret = iwl_mvm_link_changed(mvm, vif, &vif->bss_conf, in iwl_mvm_mld_roc_link()
967 return iwl_mvm_mld_add_bcast_sta(mvm, vif, &vif->bss_conf); in iwl_mvm_mld_roc_link()
970 static int iwl_mvm_mld_roc(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_mld_roc() argument
979 return iwl_mvm_roc_common(hw, vif, channel, duration, type, &ops); in iwl_mvm_mld_roc()
984 struct ieee80211_vif *vif, in iwl_mvm_mld_change_vif_links() argument
989 unsigned int n_active = iwl_mvm_mld_count_active_links(vif); in iwl_mvm_mld_change_vif_links()
990 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mld_change_vif_links()
997 n_active > iwl_mvm_max_active_links(mvm, vif)) in iwl_mvm_mld_change_vif_links()
1031 err = iwl_mvm_disable_link(mvm, vif, &vif->bss_conf); in iwl_mvm_mld_change_vif_links()
1041 err = iwl_mvm_disable_link(mvm, vif, link_conf); in iwl_mvm_mld_change_vif_links()
1049 link_conf = link_conf_dereference_protected(vif, i); in iwl_mvm_mld_change_vif_links()
1057 err = iwl_mvm_add_link(mvm, vif, link_conf); in iwl_mvm_mld_change_vif_links()
1066 err = iwl_mvm_add_link(mvm, vif, &vif->bss_conf); in iwl_mvm_mld_change_vif_links()
1081 struct ieee80211_vif *vif, in iwl_mvm_mld_change_sta_links() argument
1089 ret = iwl_mvm_mld_update_sta_links(mvm, vif, sta, old_links, new_links); in iwl_mvm_mld_change_sta_links()