]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ath79: ws-ap3610: assign MAC address with nvmem 23146/head
authorRosen Penev <rosenp@gmail.com>
Tue, 28 Apr 2026 21:52:29 +0000 (14:52 -0700)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Fri, 12 Jun 2026 07:28:37 +0000 (09:28 +0200)
Userspace handling is deprecated.

As with all ws-ap devices, a redundant u-boot environment is used.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23146
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts
target/linux/ath79/generic/base-files/lib/preinit/10_fix_eth_mac.sh

index 27ac6c977b15b2e849047f86215fc57146986911..1eb61a74d5e4e2197012d4604a9253f871e6a91f 100644 (file)
 
        phy-mode = "rgmii-id";
        phy-handle = <&phy0>;
+
+       nvmem-cells = <&macaddr_cfg1_ethaddr>;
+       nvmem-cell-names = "mac-address";
 };
 
 &spi {
                                label = "cfg1";
                                reg = <0xe80000 0x40000>;
                                read-only;
+
+                               nvmem-layout {
+                                       compatible = "u-boot,env-redundant-bool";
+                                       env-size = <0x10000>;
+
+                                       macaddr_cfg1_ethaddr: ethaddr {
+                                       };
+                               };
                        };
 
                        partition@ec0000 {
index 1126a1eefc0205e60834122d8d2a9057dc531bf5..e30a31a59ca18819aedf5e06a6854d5f97fad9cf 100644 (file)
@@ -12,9 +12,6 @@ preinit_set_mac_address() {
                ip link set dev eth0 address $(mtd_get_mac_ascii bdcfg "lanmac")
                ip link set dev eth1 address $(mtd_get_mac_ascii bdcfg "wanmac")
                ;;
-       siemens,ws-ap3610)
-               ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr)
-               ;;
        moxa,awk-1137c)
                ip link set dev eth0 address $(mtd_get_mac_ascii u-boot-env mac_addr)
                ;;