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
) +2)
60 caldata_extract
"0:art" 0x1000 0x2f20
61 ath10k_patch_mac $
(macaddr_add $
(mtd_get_mac_ascii
0:appsblenv ethaddr
) 1)
65 "ath10k/cal-pci-0001:01:00.0.bin")
73 "ath10k/pre-cal-pci-0001:01:00.0.bin")
76 caldata_extract
"0:art" 0x5000 0x2f20
79 caldata_extract
"0:art" 0x1000 0x2f20
83 caldata_extract
"art" 0x5000 0x2f20
84 ath10k_patch_mac $
(macaddr_add $
(mtd_get_mac_ascii devinfo hw_mac_addr
) 2)
89 caldata_extract_ubi
"ART" 0x5000 0x2f20
92 caldata_extract
"0:art" 0x5000 0x2f20
93 ath10k_patch_mac $
(macaddr_add $
(mtd_get_mac_ascii
0:appsblenv ethaddr
) +3)
96 caldata_extract
"0:art" 0x5000 0x2f20
97 ath10k_patch_mac $
(mtd_get_mac_ascii
0:appsblenv ethaddr
)
101 "ath10k/cal-pci-0002:01:00.0.bin")
109 caldata_extract_ubi
"ART" 0x9000 0x844
113 "ath10k/pre-cal-pci-0002:01:00.0.bin")
116 caldata_extract
"0:art" 0x5000 0x2f20
120 caldata_extract_ubi
"ART" 0x9000 0x2f20