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 65B733EFFA8 for ; Wed, 17 Jun 2026 13:08:46 +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=1781701727; cv=none; b=qpILL6jxmJ2VBVDX0Dy/STvnNCikn52mSObRC47Tbw9oKyrvHV0qhPjZA0qA1f2kmy72oGFXFD6gZtax0CzevwXLYYxjzmPbq7lgj1kDvC4kRgXCFdZLFGJLykXQj4KbzzMCCT/Ml8XhDKaV6kaNYwrVa739AB7ANW/3xlpJxzQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781701727; c=relaxed/simple; bh=2EIlbEivKkhMgNOMm0+KCt2vnIEoqzWvlGX6Y1KnU04=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dtM5YNmm1E2O118r3YVC1gwdU5ymBKv8HhFq1WI+TtneHNrI8K1NFHTYOZV8F2JIDedlelf43sAEeuf4taJItNvnNbheVOZ6OYOsb/2Uvy/Ck51f0QKScuTSTK36K9RqHQ5TmR02Lbc6/8M+wEy6etH2J5q7awkAjlxO4xxiwZ8= 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 BAE72233AA; Wed, 17 Jun 2026 16:08:44 +0300 (MSK) From: Ajrat Makhmutov To: stable@vger.kernel.org Cc: sashal@kernel.org, Quan Zhou , Sean Wang , David Ruth , Felix Fietkau , Ajrat Makhmutov Subject: [PATCH v2 2/3] wifi: mt76: mt7921: fix a potential scan no APs Date: Wed, 17 Jun 2026 16:08:24 +0300 Message-ID: <20260617130826.1667503-2-rauty@altlinux.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260617130826.1667503-1-rauty@altlinux.org> References: <20260610080943.17734-1-rauty@altlinux.org> <20260617130826.1667503-1-rauty@altlinux.org> Precedence: bulk X-Mailing-List: stable@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. 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