wifi: mt76: mt7996: Do not schedule RRO and TxFree queues during reset for NPU

This is a preliminary patch to properly manage reset procedure when NPU
offloading is enabled.

Tested-by: Kang Yang <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Lorenzo Bianconi
2026-01-27 11:56:18 +00:00
committed by Felix Fietkau
parent 9ccd49d455
commit 2bc891cc94
4 changed files with 40 additions and 0 deletions
+5
View File
@@ -756,6 +756,9 @@ int mt7996_dma_init(struct mt7996_dev *dev)
(is_mt7992(&dev->mt76)))) {
dev->mt76.q_rx[MT_RXQ_MAIN_WA].flags = MT_WED_Q_TXFREE;
dev->mt76.q_rx[MT_RXQ_MAIN_WA].wed = wed;
} else if (is_mt7992(&dev->mt76) &&
mt76_npu_device_active(&dev->mt76)) {
dev->mt76.q_rx[MT_RXQ_MAIN_WA].flags = MT_NPU_Q_TXFREE(0);
}
if (mt7996_has_wa(dev)) {
@@ -888,6 +891,8 @@ int mt7996_dma_init(struct mt7996_dev *dev)
/* tx free notify event from WA for band0 */
dev->mt76.q_rx[MT_RXQ_TXFREE_BAND0].flags = MT_WED_Q_TXFREE;
dev->mt76.q_rx[MT_RXQ_TXFREE_BAND0].wed = wed;
} else if (mt76_npu_device_active(&dev->mt76)) {
dev->mt76.q_rx[MT_RXQ_TXFREE_BAND0].flags = MT_NPU_Q_TXFREE(0);
}
ret = mt76_queue_alloc(dev,
+14
View File
@@ -2524,6 +2524,13 @@ void mt7996_mac_reset_work(struct work_struct *work)
mt76_queue_is_wed_rro(&dev->mt76.q_rx[i]))
continue;
if (mt76_npu_device_active(&dev->mt76) &&
mt76_queue_is_wed_rro(&dev->mt76.q_rx[i]))
continue;
if (mt76_queue_is_npu_txfree(&dev->mt76.q_rx[i]))
continue;
napi_disable(&dev->mt76.napi[i]);
}
napi_disable(&dev->mt76.tx_napi);
@@ -2579,6 +2586,13 @@ void mt7996_mac_reset_work(struct work_struct *work)
mt76_queue_is_wed_rro(&dev->mt76.q_rx[i]))
continue;
if (mt76_npu_device_active(&dev->mt76) &&
mt76_queue_is_wed_rro(&dev->mt76.q_rx[i]))
continue;
if (mt76_queue_is_npu_txfree(&dev->mt76.q_rx[i]))
continue;
napi_enable(&dev->mt76.napi[i]);
local_bh_disable();
napi_schedule(&dev->mt76.napi[i]);