summaryrefslogtreecommitdiff
path: root/tools/hciattach_bcm43xx.c
diff options
context:
space:
mode:
authorAndy Duan <fugang.duan@nxp.com>2017-07-20 16:14:59 +0300
committerMarcel Holtmann <marcel@holtmann.org>2017-07-20 20:21:57 +0200
commit76255f732d68aef2b90d36d9c7be51a9e1739ce7 (patch)
tree73a643830594d98236d2cc9e45b9304debcc7788 /tools/hciattach_bcm43xx.c
parent3349c9cb5d41f7097d29b5d214fc782242ea7ae8 (diff)
downloadbluez-76255f732d68aef2b90d36d9c7be51a9e1739ce7.tar.gz
hciattach: fix the delay timer for bcm43xx firmware download
From the log in .bcm43xx_load_firmware(): /* Wait 50ms to let the firmware placed in download mode */ nanosleep(&tm_mode, NULL); But timespec tm_mode is real is 50us. Correct the delayed timer count.
Diffstat (limited to 'tools/hciattach_bcm43xx.c')
-rw-r--r--tools/hciattach_bcm43xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
index 81f38cbbc..ac1b3c1ed 100644
--- a/tools/hciattach_bcm43xx.c
+++ b/tools/hciattach_bcm43xx.c
@@ -228,8 +228,8 @@ static int bcm43xx_set_speed(int fd, struct termios *ti, uint32_t speed)
static int bcm43xx_load_firmware(int fd, const char *fw)
{
unsigned char cmd[] = { HCI_COMMAND_PKT, 0x2e, 0xfc, 0x00 };
- struct timespec tm_mode = { 0, 50000 };
- struct timespec tm_ready = { 0, 2000000 };
+ struct timespec tm_mode = { 0, 50000000 };
+ struct timespec tm_ready = { 0, 200000000 };
unsigned char resp[CC_MIN_SIZE];
unsigned char tx_buf[1024];
int len, fd_fw, n;