diff options
| author | Lorenzo Bianconi <[email protected]> | 2021-08-24 12:22:20 +0200 |
|---|---|---|
| committer | Felix Fietkau <[email protected]> | 2021-10-20 10:36:45 +0200 |
| commit | 212e5197eec24e0e437cbcfdc73dc3be1c749ef5 (patch) | |
| tree | ecb3a1a07615cf44741ad35e09678d8b24fe2a30 | |
| parent | b64c3202d4e4ea7decf969561ddeabb049874d61 (diff) | |
mt76: connac: enable 6GHz band for hw scan
This is a preliminary patch to support 6GHz band on mt7921 devices.
Tested-by: Deren Wu <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
| -rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 25 |
1 files changed, 23 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 8b72ed77881c..8858a06ebd95 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c @@ -1458,7 +1458,17 @@ int mt76_connac_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif, else chan = &req->channels[i]; - chan->band = scan_list[i]->band == NL80211_BAND_2GHZ ? 1 : 2; + switch (scan_list[i]->band) { + case NL80211_BAND_2GHZ: + chan->band = 1; + break; + case NL80211_BAND_6GHZ: + chan->band = 3; + break; + default: + chan->band = 2; + break; + } chan->channel_num = scan_list[i]->hw_value; } req->channel_type = sreq->n_channels ? 4 : 0; @@ -1567,7 +1577,18 @@ int mt76_connac_mcu_sched_scan_req(struct mt76_phy *phy, req->channels_num = min_t(u8, sreq->n_channels, 64); for (i = 0; i < req->channels_num; i++) { chan = &req->channels[i]; - chan->band = scan_list[i]->band == NL80211_BAND_2GHZ ? 1 : 2; + + switch (scan_list[i]->band) { + case NL80211_BAND_2GHZ: + chan->band = 1; + break; + case NL80211_BAND_6GHZ: + chan->band = 3; + break; + default: + chan->band = 2; + break; + } chan->channel_num = scan_list[i]->hw_value; } |