Author: nbd
Date: 2015-12-19 12:28:30 +0100 (Sat, 19 Dec 2015)
New Revision: 47947

Modified:
   trunk/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
Log:
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 <[email protected]>

Modified: 
trunk/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
===================================================================
--- trunk/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom 
2015-12-19 11:28:18 UTC (rev 47946)
+++ trunk/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom 
2015-12-19 11:28:30 UTC (rev 47947)
@@ -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 @@
        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
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to