wifi: iwlwifi: mvm: allow always calling iwl_mvm_get_bss_vif()

Allow calling iwl_mvm_get_bss_vif() without getting an error
message if multiple vifs are active etc., this is much easier
than having to check beforehand (which would be effectively
the same code as the function itself.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241028135215.a343824e2c61.Ib92534f17c63630aa2eb0604fd80dbae20077487@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg
2024-10-28 13:54:48 +02:00
parent 5b10d2014e
commit a883b693f4
@@ -679,10 +679,8 @@ struct ieee80211_vif *iwl_mvm_get_bss_vif(struct iwl_mvm *mvm)
mvm->hw, IEEE80211_IFACE_ITER_NORMAL,
iwl_mvm_bss_iface_iterator, &bss_iter_data);
if (bss_iter_data.error) {
IWL_ERR(mvm, "More than one managed interface active!\n");
if (bss_iter_data.error)
return ERR_PTR(-EINVAL);
}
return bss_iter_data.vif;
}