summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach2015-11-24 13:55:18 +0100
committerEmmanuel Grumbach2015-12-13 07:52:53 +0100
commit156f92f2b4711a0e8478c596557a1bd5ca69b02d (patch)
tree47e6d2c91a114abb36459a800733557e2bba65e3 /drivers/net/wireless/intel/iwlwifi/mvm/ops.c
parentiwlwifi: trans: support a callback for ASYNC commands (diff)
downloadkernel-qcow2-linux-156f92f2b4711a0e8478c596557a1bd5ca69b02d.tar.gz
kernel-qcow2-linux-156f92f2b4711a0e8478c596557a1bd5ca69b02d.tar.xz
kernel-qcow2-linux-156f92f2b4711a0e8478c596557a1bd5ca69b02d.zip
iwlwifi: block the queues when we send ADD_STA for uAPSD
We send an ADD_STA to instruct the firmware to release frames despite the peer being in PS. Since the ADD_STA command and the Tx frame that comes immediately afterwards can be reordered by the DMA engine, we need to block the Tx queues until the firmware replies with the ADD_STA response. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/ops.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/ops.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index b71c85b244a0..4e417fd9beb6 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -839,6 +839,18 @@ static void iwl_mvm_stop_sw_queue(struct iwl_op_mode *op_mode, int queue)
}
}
+static void iwl_mvm_async_cb(struct iwl_op_mode *op_mode,
+ const struct iwl_device_cmd *cmd)
+{
+ struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
+
+ /*
+ * For now, we only set the CMD_WANT_ASYNC_CALLBACK for ADD_STA
+ * commands that need to block the Tx queues.
+ */
+ iwl_trans_block_txq_ptrs(mvm->trans, false);
+}
+
static void iwl_mvm_wake_sw_queue(struct iwl_op_mode *op_mode, int queue)
{
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
@@ -1414,6 +1426,7 @@ int iwl_mvm_exit_d0i3(struct iwl_op_mode *op_mode)
#define IWL_MVM_COMMON_OPS \
/* these could be differentiated */ \
+ .async_cb = iwl_mvm_async_cb, \
.queue_full = iwl_mvm_stop_sw_queue, \
.queue_not_full = iwl_mvm_wake_sw_queue, \
.hw_rf_kill = iwl_mvm_set_hw_rfkill_state, \