]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: iwlwifi: mvm: fix the TXF mapping for BZ devices
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 18 Feb 2024 17:51:50 +0000 (19:51 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 21 Feb 2024 13:42:00 +0000 (14:42 +0100)
Those devices' fifos are numbered differently.
Because of that, we were looking at the size of the VO fifo size to
determine the size of the A-MSDU which led to a lower throughput.

Note that for those devices the only user of the AC -> fifo mapping is
the size limitation of A-MSDU.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240218194912.da336ca2fa0a.I73e44d5fc474ebb6f275b9008950e59c012f33b2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/api/txq.h
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h

index 9c69d3674384609b8a7c376900e07a04441c24b0..e6c0f928a6bbf338ca240214635313c05c4e8751 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
 /*
- * Copyright (C) 2005-2014, 2019-2021, 2023 Intel Corporation
+ * Copyright (C) 2005-2014, 2019-2021, 2023-2024 Intel Corporation
  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
  * Copyright (C) 2016-2017 Intel Deutschland GmbH
  */
@@ -66,6 +66,16 @@ enum iwl_gen2_tx_fifo {
        IWL_GEN2_TRIG_TX_FIFO_VO,
 };
 
+enum iwl_bz_tx_fifo {
+       IWL_BZ_EDCA_TX_FIFO_BK,
+       IWL_BZ_EDCA_TX_FIFO_BE,
+       IWL_BZ_EDCA_TX_FIFO_VI,
+       IWL_BZ_EDCA_TX_FIFO_VO,
+       IWL_BZ_TRIG_TX_FIFO_BK,
+       IWL_BZ_TRIG_TX_FIFO_BE,
+       IWL_BZ_TRIG_TX_FIFO_VI,
+       IWL_BZ_TRIG_TX_FIFO_VO,
+};
 /**
  * enum iwl_tx_queue_cfg_actions - TXQ config options
  * @TX_QUEUE_CFG_ENABLE_QUEUE: enable a queue
index c4f96125cf33af0eb066c3950e6dba18d505c4f4..25a5a31e63c2a33a0fc0bbe7317f65df62b9e8de 100644 (file)
@@ -31,6 +31,17 @@ const u8 iwl_mvm_ac_to_gen2_tx_fifo[] = {
        IWL_GEN2_TRIG_TX_FIFO_BK,
 };
 
+const u8 iwl_mvm_ac_to_bz_tx_fifo[] = {
+       IWL_BZ_EDCA_TX_FIFO_VO,
+       IWL_BZ_EDCA_TX_FIFO_VI,
+       IWL_BZ_EDCA_TX_FIFO_BE,
+       IWL_BZ_EDCA_TX_FIFO_BK,
+       IWL_BZ_TRIG_TX_FIFO_VO,
+       IWL_BZ_TRIG_TX_FIFO_VI,
+       IWL_BZ_TRIG_TX_FIFO_BE,
+       IWL_BZ_TRIG_TX_FIFO_BK,
+};
+
 struct iwl_mvm_mac_iface_iterator_data {
        struct iwl_mvm *mvm;
        struct ieee80211_vif *vif;
index 40627961b834a2ee860445b4557cf19498f4e166..81dbef6947f5578dd50e12f157124fa48fcdb728 100644 (file)
@@ -1581,12 +1581,16 @@ static inline int iwl_mvm_max_active_links(struct iwl_mvm *mvm,
 
 extern const u8 iwl_mvm_ac_to_tx_fifo[];
 extern const u8 iwl_mvm_ac_to_gen2_tx_fifo[];
+extern const u8 iwl_mvm_ac_to_bz_tx_fifo[];
 
 static inline u8 iwl_mvm_mac_ac_to_tx_fifo(struct iwl_mvm *mvm,
                                           enum ieee80211_ac_numbers ac)
 {
-       return iwl_mvm_has_new_tx_api(mvm) ?
-               iwl_mvm_ac_to_gen2_tx_fifo[ac] : iwl_mvm_ac_to_tx_fifo[ac];
+       if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_BZ)
+               return iwl_mvm_ac_to_bz_tx_fifo[ac];
+       if (iwl_mvm_has_new_tx_api(mvm))
+               return iwl_mvm_ac_to_gen2_tx_fifo[ac];
+       return iwl_mvm_ac_to_tx_fifo[ac];
 }
 
 struct iwl_rate_info {