developer | 8bb192d | 2023-08-31 11:46:57 +0800 | [diff] [blame^] | 1 | From cb7c72bdaee4dedeea85377f120e12efb070e835 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 | 8bb192d | 2023-08-31 11:46:57 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 07/15] wifi: mt76: mt7915: update mpdu density capability |
developer | 12b0343 | 2023-05-25 14:38:31 +0800 | [diff] [blame] | 5 | |
developer | 8bb192d | 2023-08-31 11:46:57 +0800 | [diff] [blame^] | 6 | Set mpdu density to 2 usec for non-mt7915 Wi-Fi 6 generation chipsets |
| 7 | to align to the hardware capability which improves the throughput. |
developer | 12b0343 | 2023-05-25 14:38:31 +0800 | [diff] [blame] | 8 | |
| 9 | Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> |
developer | 8bb192d | 2023-08-31 11:46:57 +0800 | [diff] [blame^] | 10 | Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> |
developer | 12b0343 | 2023-05-25 14:38:31 +0800 | [diff] [blame] | 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 | 8bb192d | 2023-08-31 11:46:57 +0800 | [diff] [blame^] | 16 | index 688e6bc6..004f41bf 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 | -- |
developer | 8bb192d | 2023-08-31 11:46:57 +0800 | [diff] [blame^] | 59 | 2.39.2 |
developer | 12b0343 | 2023-05-25 14:38:31 +0800 | [diff] [blame] | 60 | |