aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2016-03-20 14:41:58 +0000
committerJohn Crispin <blogic@openwrt.org>2016-03-20 14:41:58 +0000
commita764ba10942e26e8468677581fac77f30b73715a (patch)
treef1d0abf009a799fbae7a0c86e8927d93cb5ec57e /target/linux/ar71xx/files
parentfdbc285bc3ea3969e3e68213266940469a08eb19 (diff)
downloadmaster-187ad058-a764ba10942e26e8468677581fac77f30b73715a.tar.gz
master-187ad058-a764ba10942e26e8468677581fac77f30b73715a.tar.bz2
master-187ad058-a764ba10942e26e8468677581fac77f30b73715a.zip
ar71xx: WNR1000v2: fix for random WLAN MAC
Fix for invalid/random WLAN MAC address in WNR1000v2. 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 and WNR612v2. Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49051 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c9
1 files changed, 7 insertions, 2 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 13d1285f48..b1b03942fb 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
@@ -88,7 +88,7 @@
#define WNR2000V3_KEYS_POLL_INTERVAL 20 /* msecs */
#define WNR2000V3_KEYS_DEBOUNCE_INTERVAL (3 * WNR2000V3_KEYS_POLL_INTERVAL)
-/* ART offsets for: WNR2000v3, WNR612v2 */
+/* ART offsets for: WNR2000v3, WNR612v2, WNR1000v2 */
#define WNR2000V3_MAC0_OFFSET 0
#define WNR2000V3_MAC1_OFFSET 6
#define WNR2000V3_PCIE_CALDATA_OFFSET 0x1000
@@ -453,7 +453,12 @@ MIPS_MACHINE(ATH79_MACH_WNR612_V2, "WNR612V2", "NETGEAR WNR612 V2", wnr612v2_set
static void __init wnr1000v2_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(wnr1000v2_leds_gpio),
wnr1000v2_leds_gpio);