0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-11-24 22:16:14 +00:00
openwrt/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
Shiji Yang 0db4f9785c
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>
2024-02-01 17:09:03 +01:00

27 lines
546 B
Bash

#!/bin/sh
[ -e /lib/firmware/$FIRMWARE ] && exit 0
. /lib/functions/caldata.sh
board=$(board_name)
case "$FIRMWARE" in
"ath10k/pre-cal-pci-0000:00:00.0.bin")
case $board in
dlink,dir-842-c1|\
dlink,dir-842-c2|\
dlink,dir-842-c3)
caldata_extract "art" 0x5000 0x2f20
caldata_valid "202f" || caldata_extract "reserved" 0x15000 0x2f20
ath10k_patch_mac $(mtd_get_mac_ascii devdata wlan5mac)
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
;;
esac
;;
*)
exit 1
;;
esac