4a474766d52ce2ddc39ca2c34791a4f30be51f66
[openwrt/staging/chunkeey.git] / target / linux / ipq806x / base-files / etc / hotplug.d / firmware / 11-ath10k-caldata
1 #!/bin/sh
2
3 [ -e /lib/firmware/$FIRMWARE ] && exit 0
4
5 . /lib/functions/caldata.sh
6
7 board=$(board_name)
8
9 case "$FIRMWARE" in
10 "ath10k/cal-pci-0000:01:00.0.bin")
11 case "$board" in
12 meraki,mr52)
13 CI_UBIPART=art
14 caldata_extract_ubi "ART" 0x1000 0x844
15 ;;
16 esac
17 ;;
18 "ath10k/pre-cal-pci-0000:01:00.0.bin")
19 case $board in
20 askey,rt4230w-rev6)
21 caldata_extract "0:ART" 0x1000 0x2f20
22 ;;
23 asrock,g10)
24 caldata_extract "0:art" 0x1000 0x2f20
25 ;;
26 linksys,ea7500-v1 |\
27 linksys,ea8500)
28 caldata_extract "art" 0x1000 0x2f20
29 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) 1)
30 ;;
31 meraki,mr42)
32 CI_UBIPART=art
33 caldata_extract_ubi "ART" 0x1000 0x2f20
34 ;;
35 zyxel,nbg6817)
36 caldata_extract "0:art" 0x1000 0x2f20
37 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:appsblenv ethaddr) 1)
38 ;;
39 esac
40 ;;
41 "ath10k/pre-cal-pci-0001:01:00.0.bin")
42 case $board in
43 askey,rt4230w-rev6)
44 caldata_extract "0:ART" 0x5000 0x2f20
45 ;;
46 asrock,g10)
47 caldata_extract "0:art" 0x5000 0x2f20
48 ;;
49 edgecore,ecw5410)
50 caldata_extract "0:art" 0x1000 0x2f20
51 ;;
52 linksys,ea7500-v1 |\
53 linksys,ea8500)
54 caldata_extract "art" 0x5000 0x2f20
55 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) 2)
56 ;;
57 meraki,mr42 |\
58 meraki,mr52)
59 CI_UBIPART=art
60 caldata_extract_ubi "ART" 0x5000 0x2f20
61 ;;
62 zyxel,nbg6817)
63 caldata_extract "0:art" 0x5000 0x2f20
64 ath10k_patch_mac $(mtd_get_mac_ascii 0:appsblenv ethaddr)
65 ;;
66 esac
67 ;;
68 "ath10k/cal-pci-0002:01:00.0.bin")
69 case "$board" in
70 meraki,mr42)
71 CI_UBIPART=art
72 caldata_extract_ubi "ART" 0x9000 0x844
73 ;;
74 esac
75 ;;
76 "ath10k/pre-cal-pci-0002:01:00.0.bin")
77 case $board in
78 edgecore,ecw5410)
79 caldata_extract "0:art" 0x5000 0x2f20
80 ;;
81 meraki,mr52)
82 CI_UBIPART=art
83 caldata_extract_ubi "ART" 0x9000 0x2f20
84 ;;
85 esac
86 ;;
87 *)
88 exit 1
89 ;;
90 esac