ath9k: fix aggregation flush on ar9003
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 571-ath9k_ar9300_aggr_flush.patch
1 --- a/drivers/net/wireless/ath/ath9k/xmit.c
2 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
3 @@ -1089,15 +1089,6 @@ void ath_draintxq(struct ath_softc *sc,
4 txq->axq_tx_inprogress = false;
5 spin_unlock_bh(&txq->axq_lock);
6
7 - /* flush any pending frames if aggregation is enabled */
8 - if (sc->sc_flags & SC_OP_TXAGGR) {
9 - if (!retry_tx) {
10 - spin_lock_bh(&txq->axq_lock);
11 - ath_txq_drain_pending_buffers(sc, txq);
12 - spin_unlock_bh(&txq->axq_lock);
13 - }
14 - }
15 -
16 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
17 spin_lock_bh(&txq->axq_lock);
18 while (!list_empty(&txq->txq_fifo_pending)) {
19 @@ -1118,6 +1109,15 @@ void ath_draintxq(struct ath_softc *sc,
20 }
21 spin_unlock_bh(&txq->axq_lock);
22 }
23 +
24 + /* flush any pending frames if aggregation is enabled */
25 + if (sc->sc_flags & SC_OP_TXAGGR) {
26 + if (!retry_tx) {
27 + spin_lock_bh(&txq->axq_lock);
28 + ath_txq_drain_pending_buffers(sc, txq);
29 + spin_unlock_bh(&txq->axq_lock);
30 + }
31 + }
32 }
33
34 void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx)