Commit 262888fc authored by Luciano Coelho's avatar Luciano Coelho Committed by Emmanuel Grumbach

iwlwifi: mvm: treat scan races also on UMAC scans

For UMAC, we were not treating a race condition that happens in the
scan flows, because it was not using the same state flags.  Now that
UMAC and LMAC scans use the same state flags, we can also handle the
race conditions for UMAC.
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
Reviewed-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent 8d14ccd8
...@@ -2413,11 +2413,7 @@ static void iwl_mvm_mac_cancel_hw_scan(struct ieee80211_hw *hw, ...@@ -2413,11 +2413,7 @@ static void iwl_mvm_mac_cancel_hw_scan(struct ieee80211_hw *hw,
* cancel scan scan before ieee80211_scan_work() could run. * cancel scan scan before ieee80211_scan_work() could run.
* To handle that, simply return if the scan is not running. * To handle that, simply return if the scan is not running.
*/ */
/* FIXME: for now, we ignore this race for UMAC scans, since if (mvm->scan_status & IWL_MVM_SCAN_REGULAR)
* they don't set the scan_status.
*/
if ((mvm->scan_status & IWL_MVM_SCAN_REGULAR) ||
(mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_UMAC_SCAN))
iwl_mvm_scan_stop(mvm, IWL_MVM_SCAN_REGULAR, true); iwl_mvm_scan_stop(mvm, IWL_MVM_SCAN_REGULAR, true);
mutex_unlock(&mvm->mutex); mutex_unlock(&mvm->mutex);
...@@ -2767,11 +2763,7 @@ static int iwl_mvm_mac_sched_scan_stop(struct ieee80211_hw *hw, ...@@ -2767,11 +2763,7 @@ static int iwl_mvm_mac_sched_scan_stop(struct ieee80211_hw *hw,
* could run. To handle this, simply return if the scan is * could run. To handle this, simply return if the scan is
* not running. * not running.
*/ */
/* FIXME: for now, we ignore this race for UMAC scans, since if (!(mvm->scan_status & IWL_MVM_SCAN_SCHED)) {
* they don't set the scan_status.
*/
if (!(mvm->scan_status & IWL_MVM_SCAN_SCHED) &&
!(mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_UMAC_SCAN)) {
mutex_unlock(&mvm->mutex); mutex_unlock(&mvm->mutex);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment