aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2014-01-28 17:20:08 +0000
committerGabor Juhos <juhosg@openwrt.org>2014-01-28 17:20:08 +0000
commit4d8098a62b890aba030c7906e35bd52cfdb9c11d (patch)
treefa05452ee2d610b0747ad4ee0257e6ccd416abc0
parentf555ce40f44dde9563eb2911b9cefa9453d25aa8 (diff)
downloadupstream-4d8098a62b890aba030c7906e35bd52cfdb9c11d.tar.gz
upstream-4d8098a62b890aba030c7906e35bd52cfdb9c11d.tar.bz2
upstream-4d8098a62b890aba030c7906e35bd52cfdb9c11d.zip
AA: ar71xx: fix bad RX sensitivity on newer TL-WDR4300 boards
Backport of r39392. 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. [Backport note: the 'ath79_wmac_set_ext_lna_gpio' function is not available in AA, use the 'gpio_request_one' instead.] Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@39408 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wdr4300.c10
1 files changed, 10 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 7be29555dd..ea4b1c83bd 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
@@ -152,6 +155,13 @@ static void __init wdr4300_setup(void)
ARRAY_SIZE(wdr4300_gpio_keys),
wdr4300_gpio_keys);
+ gpio_request_one(WDR4300_GPIO_EXTERNAL_LNA0,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "external LNA0");
+ gpio_request_one(WDR4300_GPIO_EXTERNAL_LNA1,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "external LNA1");
+
ath79_init_mac(tmpmac, mac, -1);
ath79_register_wmac(art + WDR4300_WMAC_CALDATA_OFFSET, tmpmac);