blob: dbfb384b313a535df5bf5b1ea6c7af1942fb78e1 [file] [log] [blame]
From 19ea1497e7aea34be6e8851a1aca75e3eb58b58f Mon Sep 17 00:00:00 2001
From: "Henry.Yen" <henry.yen@mediatek.com>
Date: Tue, 16 Jan 2024 11:30:02 +0800
Subject: [PATCH 17/17] mtk: wifi: mt76: mt7996: add sanity check for NAPI
schedule
Add sanity check for NAPI schedule.
It's observed that host driver might occasionally receive
interrupts from unexpected Rx ring, whose Rx NAPI hasn't been
prepared yet. Under such situation, __napi_poll crash issue
would occur, so we add sanity check to prevent it.
If without this patch, we might encounter kernel crash issue
especially in WED-on & RRO-on software path.
Signed-off-by: Henry.Yen <henry.yen@mediatek.com>
---
mt7996/mmio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mt7996/mmio.c b/mt7996/mmio.c
index 8fe56ed9..367a204d 100644
--- a/mt7996/mmio.c
+++ b/mt7996/mmio.c
@@ -560,7 +560,7 @@ static void mt7996_irq_tasklet(struct tasklet_struct *t)
napi_schedule(&dev->mt76.tx_napi);
for (i = 0; i < __MT_RXQ_MAX; i++) {
- if ((intr & MT_INT_RX(i)))
+ if ((intr & MT_INT_RX(i)) && dev->mt76.napi[i].poll)
napi_schedule(&dev->mt76.napi[i]);
}
--
2.18.0