From 35c24b4db0bd751fda4848e8fbefa406e3da8e97 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 12 Oct 2015 14:22:27 +0200 Subject: [PATCH] tx: restart schedule after sending a BAR, fixes an unlikely race condition Signed-off-by: Felix Fietkau --- tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tx.c b/tx.c index 170cba65..bc4a1574 100644 --- a/tx.c +++ b/tx.c @@ -371,6 +371,7 @@ mt76_txq_schedule_list(struct mt76_dev *dev, struct mt76_queue *hwq) struct mt76_txq *mtxq, *mtxq_last; int len = 0; +restart: mtxq_last = list_last_entry(&hwq->swq, struct mt76_txq, list); while (1) { bool empty = false; @@ -385,7 +386,7 @@ mt76_txq_schedule_list(struct mt76_dev *dev, struct mt76_queue *hwq) ieee80211_send_bar(txq->vif, txq->sta->addr, txq->tid, mtxq->agg_ssn); spin_lock_bh(&hwq->lock); - continue; + goto restart; } list_del_init(&mtxq->list);