5002c9bbbb9174ee036816c70438397052086501
[openwrt-10.03/.git] / package / mac80211 / patches / 551-ath9k_txq_schedule_multi.patch
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)
5  {
6         struct ath_atx_ac *ac;
7 -       struct ath_atx_tid *tid;
8 +       struct ath_atx_tid *tid, *last;
9  
10 -       if (list_empty(&txq->axq_acq))
11 +       if (list_empty(&txq->axq_acq) ||
12 +           txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
13                 return;
14  
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);
17         list_del(&ac->list);
18         ac->sched = false;
19  
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);
23  
24 -               break;
25 +               if (tid == last || txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
26 +                       break;
27         } while (!list_empty(&ac->tid_q));
28  
29         if (!list_empty(&ac->tid_q)) {