Diff between b3f76b30ec9d0e06d44a9240698698926df9e333 and d9253248363b995e44c1f5e393ed1c7aa4ec81ce

Changed Files

File Additions Deletions Status
tools/hciattach.h +4 -0 modified
tools/hciattach_bcm43xx.c +0 -4 modified
tools/hciattach_qualcomm.c +2 -1 modified
tools/hciattach_tialt.c +2 -1 modified

Full Patch

diff --git a/tools/hciattach.h b/tools/hciattach.h
index 26c0d54..dfa4c1e 100644
--- a/tools/hciattach.h
+++ b/tools/hciattach.h
@@ -40,6 +40,10 @@
 #define HCI_UART_EXT_CONFIG	4
 #define HCI_UART_VND_DETECT	5
 
+#ifndef FIRMWARE_DIR
+#define FIRMWARE_DIR "/etc/firmware"
+#endif
+
 int read_hci_event(int fd, unsigned char *buf, int size);
 int set_speed(int fd, struct termios *ti, int speed);
 int uart_speed(int speed);
diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
index dbb5a3f..b89fc1b 100644
--- a/tools/hciattach_bcm43xx.c
+++ b/tools/hciattach_bcm43xx.c
@@ -30,10 +30,6 @@
 
 #include "hciattach.h"
 
-#ifndef FIRMWARE_DIR
-#define FIRMWARE_DIR "/etc/firmware"
-#endif
-
 #define FW_EXT ".hcd"
 
 #define BCM43XX_CLOCK_48 1
diff --git a/tools/hciattach_qualcomm.c b/tools/hciattach_qualcomm.c
index 77b6db1..d228aee 100644
--- a/tools/hciattach_qualcomm.c
+++ b/tools/hciattach_qualcomm.c
@@ -222,7 +222,8 @@ int qualcomm_init(int fd, int speed, struct termios *ti, const char *bdaddr)
 
 	} while (resp[3] != 0 && resp[4] != 2);
 
-	snprintf(fw, sizeof(fw), "/etc/firmware/%c%c%c%c%c%c_%c%c%c%c.bin",
+	snprintf(fw, sizeof(fw), "%s/%c%c%c%c%c%c_%c%c%c%c.bin",
+				FIRMWARE_DIR,
 				resp[18], resp[19], resp[20], resp[21],
 				resp[22], resp[23],
 				resp[32], resp[33], resp[34], resp[35]);
diff --git a/tools/hciattach_tialt.c b/tools/hciattach_tialt.c
index 4f7fd42..bf6e849 100644
--- a/tools/hciattach_tialt.c
+++ b/tools/hciattach_tialt.c
@@ -221,7 +221,8 @@ int texasalt_init(int fd, int speed, struct termios *ti)
 				((brf_chip > 7) ? "unknown" : c_brf_chip[brf_chip]),
 				brf_chip);
 
-		sprintf(fw, "/etc/firmware/%s.bin",
+		sprintf(fw, "%s/%s.bin",
+			FIRMWARE_DIR,
 			(brf_chip > 7) ? "unknown" : c_brf_chip[brf_chip]);
 		texas_load_firmware(fd, fw);