Message ID | 20191110233217.2656-3-freifunk@adrianschmutzler.de |
---|---|
State | Accepted |
Delegated to: | Adrian Schmutzler |
Headers | show |
Series | Make 02_network independent of WiFi setup (again) | expand |
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..a8ab07aef5 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,10 @@ 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) ;; avm,fritz4020) lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
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 the AVM FRITZ!WLAN Repeater 300E this replacement is non-trivial. As it would be the only device in the whole trunk to keep the old mechanism, this drops label MAC address for this device for now. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> --- Is there an easy way to retrieve phy0 MAC address from fritz-300e? Can it by deduced from the caldata extraction by assuming the standard MAC offset after reverse? --- target/linux/ath79/generic/base-files/etc/board.d/02_network | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)