wifi: iwlwifi: mvm: take the mutex before running link selection
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 25 Aug 2024 16:17:07 +0000 (19:17 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 26 Aug 2024 15:39:17 +0000 (17:39 +0200)
commitcd6f46c2fdb82e80ca248549c1f3ebe08b4a63ab
tree0136972cb98f927e92a29f07b137a6310dac931a
parent916a5d9c5354c426220a0a6533a5e8ea1287d6ea
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: 2e194efa3809 ("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>
drivers/net/wireless/intel/iwlwifi/mvm/ops.c