Skip to content

Commit cd6f46c

Browse files
egrumbachjmberg-intel
authored andcommitted
wifi: iwlwifi: mvm: take the mutex before running link selection
iwl_mvm_select_links is called by the link selection worker and it requires the mutex. Take it in the link selection worker. This logic used to run from iwl_mvm_rx_umac_scan_complete_notif which had the mvm->mutex held. This was changed to run in a worker holding the wiphy mutex, but we also need the mvm->mutex. Fixes: 2e194ef ("wifi: iwlwifi: mvm: Fix race in scan completion") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20240825191257.0cacecd5db1e.Iaca38a078592b69bdd06549daf63408ccf1810e4@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 916a5d9 commit cd6f46c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • drivers/net/wireless/intel/iwlwifi/mvm

drivers/net/wireless/intel/iwlwifi/mvm/ops.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,10 +1198,12 @@ static void iwl_mvm_trig_link_selection(struct wiphy *wiphy,
11981198
struct iwl_mvm *mvm =
11991199
container_of(wk, struct iwl_mvm, trig_link_selection_wk);
12001200

1201+
mutex_lock(&mvm->mutex);
12011202
ieee80211_iterate_active_interfaces(mvm->hw,
12021203
IEEE80211_IFACE_ITER_NORMAL,
12031204
iwl_mvm_find_link_selection_vif,
12041205
NULL);
1206+
mutex_unlock(&mvm->mutex);
12051207
}
12061208

12071209
static struct iwl_op_mode *

0 commit comments

Comments
 (0)