3 [ -e /lib
/firmware
/$FIRMWARE ] && exit 0
5 .
/lib
/functions
/caldata.sh
10 local target_dir
="/sys$DEVPATH"
11 local source="$target_dir/../../of_node/qcom,ath10k-calibration-data-base64"
13 [ -e "$source" ] || caldata_die
"cannot find base64 calibration data: $source"
14 [ -d "$target_dir" ] || \
15 caldata_die
"no sysfs dir to write: $target"
17 echo 1 > "$target_dir/loading"
18 base64decode.uc
"$source" > "$target_dir/data"
20 echo 1 > "$target_dir/loading"
22 "failed to write calibration data to $target_dir/data"
24 echo 0 > "$target_dir/loading"
29 "ath10k/cal-pci-0000:01:00.0.bin")
37 caldata_extract_ubi
"ART" 0x1000 0x844
41 "ath10k/pre-cal-pci-0000:01:00.0.bin")
44 caldata_extract
"0:art" 0x1000 0x2f20
48 caldata_extract
"art" 0x1000 0x2f20
49 ath10k_patch_mac $
(macaddr_add $
(mtd_get_mac_ascii devinfo hw_mac_addr
) 1)
53 caldata_extract_ubi
"ART" 0x1000 0x2f20
56 caldata_extract
"0:art" 0x1000 0x2f20
57 ath10k_patch_mac $
(macaddr_add $
(mtd_get_mac_ascii
0:appsblenv ethaddr
) 1)
61 "ath10k/cal-pci-0001:01:00.0.bin")
69 "ath10k/pre-cal-pci-0001:01:00.0.bin")
72 caldata_extract
"0:art" 0x5000 0x2f20
75 caldata_extract
"0:art" 0x1000 0x2f20
79 caldata_extract
"art" 0x5000 0x2f20
80 ath10k_patch_mac $
(macaddr_add $
(mtd_get_mac_ascii devinfo hw_mac_addr
) 2)
85 caldata_extract_ubi
"ART" 0x5000 0x2f20
88 caldata_extract
"0:art" 0x5000 0x2f20
89 ath10k_patch_mac $
(mtd_get_mac_ascii
0:appsblenv ethaddr
)
93 "ath10k/cal-pci-0002:01:00.0.bin")
101 caldata_extract_ubi
"ART" 0x9000 0x844
105 "ath10k/pre-cal-pci-0002:01:00.0.bin")
108 caldata_extract
"0:art" 0x5000 0x2f20
112 caldata_extract_ubi
"ART" 0x9000 0x2f20