Skip to content

Commit 212e519

Browse files
LorenzoBianconinbd168
authored andcommitted
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]>
1 parent b64c320 commit 212e519

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,17 @@ int mt76_connac_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
14581458
else
14591459
chan = &req->channels[i];
14601460

1461-
chan->band = scan_list[i]->band == NL80211_BAND_2GHZ ? 1 : 2;
1461+
switch (scan_list[i]->band) {
1462+
case NL80211_BAND_2GHZ:
1463+
chan->band = 1;
1464+
break;
1465+
case NL80211_BAND_6GHZ:
1466+
chan->band = 3;
1467+
break;
1468+
default:
1469+
chan->band = 2;
1470+
break;
1471+
}
14621472
chan->channel_num = scan_list[i]->hw_value;
14631473
}
14641474
req->channel_type = sreq->n_channels ? 4 : 0;
@@ -1567,7 +1577,18 @@ int mt76_connac_mcu_sched_scan_req(struct mt76_phy *phy,
15671577
req->channels_num = min_t(u8, sreq->n_channels, 64);
15681578
for (i = 0; i < req->channels_num; i++) {
15691579
chan = &req->channels[i];
1570-
chan->band = scan_list[i]->band == NL80211_BAND_2GHZ ? 1 : 2;
1580+
1581+
switch (scan_list[i]->band) {
1582+
case NL80211_BAND_2GHZ:
1583+
chan->band = 1;
1584+
break;
1585+
case NL80211_BAND_6GHZ:
1586+
chan->band = 3;
1587+
break;
1588+
default:
1589+
chan->band = 2;
1590+
break;
1591+
}
15711592
chan->channel_num = scan_list[i]->hw_value;
15721593
}
15731594

0 commit comments

Comments
 (0)