aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/313-ath9k-fix-block-ack-window-tracking-issues.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-02-24 11:57:27 +0100
committerFelix Fietkau <nbd@nbd.name>2017-02-24 12:22:29 +0100
commit703515f889124248480f39d65f8704548cbf1c09 (patch)
treecd06f11ec2cc4e6ddb75c8982ecaab9882d3a9ed /package/kernel/mac80211/patches/313-ath9k-fix-block-ack-window-tracking-issues.patch
parentd27dd6298b0f9a66199758b32ce19c0932ef2ee0 (diff)
downloadupstream-703515f889124248480f39d65f8704548cbf1c09.tar.gz
upstream-703515f889124248480f39d65f8704548cbf1c09.tar.bz2
upstream-703515f889124248480f39d65f8704548cbf1c09.zip
mac80211: sync with master branch as of 9edff13abd97
Includes the following changes: 9edff13abd mac80211: disable potentially harmful PS software retry for A-MPDU sessions 75216a76b0 mac80211: backport upstream fix for CSA in IBSS mode 368cc8ef47 mac80211: update brcmfmac backporting brcmf_err cleanups 66a63d25c4 mac80211: fix build on linux 3.18 9eacb9d7fc rt2x00: mt7620: lots of improvements fd94fa61a7 mac80211: brcmfmac: update Raspberry Pi patches for linux 4.9 649e766a64 mac80211: update to wireless-testing 2017-01-31 47540afa5d ath9k: add a warning to the tx99 config option b367eef21d mac80211: rt2x00: add support for external LNA on MT7620 9200e168f2 mac80211: move (& update) upstream accepted brcmfmac patches Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/313-ath9k-fix-block-ack-window-tracking-issues.patch')
-rw-r--r--package/kernel/mac80211/patches/313-ath9k-fix-block-ack-window-tracking-issues.patch114
1 files changed, 114 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/313-ath9k-fix-block-ack-window-tracking-issues.patch b/package/kernel/mac80211/patches/313-ath9k-fix-block-ack-window-tracking-issues.patch
new file mode 100644
index 0000000000..fb8df08afe
--- /dev/null
+++ b/package/kernel/mac80211/patches/313-ath9k-fix-block-ack-window-tracking-issues.patch
@@ -0,0 +1,114 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Tue, 30 Aug 2016 12:44:08 +0200
+Subject: [PATCH] ath9k: fix block-ack window tracking issues
+
+Ensure that a buffer gets tracked as part of the block-ack window as
+soon as it's dequeued from the tid for the first time. Ensure that
+double calls to ath_tx_addto_baw (e.g. on retransmission) don't cause
+any issues.
+
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/drivers/net/wireless/ath/ath9k/xmit.c
++++ b/drivers/net/wireless/ath/ath9k/xmit.c
+@@ -62,7 +62,7 @@ static void ath_tx_rc_status(struct ath_
+ struct ath_tx_status *ts, int nframes, int nbad,
+ int txok);
+ static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
+- int seqno);
++ struct ath_buf *bf);
+ static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc,
+ struct ath_txq *txq,
+ struct ath_atx_tid *tid,
+@@ -311,7 +311,7 @@ static void ath_tx_flush_tid(struct ath_
+ }
+
+ if (fi->baw_tracked) {
+- ath_tx_update_baw(sc, tid, bf->bf_state.seqno);
++ ath_tx_update_baw(sc, tid, bf);
+ sendbar = true;
+ }
+
+@@ -327,10 +327,15 @@ static void ath_tx_flush_tid(struct ath_
+ }
+
+ static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
+- int seqno)
++ struct ath_buf *bf)
+ {
++ struct ath_frame_info *fi = get_frame_info(bf->bf_mpdu);
++ u16 seqno = bf->bf_state.seqno;
+ int index, cindex;
+
++ if (!fi->baw_tracked)
++ return;
++
+ index = ATH_BA_INDEX(tid->seq_start, seqno);
+ cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
+
+@@ -351,6 +356,9 @@ static void ath_tx_addto_baw(struct ath_
+ u16 seqno = bf->bf_state.seqno;
+ int index, cindex;
+
++ if (fi->baw_tracked)
++ return;
++
+ index = ATH_BA_INDEX(tid->seq_start, seqno);
+ cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
+ __set_bit(cindex, tid->tx_buf);
+@@ -627,7 +635,7 @@ static void ath_tx_complete_aggr(struct
+ * complete the acked-ones/xretried ones; update
+ * block-ack window
+ */
+- ath_tx_update_baw(sc, tid, seqno);
++ ath_tx_update_baw(sc, tid, bf);
+
+ if (rc_update && (acked_cnt == 1 || txfail_cnt == 1)) {
+ memcpy(tx_info->control.rates, rates, sizeof(rates));
+@@ -657,7 +665,7 @@ static void ath_tx_complete_aggr(struct
+ * run out of tx buf.
+ */
+ if (!tbf) {
+- ath_tx_update_baw(sc, tid, seqno);
++ ath_tx_update_baw(sc, tid, bf);
+
+ ath_tx_complete_buf(sc, bf, txq,
+ &bf_head, NULL, ts,
+@@ -1046,11 +1054,14 @@ ath_tx_get_tid_subframe(struct ath_softc
+
+ INIT_LIST_HEAD(&bf_head);
+ list_add(&bf->list, &bf_head);
+- ath_tx_update_baw(sc, tid, seqno);
++ ath_tx_update_baw(sc, tid, bf);
+ ath_tx_complete_buf(sc, bf, txq, &bf_head, NULL, &ts, 0);
+ continue;
+ }
+
++ if (bf_isampdu(bf))
++ ath_tx_addto_baw(sc, tid, bf);
++
+ return bf;
+ }
+
+@@ -1108,8 +1119,6 @@ ath_tx_form_aggr(struct ath_softc *sc, s
+ bf->bf_next = NULL;
+
+ /* link buffers of this frame to the aggregate */
+- if (!fi->baw_tracked)
+- ath_tx_addto_baw(sc, tid, bf);
+ bf->bf_state.ndelim = ndelim;
+
+ list_add_tail(&bf->list, bf_q);
+@@ -1745,10 +1754,8 @@ void ath9k_release_buffered_frames(struc
+ ath9k_set_moredata(sc, bf, true);
+ list_add_tail(&bf->list, &bf_q);
+ ath_set_rates(tid->an->vif, tid->an->sta, bf, true);
+- if (bf_isampdu(bf)) {
+- ath_tx_addto_baw(sc, tid, bf);
++ if (bf_isampdu(bf))
+ bf->bf_state.bf_type &= ~BUF_AGGR;
+- }
+ if (bf_tail)
+ bf_tail->bf_next = bf;
+