]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ramips: edimax,rx21s: use nvmem for ethaddr
authorRosen Penev <rosenp@gmail.com>
Sun, 16 Jun 2024 23:25:24 +0000 (16:25 -0700)
committerRobert Marko <robimarko@gmail.com>
Sat, 14 Mar 2026 20:34:29 +0000 (21:34 +0100)
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>
target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi
target/linux/ramips/mt7621/base-files/etc/board.d/02_network

index 8e7652cac7ea3e980e8612be901f22dba01ec282..3a235070bf36815c9a6a67bb16edbc6338f0a5dc 100644 (file)
                                label = "u-boot-env";
                                reg = <0x30000 0x10000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
+
+                                       macaddr_uboot_ethaddr: ethaddr {
+                                       };
+                               };
                        };
 
                        partition@40000 {
                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";
                };
        };
 };
index c6e440b8e9e573b7befc21ac1837d4afd0659b47..c16196e1c09f193d65efc58a688810b35bb338ab 100644 (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|\