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:
Szymon Janc 2015-05-18 12:04:50 +02:00 committed by Anas Nashif
commit 62267639ac

View file

@ -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;