3 [ -e /lib
/firmware
/$FIRMWARE ] && exit 0
5 .
/lib
/functions
/caldata.sh
7 caldata_extract_swap
() {
13 mtd
=$
(find_mtd_chardev
$part)
14 [ -n "$mtd" ] || caldata_die
"no mtd device found for partition $part"
16 offset
=$
(($offset / 2))
19 dd if=$mtd of
=/lib
/firmware
/$FIRMWARE bs
=2 skip
=$offset count
=$count conv
=swab
2>/dev
/null || \
20 caldata_die
"failed to extract calibration data from $mtd"
24 "ath9k-eeprom-pci-0000:00:01.0.bin")
25 case "$(board_name)" in
27 caldata_extract_swap
"cal_data" 0x1e000 0xeb8
30 caldata_die
"board $board is not supported yet"