Skip to contentSkip to conversation

Patch "wifi: mt76: Disable napi when removing device" has been added to the 6.18-stable tree

DISCUSSION Nicolas Cavallari 2 participants 4 messages Jul 29 – Aug 11 1 message not in the archive Stable branch

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

This patch alone causes regressions on mt792x, please wait for this fix to reach mainline before applying both:

https://lore.kernel.org/linux-wireless/[email protected]/T/#u

Quoted 58 lines · Sasha Levin

This is a note to let you know that I've just added the patch titled

wifi: mt76: Disable napi when removing device

to the 6.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
wifi-mt76-disable-napi-when-removing-device.patch
and it can be found in the queue-6.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

commit ec85c41196070fef11374b2a774ece87083c8a84

Author: Nicolas Cavallari <[email protected]>
Date:   Wed Jul 8 16:43:47 2026 +0200

wifi: mt76: Disable napi when removing device

[ Upstream commit 13b7e6a96a005c656d38f3da51581deaf9866375 ]

Unloading the mt7915e module with a MT7916 triggers multiples WARN in __netif_napi_del_locked() and in page_pool_disable_direct_recycling() because the driver does not disable the napi before destroying it.

This is troublesome since on MT7916 it is required to unload the module and reinsert it with a different enable_6ghz parameter to change the frequency. The system generally becomes unstable after reinserting the module.

Fix it by disabling napi before deleting it. Also, do not delete napi on WED queues since napi is neither used nor initialized on them.

Fixes 17f1de56df05 ("mt76: add common code shared between multiple chipsets")
drivers/net/wireless/mediatek/mt76/dma.c +4 -1
index 9ef073c27f3096..f5b2c8996affd1 100644
@@ -1174,7 +1174,10 @@ void mt76_dma_cleanup(struct mt76_dev *dev)
 	mt76_for_each_q_rx(dev, i) {
 		struct mt76_queue *q = &dev->q_rx[i];
 
-		netif_napi_del(&dev->napi[i]);
+		if (!mt76_queue_is_wed_rro(q)) {
+			napi_disable(&dev->napi[i]);
+			netif_napi_del(&dev->napi[i]);
+		}
 		mt76_dma_rx_cleanup(dev, q);
 
 		page_pool_destroy(q->page_pool);
maintainer
#2 lore raw
Quoted 4 lines

This patch alone causes regressions on mt792x, please wait for this fix to reach mainline before applying both:

https://lore.kernel.org/linux-wireless/[email protected]/T/#u

Thanks for the heads up. I've dropped the backport of 13b7e6a96a00 ("wifi:
mt76: Disable napi when removing device") from the queue - it was only queued for 7.1 and 6.18 and it is gone from both, so nothing shipped to users.

I'll pick it up again together with the mt792x follow-up fix once that one lands in mainline.

Signature · 2 lines
Thanks,
Sasha
#3 lore raw

Le 30/07/2026 à 04:40, Sasha Levin a écrit :

Quoted 5 lines
Quoted 4 lines

This patch alone causes regressions on mt792x, please wait for this fix to reach mainline before applying both:

https://lore.kernel.org/linux-wireless/[email protected]/T/#u

Quoted 7 lines

Thanks for the heads up. I've dropped the backport of 13b7e6a96a00 ("wifi:
mt76: Disable napi when removing device") from the queue - it was only queued for 7.1 and 6.18 and it is gone from both, so nothing shipped to users.

I'll pick it up again together with the mt792x follow-up fix once that one lands in mainline.

The followup patch has been dropped and the former patch is being reverted, so you may stop waiting for it.

maintainer
#4 lore raw
Quoted 2 lines

The followup patch has been dropped and the former patch is being reverted, so you may stop waiting for it.

Good to know, thanks - I've dropped it from my list, so nothing is waiting on the mt792x follow-up any more.

Signature · 2 lines
Thanks,
Sasha