aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorShanyu Zhao <shanyu.zhao@intel.com>2010-04-14 18:35:14 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-04-30 18:34:31 -0400
commitc2845d010b0e58a17cd2301e657b614962331550 (patch)
tree5de6bdcc3a716e92143e0902de95d3073885f122 /drivers
parentcd398c313785cb5f2b8cb2c85e865f06419b1730 (diff)
iwlwifi: set correct AC to swq_id for aggregation
When starting an aggregation session, the swq_id is generated in function iwl_virtual_agg_queue_num() where the first parameter is supposed to be the Access Class, but it used the tx fifo ID instead. This means the AC value stored in swq_id is incorrect. To test this, look at the tx_queue file in debugfs while transmitting Best Effort flow (ac=2), it shows: hwq 10: read=0 write=0 stop=0 swq_id=0xa9 (ac 1/hwq 10) After this fix, it will show: hwq 10: read=0 write=0 stop=0 swq_id=0xaa (ac 2/hwq 10) Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 11661fa28f21..95e263f1d117 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -83,6 +83,15 @@ static inline int get_fifo_from_ac(u8 ac)
83 return ac_to_fifo[ac]; 83 return ac_to_fifo[ac];
84} 84}
85 85
86static inline int get_ac_from_tid(u16 tid)
87{
88 if (likely(tid < ARRAY_SIZE(tid_to_ac)))
89 return tid_to_ac[tid];
90
91 /* no support for TIDs 8-15 yet */
92 return -EINVAL;
93}
94
86static inline int get_fifo_from_tid(u16 tid) 95static inline int get_fifo_from_tid(u16 tid)
87{ 96{
88 if (likely(tid < ARRAY_SIZE(tid_to_ac))) 97 if (likely(tid < ARRAY_SIZE(tid_to_ac)))
@@ -991,7 +1000,7 @@ int iwlagn_tx_agg_start(struct iwl_priv *priv, const u8 *ra, u16 tid, u16 *ssn)
991 tid_data = &priv->stations[sta_id].tid[tid]; 1000 tid_data = &priv->stations[sta_id].tid[tid];
992 *ssn = SEQ_TO_SN(tid_data->seq_number); 1001 *ssn = SEQ_TO_SN(tid_data->seq_number);
993 tid_data->agg.txq_id = txq_id; 1002 tid_data->agg.txq_id = txq_id;
994 priv->txq[txq_id].swq_id = iwl_virtual_agg_queue_num(tx_fifo, txq_id); 1003 priv->txq[txq_id].swq_id = iwl_virtual_agg_queue_num(get_ac_from_tid(tid), txq_id);
995 spin_unlock_irqrestore(&priv->sta_lock, flags); 1004 spin_unlock_irqrestore(&priv->sta_lock, flags);
996 1005
997 ret = priv->cfg->ops->lib->txq_agg_enable(priv, txq_id, tx_fifo, 1006 ret = priv->cfg->ops->lib->txq_agg_enable(priv, txq_id, tx_fifo,