[][MAC80211][wifi6][mt76][Rebase][for upstream]
[Description]
Change some patches for the preparation of next upstream series.
[Release-log]
N/A
Change-Id: I7b77a67f54dc2e1c778161a256cc20fe92cc9c8f
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7949840
diff --git a/autobuild_mac80211_release/package/kernel/mt76/patches/0007-wifi-mt76-mt7915-update-mpdu-density-capability.patch b/autobuild_mac80211_release/package/kernel/mt76/patches/0007-wifi-mt76-mt7915-update-mpdu-density-capability.patch
new file mode 100644
index 0000000..b87db29
--- /dev/null
+++ b/autobuild_mac80211_release/package/kernel/mt76/patches/0007-wifi-mt76-mt7915-update-mpdu-density-capability.patch
@@ -0,0 +1,60 @@
+From cb7c72bdaee4dedeea85377f120e12efb070e835 Mon Sep 17 00:00:00 2001
+From: Peter Chiu <chui-hao.chiu@mediatek.com>
+Date: Wed, 24 May 2023 10:17:38 +0800
+Subject: [PATCH 07/15] wifi: mt76: mt7915: update mpdu density capability
+
+Set mpdu density to 2 usec for non-mt7915 Wi-Fi 6 generation chipsets
+to align to the hardware capability which improves the throughput.
+
+Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
+Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
+---
+ mt7915/init.c | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/mt7915/init.c b/mt7915/init.c
+index 688e6bc6..004f41bf 100644
+--- a/mt7915/init.c
++++ b/mt7915/init.c
+@@ -398,8 +398,12 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
+ phy->mt76->sband_2g.sband.ht_cap.cap |=
+ IEEE80211_HT_CAP_LDPC_CODING |
+ IEEE80211_HT_CAP_MAX_AMSDU;
+- phy->mt76->sband_2g.sband.ht_cap.ampdu_density =
+- IEEE80211_HT_MPDU_DENSITY_4;
++ if (is_mt7915(&dev->mt76))
++ phy->mt76->sband_2g.sband.ht_cap.ampdu_density =
++ IEEE80211_HT_MPDU_DENSITY_4;
++ else
++ phy->mt76->sband_2g.sband.ht_cap.ampdu_density =
++ IEEE80211_HT_MPDU_DENSITY_2;
+ }
+
+ if (phy->mt76->cap.has_5ghz) {
+@@ -409,10 +413,11 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
+ phy->mt76->sband_5g.sband.ht_cap.cap |=
+ IEEE80211_HT_CAP_LDPC_CODING |
+ IEEE80211_HT_CAP_MAX_AMSDU;
+- phy->mt76->sband_5g.sband.ht_cap.ampdu_density =
+- IEEE80211_HT_MPDU_DENSITY_4;
+
+ if (is_mt7915(&dev->mt76)) {
++ phy->mt76->sband_5g.sband.ht_cap.ampdu_density =
++ IEEE80211_HT_MPDU_DENSITY_4;
++
+ vht_cap->cap |=
+ IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 |
+ IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;
+@@ -422,6 +427,9 @@ mt7915_init_wiphy(struct mt7915_phy *phy)
+ IEEE80211_VHT_CAP_SHORT_GI_160 |
+ FIELD_PREP(IEEE80211_VHT_CAP_EXT_NSS_BW_MASK, 1);
+ } else {
++ phy->mt76->sband_5g.sband.ht_cap.ampdu_density =
++ IEEE80211_HT_MPDU_DENSITY_2;
++
+ vht_cap->cap |=
+ IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 |
+ IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK;
+--
+2.39.2
+