2
0
forked from Ivasoft/openwrt

ramips: read label MAC address from flash instead of using phy0/phy1

This replaces all uses of $(cat /sys/class/ieee80211/phyX/macaddress)
by retrieval from the proper flash locations. This will make
02_network independent of WiFi setup again.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler
2019-11-11 00:18:45 +01:00
parent 4b81c1fd57
commit f4c3cfc620
4 changed files with 14 additions and 11 deletions

View File

@@ -242,10 +242,13 @@ ramips_setup_macs()
lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)")
wan_mac=$(macaddr_add "$lan_mac" 1)
;;
dlink,dir-615-d|\
dlink,dir-615-d)
wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
label_mac=$(mtd_get_mac_binary devdata 0x4004)
;;
dlink,dir-615-h1)
wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
label_mac=$(mtd_get_mac_binary factory 0x4)
;;
poray,m3|\
poray,m4-4m|\