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