blob: bb26ecd346fbe00c9b866362e6b3867f73c87f4c [file] [log] [blame]
From e1e69be464ae5ef9a2249c76d5eeeb3783417011 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 012/120] mtk: wifi: mt76: mt7996: 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 a sanity check to prevent it.
Without this patch, we might encounter kernel crash issue
especially in WED-on & RRO-on software path.
CR-Id: WCNCR00185554
Change-Id: I165b003a41207d034cfb720b4db979b1e1d5f695
Signed-off-by: Henry Yen <henry.yen@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
---
mt7996/mmio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mt7996/mmio.c b/mt7996/mmio.c
index 341fa089e..fd4d41d90 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.39.2