linux/drivers/net/wireless/mediatek/mt76/mt7915
Nicolas Cavallari 916c484d29 wifi: mt76: mt7915: disable rx napi when removing device
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 rx napi inside mt7915e itself, even through napi rx is
enabled in the mt76 generic code.  Disabling it in the mt76 generic code
was previously attempted and reverted because napi was disabled too
late and rx handlers could access freed structures.  Note that the tx
side is enabled and disabled by the mt76 generic code.

It is disabled in mt7915_stop_hardware() since, unlike
mt7915_unregister_device(), is it also called in the probe path if an
error happens after rx napi is enabled.

Fixes: e57b790146 ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Link: https://patch.msgid.link/20260810154923.32546-1-nicolas.cavallari@green-communications.fr
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2026-10-06 11:50:52 +02:00
..
coredump.c wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
coredump.h wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
debugfs.c wifi: mt76: mt7915: simplify mt7915_sys_recovery_set() 2026-08-01 14:49:43 +00:00
dma.c wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
eeprom.c wifi: mt76: mt7915: fix chainmask handling for non-dbdc phys on band 1 2026-08-01 14:49:43 +00:00
eeprom.h wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
init.c wifi: mt76: mt7915: disable rx napi when removing device 2026-10-06 11:50:52 +02:00
Kconfig wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
mac.c wifi: mt76: mt7915: report RX chain signal for all RX paths 2026-08-01 14:49:43 +00:00
mac.h wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
main.c wifi: mt76: use ALTX queue for packets to disassociated stations 2026-10-06 11:50:52 +02:00
Makefile wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00
mcu.c wifi: mt76: mt7915: handle MCU PS sync events 2026-08-01 15:22:41 +00:00
mcu.h wifi: mt76: mt7915: handle MCU PS sync events 2026-08-01 15:22:41 +00:00
mmio.c wifi: mt76: mt7915: handle MCU PS sync events 2026-08-01 15:22:41 +00:00
mt7915.h wifi: mt76: mt7915: fix chainmask handling for non-dbdc phys on band 1 2026-08-01 14:49:43 +00:00
pci.c wifi: mt76: mt7915: release hif2 reference on probe IRQ failure 2026-08-01 14:49:43 +00:00
regs.h wifi: mt76: mt7915: trigger L1 SER on PLE MDP RIOC hang 2026-08-01 14:49:42 +00:00
soc.c wifi: mt76: mt7915: poll the correct SLP CTRL register for the second adie 2026-07-31 12:25:40 +00:00
testmode.c wifi: mt76: mt7915: fix chainmask handling for non-dbdc phys on band 1 2026-08-01 14:49:43 +00:00
testmode.h wifi: mt76: relicense to BSD-3-Clause-Clear 2025-11-24 14:37:54 +01:00