From: Ajrat Makhmutov <rauty@altlinux.org>
To: stable@vger.kernel.org
Cc: sashal@kernel.org, nbd@nbd.name, linux-wireless@vger.kernel.org,
Quan Zhou <quan.zhou@mediatek.com>,
Sean Wang <sean.wang@mediatek.com>,
David Ruth <druth@chromium.org>,
Ajrat Makhmutov <rauty@altlinux.org>
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 [thread overview]
Message-ID: <20260618081413.17812-3-rauty@altlinux.org> (raw)
In-Reply-To: <20260618081413.17812-1-rauty@altlinux.org>
From: Quan Zhou <quan.zhou@mediatek.com>
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 <quan.zhou@mediatek.com>
Reviewed-by: Sean Wang <sean.wang@mediatek.com>
Tested-by: David Ruth <druth@chromium.org>
Reviewed-by: David Ruth <druth@chromium.org>
Link: https://patch.msgid.link/1ac1ae779db86d4012199a24ea2ca74050ed4af6.1721300411.git.quan.zhou@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Ajrat Makhmutov <rauty@altlinux.org>
---
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
next prev parent reply other threads:[~2026-06-18 8:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-10 8:09 [stable request] mt7921e: backport two mt76 fixes to 6.12.y Ajrat Makhmutov
2026-06-11 0:45 ` Sasha Levin
2026-06-11 10:38 ` Ajrat Makhmutov
2026-06-16 13:21 ` Ajrat Makhmutov
2026-06-19 4:06 ` Sasha Levin
2026-06-17 12:57 ` [PATCH 1/3] wifi: mt76: mt7921: avoid undesired changes of the preset regulatory domain Ajrat Makhmutov
2026-06-17 12:57 ` [PATCH 2/3] wifi: mt76: mt7921: fix a potential scan no APs Ajrat Makhmutov
2026-06-17 12:57 ` [PATCH 3/3] wifi: mt76: mt7921: fix potential deadlock in mt7921_roc_abort_sync Ajrat Makhmutov
2026-06-17 13:08 ` [PATCH v2 1/3] wifi: mt76: mt7921: avoid undesired changes of the preset regulatory domain Ajrat Makhmutov
2026-06-17 13:08 ` [PATCH v2 2/3] wifi: mt76: mt7921: fix a potential scan no APs Ajrat Makhmutov
2026-06-17 13:08 ` [PATCH v2 3/3] wifi: mt76: mt7921: fix potential deadlock in mt7921_roc_abort_sync Ajrat Makhmutov
2026-06-18 8:14 ` [PATCH 6.12.y v3 0/3] mt7921e: backport three mt76 fixes to 6.12.y Ajrat Makhmutov
2026-06-18 8:14 ` [PATCH 6.12.y v3 1/3] wifi: mt76: mt7921: avoid undesired changes of the preset regulatory domain Ajrat Makhmutov
2026-06-18 8:14 ` Ajrat Makhmutov [this message]
2026-06-18 8:14 ` [PATCH 6.12.y v3 3/3] wifi: mt76: mt7921: fix potential deadlock in mt7921_roc_abort_sync Ajrat Makhmutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260618081413.17812-3-rauty@altlinux.org \
--to=rauty@altlinux.org \
--cc=druth@chromium.org \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=quan.zhou@mediatek.com \
--cc=sashal@kernel.org \
--cc=sean.wang@mediatek.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.