e5c26d6bb5dc8f329fca167080f0a44b802e89a0
[openwrt/staging/ldir.git] / target / linux / ath79 / nand / 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:00:00.0.bin")
11 case $board in
12 domywifi,dw33d)
13 caldata_extract "art" 0x5000 0x844
14 ath10k_patch_mac $(mtd_get_mac_binary art 0x12)
15 ;;
16 glinet,gl-ar750s-nor|\
17 glinet,gl-ar750s-nor-nand)
18 caldata_extract "art" 0x5000 0x844
19 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 1)
20 ;;
21 netgear,r6100)
22 caldata_extract "caldata" 0x5000 0x844
23 ;;
24 zyxel,emg2926-q10a|\
25 zyxel,nbg6716)
26 caldata_extract "art" 0x5000 0x844
27 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1)
28 ;;
29 esac
30 ;;
31 *)
32 exit 1
33 ;;
34 esac