diff mbox series

[v1,3/3] hciattach: Enable loading BCM43xx firmware on RPi

Message ID 20201218190609.107898-4-dave.jones@canonical.com
State New
Headers show
Series [v1,1/3] hciattach: Add BCM43xx 3-wire variant | expand

Commit Message

Dave Jones Dec. 18, 2020, 7:06 p.m. UTC
Corrects the location of the firmware from /etc/firmware to
/lib/firmware, and disables setting the UART interface speed prior to
loading the firmware. An already existing later call to
bcm43xx_set_speed still sets the speed of the interface as requested.

For certain bluetooth devices, in particular that on the Raspberry Pi
400, setting the UART speed prior to loading the firmware causes the
firmware load to fail.

Signed-off-by: Dave Jones <dave.jones@canonical.com>
---
 tools/hciattach_bcm43xx.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
index dbb5a3fe3..ddf9b4037 100644
--- a/tools/hciattach_bcm43xx.c
+++ b/tools/hciattach_bcm43xx.c
@@ -31,7 +31,7 @@ 
 #include "hciattach.h"
 
 #ifndef FIRMWARE_DIR
-#define FIRMWARE_DIR "/etc/firmware"
+#define FIRMWARE_DIR "/lib/firmware"
 #endif
 
 #define FW_EXT ".hcd"
@@ -356,9 +356,6 @@  int bcm43xx_init(int fd, int def_speed, int speed, struct termios *ti,
 	if (bcm43xx_locate_patch(FIRMWARE_DIR, chip_name, fw_path)) {
 		fprintf(stderr, "Patch not found, continue anyway\n");
 	} else {
-		if (bcm43xx_set_speed(fd, ti, speed))
-			return -1;
-
 		if (bcm43xx_load_firmware(fd, fw_path))
 			return -1;