linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: linux-wireless@vger.kernel.org
Cc: linville@tuxdriver.com
Subject: [PATCH 02/12] ath9k: split tid retry packets into a separate queue
Date: Mon,  5 Aug 2013 21:56:13 +0200	[thread overview]
Message-ID: <1375732583-39001-2-git-send-email-nbd@openwrt.org> (raw)
In-Reply-To: <1375732583-39001-1-git-send-email-nbd@openwrt.org>

Improves packet retry order and helps with further tx queueing
improvements.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
 drivers/net/wireless/ath/ath9k/ath9k.h |  1 +
 drivers/net/wireless/ath/ath9k/xmit.c  | 18 ++++++++++++++----
 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 ed8f8ef..919c8ee 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -241,6 +241,7 @@ struct ath_buf {
 struct ath_atx_tid {
 	struct list_head list;
 	struct sk_buff_head buf_q;
+	struct sk_buff_head retry_q;
 	struct ath_node *an;
 	struct ath_atx_ac *ac;
 	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 ccc146c..ac6bd50 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,
 
 static bool ath_tid_has_buffered(struct ath_atx_tid *tid)
 {
-	return !skb_queue_empty(&tid->buf_q);
+	return !skb_queue_empty(&tid->buf_q) || !skb_queue_empty(&tid->retry_q);
 }
 
 static struct sk_buff *ath_tid_dequeue(struct ath_atx_tid *tid)
 {
-	return __skb_dequeue(&tid->buf_q);
+	struct sk_buff *skb;
+
+	skb = __skb_dequeue(&tid->retry_q);
+	if (!skb)
+		skb = __skb_dequeue(&tid->buf_q);
+
+	return skb;
 }
 
 static 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,
 		if (an->sleeping)
 			ieee80211_sta_set_buffered(sta, tid->tidno, true);
 
-		skb_queue_splice(&bf_pending, &tid->buf_q);
+		skb_queue_splice_tail(&bf_pending, &tid->retry_q);
 		if (!an->sleeping) {
 			ath_tx_queue_tid(txq, tid);
 
@@ -833,7 +839,10 @@ ath_tx_get_tid_subframe(struct ath_softc *sc, struct ath_txq *txq,
 	u16 seqno;
 
 	while (1) {
-		*q = &tid->buf_q;
+		*q = &tid->retry_q;
+		if (skb_queue_empty(*q))
+			*q = &tid->buf_q;
+
 		skb = skb_peek(*q);
 		if (!skb)
 			break;
@@ -2636,6 +2645,7 @@ void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an)
 		tid->paused    = false;
 		tid->active	   = false;
 		__skb_queue_head_init(&tid->buf_q);
+		__skb_queue_head_init(&tid->retry_q);
 		acno = TID_TO_WME_AC(tidno);
 		tid->ac = &an->ac[acno];
 	}
-- 
1.8.0.2


  reply	other threads:[~2013-08-05 19:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05 19:56 [PATCH 01/12] ath9k: add utility functions for accessing tid queues Felix Fietkau
2013-08-05 19:56 ` Felix Fietkau [this message]
2013-08-05 19:56 ` [PATCH 03/12] ath9k: add function for getting the tx tid for a packet Felix Fietkau
2013-08-05 19:56 ` [PATCH 04/12] ath9k: add CAB queue info to debugfs Felix Fietkau
2013-08-05 19:56 ` [PATCH 05/12] ath9k: simplify ath_tx_form_aggr Felix Fietkau
2013-08-05 19:56 ` [PATCH 06/12] ath9k: fix block ack window tracking check Felix Fietkau
2013-08-05 19:56 ` [PATCH 07/12] ath9k: prepare queueing code for handling unaggregated traffic Felix Fietkau
2013-08-06  7:45   ` Sujith Manoharan
2013-08-06  9:47     ` Felix Fietkau
2013-08-06 16:32       ` Sujith Manoharan
2013-08-05 19:56 ` [PATCH 08/12] ath9k: fix clearing expired A-MPDU subframes in tx completion Felix Fietkau
2013-08-05 19:56 ` [PATCH 09/12] ath9k: always clear ps filter bit on new assoc Felix Fietkau
2013-08-06  7:55   ` Sujith Manoharan
2013-08-06  9:49     ` Felix Fietkau
2013-08-05 19:56 ` [PATCH 10/12] ath9k: use software queues for un-aggregated data packets Felix Fietkau
2013-08-06  8:44   ` Sujith Manoharan
2013-08-06  9:38     ` Felix Fietkau
2013-08-05 19:56 ` [PATCH 11/12] ath9k: improve tx scheduling fairness Felix Fietkau
2013-08-06  8:48   ` Sujith Manoharan
2013-08-06  9:53     ` Felix Fietkau
2013-08-05 19:56 ` [PATCH 12/12] ath9k: use software queueing for multicast traffic Felix Fietkau
2013-08-06  7:21 ` [PATCH 01/12] ath9k: add utility functions for accessing tid queues Sujith Manoharan
2013-08-06  9:40   ` Felix Fietkau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1375732583-39001-2-git-send-email-nbd@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).