Lines Matching defs:vif
81 int iwl_mvm_set_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
84 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
102 int iwl_mvm_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
105 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
116 ret = iwl_mvm_set_link_mapping(mvm, vif, link_conf);
123 if (iwl_mvm_sf_update(mvm, vif, false))
134 if (vif->type == NL80211_IFTYPE_ADHOC && link_conf->bssid)
144 struct ieee80211_vif *vif;
150 struct ieee80211_vif *vif)
153 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
156 if (ieee80211_vif_type_p2p(vif) == NL80211_IFTYPE_STATION)
162 if (vif == data->vif && link_id == data->link_id)
169 int iwl_mvm_esr_non_bss_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
172 /* An active link of a non-station vif blocks EMLSR. Upon activation
173 * block EMLSR on the bss vif. Upon deactivation, check if this link
174 * was the last non-station link active, and if so unblock the bss vif
178 .vif = vif,
202 int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
206 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
238 if (!active && vif->type == NL80211_IFTYPE_STATION)
239 iwl_mvm_stop_session_protection(mvm, vif);
258 if (vif->type == NL80211_IFTYPE_ADHOC && link_conf->bssid)
261 iwl_mvm_set_fw_basic_rates(mvm, vif, link_conf,
269 iwl_mvm_set_fw_protection_flags(mvm, vif, link_conf,
273 iwl_mvm_set_fw_qos_params(mvm, vif, link_conf, cmd.ac,
282 (vif->type == NL80211_IFTYPE_STATION && !vif->cfg.assoc)) {
358 int iwl_mvm_unset_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
361 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
376 int iwl_mvm_remove_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
379 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
385 ret = iwl_mvm_unset_link_mapping(mvm, vif, link_conf);
397 if (iwl_mvm_sf_update(mvm, vif, true))
406 int iwl_mvm_disable_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
411 ret = iwl_mvm_link_changed(mvm, vif, link_conf,
416 ret = iwl_mvm_remove_link(mvm, vif, link_conf);
496 struct ieee80211_vif *vif = link_conf->vif;
498 iwl_mvm_vif_from_mac80211(link_conf->vif)->link[link_conf->link_id];
507 if (ieee80211_vif_link_active(vif, link_conf->link_id))
622 u8 iwl_mvm_set_link_selection_data(struct ieee80211_vif *vif,
634 link_conf_dereference_protected(vif, link_id);
695 struct ieee80211_vif *vif,
704 conf = wiphy_dereference(wiphy, vif->link_conf[link->link_id]);
710 (!iwl_mvm_bt_coex_calculate_esr_mode(mvm, vif, link->signal,
733 bool iwl_mvm_mld_valid_link_pair(struct ieee80211_vif *vif,
737 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
742 if (iwl_mvm_esr_disallowed_with_link(mvm, vif, a, true) ||
743 iwl_mvm_esr_disallowed_with_link(mvm, vif, b, false))
769 unsigned int iwl_mvm_get_esr_grade(struct ieee80211_vif *vif,
775 struct wiphy *wiphy = ieee80211_vif_to_wdev(vif)->wiphy;
786 if (!iwl_mvm_mld_valid_link_pair(vif, a, b))
789 primary_conf = wiphy_dereference(wiphy, vif->link_conf[*primary_id]);
800 void iwl_mvm_select_links(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
804 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
805 u32 max_active_links = iwl_mvm_max_active_links(mvm, vif);
806 u16 usable_links = ieee80211_vif_usable_links(vif);
812 if (!mvmvif->authorized || !ieee80211_vif_is_mld(vif))
823 n_data = iwl_mvm_set_link_selection_data(vif, data, usable_links,
834 if (max_active_links == 1 || !iwl_mvm_vif_has_esr_cap(mvm, vif) ||
840 u16 esr_grade = iwl_mvm_get_esr_grade(vif, &data[a],
865 ieee80211_set_active_links_async(vif, new_active_links);
870 u8 iwl_mvm_get_primary_link(struct ieee80211_vif *vif)
872 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
878 if (!ieee80211_vif_is_mld(vif))
882 if (vif->type == NL80211_IFTYPE_AP)
883 return __ffs(vif->active_links);
886 !WARN_ON(!(BIT(mvmvif->primary_link) & vif->active_links)))
889 return __ffs(vif->active_links);
896 u8 iwl_mvm_get_other_link(struct ieee80211_vif *vif, u8 link_id)
898 switch (hweight16(vif->active_links)) {
905 return __ffs(vif->active_links);
907 return __ffs(vif->active_links & ~BIT(link_id));
970 void iwl_mvm_exit_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
974 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
987 if (WARN_ON(!ieee80211_vif_is_mld(vif) || !mvmvif->authorized))
990 if (WARN_ON(!(vif->active_links & BIT(link_to_keep))))
991 link_to_keep = __ffs(vif->active_links);
997 vif->active_links, new_active_links);
999 ieee80211_set_active_links_async(vif, new_active_links);
1022 void iwl_mvm_block_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
1026 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1048 iwl_mvm_exit_esr(mvm, vif, reason, link_to_keep);
1051 int iwl_mvm_block_esr_sync(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
1054 int primary_link = iwl_mvm_get_primary_link(vif);
1057 if (!IWL_MVM_AUTO_EML_ENABLE || !ieee80211_vif_is_mld(vif))
1065 ret = ieee80211_set_active_links(vif, BIT(primary_link));
1071 iwl_mvm_block_esr(mvm, vif, reason, primary_link);
1078 struct ieee80211_vif *vif)
1080 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1086 if (!ieee80211_vif_is_mld(vif) || !mvmvif->authorized ||
1118 ieee80211_set_active_links_async(vif,
1123 void iwl_mvm_unblock_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
1126 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1149 iwl_mvm_esr_unblocked(mvm, vif);