ipq806x: e8350: use nvmem for MAC address

Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22263
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Rosen Penev 2026-03-08 15:32:37 -07:00 committed by Christian Marangi
parent eadd81b17e
commit 82b8feabc0
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG Key ID: AC001D09ADBFEAD7
2 changed files with 14 additions and 5 deletions

View File

@ -85,11 +85,6 @@ ipq806x_setup_macs()
hw_mac_addr=$(mtd_get_mac_ascii hwconfig HW.WAN.MAC.Address)
ucidef_set_interface_macaddr "wan" "$(macaddr_add $hw_mac_addr 1)"
;;
linksys,e8350-v1)
hw_mac_addr=$(mtd_get_mac_ascii 0:appsblenv ethaddr)
ucidef_set_interface_macaddr "lan" "$(macaddr_add $hw_mac_addr 2)"
ucidef_set_interface_macaddr "wan" "$(macaddr_add $hw_mac_addr 3)"
;;
esac
}

View File

@ -210,6 +210,14 @@
label = "0:appsblenv";
reg = <0x0130000 0x0040000>;
read-only;
nvmem-layout {
compatible = "u-boot,env";
macaddr_uboot_ethaddr: ethaddr {
#nvmem-cell-cells = <1>;
};
};
};
art: partition@170000 {
@ -399,6 +407,9 @@
pinctrl-0 = <&rgmii2_pins>;
pinctrl-names = "default";
nvmem-cells = <&macaddr_uboot_ethaddr 3>;
nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
full-duplex;
@ -411,6 +422,9 @@
phy-mode = "sgmii";
qcom,id = <2>;
nvmem-cells = <&macaddr_uboot_ethaddr 2>;
nvmem-cell-names = "mac-address";
fixed-link {
speed = <1000>;
full-duplex;