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