ath79: add support for Netgear WNDR3700v4
[openwrt/openwrt.git] / target / linux / ath79 / nand / base-files / etc / hotplug.d / firmware / 10-ath9k-eeprom
1 #!/bin/sh
2
3 [ -e /lib/firmware/$FIRMWARE ] && exit 0
4
5 . /lib/functions/caldata.sh
6
7 board=$(board_name)
8
9 case "$FIRMWARE" in
10 "ath9k-eeprom-ahb-18100000.wmac.bin")
11 case $board in
12 netgear,wndr3700-v4|\
13 netgear,wndr4300)
14 caldata_extract "caldata" 0x1000 0x440
15 ;;
16 zyxel,nbg6716)
17 caldata_extract "art" 0x1000 0x440
18 ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env ethaddr)
19 ;;
20 *)
21 caldata_die "board $board is not supported yet"
22 ;;
23 esac
24 ;;
25 "ath9k-eeprom-pci-0000:00:00.0.bin")
26 case $board in
27 netgear,wndr3700-v4|\
28 netgear,wndr4300)
29 caldata_extract "caldata" 0x5000 0x440
30 ;;
31 *)
32 caldata_die "board $board is not supported yet"
33 ;;
34 esac
35 ;;
36 esac