Fix compilation issue in enabling BLE_HCI_VS flag

This commit is contained in:
Rahul Tank
2024-04-02 15:21:55 +05:30
parent d232e23dbd
commit 9b6f0afa01
2 changed files with 5 additions and 6 deletions
+2 -2
View File
@@ -132,7 +132,7 @@ static const struct ble_hs_hci_evt_dispatch_entry ble_hs_hci_evt_dispatch[] = {
{ BLE_HCI_OCF_LE_RX_TEST_V2, ble_hs_hci_evt_rx_test },
{ BLE_HCI_OCF_LE_TX_TEST_V2, ble_hs_hci_evt_tx_test },
#if MYNEWT_VAL(BLE_HCI_VS)
{ BLE_HCI_EVCODE_VS, ble_hs_hci_evt_vs },
{ BLE_HCI_EVCODE_VENDOR_DEBUG, ble_hs_hci_evt_vs },
#endif
};
@@ -367,7 +367,7 @@ ble_hs_hci_evt_num_completed_pkts(uint8_t event_code, const void *data,
static int
ble_hs_hci_evt_vs(uint8_t event_code, const void *data, unsigned int len)
{
const struct ble_hci_ev_vs *ev = data;
const struct ble_hci_ev_vendor_debug *ev = data;
if (len < sizeof(*ev)) {
return BLE_HS_ECONTROLLER;
+3 -4
View File
@@ -28,9 +28,10 @@
static int
ble_hs_util_load_rand_addr(ble_addr_t *addr)
{
int rc = BLE_HS_ENOADDR;
#if MYNEWT_VAL(BLE_HCI_VS)
struct ble_hci_vs_rd_static_addr_rp rsp;
int rc;
rc = ble_hs_hci_cmd_tx(BLE_HCI_OP(BLE_HCI_OGF_VENDOR,
BLE_HCI_OCF_VS_RD_STATIC_ADDR),
@@ -43,14 +44,12 @@ ble_hs_util_load_rand_addr(ble_addr_t *addr)
#endif
#if SOC_ESP_NIMBLE_CONTROLLER
int rc;
rc = esp_ble_hw_get_static_addr((esp_ble_addr_t *)addr);
if (rc == 0) {
return 0;
}
#endif
return BLE_HS_ENOADDR;
return rc;
}
static int