From f4c3cfc620db16484fd85570c8215abc3b36dc82 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Mon, 11 Nov 2019 00:18:45 +0100 Subject: 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 --- target/linux/ramips/mt7620/base-files/etc/board.d/02_network | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'target/linux/ramips/mt7620') diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index dfca48e123..1b51f17485 100755 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -288,7 +288,7 @@ ramips_setup_macs() glinet,gl-mt300n|\ glinet,gl-mt750) 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) ;; hiwifi,hc5661|\ hiwifi,hc5761|\ @@ -312,11 +312,11 @@ ramips_setup_macs() wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR) ;; zbtlink,zbt-we1026-5g-16m) - label_mac=$(cat /sys/class/ieee80211/phy1/macaddress) + label_mac=$(mtd_get_mac_binary factory 0x4) ;; zbtlink,zbt-we1026-h-32m) wan_mac=$(mtd_get_mac_binary factory 0x2e) - label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) + label_mac=$(mtd_get_mac_binary factory 0x4) ;; zyxel,keenetic-omni|\ zyxel,keenetic-omni-ii|\ -- cgit v1.2.3