From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from air.basealt.ru (air.basealt.ru [193.43.8.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDECF2F7462; Thu, 18 Jun 2026 08:14:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.43.8.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781770484; cv=none; b=ORlS9XSUCxzh0AVBLJVWoUDQZPJzcslIoS8kM840on6Wjh+YyEaduGPbYLL+Begf7LVKAooskNj+jO6kIUX9tm6PDDJCRS8cjQhwrPq/A6sxBsuxxCBnYr/1VMdFkIetiLkxbLG/EQuR0UCXl8pcuzOf2mpUPefoEcYh6pG2Vu4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781770484; c=relaxed/simple; bh=FKfoYrImvuyLUV+uyDG0xSvluVDC+iypR1Ro2I9pbhg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VLAT8MpOIU/npHQHNZcyRPV99mLKK/szuv6hMVaefPFitpw9cDW5uG/bKakaE+X3zNeY5CBVHYaqGakopW0tai+0gpvix49s2s38Ixv0g4w36wQ77YD1Xb1qEF+Kh+D6SKeabtIVinPD+uIg6Bff39bzaW29SbyMpFJ2HTGQ0WY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=altlinux.org; spf=pass smtp.mailfrom=altlinux.org; arc=none smtp.client-ip=193.43.8.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=altlinux.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=altlinux.org Received: from ajratkogda.malta.altlinux.ru (obninsk.basealt.ru [217.15.195.17]) (Authenticated sender: ajratma) by air.basealt.ru (Postfix) with ESMTPSA id 6E0BC233AF; Thu, 18 Jun 2026 11:14:35 +0300 (MSK) From: Ajrat Makhmutov To: stable@vger.kernel.org Cc: sashal@kernel.org, nbd@nbd.name, linux-wireless@vger.kernel.org, Quan Zhou , Sean Wang , David Ruth , Ajrat Makhmutov Subject: [PATCH 6.12.y v3 2/3] wifi: mt76: mt7921: fix a potential scan no APs Date: Thu, 18 Jun 2026 11:14:12 +0300 Message-ID: <20260618081413.17812-3-rauty@altlinux.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260618081413.17812-1-rauty@altlinux.org> References: <20260617130826.1667503-1-rauty@altlinux.org> <20260618081413.17812-1-rauty@altlinux.org> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Quan Zhou commit 5ed54896b6bd444223092cab361b0785932119ab upstream. In multi-channel scenarios, the granted channel must be aborted before station remove. Otherwise, the firmware will be put into a wrong state, resulting in have chance to make subsequence scan no APs. With this patch, the granted channel will be always aborted before station remove. Signed-off-by: Quan Zhou Reviewed-by: Sean Wang Tested-by: David Ruth Reviewed-by: David Ruth Link: https://patch.msgid.link/1ac1ae779db86d4012199a24ea2ca74050ed4af6.1721300411.git.quan.zhou@mediatek.com Signed-off-by: Felix Fietkau Signed-off-by: Ajrat Makhmutov --- v2: drop redundant "cherry picked from" trailer; add backporter Signed-off-by. No code change. v3: add cover letter with upstream/stable references; mark target 6.12.y. drivers/net/wireless/mediatek/mt76/mt7921/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c index a93ae4e44f16a..f2fffca868b51 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c @@ -368,9 +368,9 @@ void mt7921_roc_abort_sync(struct mt792x_dev *dev) del_timer_sync(&phy->roc_timer); cancel_work_sync(&phy->roc_work); if (test_and_clear_bit(MT76_STATE_ROC, &phy->mt76->state)) - ieee80211_iterate_active_interfaces(mt76_hw(dev), - IEEE80211_IFACE_ITER_RESUME_ALL, - mt7921_roc_iter, (void *)phy); + ieee80211_iterate_interfaces(mt76_hw(dev), + IEEE80211_IFACE_ITER_RESUME_ALL, + mt7921_roc_iter, (void *)phy); } EXPORT_SYMBOL_GPL(mt7921_roc_abort_sync); @@ -881,6 +881,7 @@ void mt7921_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif, struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76); struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv; + mt7921_roc_abort_sync(dev); mt76_connac_free_pending_tx_skbs(&dev->pm, &msta->deflink.wcid); mt76_connac_pm_wake(&dev->mphy, &dev->pm); -- 2.50.1