c8924df92f6cfa6f4a5f6c5fab0b3d21aeca508b
[openwrt/openwrt.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/pre-cal-pci-0000:01:00.0.bin")
11 case $board in
12 askey,rt4230w-rev6)
13 caldata_extract "0:ART" 0x1000 0x2f20
14 ;;
15 asrock,g10)
16 caldata_extract "0:art" 0x1000 0x2f20
17 ;;
18 buffalo,wxr-2533dhp)
19 caldata_extract "ART" 0x1000 0x2f20
20 ;;
21 edgecore,ecw5410)
22 caldata_extract "0:art" 0x1000 0x2f20
23 ;;
24 linksys,ea7500-v1 |\
25 linksys,ea8500)
26 caldata_extract "art" 0x1000 0x2f20
27 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) 1)
28 ;;
29 nec,wg2600hp |\
30 nec,wg2600hp3)
31 caldata_extract "ART" 0x1000 0x2f20
32 ;;
33 netgear,d7800 |\
34 netgear,r7500v2 |\
35 netgear,r7800)
36 caldata_extract "art" 0x1000 0x2f20
37 ;;
38 netgear,xr500)
39 caldata_extract "art" 0x1000 0x2f20
40 ;;
41 tplink,ad7200 |\
42 tplink,c2600)
43 caldata_extract "radio" 0x1000 0x2f20
44 ;;
45 tplink,vr2600v)
46 caldata_extract "ART" 0x1000 0x2f20
47 ;;
48 zyxel,nbg6817)
49 caldata_extract "0:art" 0x1000 0x2f20
50 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:appsblenv ethaddr) 1)
51 ;;
52 esac
53 ;;
54 "ath10k/pre-cal-pci-0001:01:00.0.bin")
55 case $board in
56 askey,rt4230w-rev6)
57 caldata_extract "0:ART" 0x5000 0x2f20
58 ;;
59 asrock,g10)
60 caldata_extract "0:art" 0x5000 0x2f20
61 ;;
62 buffalo,wxr-2533dhp)
63 caldata_extract "ART" 0x5000 0x2f20
64 ;;
65 linksys,ea7500-v1 |\
66 linksys,ea8500)
67 caldata_extract "art" 0x5000 0x2f20
68 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) 2)
69 ;;
70 nec,wg2600hp |\
71 nec,wg2600hp3)
72 caldata_extract "ART" 0x5000 0x2f20
73 ;;
74 netgear,d7800 |\
75 netgear,r7500v2 |\
76 netgear,r7800)
77 caldata_extract "art" 0x5000 0x2f20
78 ;;
79 netgear,xr500)
80 caldata_extract "art" 0x5000 0x2f20
81 ;;
82 tplink,ad7200 |\
83 tplink,c2600)
84 caldata_extract "radio" 0x5000 0x2f20
85 ;;
86 tplink,vr2600v)
87 caldata_extract "ART" 0x5000 0x2f20
88 ;;
89 zyxel,nbg6817)
90 caldata_extract "0:art" 0x5000 0x2f20
91 ath10k_patch_mac $(mtd_get_mac_ascii 0:appsblenv ethaddr)
92 ;;
93 esac
94 ;;
95 "ath10k/pre-cal-pci-0002:01:00.0.bin")
96 case $board in
97 edgecore,ecw5410)
98 caldata_extract "0:art" 0x5000 0x2f20
99 ;;
100 esac
101 ;;
102 *)
103 exit 1
104 ;;
105 esac