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 E236E1E98EF for ; Wed, 17 Jun 2026 12:57:32 +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=1781701058; cv=none; b=tGxCepSB1TOF7G2OZjBgvno/tgdkbW4CGsQRedrz9qgE6AQxHwjmz6dbj3RHldeJ0YM4UptR+Hp/LGx2GN/CN8S+pO3h90KRcA2xhyNKxtPo393Rf3G1tYlvhgGXNV+CwtWWD+cC0iISVBJxfuiqqqvONZIC92+OmHWm63iPn1w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781701058; c=relaxed/simple; bh=qgnmHbv2EZRr1s0H/LPu3dQswhkTbE6Iz1Jib88d4jo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QLxqAi4YC9QUN2F733nfzCPYY2EzIrWLYqUyOD4Wj3DPsabDDur8MKI1ESIlc995i/wZrsovyhREkAm8CkfgImOh63hICYkBfK1VWMc/JfOzkB/2+psNjsBEjwCG1JJKW25PqayPHtymwcyxVO6yZIQt92dE0THvddUvsn42ILY= 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 8EA3B233A8; Wed, 17 Jun 2026 15:57:30 +0300 (MSK) From: Ajrat Makhmutov To: stable@vger.kernel.org Cc: 'Sasha Levin ' , Quan Zhou , Sean Wang , David Ruth , Felix Fietkau Subject: [PATCH 2/3] wifi: mt76: mt7921: fix a potential scan no APs Date: Wed, 17 Jun 2026 15:57:13 +0300 Message-ID: <20260617125714.1663242-2-rauty@altlinux.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260617125714.1663242-1-rauty@altlinux.org> References: <20260610080943.17734-1-rauty@altlinux.org> <20260617125714.1663242-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 (cherry picked from commit 5ed54896b6bd444223092cab361b0785932119ab) --- 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