diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-02-27 19:42:39 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-03-07 12:50:23 +0100 |
commit | 004960423fe17dfff93753017b7081dab36c7180 (patch) | |
tree | f7f0aadb89dbeda7e9d734683747e4dea751c5b1 /drivers/net/wireless/mediatek/mt76/tx.c | |
parent | de3c2af15fce23c42407ad0a868ac47df2e7279a (diff) |
mt76: mt76x2: implement full device restart on watchdog reset
Restart the firmware and re-initialize the MAC to be able to recover
from more kinds of hang states
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/tx.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/tx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c index 4d38a54014e8..fc7dffe066be 100644 --- a/drivers/net/wireless/mediatek/mt76/tx.c +++ b/drivers/net/wireless/mediatek/mt76/tx.c @@ -580,6 +580,9 @@ void mt76_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq) struct mt76_txq *mtxq = (struct mt76_txq *) txq->drv_priv; struct mt76_queue *hwq = mtxq->hwq; + if (!test_bit(MT76_STATE_RUNNING, &dev->state)) + return; + spin_lock_bh(&hwq->lock); if (list_empty(&mtxq->list)) list_add_tail(&mtxq->list, &hwq->swq); |