]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ath79: iodata etg3-r: set eth MAC in dts 21119/head
authorRosen Penev <rosenp@gmail.com>
Tue, 9 Dec 2025 00:49:32 +0000 (16:49 -0800)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Thu, 11 Jun 2026 08:36:07 +0000 (10:36 +0200)
Userspace handling is deprecated. WAN stuff needs to remain as no DSA
yet.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21119
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/ath79/dts/ar9342_iodata_etg3-r.dts
target/linux/ath79/generic/base-files/etc/board.d/02_network

index 21c5d6bc17837af8324e921c643dceebf2294980..76e94e910581305d3ca13d465462d40d471f4e3c 100644 (file)
                        partition@40000 {
                                label = "u-boot-env";
                                reg = <0x040000 0x010000>;
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env";
+
+                                       macaddr_uboot_ethaddr: ethaddr {
+                                               #nvmem-cell-cells = <1>;
+                                       };
+                               };
                        };
 
                        partition@50000 {
        phy-mode = "rgmii";
        phy-handle = <&phy0>;
 
+       nvmem-cells = <&macaddr_uboot_ethaddr 0>;
+       nvmem-cell-names = "mac-address";
+
        gmac-config {
                device = <&gmac>;
 
index 8c5c0a0935d6d5b64ec1694fc81ec1ee4b5c15e7..7194d16f24d6400c4a9ef5d462841be3130866c2 100644 (file)
@@ -729,8 +729,7 @@ ath79_setup_macs()
                label_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
                ;;
        iodata,etg3-r)
-               lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
-               wan_mac=$(macaddr_add "$lan_mac" -1)
+               wan_mac=$(macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" -1)
                label_mac=$wan_mac
                ;;
        iodata,wn-ac1167dgr|\