aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-08-16 12:59:09 +0200
committerChuanhong Guo <gch981213@gmail.com>2019-09-07 21:41:44 +0800
commitaaf90d88087d7d23b1b829bef5012cc0a0b5ed4c (patch)
treea2845a232732d18870de16aa9f856cf1c196a8e7 /target/linux/ramips
parente35e4a996e26f17b69d200505ecea78af96a2704 (diff)
downloadupstream-aaf90d88087d7d23b1b829bef5012cc0a0b5ed4c.tar.gz
upstream-aaf90d88087d7d23b1b829bef5012cc0a0b5ed4c.tar.bz2
upstream-aaf90d88087d7d23b1b829bef5012cc0a0b5ed4c.zip
ramips: initialize MAC addresses from flash where possible
This patch changes wan MAC address setup from retrieving it by calculation to reading it from flash. Changes are limited to cases where on-device check was possible. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> [fix mac for newifi-d1; drop adslr,g7 because it's unlikely for vendor to specifically use 2.4g mac as wan_mac] Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/ramips')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network14
1 files changed, 9 insertions, 5 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 8c6c55d7b7..b80041c2ab 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -515,7 +515,8 @@ ramips_setup_macs()
netgear,wnce2001|\
ohyeah,oy-0001|\
phicomm,k2g|\
- skylab,skw92a)
+ skylab,skw92a|\
+ totolink,lr1200)
wan_mac=$(mtd_get_mac_binary factory 0x2e)
;;
dlink,dir-300-b7|\
@@ -536,12 +537,18 @@ ramips_setup_macs()
wan_mac=$(macaddr_add "$lan_mac" 1)
;;
asus,rt-ac57u|\
+ d-team,newifi-d2|\
+ d-team,pbr-m1|\
elecom,wrc-1167ghbk2-s|\
elecom,wrc-1900gst|\
elecom,wrc-2533gst|\
+ lenovo,newifi-d1|\
phicomm,k2p|\
planex,vr500|\
- samknows,whitebox-v8)
+ samknows,whitebox-v8|\
+ youku,yk-l2|\
+ zbtlink,zbt-we1326|\
+ zbtlink,zbt-we3526)
wan_mac=$(mtd_get_mac_binary factory 0xe006)
;;
asus,rt-n56u)
@@ -625,9 +632,6 @@ ramips_setup_macs()
iptime,a604m)
wan_mac=$(mtd_get_mac_binary u-boot 0x1fc40)
;;
- lenovo,newifi-d1)
- lan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
- ;;
linksys,e1700)
wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR)
;;