Message ID | 1655553ca765a8c18abd6f9bb7e861e9eb590b24.1658176763.git.sean.wang@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/3] mt76: mt7921s: fix the deadlock caused by sdio->stat_work | expand |
diff --git a/drivers/net/wireless/mediatek/mt76/sdio.c b/drivers/net/wireless/mediatek/mt76/sdio.c index aba2a9865821..3b9bb7cd08ad 100644 --- a/drivers/net/wireless/mediatek/mt76/sdio.c +++ b/drivers/net/wireless/mediatek/mt76/sdio.c @@ -478,7 +478,7 @@ static void mt76s_status_worker(struct mt76_worker *w) if (ndata_frames > 0) resched = true; - if (dev->drv->tx_status_data && + if (dev->drv->tx_status_data && ndata_frames > 0 && !test_and_set_bit(MT76_READING_STATS, &dev->phy.state) && !test_bit(MT76_STATE_SUSPEND, &dev->phy.state)) queue_work(dev->wq, &dev->sdio.stat_work);