]> code.ossystems Code Review - openembedded-core.git/blob
7bd5bbcbbb37aedb16638ebff3be0928db435caf
[openembedded-core.git] /
1 From 3b341fb421ef61db7782bf1314ec693828467de9 Mon Sep 17 00:00:00 2001
2 From: Andy Duan <fugang.duan@nxp.com>
3 Date: Wed, 23 Nov 2016 17:12:12 +0800
4 Subject: [PATCH] hciattach: bcm43xx: fix the delay timer for firmware download
5
6 From the log in .bcm43xx_load_firmware():
7         /* Wait 50ms to let the firmware placed in download mode */
8         nanosleep(&tm_mode, NULL);
9
10 But timespec tm_mode is real is 50us. Correct the delayed timer count.
11
12 Upstream-Status: Pending
13
14 Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
15 ---
16  tools/hciattach_bcm43xx.c | 4 ++--
17  1 file changed, 2 insertions(+), 2 deletions(-)
18
19 diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
20 index 81f38cb..ac1b3c1 100644
21 --- a/tools/hciattach_bcm43xx.c
22 +++ b/tools/hciattach_bcm43xx.c
23 @@ -228,8 +228,8 @@ static int bcm43xx_set_speed(int fd, struct termios *ti, uint32_t speed)
24  static int bcm43xx_load_firmware(int fd, const char *fw)
25  {
26         unsigned char cmd[] = { HCI_COMMAND_PKT, 0x2e, 0xfc, 0x00 };
27 -       struct timespec tm_mode = { 0, 50000 };
28 -       struct timespec tm_ready = { 0, 2000000 };
29 +       struct timespec tm_mode = { 0, 50000000 };
30 +       struct timespec tm_ready = { 0, 200000000 };
31         unsigned char resp[CC_MIN_SIZE];
32         unsigned char tx_buf[1024];
33         int len, fd_fw, n;
34 -- 
35 1.9.1
36