aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata')
-rw-r--r--target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata35
1 files changed, 35 insertions, 0 deletions
diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 398ddf9a29..a0e2e9d123 100644
--- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -6,9 +6,32 @@
board=$(board_name)
+dt_base64_extract() {
+ local target_dir="/sys$DEVPATH"
+ local source="$target_dir/../../of_node/qcom,ath10k-calibration-data-base64"
+
+ [ -e "$source" ] || caldata_die "cannot find base64 calibration data: $source"
+ [ -d "$target_dir" ] || \
+ caldata_die "no sysfs dir to write: $target"
+
+ echo 1 > "$target_dir/loading"
+ base64decode.uc "$source" > "$target_dir/data"
+ if [ $? != 0 ]; then
+ echo 1 > "$target_dir/loading"
+ caldata_die \
+ "failed to write calibration data to $target_dir/data"
+ else
+ echo 0 > "$target_dir/loading"
+ fi
+}
+
case "$FIRMWARE" in
"ath10k/cal-pci-0000:01:00.0.bin")
case "$board" in
+ asus,onhub |\
+ tplink,onhub)
+ dt_base64_extract
+ ;;
meraki,mr52)
CI_UBIPART=art
caldata_extract_ubi "ART" 0x1000 0x844
@@ -35,6 +58,14 @@ case "$FIRMWARE" in
;;
esac
;;
+"ath10k/cal-pci-0001:01:00.0.bin")
+ case "$board" in
+ asus,onhub |\
+ tplink,onhub)
+ dt_base64_extract
+ ;;
+ esac
+ ;;
"ath10k/pre-cal-pci-0001:01:00.0.bin")
case $board in
asrock,g10)
@@ -61,6 +92,10 @@ case "$FIRMWARE" in
;;
"ath10k/cal-pci-0002:01:00.0.bin")
case "$board" in
+ asus,onhub |\
+ tplink,onhub)
+ dt_base64_extract
+ ;;
meraki,mr42)
CI_UBIPART=art
caldata_extract_ubi "ART" 0x9000 0x844