aboutsummaryrefslogtreecommitdiff
path: root/SOURCES/mt76:-mt7921:-Disable-powersave-features-by-default.patch
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2023-11-28 09:25:22 +0100
committerJan200101 <sentrycraft123@gmail.com>2023-11-28 09:25:22 +0100
commit6229f58d19ef9e8c060cc9d9974ef6fcf1bcb528 (patch)
tree5d375a5d3b74c7b8320cd0bde47d2947a3446a9b /SOURCES/mt76:-mt7921:-Disable-powersave-features-by-default.patch
parent6d1c932b1ab6892c861ea92d93914a175e187b08 (diff)
downloadkernel-fsync-6229f58d19ef9e8c060cc9d9974ef6fcf1bcb528.tar.gz
kernel-fsync-6229f58d19ef9e8c060cc9d9974ef6fcf1bcb528.zip
kernel 6.6.2
Diffstat (limited to 'SOURCES/mt76:-mt7921:-Disable-powersave-features-by-default.patch')
-rw-r--r--SOURCES/mt76:-mt7921:-Disable-powersave-features-by-default.patch37
1 files changed, 18 insertions, 19 deletions
diff --git a/SOURCES/mt76:-mt7921:-Disable-powersave-features-by-default.patch b/SOURCES/mt76:-mt7921:-Disable-powersave-features-by-default.patch
index 4bb775c..1a0ddc8 100644
--- a/SOURCES/mt76:-mt7921:-Disable-powersave-features-by-default.patch
+++ b/SOURCES/mt76:-mt7921:-Disable-powersave-features-by-default.patch
@@ -1,6 +1,6 @@
-From ca89780690f7492c2d357e0ed2213a1d027341ae Mon Sep 17 00:00:00 2001
-From: Sultan Alsawaf <sultan@kerneltoast.com>
-Date: Sun, 29 May 2022 01:32:19 -0700
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jan200101 <sentrycraft123@gmail.com>
+Date: Mon, 27 Nov 2023 15:25:48 +0100
Subject: [PATCH] mt76: mt7921: Disable powersave features by default
This brings WiFi latency down considerably and makes latency consistent by
@@ -9,27 +9,17 @@ power consumption difference is inconsequential on desktops and laptops,
while the performance difference is monumental. Latencies of 20+ ms are no
longer observed after this change, and the connection is much more stable.
-Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
+Signed-off-by: Jan200101 <sentrycraft123@gmail.com>
---
- drivers/net/wireless/mediatek/mt76/mt7921/init.c | 9 ++-------
- 1 file changed, 2 insertions(+), 7 deletions(-)
+ drivers/net/wireless/mediatek/mt76/mt7921/init.c | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
-index 91fc41922d95..cfa0bb51004d 100644
+index ff63f37f67d9..840b4c606c83 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
-@@ -99,7 +99,8 @@
- wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
- }
- wiphy->flags &= ~(WIPHY_FLAG_IBSS_RSN | WIPHY_FLAG_4ADDR_AP |
-- WIPHY_FLAG_4ADDR_STATION);
-+ WIPHY_FLAG_4ADDR_STATION |
-+ WIPHY_FLAG_PS_ON_BY_DEFAULT);
- wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
- BIT(NL80211_IFTYPE_AP) |
- BIT(NL80211_IFTYPE_P2P_CLIENT) |
-@@ -408,12 +409,6 @@
- dev->pm.idle_timeout = MT7921_PM_TIMEOUT;
+@@ -220,12 +220,6 @@ int mt7921_register_device(struct mt792x_dev *dev)
+ dev->pm.idle_timeout = MT792x_PM_TIMEOUT;
dev->pm.stats.last_wake_event = jiffies;
dev->pm.stats.last_doze_event = jiffies;
- if (!mt76_is_usb(&dev->mt76)) {
@@ -41,3 +31,12 @@ index 91fc41922d95..cfa0bb51004d 100644
if (!mt76_is_mmio(&dev->mt76))
hw->extra_tx_headroom += MT_SDIO_TXD_SIZE + MT_SDIO_HDR_SIZE;
+@@ -240,6 +234,8 @@ int mt7921_register_device(struct mt792x_dev *dev)
+ if (ret)
+ return ret;
+
++ hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
++
+ hw->wiphy->reg_notifier = mt7921_regd_notifier;
+ dev->mphy.sband_2g.sband.ht_cap.cap |=
+ IEEE80211_HT_CAP_LDPC_CODING |