diff options
author | Sean Wang <sean.wang@mediatek.com> | 2021-04-06 11:34:39 +0800 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-04-12 23:07:24 +0200 |
commit | 4da64fe086d95daa66d0def40fbd1b02d4f813fd (patch) | |
tree | 1fcb72ea997fc3bf3d7020cbfdb3e499cb8847bf /drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | |
parent | 49897c529f85504139a6e54417a65f26a07492d2 (diff) | |
download | linux-stable-4da64fe086d95daa66d0def40fbd1b02d4f813fd.tar.gz linux-stable-4da64fe086d95daa66d0def40fbd1b02d4f813fd.tar.bz2 linux-stable-4da64fe086d95daa66d0def40fbd1b02d4f813fd.zip |
mt76: mt7921: reduce the data latency during hw scan
Reduce the data latency during hw_scan by the split scan which would switch
back to operational channel right after scanning each channel done.
Suggested-by: Asda Wen <Asda.Wen@mediatek.com>
Suggested-by: Soul Huang <Soul.Huang@mediatek.com>
Co-developed-by: YN Chen <YN.Chen@mediatek.com>
Signed-off-by: YN Chen <YN.Chen@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c index 1bd6294042b6..4892728ad9bb 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c @@ -1395,11 +1395,14 @@ int mt76_connac_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif, req->ies_len = cpu_to_le16(sreq->ie_len); } + if (is_mt7921(phy->dev)) + req->scan_func |= SCAN_FUNC_SPLIT_SCAN; + memcpy(req->bssid, sreq->bssid, ETH_ALEN); if (sreq->flags & NL80211_SCAN_FLAG_RANDOM_ADDR) { get_random_mask_addr(req->random_mac, sreq->mac_addr, sreq->mac_addr_mask); - req->scan_func = 1; + req->scan_func |= SCAN_FUNC_RANDOM_MAC; } err = mt76_mcu_skb_send_msg(mdev, skb, MCU_CMD_START_HW_SCAN, false); |