Skip to content

Commit 097129c

Browse files
lkaufman-heegrumbach
authored andcommitted
iwlwifi: mvm: move cmd queue to be #0 in dqa mode
Change the CMD queue to be queue #0 (rather than queue #9) when working in DQA mode. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
1 parent 0e0e442 commit 097129c

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ enum {
8989
/*
9090
* DQA queue numbers
9191
*
92+
* @IWL_MVM_DQA_CMD_QUEUE: a queue reserved for sending HCMDs to the FW
9293
* @IWL_MVM_DQA_GCAST_QUEUE: a queue reserved for P2P GO/SoftAP GCAST frames
9394
* @IWL_MVM_DQA_BSS_CLIENT_QUEUE: a queue reserved for BSS activity, to ensure
9495
* that we are never left without the possibility to connect to an AP.
@@ -103,6 +104,7 @@ enum {
103104
* @IWL_MVM_DQA_MAX_DATA_QUEUE: last TXQ in pool for DATA frames
104105
*/
105106
enum iwl_mvm_dqa_txq {
107+
IWL_MVM_DQA_CMD_QUEUE = 0,
106108
IWL_MVM_DQA_GCAST_QUEUE = 3,
107109
IWL_MVM_DQA_BSS_CLIENT_QUEUE = 4,
108110
IWL_MVM_DQA_MIN_MGMT_QUEUE = 5,

drivers/net/wireless/intel/iwlwifi/mvm/fw.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,10 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,
652652
*/
653653

654654
memset(&mvm->queue_info, 0, sizeof(mvm->queue_info));
655-
mvm->queue_info[IWL_MVM_CMD_QUEUE].hw_queue_refcount = 1;
655+
if (iwl_mvm_is_dqa_supported(mvm))
656+
mvm->queue_info[IWL_MVM_DQA_CMD_QUEUE].hw_queue_refcount = 1;
657+
else
658+
mvm->queue_info[IWL_MVM_CMD_QUEUE].hw_queue_refcount = 1;
656659

657660
for (i = 0; i < IEEE80211_MAX_QUEUES; i++)
658661
atomic_set(&mvm->mac80211_queue_stop_count[i], 0);

drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,14 @@ unsigned long iwl_mvm_get_used_hw_queues(struct iwl_mvm *mvm,
252252
.exclude_vif = exclude_vif,
253253
.used_hw_queues =
254254
BIT(IWL_MVM_OFFCHANNEL_QUEUE) |
255-
BIT(mvm->aux_queue) |
256-
BIT(IWL_MVM_CMD_QUEUE),
255+
BIT(mvm->aux_queue),
257256
};
258257

258+
if (iwl_mvm_is_dqa_supported(mvm))
259+
data.used_hw_queues |= BIT(IWL_MVM_DQA_CMD_QUEUE);
260+
else
261+
data.used_hw_queues |= BIT(IWL_MVM_CMD_QUEUE);
262+
259263
lockdep_assert_held(&mvm->mutex);
260264

261265
/* mark all VIF used hw queues */

drivers/net/wireless/intel/iwlwifi/mvm/ops.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,10 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
619619
trans_cfg.command_groups = iwl_mvm_groups;
620620
trans_cfg.command_groups_size = ARRAY_SIZE(iwl_mvm_groups);
621621

622-
trans_cfg.cmd_queue = IWL_MVM_CMD_QUEUE;
622+
if (iwl_mvm_is_dqa_supported(mvm))
623+
trans_cfg.cmd_queue = IWL_MVM_DQA_CMD_QUEUE;
624+
else
625+
trans_cfg.cmd_queue = IWL_MVM_CMD_QUEUE;
623626
trans_cfg.cmd_fifo = IWL_MVM_TX_FIFO_CMD;
624627
trans_cfg.scd_set_active = true;
625628

0 commit comments

Comments
 (0)