summaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/561-ath9k_reduce_indentation.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-12-10 21:17:07 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-12-10 21:17:07 +0000
commit60c148cc14e1cd983fb72022530bae59c93b2602 (patch)
treef2bcb9592775f25a629d2f8d7351766a852f6b8f /package/mac80211/patches/561-ath9k_reduce_indentation.patch
parentbd4aa5a603a31fd4495567d6608443495cff5556 (diff)
ath9k: improve handling of blockackreq (should improve aggregation behavior under tough wifi conditions with lots of retransmission)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29494 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/561-ath9k_reduce_indentation.patch')
-rw-r--r--package/mac80211/patches/561-ath9k_reduce_indentation.patch159
1 files changed, 159 insertions, 0 deletions
diff --git a/package/mac80211/patches/561-ath9k_reduce_indentation.patch b/package/mac80211/patches/561-ath9k_reduce_indentation.patch
new file mode 100644
index 000000000..08ff157c6
--- /dev/null
+++ b/package/mac80211/patches/561-ath9k_reduce_indentation.patch
@@ -0,0 +1,159 @@
+--- a/drivers/net/wireless/ath/ath9k/xmit.c
++++ b/drivers/net/wireless/ath/ath9k/xmit.c
+@@ -490,27 +490,25 @@ static void ath_tx_complete_aggr(struct
+ } else if (!isaggr && txok) {
+ /* transmit completion */
+ acked_cnt++;
++ } else if ((tid->state & AGGR_CLEANUP) || !retry) {
++ /*
++ * cleanup in progress, just fail
++ * the un-acked sub-frames
++ */
++ txfail = 1;
++ } else if (flush) {
++ txpending = 1;
++ } else if (fi->retries < ATH_MAX_SW_RETRIES) {
++ if (txok || !an->sleeping)
++ ath_tx_set_retry(sc, txq, bf->bf_mpdu,
++ retries);
++
++ txpending = 1;
+ } else {
+- if ((tid->state & AGGR_CLEANUP) || !retry) {
+- /*
+- * cleanup in progress, just fail
+- * the un-acked sub-frames
+- */
+- txfail = 1;
+- } else if (flush) {
+- txpending = 1;
+- } else if (fi->retries < ATH_MAX_SW_RETRIES) {
+- if (txok || !an->sleeping)
+- ath_tx_set_retry(sc, txq, bf->bf_mpdu,
+- retries);
+-
+- txpending = 1;
+- } else {
+- txfail = 1;
+- txfail_cnt++;
+- bar_index = max_t(int, bar_index,
+- ATH_BA_INDEX(seq_first, seqno));
+- }
++ txfail = 1;
++ txfail_cnt++;
++ bar_index = max_t(int, bar_index,
++ ATH_BA_INDEX(seq_first, seqno));
+ }
+
+ /*
+@@ -541,32 +539,29 @@ static void ath_tx_complete_aggr(struct
+ !txfail);
+ } else {
+ /* retry the un-acked ones */
+- if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)) {
+- if (bf->bf_next == NULL && bf_last->bf_stale) {
+- struct ath_buf *tbf;
+-
+- tbf = ath_clone_txbuf(sc, bf_last);
+- /*
+- * Update tx baw and complete the
+- * frame with failed status if we
+- * run out of tx buf.
+- */
+- if (!tbf) {
+- spin_lock_bh(&txq->axq_lock);
+- ath_tx_update_baw(sc, tid, seqno);
+- spin_unlock_bh(&txq->axq_lock);
+-
+- ath_tx_complete_buf(sc, bf, txq,
+- &bf_head,
+- ts, 0);
+- bar_index = max_t(int, bar_index,
+- ATH_BA_INDEX(seq_first,
+- seqno));
+- break;
+- }
++ if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) &&
++ bf->bf_next == NULL && bf_last->bf_stale) {
++ struct ath_buf *tbf;
+
+- fi->bf = tbf;
++ tbf = ath_clone_txbuf(sc, bf_last);
++ /*
++ * Update tx baw and complete the
++ * frame with failed status if we
++ * run out of tx buf.
++ */
++ if (!tbf) {
++ spin_lock_bh(&txq->axq_lock);
++ ath_tx_update_baw(sc, tid, seqno);
++ spin_unlock_bh(&txq->axq_lock);
++
++ ath_tx_complete_buf(sc, bf, txq,
++ &bf_head, ts, 0);
++ bar_index = max_t(int, bar_index,
++ ATH_BA_INDEX(seq_first, seqno));
++ break;
+ }
++
++ fi->bf = tbf;
+ }
+
+ /*
+@@ -654,24 +649,26 @@ static u32 ath_lookup_rate(struct ath_so
+ max_4ms_framelen = ATH_AMPDU_LIMIT_MAX;
+
+ for (i = 0; i < 4; i++) {
+- if (rates[i].count) {
+- int modeidx;
+- if (!(rates[i].flags & IEEE80211_TX_RC_MCS)) {
+- legacy = 1;
+- break;
+- }
+-
+- if (rates[i].flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
+- modeidx = MCS_HT40;
+- else
+- modeidx = MCS_HT20;
++ int modeidx;
+
+- if (rates[i].flags & IEEE80211_TX_RC_SHORT_GI)
+- modeidx++;
++ if (!rates[i].count)
++ continue;
+
+- frmlen = ath_max_4ms_framelen[modeidx][rates[i].idx];
+- max_4ms_framelen = min(max_4ms_framelen, frmlen);
++ if (!(rates[i].flags & IEEE80211_TX_RC_MCS)) {
++ legacy = 1;
++ break;
+ }
++
++ if (rates[i].flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
++ modeidx = MCS_HT40;
++ else
++ modeidx = MCS_HT20;
++
++ if (rates[i].flags & IEEE80211_TX_RC_SHORT_GI)
++ modeidx++;
++
++ frmlen = ath_max_4ms_framelen[modeidx][rates[i].idx];
++ max_4ms_framelen = min(max_4ms_framelen, frmlen);
+ }
+
+ /*
+@@ -1598,11 +1595,9 @@ void ath_txq_schedule(struct ath_softc *
+ break;
+ }
+
+- if (!list_empty(&ac->tid_q)) {
+- if (!ac->sched) {
+- ac->sched = true;
+- list_add_tail(&ac->list, &txq->axq_acq);
+- }
++ if (!list_empty(&ac->tid_q) && !ac->sched) {
++ ac->sched = true;
++ list_add_tail(&ac->list, &txq->axq_acq);
+ }
+
+ if (ac == last_ac ||