developer | c2dc472 | 2023-07-17 13:20:33 +0800 | [diff] [blame^] | 1 | From 676c2c7677ee75ee7a041711cc00f0360071f371 Mon Sep 17 00:00:00 2001 |
developer | 12b0343 | 2023-05-25 14:38:31 +0800 | [diff] [blame] | 2 | From: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 3 | Date: Wed, 24 May 2023 10:17:38 +0800 |
developer | c2dc472 | 2023-07-17 13:20:33 +0800 | [diff] [blame^] | 4 | Subject: [PATCH] wifi: mt76: mt7915: update mpdu density in 2/5g capability |
developer | 12b0343 | 2023-05-25 14:38:31 +0800 | [diff] [blame] | 5 | |
| 6 | Set mpdu density to 2 usec to meet hardware capability |
| 7 | and also update enhance throughput. |
| 8 | |
| 9 | Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 10 | --- |
| 11 | mt7915/init.c | 16 ++++++++++++---- |
| 12 | 1 file changed, 12 insertions(+), 4 deletions(-) |
| 13 | |
| 14 | diff --git a/mt7915/init.c b/mt7915/init.c |
developer | c2dc472 | 2023-07-17 13:20:33 +0800 | [diff] [blame^] | 15 | index 5baa571..2eec451 100644 |
developer | 12b0343 | 2023-05-25 14:38:31 +0800 | [diff] [blame] | 16 | --- a/mt7915/init.c |
| 17 | +++ b/mt7915/init.c |
| 18 | @@ -398,8 +398,12 @@ mt7915_init_wiphy(struct mt7915_phy *phy) |
| 19 | phy->mt76->sband_2g.sband.ht_cap.cap |= |
| 20 | IEEE80211_HT_CAP_LDPC_CODING | |
| 21 | IEEE80211_HT_CAP_MAX_AMSDU; |
| 22 | - phy->mt76->sband_2g.sband.ht_cap.ampdu_density = |
| 23 | - IEEE80211_HT_MPDU_DENSITY_4; |
| 24 | + if (is_mt7915(&dev->mt76)) |
| 25 | + phy->mt76->sband_2g.sband.ht_cap.ampdu_density = |
| 26 | + IEEE80211_HT_MPDU_DENSITY_4; |
| 27 | + else |
| 28 | + phy->mt76->sband_2g.sband.ht_cap.ampdu_density = |
| 29 | + IEEE80211_HT_MPDU_DENSITY_2; |
| 30 | } |
| 31 | |
| 32 | if (phy->mt76->cap.has_5ghz) { |
| 33 | @@ -409,10 +413,11 @@ mt7915_init_wiphy(struct mt7915_phy *phy) |
| 34 | phy->mt76->sband_5g.sband.ht_cap.cap |= |
| 35 | IEEE80211_HT_CAP_LDPC_CODING | |
| 36 | IEEE80211_HT_CAP_MAX_AMSDU; |
| 37 | - phy->mt76->sband_5g.sband.ht_cap.ampdu_density = |
| 38 | - IEEE80211_HT_MPDU_DENSITY_4; |
| 39 | |
| 40 | if (is_mt7915(&dev->mt76)) { |
| 41 | + phy->mt76->sband_5g.sband.ht_cap.ampdu_density = |
| 42 | + IEEE80211_HT_MPDU_DENSITY_4; |
| 43 | + |
| 44 | vht_cap->cap |= |
| 45 | IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 | |
| 46 | IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK; |
developer | c2dc472 | 2023-07-17 13:20:33 +0800 | [diff] [blame^] | 47 | @@ -422,6 +427,9 @@ mt7915_init_wiphy(struct mt7915_phy *phy) |
| 48 | IEEE80211_VHT_CAP_SHORT_GI_160 | |
developer | 12b0343 | 2023-05-25 14:38:31 +0800 | [diff] [blame] | 49 | FIELD_PREP(IEEE80211_VHT_CAP_EXT_NSS_BW_MASK, 1); |
| 50 | } else { |
| 51 | + phy->mt76->sband_5g.sband.ht_cap.ampdu_density = |
| 52 | + IEEE80211_HT_MPDU_DENSITY_2; |
| 53 | + |
| 54 | vht_cap->cap |= |
| 55 | IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 | |
| 56 | IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK; |
| 57 | -- |
| 58 | 2.18.0 |
| 59 | |