aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2014-01-10 09:07:12 +0000
committerGabor Juhos <juhosg@openwrt.org>2014-01-10 09:07:12 +0000
commit14311df9f8456f17a8bb9c3035a121c6da5054f6 (patch)
tree374455a1bd0d0fd4555f5665ca6810f7ff036d67 /target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c
parentf94b395b533141d4fdff3faedfaaaa7fa996b4a7 (diff)
downloadmaster-187ad058-14311df9f8456f17a8bb9c3035a121c6da5054f6.tar.gz
master-187ad058-14311df9f8456f17a8bb9c3035a121c6da5054f6.tar.bz2
master-187ad058-14311df9f8456f17a8bb9c3035a121c6da5054f6.zip
ar71xx: Fix WD My Net N600 weak signal issue
The LNAs need to be enabled by setting their respective GPIO to high even though the original firmware's setting sets them to low on initialization. Obviously the LNAs are then later initialized by the driver on the OEM firmware. Without this fix the device is mostly "deaf". Signed-off-by: Felix Kaechele <heffer@fedoraproject.org> Tested-by: Steven Haigh <netwiz@crc.id.au> Patchwork: http://patchwork.openwrt.org/patch/4689/ [juhosg: - remove the GPIO LED changes, the My Net N600 has no yellow LEDs at all, - change subject and update the commit message] Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39214 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c
index 476cff8d2e..9e785ca163 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-mynet-n600.c
@@ -42,6 +42,9 @@
#define MYNET_N600_GPIO_BTN_RESET 16
#define MYNET_N600_GPIO_BTN_WPS 17
+#define MYNET_N600_GPIO_EXTERNAL_LNA0 14
+#define MYNET_N600_GPIO_EXTERNAL_LNA1 15
+
#define MYNET_N600_KEYS_POLL_INTERVAL 20 /* msecs */
#define MYNET_N600_KEYS_DEBOUNCE_INTERVAL (3 * MYNET_N600_KEYS_POLL_INTERVAL)
@@ -152,6 +155,18 @@ static void __init mynet_n600_setup(void)
ARRAY_SIZE(mynet_n600_gpio_keys),
mynet_n600_gpio_keys);
+ /*
+ * Control signal for external LNAs 0 and 1
+ * Taken from GPL bootloader source:
+ * board/ar7240/db12x/alpha_gpio.c
+ */
+ gpio_request_one(MYNET_N600_GPIO_EXTERNAL_LNA0,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "External LNA0");
+ gpio_request_one(MYNET_N600_GPIO_EXTERNAL_LNA1,
+ GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
+ "External LNA1");
+
mynet_n600_get_mac("wlan24mac=", tmpmac);
ath79_register_wmac(art + MYNET_N600_WMAC_CALDATA_OFFSET, tmpmac);