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