aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-08-06 08:18:03 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-08-09 15:58:02 -0400
commitbb195ff61f2e205886ec246465f0809e5c6cd52f (patch)
tree37c62dd0986a35531352281ad16af7cd4afce894 /drivers/net/wireless/ath/ath9k
parenta7586ee441d50f0379a202d45d8fd0a7952cc918 (diff)
ath9k: split tid retry packets into a separate queue
Improves packet retry order and helps with further tx queueing improvements. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c18
2 files changed, 15 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index c497d529ce86..2ce79c1e94bf 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -241,6 +241,7 @@ struct ath_buf {
241struct ath_atx_tid { 241struct ath_atx_tid {
242 struct list_head list; 242 struct list_head list;
243 struct sk_buff_head buf_q; 243 struct sk_buff_head buf_q;
244 struct sk_buff_head retry_q;
244 struct ath_node *an; 245 struct ath_node *an;
245 struct ath_atx_ac *ac; 246 struct ath_atx_ac *ac;
246 unsigned long tx_buf[BITS_TO_LONGS(ATH_TID_MAX_BUFS)]; 247 unsigned long tx_buf[BITS_TO_LONGS(ATH_TID_MAX_BUFS)];
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index eaa9eaf91ee7..c2b6cf0de903 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -170,12 +170,18 @@ static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq,
170 170
171static bool ath_tid_has_buffered(struct ath_atx_tid *tid) 171static bool ath_tid_has_buffered(struct ath_atx_tid *tid)
172{ 172{
173 return !skb_queue_empty(&tid->buf_q); 173 return !skb_queue_empty(&tid->buf_q) || !skb_queue_empty(&tid->retry_q);
174} 174}
175 175
176static struct sk_buff *ath_tid_dequeue(struct ath_atx_tid *tid) 176static struct sk_buff *ath_tid_dequeue(struct ath_atx_tid *tid)
177{ 177{
178 return __skb_dequeue(&tid->buf_q); 178 struct sk_buff *skb;
179
180 skb = __skb_dequeue(&tid->retry_q);
181 if (!skb)
182 skb = __skb_dequeue(&tid->buf_q);
183
184 return skb;
179} 185}
180 186
181static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid) 187static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
@@ -593,7 +599,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
593 if (an->sleeping) 599 if (an->sleeping)
594 ieee80211_sta_set_buffered(sta, tid->tidno, true); 600 ieee80211_sta_set_buffered(sta, tid->tidno, true);
595 601
596 skb_queue_splice(&bf_pending, &tid->buf_q); 602 skb_queue_splice_tail(&bf_pending, &tid->retry_q);
597 if (!an->sleeping) { 603 if (!an->sleeping) {
598 ath_tx_queue_tid(txq, tid); 604 ath_tx_queue_tid(txq, tid);
599 605
@@ -833,7 +839,10 @@ ath_tx_get_tid_subframe(struct ath_softc *sc, struct ath_txq *txq,
833 u16 seqno; 839 u16 seqno;
834 840
835 while (1) { 841 while (1) {
836 *q = &tid->buf_q; 842 *q = &tid->retry_q;
843 if (skb_queue_empty(*q))
844 *q = &tid->buf_q;
845
837 skb = skb_peek(*q); 846 skb = skb_peek(*q);
838 if (!skb) 847 if (!skb)
839 break; 848 break;
@@ -2636,6 +2645,7 @@ void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an)
2636 tid->paused = false; 2645 tid->paused = false;
2637 tid->active = false; 2646 tid->active = false;
2638 __skb_queue_head_init(&tid->buf_q); 2647 __skb_queue_head_init(&tid->buf_q);
2648 __skb_queue_head_init(&tid->retry_q);
2639 acno = TID_TO_WME_AC(tidno); 2649 acno = TID_TO_WME_AC(tidno);
2640 tid->ac = &an->ac[acno]; 2650 tid->ac = &an->ac[acno];
2641 } 2651 }