]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
iwlwifi: remove command ID argument from queue allocation
authorJohannes Berg <johannes.berg@intel.com>
Thu, 10 Feb 2022 16:22:25 +0000 (18:22 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 18 Feb 2022 08:40:54 +0000 (10:40 +0200)
The command ID here is always hard-coded to the same, so we
can remove it. In the future we actually need to make this
configurable, but that doesn't need to be on each call, it
can be done through the transport configuration.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220210181930.8b352828f767.Ice4c91d8ea3e207914104e72801b87cd7f409ba7@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-trans.h
drivers/net/wireless/intel/iwlwifi/mvm/sta.c
drivers/net/wireless/intel/iwlwifi/queue/tx.c
drivers/net/wireless/intel/iwlwifi/queue/tx.h

index 6a4d3eafdc19fea636601ab4360b1a2af95cd7e4..50342bf0a5d7d84915eef48f9f8cb8f9148a7f8c 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
 /*
- * Copyright (C) 2005-2014, 2018-2021 Intel Corporation
+ * Copyright (C) 2005-2014, 2018-2022 Intel Corporation
  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  * Copyright (C) 2016-2017 Intel Deutschland GmbH
  */
@@ -571,8 +571,7 @@ struct iwl_trans_ops {
        /* 22000 functions */
        int (*txq_alloc)(struct iwl_trans *trans,
                         __le16 flags, u8 sta_id, u8 tid,
-                        int cmd_id, int size,
-                        unsigned int queue_wdg_timeout);
+                        int size, unsigned int queue_wdg_timeout);
        void (*txq_free)(struct iwl_trans *trans, int queue);
        int (*rxq_dma_data)(struct iwl_trans *trans, int queue,
                            struct iwl_trans_rxq_dma_data *data);
@@ -1246,8 +1245,7 @@ iwl_trans_txq_free(struct iwl_trans *trans, int queue)
 static inline int
 iwl_trans_txq_alloc(struct iwl_trans *trans,
                    __le16 flags, u8 sta_id, u8 tid,
-                   int cmd_id, int size,
-                   unsigned int wdg_timeout)
+                   int size, unsigned int wdg_timeout)
 {
        might_sleep();
 
@@ -1260,7 +1258,7 @@ iwl_trans_txq_alloc(struct iwl_trans *trans,
        }
 
        return trans->ops->txq_alloc(trans, flags, sta_id, tid,
-                                    cmd_id, size, wdg_timeout);
+                                    size, wdg_timeout);
 }
 
 static inline void iwl_trans_txq_set_shared_mode(struct iwl_trans *trans,
index 36d97cc72d65008f18602803aa5da2bbaf8ba922..adc092c4e3b1793617c0bb321ff283bcd6c4fd2e 100644 (file)
@@ -784,9 +784,8 @@ static int iwl_mvm_tvqm_enable_txq(struct iwl_mvm *mvm,
        do {
                __le16 enable = cpu_to_le16(TX_QUEUE_CFG_ENABLE_QUEUE);
 
-               queue = iwl_trans_txq_alloc(mvm->trans, enable,
-                                           sta_id, tid, SCD_QUEUE_CFG,
-                                           size, timeout);
+               queue = iwl_trans_txq_alloc(mvm->trans, enable, sta_id,
+                                           tid, size, timeout);
 
                if (queue < 0)
                        IWL_DEBUG_TX_QUEUES(mvm,
index 49625c679a5afcb0ddf6619d9342872fa6b00817..047092ea34fbe65e5dacca2205c6d51ecbb03768 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "iwl-debug.h"
 #include "iwl-io.h"
+#include "fw/api/commands.h"
 #include "fw/api/tx.h"
 #include "queue/tx.h"
 #include "iwl-fh.h"
@@ -1185,7 +1186,7 @@ error_free_resp:
 }
 
 int iwl_txq_dyn_alloc(struct iwl_trans *trans, __le16 flags, u8 sta_id, u8 tid,
-                     int cmd_id, int size, unsigned int timeout)
+                     int size, unsigned int timeout)
 {
        struct iwl_txq *txq;
        struct iwl_tx_queue_cfg_cmd cmd = {
@@ -1194,7 +1195,7 @@ int iwl_txq_dyn_alloc(struct iwl_trans *trans, __le16 flags, u8 sta_id, u8 tid,
                .tid = tid,
        };
        struct iwl_host_cmd hcmd = {
-               .id = cmd_id,
+               .id = SCD_QUEUE_CFG,
                .len = { sizeof(cmd) },
                .data = { &cmd, },
                .flags = CMD_WANT_SKB,
index 7db675b89f8d53c6252632d06688874c9716f53e..726dd001e65b644641b0f7b2dbb47deecbe5bc77 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
 /*
- * Copyright (C) 2020-2021 Intel Corporation
+ * Copyright (C) 2020-2022 Intel Corporation
  */
 #ifndef __iwl_trans_queue_tx_h__
 #define __iwl_trans_queue_tx_h__
@@ -114,8 +114,7 @@ void iwl_txq_gen2_tfd_unmap(struct iwl_trans *trans,
 
 int iwl_txq_dyn_alloc(struct iwl_trans *trans,
                      __le16 flags, u8 sta_id, u8 tid,
-                     int cmd_id, int size,
-                     unsigned int timeout);
+                     int size, unsigned int timeout);
 
 int iwl_txq_gen2_tx(struct iwl_trans *trans, struct sk_buff *skb,
                    struct iwl_device_tx_cmd *dev_cmd, int txq_id);