ath79: convert ath10k calibration data to NVMEM (ASCII MAC)

This patch converts ath10k calibration data to NVMEM format for
wave 1 devices with mtd ASCII MAC address. The "calibration"
NVMEM cell size is 0x844. All unportable MAC address settings
have been moved to '10_fix_wifi_mac' scripts.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
This commit is contained in:
Shiji Yang
2024-02-01 19:39:51 +08:00
committed by Christian Marangi
parent 2f1c62e5af
commit 0db4f9785c
15 changed files with 174 additions and 68 deletions

View File

@@ -1,22 +0,0 @@
#!/bin/sh
[ -e /lib/firmware/$FIRMWARE ] && exit 0
. /lib/functions/caldata.sh
board=$(board_name)
case "$FIRMWARE" in
"ath10k/cal-pci-0000:00:00.0.bin")
case $board in
zyxel,emg2926-q10a|\
zyxel,nbg6716)
caldata_extract "art" 0x5000 0x844
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1)
;;
esac
;;
*)
exit 1
;;
esac

View File

@@ -17,8 +17,10 @@ case $board in
;;
zyxel,emg2926-q10a|\
zyxel,nbg6716)
# Set mac address for 2.4g device
ethaddr=$(mtd_get_mac_ascii u-boot-env ethaddr)
[ "$PHYNBR" -eq 0 ] && \
macaddr_add $ethaddr 1 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" -eq 1 ] && \
mtd_get_mac_ascii u-boot-env ethaddr > /sys${DEVPATH}/macaddress
echo -n $ethaddr > /sys${DEVPATH}/macaddress
;;
esac