summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid SantamarĂ­a Rogado <howl.nsp@gmail.com>2019-01-18 22:28:41 +0100
committerJo-Philipp Wich <jo@mein.io>2019-01-30 12:24:32 +0100
commite6c2f3feb1e5bf30f25b333f91ec2be6f5b7102d (patch)
tree5e0c5d195094ef870d5680a67b9243ac9113f1e8
parent2c7a1ccaeac6bb4a197e12257f166022d6757fb3 (diff)
downloadopenwrt-e6c2f3feb1e5bf30f25b333f91ec2be6f5b7102d.tar.gz
openwrt-e6c2f3feb1e5bf30f25b333f91ec2be6f5b7102d.tar.bz2
openwrt-e6c2f3feb1e5bf30f25b333f91ec2be6f5b7102d.zip
ar71xx: use correct wan mac address for the TP-Link Archer C7 v4
The correct MAC address for this device is lan_mac +1, there is no need to set lan_mac so use base_mac variable instead lan_mac. Based on this PR for ath79: https://github.com/openwrt/openwrt/pull/1726 Signed-off-by: David SantamarĂ­a Rogado <howl.nsp@gmail.com> [fix alphabetical ordering, reword subject] Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 4bcf58135210736f2a1603609d2a76b3e188e2ad)
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/board.d/02_network18
1 files changed, 11 insertions, 7 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 b0076366bc..6f5f07e1c5 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -576,6 +576,10 @@ ar71xx_setup_macs()
local wan_mac=""
case $board in
+ archer-c7-v4)
+ base_mac=$(mtd_get_mac_binary config 8)
+ wan_mac=$(macaddr_add "$base_mac" 1)
+ ;;
dgl-5500-a1|\
dir-825-c1)
wan_mac=$(mtd_get_mac_ascii nvram "wan_mac")
@@ -587,6 +591,13 @@ ar71xx_setup_macs()
lan_mac=$(mtd_get_mac_binary caldata 0)
wan_mac=$(mtd_get_mac_binary caldata 6)
;;
+ dir-869-a1|\
+ mynet-n750)
+ wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
+ ;;
+ esr900)
+ wan_mac=$(mtd_get_mac_ascii u-boot-env "wanaddr")
+ ;;
fritz300e)
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
;;
@@ -595,13 +606,6 @@ ar71xx_setup_macs()
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")
- ;;
- dir-869-a1|\
- mynet-n750)
- wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
- ;;
wlr8100)
lan_mac=$(mtd_get_mac_ascii u-boot-env "ethaddr")
wan_mac=$(mtd_get_mac_ascii u-boot-env "wanaddr")