ramips: edimax,rx21s: use nvmem for ethaddr

Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14182
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Rosen Penev 2024-06-16 16:25:24 -07:00 committed by Robert Marko
parent 8dd95cc6b5
commit d7178cdd6e
2 changed files with 19 additions and 1 deletions

View file

@ -78,6 +78,13 @@
label = "u-boot-env";
reg = <0x30000 0x10000>;
read-only;
nvmem-layout {
compatible = "u-boot,env";
macaddr_uboot_ethaddr: ethaddr {
};
};
};
partition@40000 {
@ -160,21 +167,33 @@
port@1 {
status = "okay";
label = "lan4";
nvmem-cells = <&macaddr_uboot_ethaddr>;
nvmem-cell-names = "mac-address";
};
port@2 {
status = "okay";
label = "lan3";
nvmem-cells = <&macaddr_uboot_ethaddr>;
nvmem-cell-names = "mac-address";
};
port@3 {
status = "okay";
label = "lan2";
nvmem-cells = <&macaddr_uboot_ethaddr>;
nvmem-cell-names = "mac-address";
};
port@4 {
status = "okay";
label = "lan1";
nvmem-cells = <&macaddr_uboot_ethaddr>;
nvmem-cell-names = "mac-address";
};
};
};

View file

@ -261,7 +261,6 @@ ramips_setup_macs()
;;
edimax,ra21s|\
edimax,rg21s)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
;;
elecom,wrc-2533ghbk2-t|\