mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fix(ble/bluedroid): fix state management and security issues in BTA DM layer
- Fix out-of-bounds read and peer_device cleanup in bta_dm_acl_change
- Fix adv state restore and BTM status usage in bta_dm_ble_advstop
- Fix remove security device failed due to invalid transport
- Rename tBTA_DM_API_BLE_OBSERVE to tBTA_DM_API_BLE_ADVACTION
- Remove unused btm_sec_find_bonded_dev()
(cherry picked from commit c7931bedf5)
Co-authored-by: zhiweijian <zhiweijian@espressif.com>
This commit is contained in:
@@ -305,6 +305,10 @@ void bta_dm_enable(tBTA_DM_MSG *p_data)
|
||||
sys_enable_event->hw_module = BTA_SYS_HW_BLUETOOTH;
|
||||
|
||||
bta_sys_sendmsg(sys_enable_event);
|
||||
} else {
|
||||
// if malloc failed, restart
|
||||
APPL_TRACE_ERROR("%s, failed to allocate memory for sys_enable_event", __func__);
|
||||
assert(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -678,7 +682,11 @@ static void bta_dm_disable_timer_cback (TIMER_LIST_ENT *p_tle)
|
||||
#if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
bta_sys_remove_uuid(UUID_SERVCLASS_PNP_INFORMATION);
|
||||
#endif // #if (CLASSIC_BT_INCLUDED == TRUE)
|
||||
bta_dm_cb.p_sec_cback(BTA_DM_DISABLE_EVT, NULL);
|
||||
if (bta_dm_cb.p_sec_cback) {
|
||||
bta_dm_cb.p_sec_cback(BTA_DM_DISABLE_EVT, NULL);
|
||||
} else {
|
||||
APPL_TRACE_ERROR("%s, security callback is not registered", __func__);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1199,6 +1207,7 @@ static void bta_dm_process_remove_device(BD_ADDR bd_addr, tBT_TRANSPORT transpor
|
||||
*******************************************************************************/
|
||||
void bta_dm_remove_device(tBTA_DM_MSG *p_data)
|
||||
{
|
||||
// p_data is not NULL, see BTA_DmRemoveDevice()
|
||||
tBTA_DM_API_REMOVE_DEVICE *p_dev = &p_data->remove_dev;
|
||||
if (p_dev == NULL) {
|
||||
return;
|
||||
@@ -3784,19 +3793,26 @@ void bta_dm_acl_change(tBTA_DM_MSG *p_data)
|
||||
|
||||
conn.link_down.is_removed = bta_dm_cb.device_list.peer_device[i].remove_dev_pending;
|
||||
|
||||
for (; i < bta_dm_cb.device_list.count ; i++) {
|
||||
/* Shift remaining devices down; use i + 1 < count to avoid UINT8 underflow when count is 0 */
|
||||
for (; i + 1 < bta_dm_cb.device_list.count; i++) {
|
||||
memcpy(&bta_dm_cb.device_list.peer_device[i], &bta_dm_cb.device_list.peer_device[i + 1], sizeof(bta_dm_cb.device_list.peer_device[i]));
|
||||
}
|
||||
/* Clear empty slots to avoid residual old data */
|
||||
memset(&bta_dm_cb.device_list.peer_device[bta_dm_cb.device_list.count-1], 0,
|
||||
sizeof(bta_dm_cb.device_list.peer_device[0]));
|
||||
|
||||
if (bta_dm_cb.device_list.count) {
|
||||
bta_dm_cb.device_list.count--;
|
||||
}
|
||||
#if BLE_INCLUDED == TRUE
|
||||
if ((p_data->acl_change.transport == BT_TRANSPORT_LE) &&
|
||||
(bta_dm_cb.device_list.le_count)) {
|
||||
bta_dm_cb.device_list.le_count--;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
if (bta_dm_cb.device_list.count) {
|
||||
bta_dm_cb.device_list.count--;
|
||||
}
|
||||
#if BLE_INCLUDED == TRUE
|
||||
if ((p_data->acl_change.transport == BT_TRANSPORT_LE) &&
|
||||
(bta_dm_cb.device_list.le_count)) {
|
||||
bta_dm_cb.device_list.le_count--;
|
||||
}
|
||||
conn.link_down.link_type = p_data->acl_change.transport;
|
||||
#endif
|
||||
|
||||
@@ -3989,23 +4005,34 @@ static BOOLEAN bta_dm_remove_sec_dev_entry(BD_ADDR remote_bd_addr)
|
||||
{
|
||||
BOOLEAN is_device_deleted = FALSE;
|
||||
UINT16 index = 0;
|
||||
|
||||
for (index = 0; index < bta_dm_cb.device_list.count; index ++) {
|
||||
if (!bdcmp( bta_dm_cb.device_list.peer_device[index].peer_bdaddr, remote_bd_addr)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( BTM_IsAclConnectionUp(remote_bd_addr, BT_TRANSPORT_LE) ||
|
||||
BTM_IsAclConnectionUp(remote_bd_addr, BT_TRANSPORT_BR_EDR)) {
|
||||
APPL_TRACE_DEBUG("%s ACL is not down. Schedule for Dev Removal when ACL closes",
|
||||
__FUNCTION__);
|
||||
BTM_SecClearSecurityFlags (remote_bd_addr);
|
||||
for (index = 0; index < bta_dm_cb.device_list.count; index ++) {
|
||||
if (!bdcmp( bta_dm_cb.device_list.peer_device[index].peer_bdaddr, remote_bd_addr)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (index != bta_dm_cb.device_list.count) {
|
||||
bta_dm_cb.device_list.peer_device[index].remove_dev_pending = TRUE;
|
||||
} else {
|
||||
APPL_TRACE_ERROR(" %s Device does not exist in DB", __FUNCTION__);
|
||||
}
|
||||
} else {
|
||||
is_device_deleted = BTM_SecDeleteDevice (remote_bd_addr, bta_dm_cb.device_list.peer_device[index].transport);
|
||||
tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR;
|
||||
if (index != bta_dm_cb.device_list.count) {
|
||||
transport = bta_dm_cb.device_list.peer_device[index].transport;
|
||||
} else {
|
||||
// if device not found, Set transport to invalid value, try to delete both BR/EDR and LE keys
|
||||
transport = BT_TRANSPORT_INVALID;
|
||||
APPL_TRACE_WARNING("%s Device does not exist", __FUNCTION__);
|
||||
}
|
||||
is_device_deleted = BTM_SecDeleteDevice (remote_bd_addr, transport);
|
||||
#if (BLE_INCLUDED == TRUE && GATTC_INCLUDED == TRUE)
|
||||
/* need to remove all pending background connection */
|
||||
BTA_GATTC_CancelOpen(0, remote_bd_addr, FALSE);
|
||||
@@ -5075,7 +5102,7 @@ void bta_dm_add_ble_device (tBTA_DM_MSG *p_data)
|
||||
*******************************************************************************/
|
||||
void bta_dm_ble_passkey_reply (tBTA_DM_MSG *p_data)
|
||||
{
|
||||
if (p_data->pin_reply.accept) {
|
||||
if (p_data->ble_passkey_reply.accept) {
|
||||
BTM_BlePasskeyReply(p_data->ble_passkey_reply.bd_addr, BTM_SUCCESS, p_data->ble_passkey_reply.passkey);
|
||||
} else {
|
||||
BTM_BlePasskeyReply(p_data->ble_passkey_reply.bd_addr, BTM_NOT_AUTHORIZED, p_data->ble_passkey_reply.passkey);
|
||||
@@ -5102,7 +5129,7 @@ void bta_dm_ble_confirm_reply (tBTA_DM_MSG *p_data)
|
||||
if (p_data->confirm.accept) {
|
||||
BTM_BleConfirmReply(p_data->confirm.bd_addr, BTM_SUCCESS);
|
||||
} else {
|
||||
BTM_BleConfirmReply(p_data->ble_passkey_reply.bd_addr, BTM_NOT_AUTHORIZED);
|
||||
BTM_BleConfirmReply(p_data->confirm.bd_addr, BTM_NOT_AUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5569,16 +5596,17 @@ void bta_dm_ble_set_data_length(tBTA_DM_MSG *p_data)
|
||||
void bta_dm_ble_advstop (tBTA_DM_MSG *p_data)
|
||||
{
|
||||
tBTA_STATUS status = BTA_FAILURE;
|
||||
BOOLEAN start = p_data->ble_observe.start;
|
||||
BOOLEAN start = p_data->ble_adv_action.start;
|
||||
|
||||
if (BTM_BleBroadcast(start, p_data->ble_observe.p_stop_adv_cback) == BTM_SUCCESS) {
|
||||
status = BTA_SUCCESS;
|
||||
tBTM_STATUS btm_status = BTM_BleBroadcast(start, p_data->ble_adv_action.p_stop_adv_cback);
|
||||
if (btm_status == BTM_SUCCESS) {
|
||||
status = BTA_SUCCESS;
|
||||
} else {
|
||||
APPL_TRACE_ERROR("%s failed\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
if (p_data->ble_observe.p_stop_adv_cback){
|
||||
(*p_data->ble_observe.p_stop_adv_cback)(status);
|
||||
if (p_data->ble_adv_action.p_stop_adv_cback){
|
||||
(*p_data->ble_adv_action.p_stop_adv_cback)(status);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5902,7 +5930,7 @@ void bta_dm_ble_gap_enable_monitor_adv(tBTA_DM_MSG *p_data)
|
||||
#endif // #if (BLE_FEAT_ADV_MONITOR == TRUE)
|
||||
|
||||
#if (BLE_FEAT_ISO_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
void bta_dm_ble_big_create(tBTA_DM_MSG *p_data)
|
||||
{
|
||||
APPL_TRACE_API("%s", __func__);
|
||||
@@ -5930,7 +5958,7 @@ void bta_dm_ble_big_terminate(tBTA_DM_MSG *p_data)
|
||||
tBTA_DM_BLE_BIG_TERMINATE_PARAMS param = p_data->big_terminate.big_terminate_param;
|
||||
BTM_BleBigTerminate(param.big_handle, param.reason);
|
||||
}
|
||||
#endif // #if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#endif // #if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
|
||||
#if (BLE_FEAT_ISO_BIG_SYNCER_EN == TRUE)
|
||||
void bta_dm_ble_big_sync_create(tBTA_DM_MSG *p_data)
|
||||
@@ -6382,7 +6410,7 @@ static void bta_dm_gatt_disc_complete(UINT16 conn_id, tBTA_GATT_STATUS status)
|
||||
p_msg->disc_result.result.disc_res.raw_data_size = bta_dm_search_cb.ble_raw_used;
|
||||
} else {
|
||||
p_msg->disc_result.result.disc_res.p_raw_data = NULL;
|
||||
bta_dm_search_cb.p_ble_rawdata = 0;
|
||||
bta_dm_search_cb.p_ble_rawdata = NULL;
|
||||
}
|
||||
|
||||
bta_sys_sendmsg(p_msg);
|
||||
|
||||
@@ -926,11 +926,13 @@ void BTA_DmSecureConnectionOobReply(BD_ADDR bd_addr, UINT8 *p_c, UINT8 *p_r)
|
||||
{
|
||||
tBTA_DM_API_SC_OOB_REPLY *p_msg;
|
||||
|
||||
if ((p_msg = (tBTA_DM_API_SC_OOB_REPLY *) osi_malloc(sizeof(tBTA_DM_API_OOB_REPLY))) != NULL) {
|
||||
if((p_c == NULL) || (p_r == NULL)) {
|
||||
APPL_TRACE_ERROR("%s, p_c or p_r is NULL", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((p_msg = (tBTA_DM_API_SC_OOB_REPLY *) osi_malloc(sizeof(tBTA_DM_API_SC_OOB_REPLY))) != NULL) {
|
||||
p_msg->hdr.event = BTA_DM_API_SC_OOB_REPLY_EVT;
|
||||
if((p_c == NULL) || (p_r == NULL)) {
|
||||
return;
|
||||
}
|
||||
memcpy(p_msg->bd_addr, bd_addr, BD_ADDR_LEN);
|
||||
memcpy(p_msg->c, p_c, BT_OCTET16_LEN);
|
||||
memcpy(p_msg->r, p_r, BT_OCTET16_LEN);
|
||||
@@ -1688,12 +1690,12 @@ void BTA_DmUpdateDuplicateExceptionalList(UINT8 subcode, UINT32 type, BD_ADDR de
|
||||
*******************************************************************************/
|
||||
extern void BTA_DmBleAdvStop (BOOLEAN start, tBTA_START_STOP_ADV_CMPL_CBACK *p_start_stop_adv_cb)
|
||||
{
|
||||
tBTA_DM_API_BLE_OBSERVE *p_msg;
|
||||
tBTA_DM_API_BLE_ADVACTION *p_msg;
|
||||
|
||||
APPL_TRACE_API("BTA_DmBleAdvStop: start = %d \n", start);
|
||||
|
||||
if ((p_msg = (tBTA_DM_API_BLE_OBSERVE *) osi_malloc(sizeof(tBTA_DM_API_BLE_OBSERVE))) != NULL) {
|
||||
memset(p_msg, 0, sizeof(tBTA_DM_API_BLE_OBSERVE));
|
||||
if ((p_msg = (tBTA_DM_API_BLE_ADVACTION *) osi_malloc(sizeof(tBTA_DM_API_BLE_ADVACTION))) != NULL) {
|
||||
memset(p_msg, 0, sizeof(tBTA_DM_API_BLE_ADVACTION));
|
||||
|
||||
p_msg->hdr.event = BTA_DM_API_BLE_ADVSTOP_EVT;
|
||||
p_msg->start = start;
|
||||
@@ -2895,9 +2897,10 @@ void BTA_DmBleGapPeriodicAdvCfgDataRaw(UINT8 instance, UINT16 length,
|
||||
p_msg->hdr.event = BTA_DM_API_PERIODIC_ADV_CFG_DATA_EVT;
|
||||
p_msg->instance = instance;
|
||||
p_msg->length = length;
|
||||
p_msg->data = (UINT8 *)(p_msg + 1);
|
||||
memcpy(p_msg->data, data, length);
|
||||
p_msg->data = length != 0 ? (UINT8 *)(p_msg + 1) : NULL;
|
||||
p_msg->data = (length != 0) ? (UINT8 *)(p_msg + 1) : NULL;
|
||||
if (data && length) {
|
||||
memcpy(p_msg->data, data, length);
|
||||
}
|
||||
p_msg->only_update_did = only_update_did;
|
||||
//start sent the msg to the bta system control module
|
||||
bta_sys_sendmsg(p_msg);
|
||||
@@ -3298,7 +3301,7 @@ void BTA_DmBleGapEnableMonitorAdv(UINT8 enable)
|
||||
#endif // #if (BLE_FEAT_ADV_MONITOR == TRUE)
|
||||
|
||||
#if (BLE_FEAT_ISO_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
void BTA_DmBleGapIsoBigCreate(tBTA_DM_BLE_BIG_CREATE_PARAMS *p_big_creat_param)
|
||||
{
|
||||
tBTA_DM_API_BIG_CREATE *p_msg;
|
||||
@@ -3373,7 +3376,7 @@ void BTA_DmBleGapIsoBigTerminate(tBTA_DM_BLE_BIG_TERMINATE_PARAMS *p_big_termina
|
||||
APPL_TRACE_ERROR("%s malloc failed", __func__);
|
||||
}
|
||||
}
|
||||
#endif // #if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#endif // #if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
|
||||
#if (BLE_FEAT_ISO_BIG_SYNCER_EN == TRUE)
|
||||
void BTA_DmBleGapIsoBigSyncCreate(tBTA_DM_BLE_BIG_SYNC_CREATE_PARAMS *p_big_sync_param)
|
||||
@@ -3633,7 +3636,7 @@ void BTA_DmBleCteSetConnectionlessTransParams(uint8_t adv_handle, uint8_t cte_le
|
||||
p_buf->cte_count = cte_count;
|
||||
p_buf->switching_pattern_len = switching_pattern_len;
|
||||
p_buf->antenna_ids = (switching_pattern_len != 0) ? (UINT8 *)(p_buf + 1) : NULL;
|
||||
if (switching_pattern_len) {
|
||||
if (switching_pattern_len && antenna_ids) {
|
||||
memcpy(p_buf->antenna_ids, antenna_ids, switching_pattern_len);
|
||||
}
|
||||
//start sent the msg to the bta system control module
|
||||
@@ -3677,7 +3680,7 @@ void BTA_DmBleCteSetConnectionlessIqSamplingEnable(uint16_t sync_handle, uint8_t
|
||||
p_buf->max_sampled_ctes = max_sampled_ctes;
|
||||
p_buf->switching_pattern_len = switching_pattern_len;
|
||||
p_buf->antenna_ids = (switching_pattern_len != 0) ? (UINT8 *)(p_buf + 1) : NULL;
|
||||
if (switching_pattern_len) {
|
||||
if (switching_pattern_len && ant_ids) {
|
||||
memcpy(p_buf->antenna_ids, ant_ids, switching_pattern_len);
|
||||
}
|
||||
// start sent the msg to the bta system control module
|
||||
@@ -3704,7 +3707,7 @@ void BTA_DmBleCteSetConnectionReceiveParams(uint16_t conn_handle, uint8_t sampli
|
||||
p_buf->slot_dur = slot_dur;
|
||||
p_buf->switching_pattern_len = switching_pattern_len;
|
||||
p_buf->antenna_ids = (switching_pattern_len != 0) ? (UINT8 *)(p_buf + 1) : NULL;
|
||||
if (switching_pattern_len) {
|
||||
if (switching_pattern_len && ant_ids) {
|
||||
memcpy(p_buf->antenna_ids, ant_ids, switching_pattern_len);
|
||||
}
|
||||
// start sent the msg to the bta system control module
|
||||
@@ -3727,7 +3730,7 @@ void BTA_DmBleCteSetConnectionTransParams(uint16_t conn_handle, uint8_t cte_type
|
||||
p_buf->cte_types = cte_types;
|
||||
p_buf->switching_pattern_len = switching_pattern_len;
|
||||
p_buf->antenna_ids = (switching_pattern_len != 0) ? (UINT8 *)(p_buf + 1) : NULL;
|
||||
if (switching_pattern_len) {
|
||||
if (switching_pattern_len && ant_ids) {
|
||||
memcpy(p_buf->antenna_ids, ant_ids, switching_pattern_len);
|
||||
}
|
||||
// start sent the msg to the bta system control module
|
||||
|
||||
@@ -254,11 +254,11 @@ const tBTA_DM_ACTION bta_dm_action[BTA_DM_MAX_EVT] = {
|
||||
bta_dm_read_ble_channel_map, /* BTA_DM_API_BLE_READ_CH_MAP_EVT */
|
||||
#endif
|
||||
#if (BLE_FEAT_ISO_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
bta_dm_ble_big_create, /* BTA_DM_API_ISO_BIG_CREATE_EVT */
|
||||
bta_dm_ble_big_create_test, /* BTA_DM_API_ISO_BIG_CREATE_TEST_EVT */
|
||||
bta_dm_ble_big_terminate, /* BTA_DM_API_ISO_BIG_TERMINATE_EVT */
|
||||
#endif// #if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#endif// #if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_SYNCER_EN == TRUE)
|
||||
bta_dm_ble_big_sync_create, /* BTA_DM_API_ISO_BIG_SYNC_CREATE_EVT */
|
||||
bta_dm_ble_big_sync_terminate, /* BTA_DM_API_ISO_BIG_SYNC_TERMINATE_EVT */
|
||||
|
||||
@@ -247,11 +247,11 @@ enum {
|
||||
BTA_DM_API_BLE_READ_CH_MAP_EVT,
|
||||
#endif
|
||||
#if (BLE_FEAT_ISO_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
BTA_DM_API_ISO_BIG_CREATE_EVT,
|
||||
BTA_DM_API_ISO_BIG_CREATE_TEST_EVT,
|
||||
BTA_DM_API_ISO_BIG_TERMINATE_EVT,
|
||||
#endif // #if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#endif // #if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_SYNCER_EN == TRUE)
|
||||
BTA_DM_API_ISO_BIG_SYNC_CREATE_EVT,
|
||||
BTA_DM_API_ISO_BIG_SYNC_TERMINATE_EVT,
|
||||
@@ -875,12 +875,8 @@ typedef struct {
|
||||
typedef struct {
|
||||
BT_HDR hdr;
|
||||
BOOLEAN start;
|
||||
UINT32 duration;
|
||||
tBTA_DM_SEARCH_CBACK *p_cback;
|
||||
tBTA_START_STOP_SCAN_CMPL_CBACK *p_start_scan_cback;
|
||||
tBTA_START_STOP_SCAN_CMPL_CBACK *p_stop_scan_cback;
|
||||
tBTA_START_STOP_ADV_CMPL_CBACK *p_stop_adv_cback;
|
||||
} tBTA_DM_API_BLE_OBSERVE;
|
||||
} tBTA_DM_API_BLE_ADVACTION;
|
||||
|
||||
/* Data type for start/stop scan */
|
||||
typedef struct {
|
||||
@@ -890,7 +886,6 @@ typedef struct {
|
||||
tBTA_DM_SEARCH_CBACK *p_cback;
|
||||
tBTA_START_STOP_SCAN_CMPL_CBACK *p_start_scan_cback;
|
||||
tBTA_START_STOP_SCAN_CMPL_CBACK *p_stop_scan_cback;
|
||||
tBTA_START_STOP_ADV_CMPL_CBACK *p_stop_adv_cback;
|
||||
} tBTA_DM_API_BLE_SCAN;
|
||||
|
||||
typedef struct {
|
||||
@@ -1469,7 +1464,7 @@ typedef struct {
|
||||
#endif // #if (BLE_FEAT_PERIODIC_ADV_SYNC_TRANSFER == TRUE)
|
||||
|
||||
#if (BLE_FEAT_ISO_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
typedef struct {
|
||||
BT_HDR hdr;
|
||||
tBTA_DM_BLE_BIG_CREATE_PARAMS big_creat_param;
|
||||
@@ -1482,7 +1477,7 @@ typedef struct {
|
||||
BT_HDR hdr;
|
||||
tBTA_DM_BLE_BIG_TERMINATE_PARAMS big_terminate_param;
|
||||
} tBTA_DM_API_BIG_TERMINATE;
|
||||
#endif // #if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#endif // #if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_SYNCER_EN == TRUE)
|
||||
typedef struct {
|
||||
BT_HDR hdr;
|
||||
@@ -1779,7 +1774,7 @@ typedef union {
|
||||
tBTA_DM_API_BLE_SET_BG_CONN_TYPE ble_set_bd_conn_type;
|
||||
tBTA_DM_API_BLE_CONN_PARAMS ble_set_conn_params;
|
||||
tBTA_DM_API_BLE_SCAN_FILTER_PARAMS ble_set_scan_fil_params;
|
||||
tBTA_DM_API_BLE_OBSERVE ble_observe;
|
||||
tBTA_DM_API_BLE_ADVACTION ble_adv_action;
|
||||
tBTA_DM_API_BLE_SCAN ble_scan;
|
||||
tBTA_DM_API_ENABLE_PRIVACY ble_remote_privacy;
|
||||
tBTA_DM_API_LOCAL_PRIVACY ble_local_privacy;
|
||||
@@ -1859,11 +1854,11 @@ typedef union {
|
||||
tBTA_DM_API_BLE_SET_VENDOR_EVT_MASK ble_set_vendor_evt_mask;
|
||||
#endif
|
||||
#if (BLE_FEAT_ISO_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
tBTA_DM_API_BIG_CREATE big_creat;
|
||||
tBTA_DM_API_BIG_CREATE_TEST big_creat_test;
|
||||
tBTA_DM_API_BIG_TERMINATE big_terminate;
|
||||
#endif // #if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#endif // #if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_SYNCER_EN == TRUE)
|
||||
tBTA_DM_API_BIG_SYNC_CREATE big_sync;
|
||||
tBTA_DM_API_BIG_SYNC_TERMINATE big_sync_terminate;
|
||||
@@ -2528,11 +2523,11 @@ extern void bta_dm_ble_gap_enable_monitor_adv(tBTA_DM_MSG *p_data);
|
||||
#endif // #if (BLE_FEAT_ADV_MONITOR == TRUE)
|
||||
|
||||
#if (BLE_FEAT_ISO_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
extern void bta_dm_ble_big_create(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_big_create_test(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_big_terminate(tBTA_DM_MSG *p_data);
|
||||
#endif // #if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#endif // #if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_SYNCER_EN == TRUE)
|
||||
extern void bta_dm_ble_big_sync_create(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_big_sync_terminate(tBTA_DM_MSG *p_data);
|
||||
|
||||
@@ -444,8 +444,6 @@ typedef tBTM_CMPL_CB tBTA_CMPL_CB;
|
||||
|
||||
typedef tBTM_VSC_CMPL tBTA_VSC_CMPL;
|
||||
|
||||
typedef tBTM_TX_POWER_RESULTS tBTA_TX_POWER_RESULTS;
|
||||
|
||||
typedef tBTM_RSSI_RESULTS tBTA_RSSI_RESULTS;
|
||||
|
||||
typedef tBTM_BLE_CH_MAP_RESULTS tBTA_BLE_CH_MAP_RESULTS;
|
||||
@@ -1669,10 +1667,10 @@ extern tBTM_BLE_5_HCI_CBACK ble_5_hci_cb;
|
||||
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
|
||||
#if (BLE_FEAT_ISO_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
#define BTA_BLE_ISO_BIG_CREATE_COMPLETE_EVT BTM_BLE_ISO_BIG_CREATE_COMPLETE_EVT
|
||||
#define BTA_BLE_ISO_BIG_TERMINATE_COMPLETE_EVT BTM_BLE_ISO_BIG_TERMINATE_COMPLETE_EVT
|
||||
#endif // #if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#endif // #if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_SYNCER_EN == TRUE)
|
||||
#define BTA_BLE_ISO_BIG_SYNC_ESTABLISHED_EVT BTM_BLE_ISO_BIG_SYNC_ESTABLISHED_EVT
|
||||
#define BTA_BLE_ISO_BIG_SYNC_LOST_EVT BTM_BLE_ISO_BIG_SYNC_LOST_EVT
|
||||
@@ -3135,11 +3133,11 @@ extern void BTA_DmBleGapEnableMonitorAdv(UINT8 enable);
|
||||
#endif // #if (BLE_FEAT_ADV_MONITOR == TRUE)
|
||||
|
||||
#if (BLE_FEAT_ISO_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
extern void BTA_DmBleGapIsoBigCreate(tBTA_DM_BLE_BIG_CREATE_PARAMS *p_big_creat_param);
|
||||
extern void BTA_DmBleGapIsoBigCreateTest(tBTA_DM_BLE_BIG_CREATE_TEST_PARAMS *p_big_creat_test_param);
|
||||
extern void BTA_DmBleGapIsoBigTerminate(tBTA_DM_BLE_BIG_TERMINATE_PARAMS *p_big_terminate_param);
|
||||
#endif// #if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE)
|
||||
#endif// #if (BLE_FEAT_ISO_BIG_BROADCASTER_EN == TRUE)
|
||||
#if (BLE_FEAT_ISO_BIG_SYNCER_EN == TRUE)
|
||||
extern void BTA_DmBleGapIsoBigSyncCreate(tBTA_DM_BLE_BIG_SYNC_CREATE_PARAMS *p_big_sync_param);
|
||||
extern void BTA_DmBleGapIsoBigSyncTerminate(tBTA_DM_BLE_BIG_SYNC_TERMINATE_PARAMS *p_big_sync_terminate_param);
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
*
|
||||
*
|
||||
******************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#include "stack/bt_types.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user