aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/base-files
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
commit8e4194797aff4f0d2c837565571757b5dccb1548 (patch)
tree4813c57599dab070e048cef5a2114f1790972f2f /target/linux/ar71xx/base-files
parentfb1273dfddd89ff487dae16265a2870e9d175dfb (diff)
downloadupstream-8e4194797aff4f0d2c837565571757b5dccb1548.tar.gz
upstream-8e4194797aff4f0d2c837565571757b5dccb1548.tar.bz2
upstream-8e4194797aff4f0d2c837565571757b5dccb1548.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> SVN-Revision: 47947
Diffstat (limited to 'target/linux/ar71xx/base-files')
-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