1. According to spec, controller should never send "Command Complete" event
after "LE Create Connection" or "LE Extened Create Connection" command.
Add error message in such case.
2. Parse Comand Status for LE Enhanced Create Connection.
3. Fix NPE in btm_ble_update_mode_operation, when called from
btm_ble_create_ll_conn_complete.
Test: Bond/unbond with few LE devices while connected.
Change-Id: Ic135d9a8d096634afe33997afb42d054237598c2
/* in case of disconnected, we must cancel bgconn and restart
in order to add back device to white list in order to reconnect */
- btm_ble_bgconn_cancel_if_disconnected(*bd_addr);
+ if (bd_addr) btm_ble_bgconn_cancel_if_disconnected(*bd_addr);
/* when no connection is attempted, and controller is not rejecting last
request
break;
case HCI_BLE_CREATE_LL_CONN:
- btm_ble_create_ll_conn_complete(*p);
+ case HCI_LE_EXTENDED_CREATE_CONNECTION:
+ // No command complete event for those commands according to spec
+ LOG(ERROR) << "No command complete expected, but received!";
break;
case HCI_BLE_TRANSMITTER_TEST:
break;
case HCI_BLE_CREATE_LL_CONN:
+ case HCI_LE_EXTENDED_CREATE_CONNECTION:
btm_ble_create_ll_conn_complete(status);
break;