aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/generic/base-files/etc
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-11-11 00:22:33 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-11-13 12:55:25 +0100
commitd421a8b9448968de0e3265f5beb469c210a909ab (patch)
treeefe7e2112da590cf0883271d830567ec4375aaa8 /target/linux/ath79/generic/base-files/etc
parentf4c3cfc620db16484fd85570c8215abc3b36dc82 (diff)
downloadupstream-d421a8b9448968de0e3265f5beb469c210a909ab.tar.gz
upstream-d421a8b9448968de0e3265f5beb469c210a909ab.tar.bz2
upstream-d421a8b9448968de0e3265f5beb469c210a909ab.zip
ath79: 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. For future reference: The MAC addresses of the FRITZ!WLAN Repeater 300E can be extracted from the urlader key value store: maca *:6B macb *:6C macwlan *:6D macdsl *:6E and be set by e.g. addr=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ath79/generic/base-files/etc')
-rwxr-xr-xtarget/linux/ath79/generic/base-files/etc/board.d/02_network4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index 34f6e31047..3a896b55b0 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -292,11 +292,11 @@ ath79_setup_macs()
ubnt,nanostation-m|\
ubnt,rocket-m|\
ubnt,unifi)
- label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
+ label_mac=$(mtd_get_mac_binary art 0x1002)
;;
avm,fritz300e)
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
- label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
+ label_mac=$(fritz_tffs -n macwlan -i $(find_mtd_part "tffs (1)"))
;;
avm,fritz4020)
lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))