From d715665b9bbd5ac1cd9ab4b8723b781b8f218982 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 26 Jun 2010 20:41:34 +0000 Subject: mac80211: update to wireless-testing 2010-06-15 SVN-Revision: 21943 --- .../patches/510-ath9k_fix_ampdu_retry_count.patch | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 package/mac80211/patches/510-ath9k_fix_ampdu_retry_count.patch (limited to 'package/mac80211/patches/510-ath9k_fix_ampdu_retry_count.patch') diff --git a/package/mac80211/patches/510-ath9k_fix_ampdu_retry_count.patch b/package/mac80211/patches/510-ath9k_fix_ampdu_retry_count.patch new file mode 100644 index 0000000000..8e6e6d0ad3 --- /dev/null +++ b/package/mac80211/patches/510-ath9k_fix_ampdu_retry_count.patch @@ -0,0 +1,62 @@ +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -328,6 +328,7 @@ static void ath_tx_complete_aggr(struct + u32 ba[WME_BA_BMP_SIZE >> 5]; + int isaggr, txfail, txpending, sendbar = 0, needreset = 0, nbad = 0; + bool rc_update = true; ++ struct ieee80211_tx_rate rates[4]; + + skb = bf->bf_mpdu; + hdr = (struct ieee80211_hdr *)skb->data; +@@ -335,6 +336,8 @@ static void ath_tx_complete_aggr(struct + tx_info = IEEE80211_SKB_CB(skb); + hw = bf->aphy->hw; + ++ memcpy(rates, tx_info->control.rates, sizeof(rates)); ++ + rcu_read_lock(); + + /* XXX: use ieee80211_find_sta! */ +@@ -375,6 +378,9 @@ static void ath_tx_complete_aggr(struct + txfail = txpending = 0; + bf_next = bf->bf_next; + ++ skb = bf->bf_mpdu; ++ tx_info = IEEE80211_SKB_CB(skb); ++ + if (ATH_BA_ISSET(ba, ATH_BA_INDEX(seq_st, bf->bf_seqno))) { + /* transmit completion, subframe is + * acked by block ack */ +@@ -428,6 +434,7 @@ static void ath_tx_complete_aggr(struct + spin_unlock_bh(&txq->axq_lock); + + if (rc_update && (acked_cnt == 1 || txfail_cnt == 1)) { ++ memcpy(tx_info->control.rates, rates, sizeof(rates)); + ath_tx_rc_status(bf, ts, nbad, txok, true); + rc_update = false; + } else { +@@ -2014,7 +2021,7 @@ static void ath_tx_rc_status(struct ath_ + tx_info->status.rates[i].idx = -1; + } + +- tx_info->status.rates[tx_rateindex].count = bf->bf_retries + 1; ++ tx_info->status.rates[tx_rateindex].count = ts->ts_longretry + 1; + } + + static void ath_wake_mac80211_queue(struct ath_softc *sc, struct ath_txq *txq) +@@ -2125,7 +2132,6 @@ static void ath_tx_processq(struct ath_s + * This frame is sent out as a single frame. + * Use hardware retry status for this frame. + */ +- bf->bf_retries = ts.ts_longretry; + if (ts.ts_status & ATH9K_TXERR_XRETRY) + bf->bf_state.bf_type |= BUF_XRETRY; + ath_tx_rc_status(bf, &ts, 0, txok, true); +@@ -2255,7 +2261,6 @@ void ath_tx_edma_tasklet(struct ath_soft + } + + if (!bf_isampdu(bf)) { +- bf->bf_retries = txs.ts_longretry; + if (txs.ts_status & ATH9K_TXERR_XRETRY) + bf->bf_state.bf_type |= BUF_XRETRY; + ath_tx_rc_status(bf, &txs, 0, txok, true); -- cgit v1.2.3