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:
parent
eadd81b17e
commit
82b8feabc0
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user