From 7a31731af2cf67a32b584047c15822c8a7490410 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 13 Apr 2018 11:47:11 +0200 Subject: [PATCH] mt76: check for pending reset before attempting to schedule tx The check within mt76_txq_send_burst is not enough, as it happens after a first frame has already been queued up Signed-off-by: Felix Fietkau --- tx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tx.c b/tx.c index 4eef69bd..4f1a0b38 100644 --- a/tx.c +++ b/tx.c @@ -385,6 +385,10 @@ restart: bool empty = false; int cur; + if (test_bit(MT76_SCANNING, &dev->state) || + test_bit(MT76_RESET, &dev->state)) + return -EBUSY; + mtxq = list_first_entry(&hwq->swq, struct mt76_txq, list); if (mtxq->send_bar && mtxq->aggr) { struct ieee80211_txq *txq = mtxq_to_txq(mtxq);