developer | 004e50c | 2023-06-29 20:33:22 +0800 | [diff] [blame^] | 1 | From a16f98e2a2abcda88b80b5614d38b4083e30b59f Mon Sep 17 00:00:00 2001 |
developer | 8e5fecd | 2023-05-30 11:58:00 +0800 | [diff] [blame] | 2 | From: MeiChia Chiu <meichia.chiu@mediatek.com> |
| 3 | Date: Wed, 24 May 2023 22:35:54 +0800 |
developer | 004e50c | 2023-06-29 20:33:22 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 1031/1031] wifi: mt76: mt7915: remove BW160 support |
developer | 8e5fecd | 2023-05-30 11:58:00 +0800 | [diff] [blame] | 5 | |
| 6 | Remove BW160 capability in mt7915. |
| 7 | --- |
developer | 004e50c | 2023-06-29 20:33:22 +0800 | [diff] [blame^] | 8 | mt7915/init.c | 29 +++++++---------------------- |
| 9 | 1 file changed, 7 insertions(+), 22 deletions(-) |
developer | 8e5fecd | 2023-05-30 11:58:00 +0800 | [diff] [blame] | 10 | |
| 11 | diff --git a/mt7915/init.c b/mt7915/init.c |
developer | 004e50c | 2023-06-29 20:33:22 +0800 | [diff] [blame^] | 12 | index 09ee080..bc16f17 100644 |
developer | 8e5fecd | 2023-05-30 11:58:00 +0800 | [diff] [blame] | 13 | --- a/mt7915/init.c |
| 14 | +++ b/mt7915/init.c |
developer | 004e50c | 2023-06-29 20:33:22 +0800 | [diff] [blame^] | 15 | @@ -420,13 +420,7 @@ mt7915_init_wiphy(struct mt7915_phy *phy) |
| 16 | |
developer | 8e5fecd | 2023-05-30 11:58:00 +0800 | [diff] [blame] | 17 | vht_cap->cap |= |
| 18 | IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 | |
developer | 004e50c | 2023-06-29 20:33:22 +0800 | [diff] [blame^] | 19 | - IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK; |
developer | 8e5fecd | 2023-05-30 11:58:00 +0800 | [diff] [blame] | 20 | - |
| 21 | - if (!dev->dbdc_support) |
| 22 | - vht_cap->cap |= |
| 23 | - IEEE80211_VHT_CAP_SHORT_GI_160 | |
| 24 | - IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ | |
| 25 | - FIELD_PREP(IEEE80211_VHT_CAP_EXT_NSS_BW_MASK, 1); |
developer | 004e50c | 2023-06-29 20:33:22 +0800 | [diff] [blame^] | 26 | + IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;; |
developer | 8e5fecd | 2023-05-30 11:58:00 +0800 | [diff] [blame] | 27 | } else { |
developer | 004e50c | 2023-06-29 20:33:22 +0800 | [diff] [blame^] | 28 | phy->mt76->sband_5g.sband.ht_cap.ampdu_density = |
| 29 | IEEE80211_HT_MPDU_DENSITY_2; |
| 30 | @@ -886,13 +880,9 @@ mt7915_set_stream_he_txbf_caps(struct mt7915_phy *phy, |
developer | 8e5fecd | 2023-05-30 11:58:00 +0800 | [diff] [blame] | 31 | int sts = hweight8(phy->mt76->chainmask); |
| 32 | u8 c, sts_160 = sts; |
| 33 | |
| 34 | - /* Can do 1/2 of STS in 160Mhz mode for mt7915 */ |
developer | 004e50c | 2023-06-29 20:33:22 +0800 | [diff] [blame^] | 35 | - if (is_mt7915(&dev->mt76)) { |
developer | 8e5fecd | 2023-05-30 11:58:00 +0800 | [diff] [blame] | 36 | - if (!dev->dbdc_support) |
| 37 | - sts_160 /= 2; |
| 38 | - else |
| 39 | - sts_160 = 0; |
developer | 004e50c | 2023-06-29 20:33:22 +0800 | [diff] [blame^] | 40 | - } |
| 41 | + /* mt7915 doesn't support bw160 */ |
| 42 | + if (is_mt7915(&dev->mt76)) |
developer | 8e5fecd | 2023-05-30 11:58:00 +0800 | [diff] [blame] | 43 | + sts_160 = 0; |
developer | 8e5fecd | 2023-05-30 11:58:00 +0800 | [diff] [blame] | 44 | |
| 45 | #ifdef CONFIG_MAC80211_MESH |
developer | 004e50c | 2023-06-29 20:33:22 +0800 | [diff] [blame^] | 46 | if (vif == NL80211_IFTYPE_MESH_POINT) |
| 47 | @@ -972,15 +962,10 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band, |
developer | 8e5fecd | 2023-05-30 11:58:00 +0800 | [diff] [blame] | 48 | int i, idx = 0, nss = hweight8(phy->mt76->antenna_mask); |
| 49 | u16 mcs_map = 0; |
| 50 | u16 mcs_map_160 = 0; |
| 51 | - u8 nss_160; |
| 52 | + u8 nss_160 = nss; |
| 53 | |
| 54 | - if (!is_mt7915(&dev->mt76)) |
| 55 | - nss_160 = nss; |
| 56 | - else if (!dev->dbdc_support) |
| 57 | - /* Can do 1/2 of NSS streams in 160Mhz mode for mt7915 */ |
| 58 | - nss_160 = nss / 2; |
| 59 | - else |
| 60 | - /* Can't do 160MHz with mt7915 dbdc */ |
| 61 | + /* Can't do 160MHz with mt7915 */ |
| 62 | + if (is_mt7915(&dev->mt76)) |
| 63 | nss_160 = 0; |
| 64 | |
| 65 | for (i = 0; i < 8; i++) { |
| 66 | -- |
developer | 004e50c | 2023-06-29 20:33:22 +0800 | [diff] [blame^] | 67 | 2.18.0 |
developer | 8e5fecd | 2023-05-30 11:58:00 +0800 | [diff] [blame] | 68 | |