diff options
author | Sean Wang <sean.wang@mediatek.com> | 2021-02-19 18:28:51 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-04-12 00:01:21 +0200 |
commit | 7139b5c0c98af1e2a04bd9ff09d2c01c40f1da41 (patch) | |
tree | a2e478b9cf35d88b44f19010d0872f2a39ede4f0 /drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | |
parent | 9dfd2785ac730f617b06b572683d76bfc51b67c2 (diff) | |
download | linux-stable-7139b5c0c98af1e2a04bd9ff09d2c01c40f1da41.tar.gz linux-stable-7139b5c0c98af1e2a04bd9ff09d2c01c40f1da41.tar.bz2 linux-stable-7139b5c0c98af1e2a04bd9ff09d2c01c40f1da41.zip |
mt76: connac: update sched_scan cmd usage
Update sched_scan command usage according to the current firmware
submitted into linux-firmware.git.
Fixes: 80fc1e37c0eb ("mt76: mt7921: rely on mt76_connac_mcu module for sched_scan and hw_scan")
Co-developed-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Soul Huang <Soul.Huang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
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 | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c index 81515419b5b6..125e02b34a5f 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c @@ -1438,10 +1438,13 @@ int mt76_connac_mcu_sched_scan_req(struct mt76_phy *phy, req->version = 1; req->seq_num = mvif->scan_seq_num | ext_phy << 7; - if (sreq->flags & NL80211_SCAN_FLAG_RANDOM_ADDR) { - get_random_mask_addr(req->random_mac, sreq->mac_addr, + if (is_mt7663(phy->dev) && + (sreq->flags & NL80211_SCAN_FLAG_RANDOM_ADDR)) { + get_random_mask_addr(req->mt7663.random_mac, sreq->mac_addr, sreq->mac_addr_mask); req->scan_func = 1; + } else if (is_mt7921(phy->dev)) { + req->mt7921.bss_idx = mvif->idx; } req->ssids_num = sreq->n_ssids; |