diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2017-10-24 22:04:15 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-11-03 11:56:09 +0200 |
commit | 309c4848c0481f71f4cb20290e6f5bded1e54131 (patch) | |
tree | f841381cc8085435f926f1209075897f254bc898 /drivers/net/wireless/intel/iwlwifi | |
parent | 06195639c66d80d21146d0e982f7fc94406ed331 (diff) |
iwlwifi: mvm: hold mutex when flushing in iwl_mvm_flush_no_vif()
The iwl_mvm_flush_tx_path() function sends a synchronous command to
the firmware. When doing that, we must hold the mutex. The
iwl_mvm_flush_no_vif() function was mistakenly not holding the mutex.
Fix it.
Fixes: 6110d9e5bdd1 ("iwlwifi: mvm: Flush non STA TX queues")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index ae2eb0c8cbeb..3e92a117c0b8 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -4005,11 +4005,14 @@ static void iwl_mvm_flush_no_vif(struct iwl_mvm *mvm, u32 queues, bool drop) int i; if (!iwl_mvm_has_new_tx_api(mvm)) { - if (drop) + if (drop) { + mutex_lock(&mvm->mutex); iwl_mvm_flush_tx_path(mvm, iwl_mvm_flushable_queues(mvm) & queues, 0); - else + mutex_unlock(&mvm->mutex); + } else { iwl_trans_wait_tx_queues_empty(mvm->trans, queues); + } return; } |