Bluetooth: Fix not waiting for all commands to complete on init
For LE-only controller init procedure should wait for last HCI command (Set Controller To Host Flow Control) to complete before returning. Change-Id: Ic01e0cbaebf19d61560faab2ae01205c2eb22b77 Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
This commit is contained in:
parent
46372d712c
commit
62267639ac
1 changed files with 4 additions and 1 deletions
|
@ -662,7 +662,10 @@ static int hci_init(void)
|
|||
|
||||
enable = bt_buf_add(buf, sizeof(*enable));
|
||||
*enable = 0x01;
|
||||
bt_hci_cmd_send(BT_HCI_OP_SET_CTL_TO_HOST_FLOW, buf);
|
||||
err = bt_hci_cmd_send_sync(BT_HCI_OP_SET_CTL_TO_HOST_FLOW, buf, NULL);
|
||||
if (err) {
|
||||
return err;
|
||||
}
|
||||
|
||||
if (lmp_bredr_capable(dev)) {
|
||||
struct bt_hci_cp_write_le_host_supp *cp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue