summaryrefslogtreecommitdiff
path: root/package/kernel/mac80211/patches/562-ath9k_get_skb_tid.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-07-20 16:37:50 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-07-20 16:37:50 +0000
commita0129dfd8e0d3de96155a40767f9853079957a6b (patch)
treec16a596355cedebf2d7262015c6ccdcba970257c /package/kernel/mac80211/patches/562-ath9k_get_skb_tid.patch
parent85e585ddcef9bccc717e500e0f7672675ef7269a (diff)
downloadmtk-20170518-a0129dfd8e0d3de96155a40767f9853079957a6b.zip
mtk-20170518-a0129dfd8e0d3de96155a40767f9853079957a6b.tar.gz
mtk-20170518-a0129dfd8e0d3de96155a40767f9853079957a6b.tar.bz2
ath9k: add initial tx queueing rework patches
This forces all packets (even for un-aggregated traffic) through software queues to improve fairness and stability Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 37483
Diffstat (limited to 'package/kernel/mac80211/patches/562-ath9k_get_skb_tid.patch')
-rw-r--r--package/kernel/mac80211/patches/562-ath9k_get_skb_tid.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/562-ath9k_get_skb_tid.patch b/package/kernel/mac80211/patches/562-ath9k_get_skb_tid.patch
new file mode 100644
index 0000000..a8d2cba
--- /dev/null
+++ b/package/kernel/mac80211/patches/562-ath9k_get_skb_tid.patch
@@ -0,0 +1,69 @@
+--- a/drivers/net/wireless/ath/ath9k/xmit.c
++++ b/drivers/net/wireless/ath/ath9k/xmit.c
+@@ -168,6 +168,20 @@ static void ath_txq_skb_done(struct ath_
+ }
+ }
+
++static struct ath_atx_tid *
++ath_get_skb_tid(struct ath_softc *sc, struct ath_node *an, struct sk_buff *skb)
++{
++ struct ieee80211_hdr *hdr;
++ u8 tidno = 0;
++
++ hdr = (struct ieee80211_hdr *) skb->data;
++ if (ieee80211_is_data_qos(hdr->frame_control))
++ tidno = ieee80211_get_qos_ctl(hdr)[0];
++
++ tidno &= IEEE80211_QOS_CTL_TID_MASK;
++ return ATH_AN_2_TID(an, tidno);
++}
++
+ static bool ath_tid_has_buffered(struct ath_atx_tid *tid)
+ {
+ return !skb_queue_empty(&tid->buf_q) || !skb_queue_empty(&tid->retry_q);
+@@ -419,7 +433,6 @@ static void ath_tx_complete_aggr(struct
+ struct ieee80211_tx_rate rates[4];
+ struct ath_frame_info *fi;
+ int nframes;
+- u8 tidno;
+ bool flush = !!(ts->ts_status & ATH9K_TX_FLUSH);
+ int i, retries;
+ int bar_index = -1;
+@@ -456,8 +469,7 @@ static void ath_tx_complete_aggr(struct
+ }
+
+ an = (struct ath_node *)sta->drv_priv;
+- tidno = ieee80211_get_qos_ctl(hdr)[0] & IEEE80211_QOS_CTL_TID_MASK;
+- tid = ATH_AN_2_TID(an, tidno);
++ tid = ath_get_skb_tid(sc, an, skb);
+ seq_first = tid->seq_start;
+ isba = ts->ts_flags & ATH9K_TX_BA;
+
+@@ -469,7 +481,7 @@ static void ath_tx_complete_aggr(struct
+ * Only BlockAcks have a TID and therefore normal Acks cannot be
+ * checked
+ */
+- if (isba && tidno != ts->tid)
++ if (isba && tid->tidno != ts->tid)
+ txok = false;
+
+ isaggr = bf_isaggr(bf);
+@@ -2088,7 +2100,6 @@ int ath_tx_start(struct ieee80211_hw *hw
+ struct ath_txq *txq = txctl->txq;
+ struct ath_atx_tid *tid = NULL;
+ struct ath_buf *bf;
+- u8 tidno;
+ int q;
+ int ret;
+
+@@ -2119,9 +2130,7 @@ int ath_tx_start(struct ieee80211_hw *hw
+ }
+
+ if (txctl->an && ieee80211_is_data_qos(hdr->frame_control)) {
+- tidno = ieee80211_get_qos_ctl(hdr)[0] &
+- IEEE80211_QOS_CTL_TID_MASK;
+- tid = ATH_AN_2_TID(txctl->an, tidno);
++ tid = ath_get_skb_tid(sc, txctl->an, skb);
+
+ WARN_ON(tid->ac->txq != txctl->txq);
+ }