openwrt/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
Adrian Schmutzler 2c60de0e3f treewide: move MAC address patch functions to common library
This unifies MAC address patch functions and moves them to a
common script. While those were implemented differently for
different targets, they all seem to do the same. The number of
different variants is significantly reduced by this patch.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-10-14 12:36:02 +02:00

22 lines
460 B
Bash

#!/bin/sh
# Based on ar71xx 11-ath10k-caldata and 10-rt2x00-eeprom
[ -e /lib/firmware/$FIRMWARE ] && exit 0
. /lib/functions/caldata.sh
case "$FIRMWARE" in
"ath10k/cal-pci-0000:02:00.0.bin")
board=$(board_name)
case $board in
bt,homehub-v5a)
caldata_extract_ubi "caldata" 0x5000 0x844
ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) +3)
;;
*)
caldata_die "board $board is not supported yet"
;;
esac
;;
esac