diff --git a/nimble/host/src/ble_hs.c b/nimble/host/src/ble_hs.c index 1ed13f82a..e044d6c3d 100644 --- a/nimble/host/src/ble_hs.c +++ b/nimble/host/src/ble_hs.c @@ -697,7 +697,7 @@ ble_hs_rx_data(struct os_mbuf *om, void *arg) { int rc; -#if (BT_HCI_LOG_INCLUDED == TRUE) +#if ((BT_HCI_LOG_INCLUDED == TRUE) && SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED) uint16_t len = OS_MBUF_PKTHDR(om)->omp_len + 1; uint8_t *data = (uint8_t *)malloc(len); assert(data != NULL); @@ -733,7 +733,7 @@ ble_hs_rx_data(struct os_mbuf *om, void *arg) int ble_hs_tx_data(struct os_mbuf *om) { -#if (BT_HCI_LOG_INCLUDED == TRUE) +#if ((BT_HCI_LOG_INCLUDED == TRUE) && SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED) uint16_t len = 0; uint8_t data[MYNEWT_VAL(BLE_TRANSPORT_ACL_SIZE) + 1]; data[0] = 0x02; diff --git a/nimble/host/src/ble_hs_hci.c b/nimble/host/src/ble_hs_hci.c index b1ac4bdba..c5b85a657 100644 --- a/nimble/host/src/ble_hs_hci.c +++ b/nimble/host/src/ble_hs_hci.c @@ -419,7 +419,7 @@ ble_hs_hci_rx_evt(uint8_t *hci_ev, void *arg) BLE_HS_DBG_ASSERT(hci_ev != NULL); -#if (BT_HCI_LOG_INCLUDED == TRUE) +#if ((BT_HCI_LOG_INCLUDED == TRUE) && SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED) uint16_t len = hci_ev[1] + 3; if (host_recv_adv_packet(hci_ev)) { bt_hci_log_record_hci_adv(HCI_LOG_DATA_TYPE_ADV, &hci_ev[1], len - 2); diff --git a/nimble/host/src/ble_hs_hci_cmd.c b/nimble/host/src/ble_hs_hci_cmd.c index 76ec034da..a9487eaa6 100644 --- a/nimble/host/src/ble_hs_hci_cmd.c +++ b/nimble/host/src/ble_hs_hci_cmd.c @@ -91,7 +91,7 @@ ble_hs_hci_cmd_send(uint16_t opcode, uint8_t len, const void *cmddata) buf--; #endif -#if (BT_HCI_LOG_INCLUDED == TRUE) +#if ((BT_HCI_LOG_INCLUDED == TRUE) && SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED) uint8_t *data; #if !(SOC_ESP_NIMBLE_CONTROLLER) && CONFIG_BT_CONTROLLER_ENABLED data = (uint8_t *)buf + 1;