1 --- a/drivers/net/wireless/ath/ath9k/xmit.c
2 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
3 @@ -1224,12 +1224,14 @@ void ath_tx_cleanupq(struct ath_softc *s
4 void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
7 - struct ath_atx_tid *tid;
8 + struct ath_atx_tid *tid, *last;
10 - if (list_empty(&txq->axq_acq))
11 + if (list_empty(&txq->axq_acq) ||
12 + txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
15 ac = list_first_entry(&txq->axq_acq, struct ath_atx_ac, list);
16 + last = list_entry(ac->tid_q.prev, struct ath_atx_tid, list);
20 @@ -1253,7 +1255,8 @@ void ath_txq_schedule(struct ath_softc *
21 if (!list_empty(&tid->buf_q))
22 ath_tx_queue_tid(txq, tid);
25 + if (tid == last || txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
27 } while (!list_empty(&ac->tid_q));
29 if (!list_empty(&ac->tid_q)) {