From e9ff0a17c66ded010c472c941713fa46aadbfa18 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Wed, 26 Apr 2023 15:06:39 -0300 Subject: [PATCH] mt76: disable 160MHz for mt7986 & mt7915 This applies patches from https://github.com/openwrt/mt76/pull/761 and https://github.com/openwrt/mt76/pull/768 that disable 160MHz operation on mt7915 and mt7986. This addresses an issue in which the throughput drops dramatically with just a few meters distance from AP, especially with Apple devices. Signed-off-by: Eneas U de Queiroz --- ...t76-mt7915-disable-160MHz-for-mt7986.patch | 39 +++++++++++++++++++ ...t76-mt7915-disable-160MHz-for-mt7915.patch | 27 +++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 package/kernel/mt76/patches/761-wifi-mt76-mt7915-disable-160MHz-for-mt7986.patch create mode 100644 package/kernel/mt76/patches/768-wifi-mt76-mt7915-disable-160MHz-for-mt7915.patch diff --git a/package/kernel/mt76/patches/761-wifi-mt76-mt7915-disable-160MHz-for-mt7986.patch b/package/kernel/mt76/patches/761-wifi-mt76-mt7915-disable-160MHz-for-mt7986.patch new file mode 100644 index 0000000000..76bb24454c --- /dev/null +++ b/package/kernel/mt76/patches/761-wifi-mt76-mt7915-disable-160MHz-for-mt7986.patch @@ -0,0 +1,39 @@ +From 20d5a0be0583775bb011c41b6c20e658cc593242 Mon Sep 17 00:00:00 2001 +From: Bryan Roessler +Date: Mon, 3 Apr 2023 09:02:58 -0400 +Subject: [PATCH] wifi: mt76: mt7915: disable VHT CAP SUPP CHAN WIDTH 160Mhz + for mt7986 + +Fixes buggy 802.11ax on the Redmi AX6000 when connecting to some clients. + +Partially reverts https://patchwork.kernel.org/project/linux-wireless/patch/20230301163739.52314-1-nbd@nbd.name/ + +Forum thread https://forum.openwrt.org/t/802-11ax-worse-than-802-11ac-with-mt76-driver/126466 + +Signed-off-by: Bryan Roessler +--- + mt7915/init.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/mt7915/init.c b/mt7915/init.c +index b88c38278..b4f0f8aff 100644 +--- a/mt7915/init.c ++++ b/mt7915/init.c +@@ -421,12 +421,13 @@ mt7915_init_wiphy(struct mt7915_phy *phy) + } else { + vht_cap->cap |= + IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 | +- IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK; ++ IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK | ++ IEEE80211_VHT_CAP_SHORT_GI_160; + + /* mt7916 dbdc with 2g 2x2 bw40 and 5g 2x2 bw160c */ +- vht_cap->cap |= +- IEEE80211_VHT_CAP_SHORT_GI_160 | +- IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ; ++ if (is_mt7916(&dev->mt76)) ++ vht_cap->cap |= ++ IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ; + } + + if (!is_mt7915(&dev->mt76) || !dev->dbdc_support) diff --git a/package/kernel/mt76/patches/768-wifi-mt76-mt7915-disable-160MHz-for-mt7915.patch b/package/kernel/mt76/patches/768-wifi-mt76-mt7915-disable-160MHz-for-mt7915.patch new file mode 100644 index 0000000000..944e2590ef --- /dev/null +++ b/package/kernel/mt76/patches/768-wifi-mt76-mt7915-disable-160MHz-for-mt7915.patch @@ -0,0 +1,27 @@ +From 3d12f69d2e1583ac35c7df3a34efc21673110f61 Mon Sep 17 00:00:00 2001 +From: Andreas <962868+Anteus@users.noreply.github.com> +Date: Mon, 3 Apr 2023 11:23:00 +0200 +Subject: [PATCH] wifi: mt76: mt7915: disable VHT CAP SUPP CHAN WIDTH 160Mhz + for mt7915 + +Fixes buggy 802.11ax on the RT3200 when connecting to some clients. + +Partially reverts https://patchwork.kernel.org/project/linux-wireless/patch/20230301163739.52314-1-nbd@nbd.name/ + +Forum thread https://forum.openwrt.org/t/802-11ax-worse-than-802-11ac-with-mt76-driver/126466 +--- + mt7915/init.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/mt7915/init.c b/mt7915/init.c +index b88c38278..fcf01d9ed 100644 +--- a/mt7915/init.c ++++ b/mt7915/init.c +@@ -416,7 +416,6 @@ mt7915_init_wiphy(struct mt7915_phy *phy) + if (!dev->dbdc_support) + vht_cap->cap |= + IEEE80211_VHT_CAP_SHORT_GI_160 | +- IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ | + FIELD_PREP(IEEE80211_VHT_CAP_EXT_NSS_BW_MASK, 1); + } else { + vht_cap->cap |=