aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2014-01-24 17:40:17 +0000
committerGabor Juhos <juhosg@openwrt.org>2014-01-24 17:40:17 +0000
commitf85231257edd47dd0ac1e3075775c052199500b1 (patch)
tree4f99206685cabae3694fdde8dede2fa328be1a39 /target
parent09bf46d4189531cb530ad6514e795c30012bcd1a (diff)
downloadupstream-f85231257edd47dd0ac1e3075775c052199500b1.tar.gz
upstream-f85231257edd47dd0ac1e3075775c052199500b1.tar.bz2
upstream-f85231257edd47dd0ac1e3075775c052199500b1.zip
ar71xx: fix bad RX sensitivity on newer TL-WDR4300 boards
On recent TL-WDR4300 boards the external LNAs of the 2.4GHz interface are connected to GPIO lines. Because these GPIO lines are disabled by default, the RX sensitivity of the device is quite bad. Setup the GPIOs of the external LNAs to fix the issue. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 39392
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c
index 4a0ae968f3..99ae80df9b 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c
@@ -37,6 +37,9 @@
#define WDR4300_GPIO_BTN_WPS 16
#define WDR4300_GPIO_BTN_RFKILL 17
+#define WDR4300_GPIO_EXTERNAL_LNA0 18
+#define WDR4300_GPIO_EXTERNAL_LNA1 19
+
#define WDR4300_GPIO_USB1_POWER 22
#define WDR4300_GPIO_USB2_POWER 21
@@ -162,6 +165,9 @@ static void __init wdr4300_setup(void)
ARRAY_SIZE(wdr4300_gpio_keys),
wdr4300_gpio_keys);
+ ath79_wmac_set_ext_lna_gpio(0, WDR4300_GPIO_EXTERNAL_LNA0);
+ ath79_wmac_set_ext_lna_gpio(1, WDR4300_GPIO_EXTERNAL_LNA1);
+
ath79_init_mac(tmpmac, mac, -1);
ath79_register_wmac(art + WDR4300_WMAC_CALDATA_OFFSET, tmpmac);