iwlwifi: mvm: use shorter queues for mgmt and auxilary queues
authorSara Sharon <sara.sharon@intel.com>
Thu, 4 Jan 2018 12:06:07 +0000 (14:06 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 20 Apr 2018 07:57:16 +0000 (10:57 +0300)
In 22000 devices, aka gen2, the TFS is 256 bytes.
In order to save memory, use shorter TX queue for aux and
mgmt queues, since there isn't much traffic on them.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/api/txq.h
drivers/net/wireless/intel/iwlwifi/mvm/utils.c

index 1f45b2ce5295986675a7e45aff66033dc11a3bff..6ac240b6eacec1a1874b679c98b9686faed3940e 100644 (file)
@@ -132,6 +132,7 @@ enum iwl_tx_queue_cfg_actions {
 };
 
 #define IWL_DEFAULT_QUEUE_SIZE 256
+#define IWL_MGMT_QUEUE_SIZE 16
 /**
  * struct iwl_tx_queue_cfg_cmd - txq hw scheduler config command
  * @sta_id: station id
index 81c02d6e3d82c08b7292b84386bb42df6e043587..e597bc193e5c8c96245924a0f42b5a9f4988683c 100644 (file)
@@ -728,13 +728,14 @@ int iwl_mvm_tvqm_enable_txq(struct iwl_mvm *mvm, int mac80211_queue,
                .sta_id = sta_id,
                .tid = tid,
        };
-       int queue;
+       int queue, size = IWL_DEFAULT_QUEUE_SIZE;
 
-       if (cmd.tid == IWL_MAX_TID_COUNT)
+       if (cmd.tid == IWL_MAX_TID_COUNT) {
                cmd.tid = IWL_MGMT_TID;
+               size = IWL_MGMT_QUEUE_SIZE;
+       }
        queue = iwl_trans_txq_alloc(mvm->trans, (void *)&cmd,
-                                   SCD_QUEUE_CFG, IWL_DEFAULT_QUEUE_SIZE,
-                                   timeout);
+                                   SCD_QUEUE_CFG, size, timeout);
 
        if (queue < 0) {
                IWL_DEBUG_TX_QUEUES(mvm,