From 42955db08adf5979f56abc9ee4f0ad9a73b2aa4a Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 7 Mar 2026 13:51:42 +0000 Subject: [PATCH] wifi: mt76: abort ROC on chanctx changes mt76_change_chanctx() calls mt76_phy_update_channel() which switches the hardware channel. If ROC is active on the same phy, this switches away from the ROC channel and clears offchannel, but leaves ROC state intact. Mac80211 still thinks the phy is on the ROC channel. Abort any active ROC before proceeding, matching the pattern already used in add, remove, assign, unassign, and switch chanctx functions. Signed-off-by: Felix Fietkau --- channel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/channel.c b/channel.c index cfff5089..8d2e72c6 100644 --- a/channel.c +++ b/channel.c @@ -88,6 +88,9 @@ void mt76_change_chanctx(struct ieee80211_hw *hw, IEEE80211_CHANCTX_CHANGE_RADAR))) return; + if (phy->roc_vif) + mt76_abort_roc(phy); + cancel_delayed_work_sync(&phy->mac_work); mutex_lock(&dev->mutex);