openwrt/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
Adrian Schmutzler 6f648ed7e6 treewide: remove "+" sign for increment with macaddr_add
Many people appear to use an unneeded "+" prefix for the increment
when calculating a MAC address with macaddr_add. Since this is not
required and used inconsistently [*], just remove it.

[*] As a funny side-fact, copy-pasting has led to almost all
    hotplug.d files using the "+", while nearly all of the
    02_network files are not using it.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-06-05 23:54:37 +02:00

21 lines
399 B
Bash

#!/bin/sh
[ -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
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) 3)
;;
*)
caldata_die "board $board is not supported yet"
;;
esac
;;
esac