Commit 21f28e6f authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville

ath9k: try more than one tid when scheduling a new aggregate

Sometimes the first TID in the first AC's list is not available for forming
a new aggregate (the BAW might not allow it), however other TIDs may have
data available for sending.
Prevent a slowdown of other TIDs by going through multiple entries until
we've either hit the last one or enough AMPDUs are pending in the hardware
queue.
Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent a4d6e17d
...@@ -1224,12 +1224,14 @@ void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq) ...@@ -1224,12 +1224,14 @@ void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq)
void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq) void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
{ {
struct ath_atx_ac *ac; struct ath_atx_ac *ac;
struct ath_atx_tid *tid; struct ath_atx_tid *tid, *last;
if (list_empty(&txq->axq_acq)) if (list_empty(&txq->axq_acq) ||
txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
return; return;
ac = list_first_entry(&txq->axq_acq, struct ath_atx_ac, list); ac = list_first_entry(&txq->axq_acq, struct ath_atx_ac, list);
last = list_entry(ac->tid_q.prev, struct ath_atx_tid, list);
list_del(&ac->list); list_del(&ac->list);
ac->sched = false; ac->sched = false;
...@@ -1253,7 +1255,8 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq) ...@@ -1253,7 +1255,8 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
if (!list_empty(&tid->buf_q)) if (!list_empty(&tid->buf_q))
ath_tx_queue_tid(txq, tid); ath_tx_queue_tid(txq, tid);
break; if (tid == last || txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
break;
} while (!list_empty(&ac->tid_q)); } while (!list_empty(&ac->tid_q));
if (!list_empty(&ac->tid_q)) { if (!list_empty(&ac->tid_q)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment