1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-13 10:49:13 +02:00
openwrt/target/linux/lantiq/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
Adrian Schmutzler 48b5d08a48 treewide: use a single ath10k MAC patching function with checksum
While all ath10k eeproms have a checksum field, so far two
functions for patching ath10k MAC address have been present (and
been used).

This merges code to provide a single function ath10k_patch_mac
in caldata.sh, having its name in accordance with ath9k functions.
By doing so, correct MAC patching for current and future ath10k
devices should be ensured.

This patch adds checksum adjustments for several targets on
ath79 and lantiq.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2019-10-15 18:13:54 +02:00

22 lines
457 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
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) +3)
;;
*)
caldata_die "board $board is not supported yet"
;;
esac
;;
esac