treewide: move MAC address patch functions to common library
[openwrt/openwrt.git] / target / linux / lantiq / base-files / etc / hotplug.d / firmware / 11-ath10k-caldata
1 #!/bin/sh
2 # Based on ar71xx 11-ath10k-caldata and 10-rt2x00-eeprom
3
4 [ -e /lib/firmware/$FIRMWARE ] && exit 0
5
6 . /lib/functions/caldata.sh
7
8 case "$FIRMWARE" in
9 "ath10k/cal-pci-0000:02:00.0.bin")
10 board=$(board_name)
11 case $board in
12 bt,homehub-v5a)
13 caldata_extract_ubi "caldata" 0x5000 0x844
14 ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) +3)
15 ;;
16 *)
17 caldata_die "board $board is not supported yet"
18 ;;
19 esac
20 ;;
21 esac