3 FW_FILE
="/lib/firmware/$FIRMWARE"
6 echo "ath9k eeprom: " "$*" >&2
10 ath9k_eeprom_extract
() {
18 mtd
=$
(find_mtd_chardev
$part)
20 ath9k_eeprom_die
"no mtd device found for partition $part"
22 dd if=$mtd bs
=$offset skip
=1 count
=1 2>/dev
/null |
dd of
=$FW_FILE bs
=$count count
=1 2>/dev
/null || \
23 ath9k_eeprom_die
"failed to extract from $mtd"
26 tpl_set_wireless_mac
()
33 mac
=$
(mtd_get_mac_binary u-boot
326656)
34 mac
=$
(macaddr_add
$mac $offset)
36 macaddr_2bin
$mac |
dd bs
=1 count
=6 seek
=2 conv
=notrunc of
=$FW_FILE 2>/dev
/null
39 [ -e $FW_FILE ] && exit 0
43 board
=$
(mpc85xx_board_name
)
49 ath9k_eeprom_extract
"caldata" 4096 2048
50 tpl_set_wireless_mac
0
53 ath9k_eeprom_die
"board $board is not supported yet"
61 ath9k_eeprom_extract
"caldata" 20480 2048
62 tpl_set_wireless_mac
-1
65 ath9k_eeprom_die
"board $board is not supported yet"