mirror of
https://git.openwrt.org/openwrt/openwrt.git/
synced 2025-10-06 03:12:40 +02:00
ath79: replace various mtd_get_mac_text
Deprecated. Replaced with nvmem. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/20176 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
committed by
Robert Marko
parent
cbdc2b851e
commit
6157a2aeb9
@@ -36,4 +36,11 @@
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "qcom,ath10k";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&macaddr_mib0_66 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
|
@@ -36,4 +36,11 @@
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
|
||||
wifi@0,0 {
|
||||
compatible = "pci168c,0030";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
nvmem-cells = <&macaddr_mib0_66 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
|
@@ -11,6 +11,7 @@
|
||||
model = "D-Link DCH-G020 A1";
|
||||
|
||||
aliases {
|
||||
label-mac-device = ð0;
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
@@ -129,6 +130,24 @@
|
||||
label = "mp";
|
||||
reg = <0x20000 0x10000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_mp_1: macaddr@1 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x1 0x11>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
|
||||
macaddr_mp_13: macaddr@13 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x13 0x11>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
@@ -168,11 +187,14 @@
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&macaddr_mp_1 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&cal_art_1000>;
|
||||
nvmem-cell-names = "calibration";
|
||||
nvmem-cells = <&cal_art_1000>, <&macaddr_mp_13 0>;
|
||||
nvmem-cell-names = "calibration", "mac-address";
|
||||
};
|
||||
|
@@ -8,6 +8,7 @@
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
label-mac-device = ð0;
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_status;
|
||||
led-running = &led_power;
|
||||
@@ -106,6 +107,24 @@
|
||||
label = "mp";
|
||||
reg = <0x20000 0x10000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_mp_1: macaddr@1 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x1 0x11>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
|
||||
macaddr_mp_13: macaddr@13 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x13 0x11>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
@@ -125,11 +144,14 @@
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&macaddr_mp_1 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&wmac {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&cal_art_1000>;
|
||||
nvmem-cell-names = "calibration";
|
||||
nvmem-cells = <&cal_art_1000>, <&macaddr_mp_13 0>;
|
||||
nvmem-cell-names = "calibration", "mac-address";
|
||||
};
|
||||
|
@@ -689,12 +689,6 @@ ath79_setup_macs()
|
||||
plc_mac=$(mtd_get_mac_ascii art "protest_plc_mac")
|
||||
[ -n "$plc_mac" ] && ucidef_set_interface_macaddr "plc" $plc_mac
|
||||
;;
|
||||
dlink,dap-1330-a1|\
|
||||
dlink,dap-1365-a1|\
|
||||
dlink,dch-g020-a1)
|
||||
lan_mac=$(mtd_get_mac_text "mp" 0x1)
|
||||
label_mac=$lan_mac
|
||||
;;
|
||||
dlink,dap-2230-a1|\
|
||||
dlink,dap-2660-a1|\
|
||||
dlink,dap-2680-a1|\
|
||||
|
@@ -24,11 +24,6 @@ case "$board" in
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
mtd_get_mac_ascii art "protest_ath0_mac" > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
dlink,dap-1330-a1|\
|
||||
dlink,dap-1365-a1|\
|
||||
dlink,dch-g020-a1)
|
||||
mtd_get_mac_text "mp" 0x13 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
dlink,dap-2230-a1|\
|
||||
dlink,dap-3320-a1)
|
||||
mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
|
||||
@@ -127,12 +122,4 @@ case "$board" in
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
mtd_get_mac_ascii devdata wlan5mac > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
zyxel,nwa1123-ac)
|
||||
[ "$PHYNBR" -eq 0 ] && \
|
||||
mtd_get_mac_text mib0 0x66 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
zyxel,nwa1123-ni)
|
||||
[ "$PHYNBR" -eq 1 ] && \
|
||||
mtd_get_mac_text mib0 0x66 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
esac
|
||||
|
Reference in New Issue
Block a user