aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-12-08 14:55:49 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-12-12 13:11:49 +0100
commita858d6d0e2864e0293a6eb721cbcd193adf711cd (patch)
tree9358dfaab944a4ee1e9e371c03b038fa17ca7ef8
parentfef18108972d270b8202ad4d010e229900a1a38e (diff)
downloadupstream-a858d6d0e2864e0293a6eb721cbcd193adf711cd.tar.gz
upstream-a858d6d0e2864e0293a6eb721cbcd193adf711cd.tar.bz2
upstream-a858d6d0e2864e0293a6eb721cbcd193adf711cd.zip
ramips: rt288x: use flash location for wan_mac in 02_network
This uses the flash locations instead of eth0 MAC address to calculate MAC address increments for WAN. The change will make the MAC address setup of a particular device more obvious and removes the dependency of 02_network on the eth0 initialization. This removes the wan_mac setup for ralink,v11st-fe as this device does not set up a MAC address for ethernet in the first place. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
-rwxr-xr-xtarget/linux/ramips/rt288x/base-files/etc/board.d/02_network9
1 files changed, 5 insertions, 4 deletions
diff --git a/target/linux/ramips/rt288x/base-files/etc/board.d/02_network b/target/linux/ramips/rt288x/base-files/etc/board.d/02_network
index b9588f4aad..0cc0e0b28b 100755
--- a/target/linux/ramips/rt288x/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/rt288x/base-files/etc/board.d/02_network
@@ -42,13 +42,14 @@ ramips_setup_macs()
local label_mac=""
case $board in
- airlink101,ar670w|\
+ airlink101,ar670w)
+ wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x2004)" 1)
+ ;;
airlink101,ar725w|\
asus,rt-n15|\
belkin,f5d8235-v1|\
- buffalo,wzr-agl300nh|\
- ralink,v11st-fe)
- wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
+ buffalo,wzr-agl300nh)
+ wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1)
;;
esac