Skip to content

Commit 3cf3e01

Browse files
LorenzoBianconinbd168
authored andcommitted
mt76: connac: add 6GHz support to mt76_connac_mcu_uni_add_bss
This is a preliminary patch to enable 6GHz band for mt7921 devices. Tested-by: Deren Wu <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
1 parent 5883892 commit 3cf3e01

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,8 @@ int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy,
12921292
u8 short_st;
12931293
u8 ht_op_info;
12941294
u8 sco;
1295-
u8 pad[3];
1295+
u8 band;
1296+
u8 pad[2];
12961297
} __packed rlm;
12971298
} __packed rlm_req = {
12981299
.hdr = {
@@ -1308,13 +1309,19 @@ int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy,
13081309
.ht_op_info = 4, /* set HT 40M allowed */
13091310
.rx_streams = phy->chainmask,
13101311
.short_st = true,
1312+
.band = band,
13111313
},
13121314
};
13131315
int err, conn_type;
1314-
u8 idx;
1316+
u8 idx, basic_phy;
13151317

13161318
idx = mvif->omac_idx > EXT_BSSID_START ? HW_BSSID_0 : mvif->omac_idx;
13171319
basic_req.basic.hw_bss_idx = idx;
1320+
if (band == NL80211_BAND_6GHZ)
1321+
basic_req.basic.phymode_ext = BIT(0);
1322+
1323+
basic_phy = mt76_connac_get_phy_mode_v2(phy, vif, band, NULL);
1324+
basic_req.basic.nonht_basic_phy = cpu_to_le16(basic_phy);
13181325

13191326
switch (vif->type) {
13201327
case NL80211_IFTYPE_MESH_POINT:

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,10 +668,14 @@ struct mt76_connac_bss_basic_tlv {
668668
* bit(3): GN
669669
* bit(4): AN
670670
* bit(5): AC
671+
* bit(6): AX2
672+
* bit(7): AX5
673+
* bit(8): AX6
671674
*/
672675
__le16 sta_idx;
673-
u8 nonht_basic_phy;
674-
u8 pad[3];
676+
__le16 nonht_basic_phy;
677+
u8 phymode_ext; /* bit(0) AX_6G */
678+
u8 pad[1];
675679
} __packed;
676680

677681
struct mt76_connac_bss_qos_tlv {

0 commit comments

Comments
 (0)