mpc85xx: use the generic board detect
[openwrt/openwrt.git] / target / linux / mpc85xx / base-files / etc / hotplug.d / firmware / 10-ath9k-eeprom
index 0baec28859da1f5fc9b1f4855f97289e192bea71..3e6488b4c7635b929c349f8177635832592aafa5 100644 (file)
@@ -13,9 +13,6 @@ ath9k_eeprom_extract() {
        local count=$3
        local mtd
 
-       . /lib/functions.sh
-       . /lib/functions/system.sh
-
        mtd=$(find_mtd_chardev $part)
        [ -n "$mtd" ] || \
                ath9k_eeprom_die "no mtd device found for partition $part"
@@ -29,9 +26,6 @@ tpl_set_wireless_mac()
        local offset=$1
        local mac
 
-       . /lib/functions.sh
-       . /lib/functions/system.sh
-
        mac=$(mtd_get_mac_binary u-boot 326656)
        mac=$(macaddr_add $mac $offset)
 
@@ -40,14 +34,15 @@ tpl_set_wireless_mac()
 
 [ -e $FW_FILE ] && exit 0
 
-. /lib/mpc85xx.sh
+. /lib/functions.sh
+. /lib/functions/system.sh
 
-board=$(mpc85xx_board_name)
+board=$(board_name)
 
 case "$FIRMWARE" in
 "pci_wmac0.eeprom")
        case $board in
-       tl-wdr4900-v1)
+       tplink,tl-wdr4900-v1)
                ath9k_eeprom_extract "caldata" 4096 2048
                tpl_set_wireless_mac 0
                ;;
@@ -59,7 +54,7 @@ case "$FIRMWARE" in
 
 "pci_wmac1.eeprom")
        case $board in
-       tl-wdr4900-v1)
+       tplink,tl-wdr4900-v1)
                ath9k_eeprom_extract "caldata" 20480 2048
                tpl_set_wireless_mac -1
                ;;