2bbe5923bc35093b9855ef495586830a597db05f
8 ath10kcal_from_file
() {
13 dd if=$source of
=/lib
/firmware
/$FIRMWARE bs
=1 skip
=$offset count
=$count 2>/dev
/null || \
14 ath10kcal_die
"failed to extract calibration data from $source"
23 mtd
=$
(find_mtd_chardev
$part)
25 ath10kcal_die
"no mtd device found for partition $part"
27 dd if=$mtd of
=/lib
/firmware
/$FIRMWARE bs
=1 skip
=$offset count
=$count 2>/dev
/null || \
28 ath10kcal_die
"failed to extract calibration data from $mtd"
31 ath10kcal_patch_mac
() {
34 [ -z "$mac" ] && return
36 macaddr_2bin
$mac |
dd of
=/lib
/firmware
/$FIRMWARE conv
=notrunc bs
=1 seek
=6 count
=6
39 [ -e /lib
/firmware
/$FIRMWARE ] && exit 0
42 .
/lib
/functions
/system.sh
47 "ath10k/cal-pci-0000:00:00.0.bin")
50 ath10kcal_extract
"ART" 20480 2116
51 ath10kcal_patch_mac $
(macaddr_add $
(cat /sys
/class
/net
/eth
0/address
) +16)