1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-16 04:03:56 +02:00

ramips: add eth0 MAC address for Edimax RG21S

So far, lan/wan MAC address for Edimax RG21S are only read using
mtd_get_mac_ascii, so eth0.1 and eth0.2 addresses are set, but
eth0 address is random. Since the device's LAN address is the same
as for 2.4 GHz, though, this patch set's the eth0 address based
on the 2.4 GHz one, which can be extracted by mtd-mac-address.

This will also allow to move the label MAC address setup to DT.

The setup of lan_mac and wan_mac are kept in 02_network, so those
locations are still in use, too.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2019-12-17 13:43:25 +01:00
parent d0efb1ba95
commit 02f8dbc6fe
2 changed files with 3 additions and 1 deletions

View File

@ -15,6 +15,7 @@
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
label-mac-device = &ethernet;
};
chosen {
@ -125,6 +126,8 @@
};
&ethernet {
mtd-mac-address = <&factory 0x4>;
mediatek,portmap = "wllll";
port@5 {
status = "disabled";

View File

@ -201,7 +201,6 @@ ramips_setup_macs()
edimax,rg21s)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
label_mac=$(mtd_get_mac_binary factory 0x4)
;;
hiwifi,hc5962)
lan_mac=$(mtd_get_mac_ascii bdinfo "Vfac_mac ")