[PATCH 0/4] wifi: unwind state after add_interface failures
From: Jiale Yao
Date: Thu Sep 24 2026 - 09:22:16 EST
mac80211 does not call remove_interface() when a driver's
add_interface() callback fails. Drivers must therefore unwind all state
they published before returning the error.
Four wireless drivers leave vif pointers or resource reservations behind
when a firmware operation fails during interface creation. Depending on
the driver, later RX, interrupt, or testmode paths can dereference the stale
vif, and leaked mask bits or counters can prevent subsequent interfaces
from being created.
Unwind the state at each failure point, following the approach used by
commit 2fb6480c52f6 ("wifi: mt76: mt7915: unwind state on add_interface
failure"). Each patch is independent and addresses one driver.
These paths were reviewed against the driver state transitions and their
remove_interface() counterparts.
Jiale Yao (4):
wifi: mt76: mt7615: unwind add_interface failures
wifi: mt76: mt7925: unwind link BSS add failures
wifi: rsi: unwind add_interface failure
wifi: mm81x: unwind add_interface failure
.../net/wireless/mediatek/mt76/mt7615/main.c | 19 ++++++++++++++++++-
.../net/wireless/mediatek/mt76/mt7925/main.c | 4 +++-
drivers/net/wireless/morsemicro/mm81x/mac.c | 9 ++++++++-
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 2 ++
4 files changed, 31 insertions(+), 3 deletions(-)
--
2.34.1