diff options
author | Sean Wang <sean.wang@mediatek.com> | 2022-11-10 22:23:47 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-12-01 17:29:13 +0100 |
commit | fe62788b6233df0fe43920e32f30c9583d584117 (patch) | |
tree | fa3910d1c9bfab375ab54b04050111ccfb3f0253 /drivers/net/wireless/mediatek | |
parent | wifi: mt76: mt7921: drop ieee80211_[start, stop]_queues in driver (diff) | |
download | linux-fe62788b6233df0fe43920e32f30c9583d584117.tar.xz linux-fe62788b6233df0fe43920e32f30c9583d584117.zip |
wifi: mt76: connac: accept hw scan request at a time
The current hw scan cannot accept multiple hw scan requests at a time, we
return the proper error code when the hw scan is still undergoing.
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c index 92855d8264d1..6b2ce5fd3e4f 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c @@ -1571,6 +1571,9 @@ int mt76_connac_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif, struct mt76_connac_hw_scan_req *req; struct sk_buff *skb; + if (test_bit(MT76_HW_SCANNING, &phy->state)) + return -EBUSY; + skb = mt76_mcu_msg_alloc(mdev, NULL, sizeof(*req)); if (!skb) return -ENOMEM; |