iwlwifi: mvm: support moving to mgmt tid
authorSara Sharon <sara.sharon@intel.com>
Tue, 13 Dec 2016 14:10:28 +0000 (16:10 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 19 Apr 2017 19:20:52 +0000 (22:20 +0300)
For a000 FW moved to 15 as management TID.
The change for us is fairly local - translate old TID to 15
when enabling and disabling a queue, and make sure to cover
it also on TX responses.

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

index 723402ee7be27242c6b42d52ac3a83149d91c98b..c87a58ee012a51a540e69897fd7aa8a26512db9b 100644 (file)
@@ -397,6 +397,7 @@ static inline void iwl_free_rxb(struct iwl_rx_cmd_buffer *r)
  */
 #define IWL_MAX_HW_QUEUES              32
 #define IWL_MAX_TID_COUNT      8
+#define IWL_MGMT_TID           15
 #define IWL_FRAME_LIMIT        64
 #define IWL_MAX_RX_HW_QUEUES   16
 
index 4d6683141c0386579a55bd2b607be6ba464a584b..4ba7ff44420da844a47a31818f86e61da1095abe 100644 (file)
@@ -1425,7 +1425,7 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
        if (!IS_ERR(sta)) {
                mvmsta = iwl_mvm_sta_from_mac80211(sta);
 
-               if (tid != IWL_TID_NON_QOS) {
+               if (tid != IWL_TID_NON_QOS && tid != IWL_MGMT_TID) {
                        struct iwl_mvm_tid_data *tid_data =
                                &mvmsta->tid_data[tid];
                        bool send_eosp_ndp = false;
@@ -1767,8 +1767,11 @@ void iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
                 * This will go together with SN and AddBA offload and cannot
                 * be handled properly for now.
                 */
-               WARN_ON(le16_to_cpu(ba_res->tfd_cnt) != 1);
-               iwl_mvm_tx_reclaim(mvm, sta_id, ba_res->ra_tid[0].tid,
+               WARN_ON(le16_to_cpu(ba_res->ra_tid_cnt) != 1);
+               tid = ba_res->ra_tid[0].tid;
+               if (tid == IWL_MGMT_TID)
+                       tid = IWL_MAX_TID_COUNT;
+               iwl_mvm_tx_reclaim(mvm, sta_id, tid,
                                   (int)ba_res->tfd[0].q_num,
                                   le16_to_cpu(ba_res->tfd[0].tfd_index),
                                   &ba_info, le32_to_cpu(ba_res->tx_rate));
index 74f62851f653202d267db6d27b0b766b05644bbd..70ec048ac15258c2e7df97b8ff88b10b41714788 100644 (file)
@@ -714,6 +714,8 @@ void iwl_mvm_enable_txq(struct iwl_mvm *mvm, int queue, int mac80211_queue,
                };
 
                if (iwl_mvm_has_new_tx_api(mvm)) {
+                       if (cmd.tid == IWL_MAX_TID_COUNT)
+                               cmd.tid = IWL_MGMT_TID;
                        iwl_trans_txq_alloc(mvm->trans, (void *)&cmd,
                                            SCD_QUEUE_CFG, wdg_timeout);
                        return;
@@ -810,6 +812,8 @@ int iwl_mvm_disable_txq(struct iwl_mvm *mvm, int queue, int mac80211_queue,
 
        if (iwl_mvm_has_new_tx_api(mvm)) {
                iwl_trans_txq_free(mvm->trans, queue);
+               if (cmd.tid == IWL_MAX_TID_COUNT)
+                       cmd.tid = IWL_MGMT_TID;
                ret = iwl_mvm_send_cmd_pdu(mvm, SCD_QUEUE_CFG, flags,
                                           sizeof(cmd), &cmd);
        } else {