Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wifi: mt76: mt7921: fix a potential scan no APs

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>

authored by

Quan Zhou and committed by
Felix Fietkau
5ed54896 512e26db

+4 -3
+4 -3
drivers/net/wireless/mediatek/mt76/mt7921/main.c
··· 360 360 del_timer_sync(&phy->roc_timer); 361 361 cancel_work_sync(&phy->roc_work); 362 362 if (test_and_clear_bit(MT76_STATE_ROC, &phy->mt76->state)) 363 - ieee80211_iterate_active_interfaces(mt76_hw(dev), 364 - IEEE80211_IFACE_ITER_RESUME_ALL, 365 - mt7921_roc_iter, (void *)phy); 363 + ieee80211_iterate_interfaces(mt76_hw(dev), 364 + IEEE80211_IFACE_ITER_RESUME_ALL, 365 + mt7921_roc_iter, (void *)phy); 366 366 } 367 367 EXPORT_SYMBOL_GPL(mt7921_roc_abort_sync); 368 368 ··· 858 858 struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76); 859 859 struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv; 860 860 861 + mt7921_roc_abort_sync(dev); 861 862 mt76_connac_free_pending_tx_skbs(&dev->pm, &msta->deflink.wcid); 862 863 mt76_connac_pm_wake(&dev->mphy, &dev->pm); 863 864