[source] ar71xx: fix MAC addresses on TP-Link TL-WR1043ND v4
LEDE Commits
lede-commits at lists.infradead.org
Mon Sep 11 10:48:55 PDT 2017
neoraider pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/415175246eec0c59351e575ce6f3769b70772b09
commit 415175246eec0c59351e575ce6f3769b70772b09
Author: Matthias Schiffer <mschiffer at universe-factory.net>
AuthorDate: Mon Sep 11 19:41:41 2017 +0200
ar71xx: fix MAC addresses on TP-Link TL-WR1043ND v4
The addresses were read from the 'config' partition, which would not always
contain the addresses at the same offsets, depending on the stock firmware
version used before flashing LEDE. Change this to get the addresses from
the 'product-info' partition, which is read-only.
Reported-and-tested-by: Andreas Ziegler <ml at andreas-ziegler.de>
Signed-off-by: Matthias Schiffer <mschiffer at universe-factory.net>
---
target/linux/ar71xx/base-files/etc/board.d/02_network | 3 ++-
target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network
index 01c947d..cb707f6 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -481,7 +481,8 @@ ar71xx_setup_macs()
wan_mac=$(mtd_get_mac_binary caldata 6)
;;
tl-wr1043nd-v4)
- wan_mac=$(mtd_get_mac_binary config 0x1017c)
+ lan_mac=$(mtd_get_mac_binary product-info 8)
+ wan_mac=$(macaddr_add "$lan_mac" 1)
;;
esr900)
wan_mac=$(mtd_get_mac_ascii u-boot-env "wanaddr")
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c
index cb224f4..b1539c5 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr1043nd-v4.c
@@ -57,7 +57,7 @@
#define TL_WR1043_V4_KEYS_POLL_INTERVAL 20 /* msecs */
#define TL_WR1043_V4_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR1043_V4_KEYS_POLL_INTERVAL)
-#define TL_WR1043_V4_MAC_LOCATION 0x1ff80174
+#define TL_WR1043_V4_MAC_LOCATION 0x1ff50008
#define TL_WR1043_V4_EEPROM_ADDR 0x1fff0000
#define TL_WR1043_V4_WMAC_CALDATA_OFFSET 0x1000
More information about the lede-commits
mailing list