diff options
author | Luca Coelho | 2015-10-02 17:13:10 +0200 |
---|---|---|
committer | Emmanuel Grumbach | 2015-11-26 15:38:52 +0100 |
commit | eb3908d3718455e9fcb0d52b391a2851900d7e27 (patch) | |
tree | 0338a286e41eba6c6faf91dff979978252d0800d /drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | |
parent | iwlwifi: dump prph registers in a common place for all transports (diff) | |
download | kernel-qcow2-linux-eb3908d3718455e9fcb0d52b391a2851900d7e27.tar.gz kernel-qcow2-linux-eb3908d3718455e9fcb0d52b391a2851900d7e27.tar.xz kernel-qcow2-linux-eb3908d3718455e9fcb0d52b391a2851900d7e27.zip |
iwlwifi: mvm: flush all used TX queues before suspending
There is a potential race condition when entering suspend with d0i3 in
PCIe. If there is a frame queued just before we suspend, it won't
complete and we will never clear the queue stuck timer. To solve
this, call TX_PATH_FLUSH to flush all queues (except the command
queue) as part of the d0i3 entry process. Add a new function that
returns all the flushable queues.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/mvm.h')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index f28e0501c5e5..91c7480c6919 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -1380,6 +1380,15 @@ void iwl_mvm_disable_txq(struct iwl_mvm *mvm, int queue, int mac80211_queue, u8 tid, u8 flags); int iwl_mvm_find_free_queue(struct iwl_mvm *mvm, u8 minq, u8 maxq); +/* Return a bitmask with all the hw supported queues, except for the + * command queue, which can't be flushed. + */ +static inline u32 iwl_mvm_flushable_queues(struct iwl_mvm *mvm) +{ + return ((BIT(mvm->cfg->base_params->num_of_queues) - 1) & + ~BIT(IWL_MVM_CMD_QUEUE)); +} + static inline void iwl_mvm_enable_ac_txq(struct iwl_mvm *mvm, int queue, int mac80211_queue, u8 fifo, u16 ssn, unsigned int wdg_timeout) |