Lines Matching refs:vif

91 int iwl_mvm_set_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
94 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
112 int iwl_mvm_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
115 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
126 ret = iwl_mvm_set_link_mapping(mvm, vif, link_conf);
133 if (iwl_mvm_sf_update(mvm, vif, false))
144 if (vif->type == NL80211_IFTYPE_ADHOC && link_conf->bssid)
154 struct ieee80211_vif *vif;
160 struct ieee80211_vif *vif)
163 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
166 if (ieee80211_vif_type_p2p(vif) == NL80211_IFTYPE_STATION)
172 if (vif == data->vif && link_id == data->link_id)
179 int iwl_mvm_esr_non_bss_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
182 /* An active link of a non-station vif blocks EMLSR. Upon activation
183 * block EMLSR on the bss vif. Upon deactivation, check if this link
184 * was the last non-station link active, and if so unblock the bss vif
188 .vif = vif,
212 int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
216 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
248 if (!active && vif->type == NL80211_IFTYPE_STATION)
249 iwl_mvm_stop_session_protection(mvm, vif);
268 if (vif->type == NL80211_IFTYPE_ADHOC && link_conf->bssid)
271 iwl_mvm_set_fw_basic_rates(mvm, vif, link_conf,
279 iwl_mvm_set_fw_protection_flags(mvm, vif, link_conf,
283 iwl_mvm_set_fw_qos_params(mvm, vif, link_conf, cmd.ac,
292 (vif->type == NL80211_IFTYPE_STATION && !vif->cfg.assoc)) {
368 int iwl_mvm_unset_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
371 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
387 int iwl_mvm_remove_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
390 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
396 ret = iwl_mvm_unset_link_mapping(mvm, vif, link_conf);
408 if (iwl_mvm_sf_update(mvm, vif, true))
417 int iwl_mvm_disable_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
422 ret = iwl_mvm_link_changed(mvm, vif, link_conf,
427 ret = iwl_mvm_remove_link(mvm, vif, link_conf);
508 iwl_mvm_vif_from_mac80211(link_conf->vif)->link[link_conf->link_id];
623 u8 iwl_mvm_set_link_selection_data(struct ieee80211_vif *vif,
635 link_conf_dereference_protected(vif, link_id);
696 struct ieee80211_vif *vif,
705 conf = wiphy_dereference(wiphy, vif->link_conf[link->link_id]);
711 (!iwl_mvm_bt_coex_calculate_esr_mode(mvm, vif, link->signal,
734 bool iwl_mvm_mld_valid_link_pair(struct ieee80211_vif *vif,
738 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
743 if (iwl_mvm_esr_disallowed_with_link(mvm, vif, a, true) ||
744 iwl_mvm_esr_disallowed_with_link(mvm, vif, b, false))
770 unsigned int iwl_mvm_get_esr_grade(struct ieee80211_vif *vif,
776 struct wiphy *wiphy = ieee80211_vif_to_wdev(vif)->wiphy;
787 if (!iwl_mvm_mld_valid_link_pair(vif, a, b))
790 primary_conf = wiphy_dereference(wiphy, vif->link_conf[*primary_id]);
801 void iwl_mvm_select_links(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
805 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
806 u32 max_active_links = iwl_mvm_max_active_links(mvm, vif);
807 u16 usable_links = ieee80211_vif_usable_links(vif);
813 if (!mvmvif->authorized || !ieee80211_vif_is_mld(vif))
824 n_data = iwl_mvm_set_link_selection_data(vif, data, usable_links,
835 if (max_active_links == 1 || !iwl_mvm_vif_has_esr_cap(mvm, vif) ||
841 u16 esr_grade = iwl_mvm_get_esr_grade(vif, &data[a],
866 ieee80211_set_active_links_async(vif, new_active_links);
871 u8 iwl_mvm_get_primary_link(struct ieee80211_vif *vif)
873 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
879 if (!ieee80211_vif_is_mld(vif))
883 if (vif->type == NL80211_IFTYPE_AP)
884 return __ffs(vif->active_links);
887 !WARN_ON(!(BIT(mvmvif->primary_link) & vif->active_links)))
890 return __ffs(vif->active_links);
897 u8 iwl_mvm_get_other_link(struct ieee80211_vif *vif, u8 link_id)
899 switch (hweight16(vif->active_links)) {
906 return __ffs(vif->active_links);
908 return __ffs(vif->active_links & ~BIT(link_id));
971 void iwl_mvm_exit_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
975 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
985 if (WARN_ON(!ieee80211_vif_is_mld(vif) || !mvmvif->authorized))
988 if (WARN_ON(!(vif->active_links & BIT(link_to_keep))))
989 link_to_keep = __ffs(vif->active_links);
995 vif->active_links, new_active_links);
997 ieee80211_set_active_links_async(vif, new_active_links);
1020 void iwl_mvm_block_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
1024 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1041 iwl_mvm_exit_esr(mvm, vif, reason, link_to_keep);
1044 int iwl_mvm_block_esr_sync(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
1047 int primary_link = iwl_mvm_get_primary_link(vif);
1050 if (!IWL_MVM_AUTO_EML_ENABLE || !ieee80211_vif_is_mld(vif))
1058 ret = ieee80211_set_active_links(vif, BIT(primary_link));
1064 iwl_mvm_block_esr(mvm, vif, reason, primary_link);
1071 struct ieee80211_vif *vif)
1073 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1079 if (!ieee80211_vif_is_mld(vif) || !mvmvif->authorized ||
1102 ieee80211_set_active_links_async(vif,
1107 void iwl_mvm_unblock_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
1110 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1130 iwl_mvm_esr_unblocked(mvm, vif);