ath79: move base-files for ZyXEL NBG6716
[openwrt/openwrt.git] / target / linux / ath79 / nand / base-files / etc / hotplug.d / firmware / 10-ath9k-eeprom
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
new file mode 100644 (file)
index 0000000..88a40b5
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+[ -e /lib/firmware/$FIRMWARE ] && exit 0
+
+. /lib/functions/caldata.sh
+
+board=$(board_name)
+
+case "$FIRMWARE" in
+"ath9k-eeprom-ahb-18100000.wmac.bin")
+       case $board in
+       zyxel,nbg6716)
+               caldata_extract "art" 0x1000 0x440
+               ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env ethaddr)
+               ;;
+       *)
+               caldata_die "board $board is not supported yet"
+               ;;
+       esac
+       ;;
+esac