Loading system/bta/dm/bta_dm_api.c +16 −0 Original line number Diff line number Diff line Loading @@ -1820,7 +1820,23 @@ void BTA_DmBleEnableRemotePrivacy(BD_ADDR bd_addr, BOOLEAN privacy_enable) *******************************************************************************/ void BTA_DmBleConfigLocalPrivacy(BOOLEAN privacy_enable) { #if BLE_INCLUDED == TRUE #if BLE_VND_INCLUDED == TRUE && BLE_PRIVACY_SPT == TRUE tBTA_DM_API_LOCAL_PRIVACY *p_msg; if ((p_msg = (tBTA_DM_API_LOCAL_PRIVACY *) GKI_getbuf(sizeof(tBTA_DM_API_ENABLE_PRIVACY))) != NULL) { memset (p_msg, 0, sizeof(tBTA_DM_API_LOCAL_PRIVACY)); p_msg->hdr.event = BTA_DM_API_LOCAL_PRIVACY_EVT; p_msg->privacy_enable = privacy_enable; bta_sys_sendmsg(p_msg); } #endif #else UNUSED(privacy_enable); #endif } #endif Loading system/bta/dm/bta_dm_int.h +3 −0 Original line number Diff line number Diff line Loading @@ -1101,6 +1101,9 @@ extern void bta_dm_ble_set_scan_params (tBTA_DM_MSG *p_data); extern void bta_dm_close_gatt_conn(tBTA_DM_MSG *p_data); extern void bta_dm_ble_observe (tBTA_DM_MSG *p_data); extern void bta_dm_ble_update_conn_params (tBTA_DM_MSG *p_data); #if BLE_PRIVACY_SPT == TRUE extern void bta_dm_ble_config_local_privacy (tBTA_DM_MSG *p_data); #endif extern void bta_dm_ble_set_adv_params (tBTA_DM_MSG *p_data); extern void bta_dm_ble_set_adv_config (tBTA_DM_MSG *p_data); extern void bta_dm_ble_set_scan_rsp (tBTA_DM_MSG *p_data); Loading system/btif/src/btif_dm.c +3 −0 Original line number Diff line number Diff line Loading @@ -1357,6 +1357,9 @@ static void btif_dm_upstreams_evt(UINT16 event, char* p_param) btif_storage_load_autopair_device_list(); btif_enable_bluetooth_evt(p_data->enable.status, p_data->enable.bd_addr); /* Enable local privacy */ BTA_DmBleConfigLocalPrivacy(TRUE); } break; Loading system/include/bt_target.h +3 −0 Original line number Diff line number Diff line Loading @@ -1307,6 +1307,9 @@ and USER_HW_DISABLE_API macros */ #define BLE_MULTI_ADV_INCLUDED TRUE #endif #ifndef BLE_VND_INCLUDED #define BLE_VND_INCLUDED TRUE #endif /****************************************************************************** ** Loading system/stack/btm/btm_ble.c +11 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,10 @@ #include "gap_api.h" #include "bt_utils.h" #if (defined BLE_VND_INCLUDED && BLE_VND_INCLUDED == TRUE) #include "vendor_ble.h" #endif #if SMP_INCLUDED == TRUE extern BOOLEAN AES_CMAC ( BT_OCTET16 key, UINT8 *input, UINT16 length, UINT16 tlen, UINT8 *p_signature); extern void smp_link_encrypted(BD_ADDR bda, UINT8 encr_enable); Loading Loading @@ -1613,6 +1617,10 @@ void btm_ble_connected (UINT8 *bda, UINT16 handle, UINT8 enc_mode, UINT8 role, if (p_dev_rec->ble.ble_addr_type == BLE_ADDR_RANDOM && !addr_matched) memcpy(p_dev_rec->ble.cur_rand_addr, bda, BD_ADDR_LEN); #if (defined BLE_VND_INCLUDED && BLE_VND_INCLUDED == TRUE) btm_ble_vendor_disable_irk_list(); #endif #endif if (role == HCI_ROLE_SLAVE) Loading Loading @@ -1649,6 +1657,9 @@ void btm_ble_conn_complete(UINT8 *p, UINT16 evt_len) if (status == 0) { #if (BLE_PRIVACY_SPT == TRUE ) #if (BLE_VND_INCLUDED == TRUE) match = btm_public_addr_to_random_pseudo (bda, &bda_type); #endif /* possiblly receive connection complete with resolvable random on slave role while the device has been paired */ if (!match && role == HCI_ROLE_SLAVE && BTM_BLE_IS_RESOLVE_BDA(bda)) Loading Loading
system/bta/dm/bta_dm_api.c +16 −0 Original line number Diff line number Diff line Loading @@ -1820,7 +1820,23 @@ void BTA_DmBleEnableRemotePrivacy(BD_ADDR bd_addr, BOOLEAN privacy_enable) *******************************************************************************/ void BTA_DmBleConfigLocalPrivacy(BOOLEAN privacy_enable) { #if BLE_INCLUDED == TRUE #if BLE_VND_INCLUDED == TRUE && BLE_PRIVACY_SPT == TRUE tBTA_DM_API_LOCAL_PRIVACY *p_msg; if ((p_msg = (tBTA_DM_API_LOCAL_PRIVACY *) GKI_getbuf(sizeof(tBTA_DM_API_ENABLE_PRIVACY))) != NULL) { memset (p_msg, 0, sizeof(tBTA_DM_API_LOCAL_PRIVACY)); p_msg->hdr.event = BTA_DM_API_LOCAL_PRIVACY_EVT; p_msg->privacy_enable = privacy_enable; bta_sys_sendmsg(p_msg); } #endif #else UNUSED(privacy_enable); #endif } #endif Loading
system/bta/dm/bta_dm_int.h +3 −0 Original line number Diff line number Diff line Loading @@ -1101,6 +1101,9 @@ extern void bta_dm_ble_set_scan_params (tBTA_DM_MSG *p_data); extern void bta_dm_close_gatt_conn(tBTA_DM_MSG *p_data); extern void bta_dm_ble_observe (tBTA_DM_MSG *p_data); extern void bta_dm_ble_update_conn_params (tBTA_DM_MSG *p_data); #if BLE_PRIVACY_SPT == TRUE extern void bta_dm_ble_config_local_privacy (tBTA_DM_MSG *p_data); #endif extern void bta_dm_ble_set_adv_params (tBTA_DM_MSG *p_data); extern void bta_dm_ble_set_adv_config (tBTA_DM_MSG *p_data); extern void bta_dm_ble_set_scan_rsp (tBTA_DM_MSG *p_data); Loading
system/btif/src/btif_dm.c +3 −0 Original line number Diff line number Diff line Loading @@ -1357,6 +1357,9 @@ static void btif_dm_upstreams_evt(UINT16 event, char* p_param) btif_storage_load_autopair_device_list(); btif_enable_bluetooth_evt(p_data->enable.status, p_data->enable.bd_addr); /* Enable local privacy */ BTA_DmBleConfigLocalPrivacy(TRUE); } break; Loading
system/include/bt_target.h +3 −0 Original line number Diff line number Diff line Loading @@ -1307,6 +1307,9 @@ and USER_HW_DISABLE_API macros */ #define BLE_MULTI_ADV_INCLUDED TRUE #endif #ifndef BLE_VND_INCLUDED #define BLE_VND_INCLUDED TRUE #endif /****************************************************************************** ** Loading
system/stack/btm/btm_ble.c +11 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,10 @@ #include "gap_api.h" #include "bt_utils.h" #if (defined BLE_VND_INCLUDED && BLE_VND_INCLUDED == TRUE) #include "vendor_ble.h" #endif #if SMP_INCLUDED == TRUE extern BOOLEAN AES_CMAC ( BT_OCTET16 key, UINT8 *input, UINT16 length, UINT16 tlen, UINT8 *p_signature); extern void smp_link_encrypted(BD_ADDR bda, UINT8 encr_enable); Loading Loading @@ -1613,6 +1617,10 @@ void btm_ble_connected (UINT8 *bda, UINT16 handle, UINT8 enc_mode, UINT8 role, if (p_dev_rec->ble.ble_addr_type == BLE_ADDR_RANDOM && !addr_matched) memcpy(p_dev_rec->ble.cur_rand_addr, bda, BD_ADDR_LEN); #if (defined BLE_VND_INCLUDED && BLE_VND_INCLUDED == TRUE) btm_ble_vendor_disable_irk_list(); #endif #endif if (role == HCI_ROLE_SLAVE) Loading Loading @@ -1649,6 +1657,9 @@ void btm_ble_conn_complete(UINT8 *p, UINT16 evt_len) if (status == 0) { #if (BLE_PRIVACY_SPT == TRUE ) #if (BLE_VND_INCLUDED == TRUE) match = btm_public_addr_to_random_pseudo (bda, &bda_type); #endif /* possiblly receive connection complete with resolvable random on slave role while the device has been paired */ if (!match && role == HCI_ROLE_SLAVE && BTM_BLE_IS_RESOLVE_BDA(bda)) Loading