aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-02-25 13:31:38 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-02-25 13:31:38 +0000
commitb6b7bcd88576ec0c11ffc193a21501245ecd7a31 (patch)
tree42a03a4d69ceca6cf622dcd859b0e225b90c1826 /target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
parent9b4456d376ac5a814bfe35925e0ebe289462aa08 (diff)
downloadmaster-187ad058-b6b7bcd88576ec0c11ffc193a21501245ecd7a31.tar.gz
master-187ad058-b6b7bcd88576ec0c11ffc193a21501245ecd7a31.tar.bz2
master-187ad058-b6b7bcd88576ec0c11ffc193a21501245ecd7a31.zip
ar71xx: WNR612v2: fix for random WLAN MAC
Fix for invalid/random WLAN MAC address in WNR612v2. Permanent platform MAC is calculated and assigned during system startup. WLAN MAC follows wired Ethernet interface addresses. This is the same fix as for WNR2000v3. Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48779 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
index 59d10a9997..7776585033 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
@@ -64,6 +64,7 @@
#define WNR2000V3_KEYS_POLL_INTERVAL 20 /* msecs */
#define WNR2000V3_KEYS_DEBOUNCE_INTERVAL (3 * WNR2000V3_KEYS_POLL_INTERVAL)
+/* ART offsets for: WNR2000v3, WNR612v2 */
#define WNR2000V3_MAC0_OFFSET 0
#define WNR2000V3_MAC1_OFFSET 6
#define WNR2000V3_PCIE_CALDATA_OFFSET 0x1000
@@ -254,7 +255,12 @@ MIPS_MACHINE(ATH79_MACH_WNR2000_V3, "WNR2000V3", "NETGEAR WNR2000 V3", wnr2000v3
static void __init wnr612v2_setup(void)
{
- wnr_common_setup(NULL);
+ u8 wlan_mac_addr[6];
+
+ wnr_get_wmac(wlan_mac_addr, WNR2000V3_MAC0_OFFSET,
+ WNR2000V3_MAC1_OFFSET, WNR2000V3_WMAC_OFFSET);
+
+ wnr_common_setup(wlan_mac_addr);
ath79_register_leds_gpio(-1, ARRAY_SIZE(wnr612v2_leds_gpio),
wnr612v2_leds_gpio);