Skip to content

Commit

Permalink
ar71xx: fix MAC addresses on TP-Link TL-WR1043ND v4
Browse files Browse the repository at this point in the history
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@andreas-ziegler.de>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
  • Loading branch information
neocturne committed Sep 11, 2017
1 parent 79440ea commit 53839da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion target/linux/ar71xx/base-files/etc/board.d/02_network
Expand Up @@ -531,7 +531,8 @@ ar71xx_setup_macs()
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
;;
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")
Expand Down
Expand Up @@ -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
Expand Down

0 comments on commit 53839da

Please sign in to comment.