From 0a47c463d2375f372a73fc0ce5b7538fed8fa2bd Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Wed, 26 Aug 2015 15:39:59 +0200 Subject: [PATCH] tx: mt76_txq_schedule() optimization Avoid to unnecessary call mt76_txq_schedule_list() if 4 (or more) AGGR frames have been queued to the corresponding hw queue or if the given hw queue is empty. This patch let burst length to be more concentrated to max value (i.e. 16) instead of 0 Signed-off-by: Lorenzo Bianconi --- tx.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tx.c b/tx.c index 5239be3e..ef13b79c 100644 --- a/tx.c +++ b/tx.c @@ -359,12 +359,6 @@ mt76_txq_schedule_list(struct mt76_dev *dev, struct mt76_queue *hwq) bool empty = false; int cur; - if (hwq->swq_queued >= 4) - break; - - if (list_empty(&hwq->swq)) - break; - mtxq = list_first_entry(&hwq->swq, struct mt76_txq, list); if (mtxq->send_bar) { struct ieee80211_txq *txq = mtxq_to_txq(mtxq); @@ -400,6 +394,9 @@ void mt76_txq_schedule(struct mt76_dev *dev, struct mt76_queue *hwq) int len; do { + if (hwq->swq_queued >= 4 || list_empty(&hwq->swq)) + break; + len = mt76_txq_schedule_list(dev, hwq); } while (len > 0); }