blob: 77ad7f1ec042f9a416fd7cea2371c476120424e4 [file] [log] [blame]
developer2157bf82023-06-26 02:27:49 +08001From a16f98e2a2abcda88b80b5614d38b4083e30b59f Mon Sep 17 00:00:00 2001
developer6b3eef82023-05-24 22:42:31 +08002From: MeiChia Chiu <meichia.chiu@mediatek.com>
3Date: Wed, 24 May 2023 22:35:54 +0800
developer2157bf82023-06-26 02:27:49 +08004Subject: [PATCH 1031/1031] wifi: mt76: mt7915: remove BW160 support
developer6b3eef82023-05-24 22:42:31 +08005
6Remove BW160 capability in mt7915.
7---
developer2157bf82023-06-26 02:27:49 +08008 mt7915/init.c | 29 +++++++----------------------
9 1 file changed, 7 insertions(+), 22 deletions(-)
developer6b3eef82023-05-24 22:42:31 +080010
11diff --git a/mt7915/init.c b/mt7915/init.c
developer2157bf82023-06-26 02:27:49 +080012index 09ee080..bc16f17 100644
developer6b3eef82023-05-24 22:42:31 +080013--- a/mt7915/init.c
14+++ b/mt7915/init.c
developer2157bf82023-06-26 02:27:49 +080015@@ -420,13 +420,7 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
16
developer6b3eef82023-05-24 22:42:31 +080017 vht_cap->cap |=
18 IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 |
developer2157bf82023-06-26 02:27:49 +080019- IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;
developer6b3eef82023-05-24 22:42:31 +080020-
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);
developer2157bf82023-06-26 02:27:49 +080026+ IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;;
developer6b3eef82023-05-24 22:42:31 +080027 } else {
developer2157bf82023-06-26 02:27:49 +080028 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,
developer6b3eef82023-05-24 22:42:31 +080031 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 */
developer2157bf82023-06-26 02:27:49 +080035- if (is_mt7915(&dev->mt76)) {
developer6b3eef82023-05-24 22:42:31 +080036- if (!dev->dbdc_support)
37- sts_160 /= 2;
38- else
39- sts_160 = 0;
developer2157bf82023-06-26 02:27:49 +080040- }
41+ /* mt7915 doesn't support bw160 */
42+ if (is_mt7915(&dev->mt76))
developer6b3eef82023-05-24 22:42:31 +080043+ sts_160 = 0;
developer6b3eef82023-05-24 22:42:31 +080044
45 #ifdef CONFIG_MAC80211_MESH
developer2157bf82023-06-26 02:27:49 +080046 if (vif == NL80211_IFTYPE_MESH_POINT)
47@@ -972,15 +962,10 @@ mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
developer6b3eef82023-05-24 22:42:31 +080048 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--
developer2157bf82023-06-26 02:27:49 +0800672.18.0
developer6b3eef82023-05-24 22:42:31 +080068