aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel
diff options
context:
space:
mode:
authorTomislav Požega <pozega.tomislav@gmail.com>2017-08-23 19:10:21 +0200
committerJohn Crispin <john@phrozen.org>2018-09-26 16:39:39 +0200
commit6044682b83a08618a4d8f6791503e0cec5b9fbe5 (patch)
tree839e705d0737af1f570998e1786ad9e0f4ec50ae /package/kernel
parentb88df4a7c8f260867f3213fc3baaa4b509d449bf (diff)
downloadupstream-6044682b83a08618a4d8f6791503e0cec5b9fbe5.tar.gz
upstream-6044682b83a08618a4d8f6791503e0cec5b9fbe5.tar.bz2
upstream-6044682b83a08618a4d8f6791503e0cec5b9fbe5.zip
mac80211: rt2x00: write registers required for reducing power consumption
Write registers required for reducing power consumption like the vendor driver does when ADJUST_POWER_CONSUMPTION_SUPPORT is set. This helps devices to sync at better TX/RX rates and improves overall performance. Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org> [daniel@makrotopia.org: edited commit message]
Diffstat (limited to 'package/kernel')
-rw-r--r--package/kernel/mac80211/patches/rt2x00/980-rt2x00-reduce-power-consumption-on-mt7620.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/rt2x00/980-rt2x00-reduce-power-consumption-on-mt7620.patch b/package/kernel/mac80211/patches/rt2x00/980-rt2x00-reduce-power-consumption-on-mt7620.patch
new file mode 100644
index 0000000000..c4d056e8f3
--- /dev/null
+++ b/package/kernel/mac80211/patches/rt2x00/980-rt2x00-reduce-power-consumption-on-mt7620.patch
@@ -0,0 +1,43 @@
+From: Tomislav Požega <pozega.tomislav@gmail.com>
+
+rt2x00: write registers required for reducing power consumption
+
+Write registers required for reducing power consumption like the vendor
+driver does when ADJUST_POWER_CONSUMPTION_SUPPORT is set.
+This helps devices to sync at better TX/RX rates and improves overall
+performance.
+
+Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
+Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+[daniel@makrotopia.org: edited commit message]
+---
+ drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+), 0 deletions(-)
+
+--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
++++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+@@ -8717,6 +8717,24 @@ static void rt2800_init_rfcsr_6352(struc
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 58, 0x02);
+ rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xC7);
+
++ /* reduce power consumption */
++ rt2800_rfcsr_write_chanreg(rt2x00dev, 43, 0x53);
++ rt2800_rfcsr_write_chanreg(rt2x00dev, 44, 0x53);
++ rt2800_rfcsr_write_chanreg(rt2x00dev, 45, 0x53);
++ rt2800_rfcsr_write_bank(rt2x00dev, 4, 47, 0x24);
++ rt2800_rfcsr_write_bank(rt2x00dev, 6, 47, 0x64);
++ rt2800_rfcsr_write_chanreg(rt2x00dev, 48, 0x4F);
++ rt2800_rfcsr_write_chanreg(rt2x00dev, 49, 0x02);
++ rt2800_rfcsr_write_bank(rt2x00dev, 4, 55, 0x24);
++ rt2800_rfcsr_write_bank(rt2x00dev, 6, 55, 0x64);
++ rt2800_rfcsr_write_chanreg(rt2x00dev, 56, 0x4F);
++ rt2800_rfcsr_write_chanreg(rt2x00dev, 57, 0x02);
++ rt2800_rfcsr_write_chanreg(rt2x00dev, 58, 0x27);
++ rt2800_rfcsr_write_bank(rt2x00dev, 4, 59, 0x24);
++ rt2800_rfcsr_write_bank(rt2x00dev, 6, 59, 0x64);
++ rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0x4F);
++ rt2800_rfcsr_write_chanreg(rt2x00dev, 61, 0x02);
++
+ /* Initialize RF DC calibration register to default value */
+ rt2800_rfcsr_write_dccal(rt2x00dev, 0, 0x47);
+ rt2800_rfcsr_write_dccal(rt2x00dev, 1, 0x00);