mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 17:27:11 -04:00
wifi: mt76: mt7925: prevent multiple scan commands
Add a check to ensure only one scan command is active at a time
by testing the MT76_HW_SCANNING state.
Fixes: c948b5da6b ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Link: https://patch.msgid.link/20250414013954.1151774-1-mingyen.hsieh@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
committed by
Felix Fietkau
parent
efb95439c1
commit
122f270aca
@@ -2840,6 +2840,9 @@ int mt7925_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
|
||||
struct tlv *tlv;
|
||||
int max_len;
|
||||
|
||||
if (test_bit(MT76_HW_SCANNING, &phy->state))
|
||||
return -EBUSY;
|
||||
|
||||
max_len = sizeof(*hdr) + sizeof(*req) + sizeof(*ssid) +
|
||||
sizeof(*bssid) * MT7925_RNR_SCAN_MAX_BSSIDS +
|
||||
sizeof(*chan_info) + sizeof(*misc) + sizeof(*ie);
|
||||
|
||||
Reference in New Issue
Block a user