diff --git a/nimble/host/src/ble_hs_flow.c b/nimble/host/src/ble_hs_flow.c index 3df8c02d5..12473097a 100644 --- a/nimble/host/src/ble_hs_flow.c +++ b/nimble/host/src/ble_hs_flow.c @@ -92,7 +92,7 @@ ble_hs_flow_tx_num_comp_pkts(void) * response from the controller, so don't use the normal blocking * HCI API when sending it. */ - rc = ble_hs_hci_cmd_send_buf( + rc = ble_hs_hci_cmd_tx_no_rsp( BLE_HCI_OP(BLE_HCI_OGF_CTLR_BASEBAND, BLE_HCI_OCF_CB_HOST_NUM_COMP_PKTS), buf, sizeof(buf)); diff --git a/nimble/host/src/ble_hs_hci.c b/nimble/host/src/ble_hs_hci.c index 3cfed27e2..d93d49b80 100644 --- a/nimble/host/src/ble_hs_hci.c +++ b/nimble/host/src/ble_hs_hci.c @@ -291,6 +291,20 @@ ble_hs_hci_wait_for_ack(void) return rc; } +int +ble_hs_hci_cmd_tx_no_rsp(uint16_t opcode, const void *cmd, uint8_t cmd_len) +{ + int rc; + + ble_hs_hci_lock(); + + rc = ble_hs_hci_cmd_send_buf(opcode, cmd, cmd_len); + + ble_hs_hci_unlock(); + + return rc; +} + int ble_hs_hci_cmd_tx(uint16_t opcode, const void *cmd, uint8_t cmd_len, void *rsp, uint8_t rsp_len) diff --git a/nimble/host/src/ble_hs_hci_priv.h b/nimble/host/src/ble_hs_hci_priv.h index 362f12cbd..cc4af5d9d 100644 --- a/nimble/host/src/ble_hs_hci_priv.h +++ b/nimble/host/src/ble_hs_hci_priv.h @@ -81,6 +81,8 @@ struct hci_periodic_adv_params extern uint16_t ble_hs_hci_avail_pkts; +/* This function is not waiting for command status/complete HCI events */ +int ble_hs_hci_cmd_tx_no_rsp(uint16_t opcode, const void *cmd, uint8_t cmd_len); int ble_hs_hci_cmd_tx(uint16_t opcode, const void *cmd, uint8_t cmd_len, void *rsp, uint8_t rsp_len); void ble_hs_hci_init(void);