wifi: iwlwifi: mvm: assign link STA ID lookups during restart
When restarting the HW, mac80211 first adds the STA back with only one link enabled. This means that iwl_mvm_alloc_sta_after_restart will not see the other links and will not do the assignment. As such, do the assignment when mac80211 is activating the link for the station. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240320232419.4a3273e5c6be.I7cb6cf096ab135f4b489f2806b116563624aa5ee@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
committed by
Johannes Berg
parent
a0b9ecffc3
commit
8598826012
@@ -1117,10 +1117,21 @@ int iwl_mvm_mld_update_sta_links(struct iwl_mvm *mvm,
|
||||
}
|
||||
|
||||
if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) {
|
||||
if (WARN_ON(!mvm_sta->link[link_id])) {
|
||||
struct iwl_mvm_link_sta *mvm_link_sta =
|
||||
rcu_dereference_protected(mvm_sta->link[link_id],
|
||||
lockdep_is_held(&mvm->mutex));
|
||||
u32 sta_id;
|
||||
|
||||
if (WARN_ON(!mvm_link_sta)) {
|
||||
ret = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
sta_id = mvm_link_sta->sta_id;
|
||||
|
||||
rcu_assign_pointer(mvm->fw_id_to_mac_id[sta_id], sta);
|
||||
rcu_assign_pointer(mvm->fw_id_to_link_sta[sta_id],
|
||||
link_sta);
|
||||
} else {
|
||||
if (WARN_ON(mvm_sta->link[link_id])) {
|
||||
ret = -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user