wifi: iwlwifi: mvm: fix iwl_mvm_sta_rc_update for MLO
When this is called it might crash due to the use of deflink's phy context, update all links instead. It really shouldn't be called right now though, but it's better to have safer code until we update this to be with a link parameter. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Link: https://lore.kernel.org/r/20230417113648.fd47d0de8319.I87c5e5bcb2fadd70acc32021eed394fc1eea12a4@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
84f650e632
commit
a705a78281
@ -3585,9 +3585,9 @@ static void iwl_mvm_rs_rate_init_all_links(struct iwl_mvm *mvm,
|
|||||||
|
|
||||||
for_each_mvm_vif_valid_link(mvmvif, link_id) {
|
for_each_mvm_vif_valid_link(mvmvif, link_id) {
|
||||||
struct ieee80211_bss_conf *conf =
|
struct ieee80211_bss_conf *conf =
|
||||||
link_conf_dereference_protected(vif, link_id);
|
link_conf_dereference_check(vif, link_id);
|
||||||
struct ieee80211_link_sta *link_sta =
|
struct ieee80211_link_sta *link_sta =
|
||||||
link_sta_dereference_protected(sta, link_id);
|
link_sta_dereference_check(sta, link_id);
|
||||||
|
|
||||||
if (!conf || !link_sta || !mvmvif->link[link_id]->phy_ctxt)
|
if (!conf || !link_sta || !mvmvif->link[link_id]->phy_ctxt)
|
||||||
continue;
|
continue;
|
||||||
@ -3983,15 +3983,11 @@ void iwl_mvm_sta_rc_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
|||||||
struct ieee80211_sta *sta, u32 changed)
|
struct ieee80211_sta *sta, u32 changed)
|
||||||
{
|
{
|
||||||
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
|
||||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
|
||||||
|
|
||||||
if (changed & (IEEE80211_RC_BW_CHANGED |
|
if (changed & (IEEE80211_RC_BW_CHANGED |
|
||||||
IEEE80211_RC_SUPP_RATES_CHANGED |
|
IEEE80211_RC_SUPP_RATES_CHANGED |
|
||||||
IEEE80211_RC_NSS_CHANGED))
|
IEEE80211_RC_NSS_CHANGED))
|
||||||
iwl_mvm_rs_rate_init(mvm, sta,
|
iwl_mvm_rs_rate_init_all_links(mvm, vif, sta, true);
|
||||||
&vif->bss_conf, &sta->deflink,
|
|
||||||
mvmvif->deflink.phy_ctxt->channel->band,
|
|
||||||
true);
|
|
||||||
|
|
||||||
if (vif->type == NL80211_IFTYPE_STATION &&
|
if (vif->type == NL80211_IFTYPE_STATION &&
|
||||||
changed & IEEE80211_RC_NSS_CHANGED)
|
changed & IEEE80211_RC_NSS_CHANGED)
|
||||||
|
Loading…
Reference in New Issue
Block a user