aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2017-01-20 16:08:03 +0100
committerDaniel Golle <daniel@makrotopia.org>2017-01-20 16:09:52 +0100
commitb367eef21dccbc5115778001955847ac3af47db8 (patch)
tree0fce66736f012bb58c4575ead7be5e372c1cffc7 /package/kernel
parent920ee1f7079d8e20f7f427c6f2b788742861f034 (diff)
downloadupstream-b367eef21dccbc5115778001955847ac3af47db8.tar.gz
upstream-b367eef21dccbc5115778001955847ac3af47db8.tar.bz2
upstream-b367eef21dccbc5115778001955847ac3af47db8.zip
mac80211: rt2x00: add support for external LNA on MT7620
Reported-by: Tom Psyborg <pozega.tomislav@gmail.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'package/kernel')
-rw-r--r--package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch12
1 files changed, 9 insertions, 3 deletions
diff --git a/package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch b/package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch
index 5ba558055e..be9677642b 100644
--- a/package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch
+++ b/package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch
@@ -210,7 +210,7 @@
case RT5592:
*txwi_size = TXWI_DESC_SIZE_5WORDS;
*rxwi_size = RXWI_DESC_SIZE_6WORDS;
-@@ -3303,6 +3376,312 @@ static void rt2800_config_channel_rf55xx
+@@ -3303,6 +3376,318 @@ static void rt2800_config_channel_rf55xx
rt2800_bbp_write(rt2x00dev, 196, (rf->channel <= 14) ? 0x19 : 0x7F);
}
@@ -470,13 +470,19 @@
+ bbp = 0x40;
+ rt2800_bbp_write(rt2x00dev, 30, bbp);
+ rt2800_rfcsr_write(rt2x00dev, 39, 0);
-+ rt2800_rfcsr_write(rt2x00dev, 42, 0x7b);
++ if (rt2x00_has_cap_external_lna_bg(rt2x00dev))
++ rt2800_rfcsr_write(rt2x00dev, 42, 0xfb);
++ else
++ rt2800_rfcsr_write(rt2x00dev, 42, 0x7b);
+ } else {
+ rt2800_bbp_read(rt2x00dev, 30, &bbp);
+ bbp = 0x1f;
+ rt2800_bbp_write(rt2x00dev, 30, bbp);
+ rt2800_rfcsr_write(rt2x00dev, 39, 0x80);
-+ rt2800_rfcsr_write(rt2x00dev, 42, 0x5b);
++ if (rt2x00_has_cap_external_lna_bg(rt2x00dev))
++ rt2800_rfcsr_write(rt2x00dev, 42, 0xdb);
++ else
++ rt2800_rfcsr_write(rt2x00dev, 42, 0x5b);
+ }
+
+ rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, mac_sys_ctrl);