wifi: iwlwifi: mvm: convert TID to FW value on queue remove
authorJohannes Berg <johannes.berg@intel.com>
Thu, 13 Apr 2023 07:44:05 +0000 (10:44 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 13 Apr 2023 14:29:59 +0000 (16:29 +0200)
On queue remove, we should convert the TID value to the
firmware value (8 -> 15) just like we do on queue add.
Otherwise, the firmware will not be able to find the
correct queue to remove.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230413102635.6651077eaec3.Ia6868c8fc1a92063609bb057b6a618726712d0bb@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
drivers/net/wireless/intel/iwlwifi/mvm/sta.c

index 78d4f186cd99355d28e7145b2afb521900039068..ad71233a229970a1aa7a6003f63b714ab3a3af09 100644 (file)
@@ -268,6 +268,9 @@ static int iwl_mvm_mld_disable_txq(struct iwl_mvm *mvm, int sta_id,
        int queue = *queueptr;
        int ret = 0;
 
+       if (tid == IWL_MAX_TID_COUNT)
+               tid = IWL_MGMT_TID;
+
        if (mvm->sta_remove_requires_queue_remove) {
                u32 cmd_id = WIDE_ID(DATA_PATH_GROUP,
                                     SCD_QUEUE_CONFIG_CMD);
index 50e224883af0a6801b26b637e0e87e818b82f39c..6b2690534f59417f6278a535f822691c657ec513 100644 (file)
@@ -356,10 +356,14 @@ static int iwl_mvm_disable_txq(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
                                             SCD_QUEUE_CONFIG_CMD);
                        struct iwl_scd_queue_cfg_cmd remove_cmd = {
                                .operation = cpu_to_le32(IWL_SCD_QUEUE_REMOVE),
-                               .u.remove.tid = cpu_to_le32(tid),
                                .u.remove.sta_mask = cpu_to_le32(BIT(sta_id)),
                        };
 
+                       if (tid == IWL_MAX_TID_COUNT)
+                               tid = IWL_MGMT_TID;
+
+                       remove_cmd.u.remove.tid = cpu_to_le32(tid);
+
                        ret = iwl_mvm_send_cmd_pdu(mvm, cmd_id, 0,
                                                   sizeof(remove_cmd),
                                                   &remove_cmd);