Skip to content

Commit edbe961

Browse files
lkaufman-helucacoelho
authored andcommitted
iwlwifi: mvm: keep track of tid associated with each queue
When sending the SCD_QUEUE_CONFIG command, the queue is associated to a specific TID. If later there is a need to use this TID on a different queue instead, it first needs to be unassociated from the first queue. Keep track for every queue what TID is associated with it. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
1 parent 9f9af3d commit edbe961

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/mvm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@ struct iwl_mvm {
772772
u8 ra_sta_id; /* The RA this queue is mapped to, if exists */
773773
bool reserved; /* Is this the TXQ reserved for a STA */
774774
u8 mac80211_ac; /* The mac80211 AC this queue is mapped to */
775+
u8 txq_tid; /* The TID "owner" of this queue*/
775776
u16 tid_bitmap; /* Bitmap of the TIDs mapped to this queue */
776777
/* Timestamp for inactivation per TID of this queue */
777778
unsigned long last_frame_time[IWL_MAX_TID_COUNT + 1];

drivers/net/wireless/intel/iwlwifi/mvm/sta.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,7 @@ int iwl_mvm_scd_queue_redirect(struct iwl_mvm *mvm, int queue, int tid,
562562

563563
cmd.sta_id = mvm->queue_info[queue].ra_sta_id;
564564
cmd.tx_fifo = iwl_mvm_ac_to_tx_fifo[mvm->queue_info[queue].mac80211_ac];
565+
cmd.tid = mvm->queue_info[queue].txq_tid;
565566
mq = mvm->queue_info[queue].hw_queue_to_mac80211;
566567
shared_queue = (mvm->queue_info[queue].hw_queue_refcount > 1);
567568
spin_unlock_bh(&mvm->queue_info_lock);
@@ -591,6 +592,11 @@ int iwl_mvm_scd_queue_redirect(struct iwl_mvm *mvm, int queue, int tid,
591592
cmd.sta_id, tid, LINK_QUAL_AGG_FRAME_LIMIT_DEF,
592593
ssn, wdg_timeout);
593594

595+
/* Update the TID "owner" of the queue */
596+
spin_lock_bh(&mvm->queue_info_lock);
597+
mvm->queue_info[queue].txq_tid = tid;
598+
spin_unlock_bh(&mvm->queue_info_lock);
599+
594600
/* TODO: Work-around SCD bug when moving back by multiples of 0x40 */
595601

596602
/* Redirect to lower AC */
@@ -749,6 +755,7 @@ static int iwl_mvm_sta_alloc_queue(struct iwl_mvm *mvm,
749755
ac = mvm->queue_info[queue].mac80211_ac;
750756
cmd.sta_id = mvm->queue_info[queue].ra_sta_id;
751757
cmd.tx_fifo = iwl_mvm_ac_to_tx_fifo[ac];
758+
cmd.tid = mvm->queue_info[queue].txq_tid;
752759
spin_unlock_bh(&mvm->queue_info_lock);
753760

754761
/* Disable the queue */

drivers/net/wireless/intel/iwlwifi/mvm/utils.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,8 @@ void iwl_mvm_enable_txq(struct iwl_mvm *mvm, int queue, int mac80211_queue,
669669
tid_to_mac80211_ac[cfg->tid];
670670
else
671671
mvm->queue_info[queue].mac80211_ac = IEEE80211_AC_VO;
672+
673+
mvm->queue_info[queue].txq_tid = cfg->tid;
672674
}
673675

674676
IWL_DEBUG_TX_QUEUES(mvm,
@@ -761,6 +763,7 @@ void iwl_mvm_disable_txq(struct iwl_mvm *mvm, int queue, int mac80211_queue,
761763
}
762764

763765
cmd.sta_id = mvm->queue_info[queue].ra_sta_id;
766+
cmd.tid = mvm->queue_info[queue].txq_tid;
764767

765768
/* Make sure queue info is correct even though we overwrite it */
766769
WARN(mvm->queue_info[queue].hw_queue_refcount ||

0 commit comments

Comments
 (0)