mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 06:33:41 +00:00
ath79: ews511ap: use nvmewm
Userspace handling is deprecated. This is a weird one. It should be using u-boot,env, but the variable name is unknown. Keep it as is. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
5dfc48e04e
commit
efd03c964a
@ -88,8 +88,8 @@
|
||||
wifi@0,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&cal_art_5000>;
|
||||
nvmem-cell-names = "calibration";
|
||||
nvmem-cells = <&cal_art_5000>, <&macaddr_uboot_e9 1>;
|
||||
nvmem-cell-names = "calibration", "mac-address";
|
||||
};
|
||||
};
|
||||
|
||||
@ -115,6 +115,18 @@
|
||||
ubootenv: partition@40000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x040000 0x010000>;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_uboot_e9: macaddr@e9 {
|
||||
compatible = "mac-base";
|
||||
reg = <0xe9 0x11>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
@ -150,6 +162,14 @@
|
||||
status = "okay";
|
||||
|
||||
phy-handle = <&swphy4>;
|
||||
|
||||
nvmem-cells = <&macaddr_uboot_e9 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
ð1 {
|
||||
nvmem-cells = <&macaddr_uboot_e9 1>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&wmac {
|
||||
|
@ -732,12 +732,6 @@ ath79_setup_macs()
|
||||
engenius,esr900)
|
||||
wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
|
||||
;;
|
||||
engenius,ews511ap)
|
||||
lan_mac=$(mtd_get_mac_text "u-boot-env" 0xe9)
|
||||
eth1_mac=$(macaddr_add "$lan_mac" 1)
|
||||
ucidef_set_interface "eth0" ifname "eth0" protocol "none" macaddr "$lan_mac"
|
||||
ucidef_set_interface "eth1" ifname "eth1" protocol "none" macaddr "$eth1_mac"
|
||||
;;
|
||||
hak5,lan-turtle|\
|
||||
hak5,packet-squirrel)
|
||||
label_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
|
||||
|
@ -56,10 +56,6 @@ case "$board" in
|
||||
engenius,ecb1750)
|
||||
macaddr_add "$(mtd_get_mac_ascii u-boot-env athaddr)" ${PHYNBR} > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
engenius,ews511ap)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
macaddr_add $(cat /sys/class/net/eth0/address) 1 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
enterasys,ws-ap3705i)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
mtd_get_mac_ascii u-boot-env0 RADIOADDR1 > /sys${DEVPATH}/macaddress
|
||||
|
Loading…
Reference in New Issue
Block a user