mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 21:58:04 +00:00
Revert "ath79: elecom,wab: use nvmem"
This reverts commit 70e41d0205
.
"ethaddr" is stored into the "u-boot-env" (stock: "Config") partition
and it's quoted with double-quotations, but that format is not supported
by the current NVMEM u-boot-env driver (and mac_pton() function) and the
MAC address won't be parsed to byte array.
This causes random MAC addresses on the adapters, so revert the above
commit.
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17116
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
39b0f081ec
commit
af611bce44
@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
/ {
|
/ {
|
||||||
aliases {
|
aliases {
|
||||||
label-mac-device = ð0;
|
|
||||||
led-boot = &led_status;
|
led-boot = &led_status;
|
||||||
led-failsafe = &led_status;
|
led-failsafe = &led_status;
|
||||||
led-upgrade = &led_status;
|
led-upgrade = &led_status;
|
||||||
@ -108,9 +107,6 @@
|
|||||||
phy-mode = "rgmii-rxid";
|
phy-mode = "rgmii-rxid";
|
||||||
pll-data = <0xae000000 0x80000101 0x80001313>;
|
pll-data = <0xae000000 0x80000101 0x80001313>;
|
||||||
|
|
||||||
nvmem-cells = <&macaddr_uboot_ethaddr 0>;
|
|
||||||
nvmem-cell-names = "mac-address";
|
|
||||||
|
|
||||||
gmac-config {
|
gmac-config {
|
||||||
device = <&gmac>;
|
device = <&gmac>;
|
||||||
|
|
||||||
@ -148,8 +144,8 @@
|
|||||||
wifi@0,0 {
|
wifi@0,0 {
|
||||||
compatible = "qcom,ath10k";
|
compatible = "qcom,ath10k";
|
||||||
reg = <0x0000 0 0 0 0>;
|
reg = <0x0000 0 0 0 0>;
|
||||||
nvmem-cells = <&cal_art_5000>, <&macaddr_uboot_ethaddr 1>;
|
nvmem-cells = <&cal_art_5000>;
|
||||||
nvmem-cell-names = "calibration", "mac-address";
|
nvmem-cell-names = "calibration";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -173,14 +169,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
partition@40000 {
|
partition@40000 {
|
||||||
compatible = "u-boot,env";
|
|
||||||
label = "u-boot-env";
|
label = "u-boot-env";
|
||||||
reg = <0x40000 0x10000>;
|
reg = <0x40000 0x10000>;
|
||||||
read-only;
|
read-only;
|
||||||
|
|
||||||
macaddr_uboot_ethaddr: ethaddr {
|
|
||||||
#nvmem-cell-cells = <1>;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
partition@50000 {
|
partition@50000 {
|
||||||
@ -261,6 +252,6 @@
|
|||||||
&wmac {
|
&wmac {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
nvmem-cells = <&cal_art_1000>, <&macaddr_uboot_ethaddr 0>;
|
nvmem-cells = <&cal_art_1000>;
|
||||||
nvmem-cell-names = "calibration", "mac-address";
|
nvmem-cell-names = "calibration";
|
||||||
};
|
};
|
||||||
|
@ -717,6 +717,9 @@ ath79_setup_macs()
|
|||||||
lan_mac=$(mtd_get_mac_ascii devdata "lanmac")
|
lan_mac=$(mtd_get_mac_ascii devdata "lanmac")
|
||||||
wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
|
wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
|
||||||
;;
|
;;
|
||||||
|
elecom,wab-i1750-ps|\
|
||||||
|
elecom,wab-s1167-ps|\
|
||||||
|
elecom,wab-s600-ps|\
|
||||||
engenius,ecb1200|\
|
engenius,ecb1200|\
|
||||||
engenius,ecb1750)
|
engenius,ecb1750)
|
||||||
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
|
||||||
|
@ -42,6 +42,16 @@ case "$board" in
|
|||||||
[ "$PHYNBR" -eq 1 ] && \
|
[ "$PHYNBR" -eq 1 ] && \
|
||||||
mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
|
mtd_get_mac_ascii bdcfg "wlanmac" > /sys${DEVPATH}/macaddress
|
||||||
;;
|
;;
|
||||||
|
elecom,wab-i1750-ps|\
|
||||||
|
elecom,wab-s1167-ps|\
|
||||||
|
elecom,wab-s600-ps)
|
||||||
|
# set the 5G MAC address (= ethaddr + 1)
|
||||||
|
[ "$PHYNBR" -eq 0 ] && \
|
||||||
|
macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
|
||||||
|
# set the 2.4G MAC address (= ethaddr)
|
||||||
|
[ "$PHYNBR" -eq 1 ] && \
|
||||||
|
mtd_get_mac_ascii u-boot-env "ethaddr" > /sys${DEVPATH}/macaddress
|
||||||
|
;;
|
||||||
engenius,ecb1200|\
|
engenius,ecb1200|\
|
||||||
engenius,ecb1750)
|
engenius,ecb1750)
|
||||||
[ "$PHYNBR" -eq 0 ] && \
|
[ "$PHYNBR" -eq 0 ] && \
|
||||||
|
Loading…
Reference in New Issue
Block a user