Lines Matching full:vif
83 int iwl_mvm_set_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
86 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
104 int iwl_mvm_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
107 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
118 ret = iwl_mvm_set_link_mapping(mvm, vif, link_conf);
125 if (iwl_mvm_sf_update(mvm, vif, false))
136 if (vif->type == NL80211_IFTYPE_ADHOC && link_conf->bssid)
146 struct ieee80211_vif *vif;
152 struct ieee80211_vif *vif)
155 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
158 if (ieee80211_vif_type_p2p(vif) == NL80211_IFTYPE_STATION)
164 if (vif == data->vif && link_id == data->link_id)
171 int iwl_mvm_esr_non_bss_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
174 /* An active link of a non-station vif blocks EMLSR. Upon activation
175 * block EMLSR on the bss vif. Upon deactivation, check if this link
176 * was the last non-station link active, and if so unblock the bss vif
180 .vif = vif,
204 int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
208 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
240 if (!active && vif->type == NL80211_IFTYPE_STATION) {
241 iwl_mvm_stop_session_protection(mvm, vif);
265 if (vif->type == NL80211_IFTYPE_ADHOC && link_conf->bssid)
268 iwl_mvm_set_fw_basic_rates(mvm, vif, link_info,
276 iwl_mvm_set_fw_protection_flags(mvm, vif, link_conf,
280 iwl_mvm_set_fw_qos_params(mvm, vif, link_conf, cmd.ac,
289 (vif->type == NL80211_IFTYPE_STATION && !vif->cfg.assoc)) {
377 int iwl_mvm_unset_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
380 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
395 int iwl_mvm_remove_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
398 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
404 ret = iwl_mvm_unset_link_mapping(mvm, vif, link_conf);
415 if (!ret && iwl_mvm_sf_update(mvm, vif, true))
424 int iwl_mvm_disable_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
429 ret = iwl_mvm_link_changed(mvm, vif, link_conf,
434 ret = iwl_mvm_remove_link(mvm, vif, link_conf);
514 struct ieee80211_vif *vif = link_conf->vif;
516 iwl_mvm_vif_from_mac80211(link_conf->vif)->link[link_conf->link_id];
525 if (ieee80211_vif_link_active(vif, link_conf->link_id))
640 u8 iwl_mvm_set_link_selection_data(struct ieee80211_vif *vif,
652 link_conf_dereference_protected(vif, link_id);
713 struct ieee80211_vif *vif,
722 conf = wiphy_dereference(wiphy, vif->link_conf[link->link_id]);
728 (!iwl_mvm_bt_coex_calculate_esr_mode(mvm, vif, link->signal,
751 bool iwl_mvm_mld_valid_link_pair(struct ieee80211_vif *vif,
755 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
760 if (iwl_mvm_esr_disallowed_with_link(mvm, vif, a, true) ||
761 iwl_mvm_esr_disallowed_with_link(mvm, vif, b, false))
786 unsigned int iwl_mvm_get_esr_grade(struct ieee80211_vif *vif,
792 struct wiphy *wiphy = ieee80211_vif_to_wdev(vif)->wiphy;
803 if (!iwl_mvm_mld_valid_link_pair(vif, a, b))
806 primary_conf = wiphy_dereference(wiphy, vif->link_conf[*primary_id]);
817 void iwl_mvm_select_links(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
821 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
822 u32 max_active_links = iwl_mvm_max_active_links(mvm, vif);
823 u16 usable_links = ieee80211_vif_usable_links(vif);
829 if (!mvmvif->authorized || !ieee80211_vif_is_mld(vif))
840 n_data = iwl_mvm_set_link_selection_data(vif, data, usable_links,
851 if (max_active_links == 1 || !iwl_mvm_vif_has_esr_cap(mvm, vif) ||
857 u16 esr_grade = iwl_mvm_get_esr_grade(vif, &data[a],
882 ieee80211_set_active_links_async(vif, new_active_links);
887 u8 iwl_mvm_get_primary_link(struct ieee80211_vif *vif)
889 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
895 if (!ieee80211_vif_is_mld(vif))
899 if (vif->type == NL80211_IFTYPE_AP)
900 return __ffs(vif->active_links);
903 !WARN_ON(!(BIT(mvmvif->primary_link) & vif->active_links)))
906 return __ffs(vif->active_links);
913 u8 iwl_mvm_get_other_link(struct ieee80211_vif *vif, u8 link_id)
915 switch (hweight16(vif->active_links)) {
922 return __ffs(vif->active_links);
924 return __ffs(vif->active_links & ~BIT(link_id));
987 void iwl_mvm_exit_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
991 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1004 if (WARN_ON(!ieee80211_vif_is_mld(vif) || !mvmvif->authorized))
1007 if (WARN_ON(!(vif->active_links & BIT(link_to_keep))))
1008 link_to_keep = __ffs(vif->active_links);
1014 vif->active_links, new_active_links);
1016 ieee80211_set_active_links_async(vif, new_active_links);
1039 void iwl_mvm_block_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
1043 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1065 iwl_mvm_exit_esr(mvm, vif, reason, link_to_keep);
1068 int iwl_mvm_block_esr_sync(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
1071 int primary_link = iwl_mvm_get_primary_link(vif);
1074 if (!IWL_MVM_AUTO_EML_ENABLE || !ieee80211_vif_is_mld(vif))
1082 ret = ieee80211_set_active_links(vif, BIT(primary_link));
1088 iwl_mvm_block_esr(mvm, vif, reason, primary_link);
1095 struct ieee80211_vif *vif)
1097 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1103 if (!ieee80211_vif_is_mld(vif) || !mvmvif->authorized ||
1135 ieee80211_set_active_links_async(vif,
1140 void iwl_mvm_unblock_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
1143 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1166 iwl_mvm_esr_unblocked(mvm, vif);