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);
7 - /* flush any pending frames if aggregation is enabled */
8 - if (sc->sc_flags & SC_OP_TXAGGR) {
10 - spin_lock_bh(&txq->axq_lock);
11 - ath_txq_drain_pending_buffers(sc, txq);
12 - spin_unlock_bh(&txq->axq_lock);
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,
21 spin_unlock_bh(&txq->axq_lock);
24 + /* flush any pending frames if aggregation is enabled */
25 + if (sc->sc_flags & SC_OP_TXAGGR) {
27 + spin_lock_bh(&txq->axq_lock);
28 + ath_txq_drain_pending_buffers(sc, txq);
29 + spin_unlock_bh(&txq->axq_lock);
34 void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx)