ath79: ws-ap3805i: use nvmem

Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2024-06-14 11:11:43 -07:00
parent ddd87c29d5
commit ca29a3ce04
3 changed files with 9 additions and 11 deletions

View File

@ -72,7 +72,8 @@
&wmac {
status = "okay";
qca,no-eeprom;
nvmem-cells = <&cal_art_1000>;
nvmem-cell-names = "calibration";
};
&pcie0 {
@ -204,6 +205,10 @@
#address-cells = <1>;
#size-cells = <1>;
cal_art_1000: calibration@1000 {
reg = <0x1000 0x440>;
};
cal_art_5000: calibration@5000 {
reg = <0x5000 0x844>;
};

View File

@ -29,10 +29,6 @@ case "$FIRMWARE" in
caldata_extract "art" 0x1000 0x440
ath9k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env athaddr) 1)
;;
extreme-networks,ws-ap3805i)
caldata_extract "art" 0x1000 0x440
ath9k_patch_mac $(mtd_get_mac_ascii cfg1 RADIOADDR1)
;;
iodata,wn-ac1167dgr|\
iodata,wn-ac1600dgr|\
iodata,wn-ac1600dgr2|\

View File

@ -67,9 +67,9 @@ case "$board" in
[ "$PHYNBR" -eq 1 ] && \
mtd_get_mac_ascii u-boot-env0 RADIOADDR0 > /sys${DEVPATH}/macaddress
;;
extreme-networks,ws-ap3805i)
[ "$PHYNBR" -eq 0 ] && \
mtd_get_mac_ascii cfg1 RADIOADDR0 > /sys${DEVPATH}/macaddress
extreme-networks,ws-ap3805i|\
siemens,ws-ap3610)
mtd_get_mac_ascii cfg1 RADIOADDR${PHYNBR} > /sys${DEVPATH}/macaddress
;;
iodata,wn-ac1167dgr|\
iodata,wn-ac1600dgr|\
@ -112,9 +112,6 @@ case "$board" in
[ "$PHYNBR" -eq 1 ] && \
k2t_get_mac "lan_mac" > /sys${DEVPATH}/macaddress
;;
siemens,ws-ap3610)
mtd_get_mac_ascii cfg1 RADIOADDR${PHYNBR} > /sys${DEVPATH}/macaddress
;;
tplink,deco-s4-v2)
base_mac=$(mtd_get_mac_encrypted_deco $(find_mtd_part config))
[ "$PHYNBR" -eq 0 ] && \