mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-18 21:28:02 +00:00
ramips: set WAN address in DTS for ASUS RT-AC51U/RT-AC54U
The location 0x28 in factory partition is the common one used for ethernet address on this architecture. Despite, it contains the label MAC address for the devices at hand. Consequently, this patch moves 0x28 to the ðernet node in DTS files (setting the WAN MAC address there) and sets up the lan_mac from 0x22 in 02_network. As a benefit, this allows to use label-mac-device in DTS instead of ucidef_set_label_macaddr. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
parent
a1f0fd8cba
commit
be9eab9bca
@ -7,6 +7,7 @@
|
||||
model = "Asus RT-AC51U";
|
||||
|
||||
aliases {
|
||||
label-mac-device = ðernet;
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
@ -37,7 +38,7 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x22>;
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
};
|
||||
|
||||
&state_default {
|
||||
|
@ -8,6 +8,7 @@
|
||||
model = "Asus RT-AC54U";
|
||||
|
||||
aliases {
|
||||
label-mac-device = ðernet;
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
@ -38,7 +39,7 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x22>;
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
};
|
||||
|
||||
&state_default {
|
||||
|
@ -273,8 +273,7 @@ ramips_setup_macs()
|
||||
;;
|
||||
asus,rt-ac51u|\
|
||||
asus,rt-ac54u)
|
||||
wan_mac=$(mtd_get_mac_binary factory 0x28)
|
||||
label_mac=$wan_mac
|
||||
lan_mac=$(mtd_get_mac_binary factory 0x22)
|
||||
;;
|
||||
dlink,dch-m225)
|
||||
lan_mac=$(mtd_get_mac_ascii factory lanmac)
|
||||
|
Loading…
Reference in New Issue
Block a user