Merge pull request #4780 from MilhouseVH/bluez_master

bluez: Add patches to load new brcm firmware
This commit is contained in:
Stephan Raue 2016-02-27 21:03:07 +01:00
commit 6b9e7aaba7
2 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,51 @@
From 874990be3b958bd3d5d5f61989f8d6314be3358a Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 16 Feb 2016 16:40:46 +0000
Subject: [PATCH 1/4] bcm43xx: Add bcm43xx-3wire variant
---
tools/hciattach.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/hciattach.c b/tools/hciattach.c
index 1904ac5..835d5ff 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
@@ -1144,6 +1144,9 @@ struct uart_t uart[] = {
{ "bcm43xx", 0x0000, 0x0000, HCI_UART_H4, 115200, 3000000,
FLOW_CTL, DISABLE_PM, NULL, bcm43xx, NULL },
+ { "bcm43xx-3wire", 0x0000, 0x0000, HCI_UART_3WIRE, 115200, 3000000,
+ 0, DISABLE_PM, NULL, bcm43xx, NULL },
+
{ "ath3k", 0x0000, 0x0000, HCI_UART_ATH3K, 115200, 115200,
FLOW_CTL, DISABLE_PM, NULL, ath3k_ps, ath3k_pm },
--
1.9.1
From 74e6869ecce13b1066741ba995fc47b437c4c72f Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Wed, 20 Jan 2016 16:00:37 +0000
Subject: [PATCH 3/4] Increase firmware load timeout to 30s
---
tools/hciattach.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hciattach.c b/tools/hciattach.c
index 9391458..b1168d4 100644
--- a/tools/hciattach.c
+++ b/tools/hciattach.c
@@ -1287,7 +1287,7 @@ int main(int argc, char *argv[])
{
struct uart_t *u = NULL;
int detach, printpid, raw, opt, i, n, ld, err;
- int to = 10;
+ int to = 30;
int init_speed = 0;
int send_break = 0;
pid_t pid;
--
1.9.1

View File

@ -0,0 +1,21 @@
diff -Naur a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
--- a/tools/hciattach_bcm43xx.c 2016-02-25 18:23:15.468717720 +0000
+++ b/tools/hciattach_bcm43xx.c 2016-02-25 18:24:08.028997243 +0000
@@ -368,9 +368,6 @@
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;
@@ -379,6 +376,7 @@
perror("Can't set host baud rate");
return -1;
}
+ sleep(1);
if (bcm43xx_reset(fd))
return -1;