From 002fdd378185aac92526ba86557620021aecc84d Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 15 Aug 2024 12:57:51 -0700 Subject: [PATCH] lantiq: vgv7510kw22: use NVMEM for mac addresses Userspace handling is deprecated. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/16230 Signed-off-by: Robert Marko --- .../arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi | 3 +++ target/linux/lantiq/xrx200/base-files/etc/board.d/02_network | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi index daf115088b..5ef6a4cc9e 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi @@ -169,6 +169,9 @@ label = "wan"; phy-mode = "mii"; phy-handle = <&phy1>; + + nvmem-cells = <&macaddr_boardconfig_16 2>; + nvmem-cell-names = "mac-address"; }; port@2 { reg = <2>; diff --git a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network index 2208752c14..27a3c75edc 100644 --- a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network @@ -110,10 +110,6 @@ lantiq_setup_macs() lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) wan_mac=$(macaddr_add "$lan_mac" 1) ;; - arcadyan,vgv7510kw22-brn|\ - arcadyan,vgv7510kw22-nor) - wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 0x16)" 2) - ;; arcadyan,vgv7519-brn|\ arcadyan,vgv7519-nor|\ arcadyan,vrv9510kwac23) -- 2.30.2