aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-12-19 11:28:30 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-12-19 11:28:30 +0000
commit2a7cbe0a69236c97ac0f9d370a48795944dcc341 (patch)
tree4d536e3da1387b2ad0a04db0ddb03f2d3369d668 /target
parent1876b73c68316e5de91c020c72ac155044f49edb (diff)
downloadmaster-187ad058-2a7cbe0a69236c97ac0f9d370a48795944dcc341.tar.gz
master-187ad058-2a7cbe0a69236c97ac0f9d370a48795944dcc341.tar.bz2
master-187ad058-2a7cbe0a69236c97ac0f9d370a48795944dcc341.zip
ar71xx: refactor 10-ath9k-eeprom
move all library includes and 'firmware already exists' check to the top of the script. Signed-off-by: Chris R Blake <chrisrblake93@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47947 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom12
1 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 5398e76105..33b1d74dc8 100644
--- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -1,5 +1,11 @@
#!/bin/sh
+[ -e /lib/firmware/$FIRMWARE ] && exit 0
+
+. /lib/ar71xx.sh
+. /lib/functions.sh
+. /lib/functions/system.sh
+
ath9k_eeprom_die() {
echo "ath9k eeprom: " "$*"
exit 1
@@ -27,12 +33,6 @@ ath9k_patch_firmware_mac() {
macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=2 count=6
}
-[ -e /lib/firmware/$FIRMWARE ] && exit 0
-
-. /lib/ar71xx.sh
-. /lib/functions.sh
-. /lib/functions/system.sh
-
board=$(ar71xx_board_name)
case "$FIRMWARE" in