Skip to content

Commit b64c320

Browse files
LorenzoBianconinbd168
authored andcommitted
mt76: connac: set 6G phymode in mt76_connac_get_phy_mode{,v2}
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 f474e6f commit b64c320

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ mt76_connac_get_phy_mode_v2(struct mt76_phy *mphy, struct ieee80211_vif *vif,
691691

692692
if (he_cap->has_he)
693693
mode |= PHY_TYPE_BIT_HE;
694-
} else if (band == NL80211_BAND_5GHZ) {
694+
} else if (band == NL80211_BAND_5GHZ || band == NL80211_BAND_6GHZ) {
695695
mode |= PHY_TYPE_BIT_OFDM;
696696

697697
if (ht_cap->ht_supported)
@@ -1154,7 +1154,7 @@ mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
11541154

11551155
if (he_cap->has_he)
11561156
mode |= PHY_MODE_AX_24G;
1157-
} else if (band == NL80211_BAND_5GHZ) {
1157+
} else if (band == NL80211_BAND_5GHZ || band == NL80211_BAND_6GHZ) {
11581158
mode |= PHY_MODE_A;
11591159

11601160
if (ht_cap->ht_supported)
@@ -1163,8 +1163,12 @@ mt76_connac_get_phy_mode(struct mt76_phy *phy, struct ieee80211_vif *vif,
11631163
if (vht_cap->vht_supported)
11641164
mode |= PHY_MODE_AC;
11651165

1166-
if (he_cap->has_he)
1167-
mode |= PHY_MODE_AX_5G;
1166+
if (he_cap->has_he) {
1167+
if (band == NL80211_BAND_6GHZ)
1168+
mode |= PHY_MODE_AX_6G;
1169+
else
1170+
mode |= PHY_MODE_AX_5G;
1171+
}
11681172
}
11691173

11701174
return mode;

0 commit comments

Comments
 (0)