Skip to content

Commit ac922bd

Browse files
MeiChia Chiunbd168
authored andcommitted
wifi: mt76: mt7915: remove BW160 and BW80+80 support
Remove BW160 and BW80+80 capability in mt7915. Tested-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: Ryder Lee <[email protected]> Reviewed-by: Shayne Chen <[email protected]> Signed-off-by: Money Wang<[email protected]> Signed-off-by: MeiChia Chiu <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
1 parent 0d82fc9 commit ac922bd

File tree

1 file changed

+9
-29
lines changed
  • drivers/net/wireless/mediatek/mt76/mt7915

1 file changed

+9
-29
lines changed

drivers/net/wireless/mediatek/mt76/mt7915/init.c

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ static const struct ieee80211_iface_combination if_comb[] = {
3838
BIT(NL80211_CHAN_WIDTH_20) |
3939
BIT(NL80211_CHAN_WIDTH_40) |
4040
BIT(NL80211_CHAN_WIDTH_80) |
41-
BIT(NL80211_CHAN_WIDTH_160) |
42-
BIT(NL80211_CHAN_WIDTH_80P80),
41+
BIT(NL80211_CHAN_WIDTH_160),
4342
}
4443
};
4544

@@ -407,11 +406,6 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
407406
phy->mt76->sband_5g.sband.vht_cap.cap |=
408407
IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 |
409408
IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;
410-
411-
if (!dev->dbdc_support)
412-
phy->mt76->sband_5g.sband.vht_cap.cap |=
413-
IEEE80211_VHT_CAP_SHORT_GI_160 |
414-
IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ;
415409
} else {
416410
phy->mt76->sband_5g.sband.vht_cap.cap |=
417411
IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 |
@@ -847,13 +841,9 @@ mt7915_set_stream_he_txbf_caps(struct mt7915_phy *phy,
847841
int sts = hweight8(phy->mt76->chainmask);
848842
u8 c, sts_160 = sts;
849843

850-
/* Can do 1/2 of STS in 160Mhz mode for mt7915 */
851-
if (is_mt7915(&dev->mt76)) {
852-
if (!dev->dbdc_support)
853-
sts_160 /= 2;
854-
else
855-
sts_160 = 0;
856-
}
844+
/* mt7915 doesn't support bw160 */
845+
if (is_mt7915(&dev->mt76))
846+
sts_160 = 0;
857847

858848
#ifdef CONFIG_MAC80211_MESH
859849
if (vif == NL80211_IFTYPE_MESH_POINT)
@@ -907,9 +897,6 @@ mt7915_set_stream_he_txbf_caps(struct mt7915_phy *phy,
907897
elem->phy_cap_info[3] |= IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER;
908898
elem->phy_cap_info[4] |= IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER;
909899

910-
/* num_snd_dim
911-
* for mt7915, max supported sts is 2 for bw > 80MHz and 0 if dbdc
912-
*/
913900
c = FIELD_PREP(IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK,
914901
sts - 1);
915902
if (sts_160)
@@ -957,15 +944,10 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
957944
int i, idx = 0, nss = hweight8(phy->mt76->antenna_mask);
958945
u16 mcs_map = 0;
959946
u16 mcs_map_160 = 0;
960-
u8 nss_160;
947+
u8 nss_160 = nss;
961948

962-
if (!is_mt7915(&dev->mt76))
963-
nss_160 = nss;
964-
else if (!dev->dbdc_support)
965-
/* Can do 1/2 of NSS streams in 160Mhz mode for mt7915 */
966-
nss_160 = nss / 2;
967-
else
968-
/* Can't do 160MHz with mt7915 dbdc */
949+
/* Can't do 160MHz with mt7915 */
950+
if (is_mt7915(&dev->mt76))
969951
nss_160 = 0;
970952

971953
for (i = 0; i < 8; i++) {
@@ -1015,8 +997,7 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
1015997
else if (nss_160)
1016998
he_cap_elem->phy_cap_info[0] =
1017999
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G |
1018-
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G |
1019-
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G;
1000+
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
10201001
else
10211002
he_cap_elem->phy_cap_info[0] =
10221003
IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G;
@@ -1088,12 +1069,11 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
10881069
break;
10891070
}
10901071

1072+
memset(he_mcs, 0, sizeof(*he_mcs));
10911073
he_mcs->rx_mcs_80 = cpu_to_le16(mcs_map);
10921074
he_mcs->tx_mcs_80 = cpu_to_le16(mcs_map);
10931075
he_mcs->rx_mcs_160 = cpu_to_le16(mcs_map_160);
10941076
he_mcs->tx_mcs_160 = cpu_to_le16(mcs_map_160);
1095-
he_mcs->rx_mcs_80p80 = cpu_to_le16(mcs_map_160);
1096-
he_mcs->tx_mcs_80p80 = cpu_to_le16(mcs_map_160);
10971077

10981078
mt7915_set_stream_he_txbf_caps(phy, he_cap, i);
10991079

0 commit comments

Comments
 (0)