Loading system/bta/dm/bta_dm_api.c +5 −3 Original line number Diff line number Diff line Loading @@ -1237,6 +1237,8 @@ void bta_dmexecutecallback (tBTA_DM_EXEC_CBACK* p_callback, void * p_param) } } #if BLE_INCLUDED == TRUE /******************************************************************************* ** ** Function BTA_DmAddBleKey Loading Loading @@ -1736,7 +1738,7 @@ void BTA_DmBleConfigLocalPrivacy(BOOLEAN privacy_enable) { UNUSED(privacy_enable); } #endif /******************************************************************************* ** Loading Loading @@ -1811,6 +1813,7 @@ void BTA_DmCloseACL(BD_ADDR bd_addr, BOOLEAN remove_dev) } } #if BLE_INCLUDED == TRUE /******************************************************************************* ** ** Function BTA_DmBleObserve Loading Loading @@ -1848,5 +1851,4 @@ BTA_API extern void BTA_DmBleObserve(BOOLEAN start, UINT8 duration, } #endif } #endif system/bta/gatt/bta_gattc_cache.c +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ #include "sdpdefs.h" #include "bta_gattc_int.h" #include "btm_api.h" #include "btm_ble_api.h" static void bta_gattc_char_dscpt_disc_cmpl(UINT16 conn_id, tBTA_GATTC_SERV *p_srvc_cb); static tBTA_GATT_STATUS bta_gattc_sdp_service_disc(UINT16 conn_id, tBTA_GATTC_SERV *p_server_cb); Loading system/bta/hh/bta_hh_utils.c +2 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,8 @@ void bta_hh_update_di_info(tBTA_HH_DEV_CB *p_cb, UINT16 vendor_id, UINT16 produc p_cb->dscp_info.version = version; #if (defined BTA_HH_LE_INCLUDED && BTA_HH_LE_INCLUDED == TRUE) p_cb->dscp_info.flag = flag; #else UNUSED(flag); #endif } /******************************************************************************* Loading system/btif/src/bluetooth.c +2 −0 Original line number Diff line number Diff line Loading @@ -82,8 +82,10 @@ extern bthh_interface_t *btif_hh_get_interface(); extern bthl_interface_t *btif_hl_get_interface(); /*pan*/ extern btpan_interface_t *btif_pan_get_interface(); #if BLE_INCLUDED == TRUE /* gatt */ extern btgatt_interface_t *btif_gatt_get_interface(); #endif /* avrc */ extern btrc_interface_t *btif_rc_get_interface(); Loading system/stack/btm/btm_ble.c +13 −48 Original line number Diff line number Diff line Loading @@ -22,6 +22,9 @@ * security functions. * ******************************************************************************/ #include "bt_target.h" #if BLE_INCLUDED == TRUE #include <string.h> Loading Loading @@ -64,7 +67,6 @@ extern void gatt_notify_enc_cmpl(BD_ADDR bd_addr); BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE dev_type, tBLE_ADDR_TYPE addr_type) { #if BLE_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_dev_rec; UINT8 i = 0; tBTM_INQ_INFO *p_info=NULL; Loading Loading @@ -133,7 +135,6 @@ BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE d p_info->results.device_type, p_info->results.ble_addr_type); } #endif return(TRUE); } Loading @@ -154,7 +155,7 @@ BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE d *******************************************************************************/ BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key, tBTM_LE_KEY_TYPE key_type) { #if (BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE) #if SMP_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_dev_rec; BTM_TRACE_DEBUG0 ("BTM_SecAddBleKey"); p_dev_rec = btm_find_dev (bd_addr); Loading Loading @@ -201,7 +202,6 @@ BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key, tBTM_LE_ *******************************************************************************/ void BTM_BleLoadLocalKeys(UINT8 key_type, tBTM_BLE_LOCAL_KEYS *p_key) { #if BLE_INCLUDED == TRUE tBTM_DEVCB *p_devcb = &btm_cb.devcb; BTM_TRACE_DEBUG0 ("BTM_BleLoadLocalKeys"); if (p_key != NULL) Loading @@ -221,7 +221,6 @@ void BTM_BleLoadLocalKeys(UINT8 key_type, tBTM_BLE_LOCAL_KEYS *p_key) break; } } #endif } /******************************************************************************* Loading @@ -239,9 +238,7 @@ void BTM_GetDeviceEncRoot (BT_OCTET16 er) { BTM_TRACE_DEBUG0 ("BTM_GetDeviceEncRoot"); #if BLE_INCLUDED == TRUE memcpy (er, btm_cb.devcb.er, BT_OCTET16_LEN); #endif } /******************************************************************************* Loading @@ -259,9 +256,7 @@ void BTM_GetDeviceIDRoot (BT_OCTET16 irk) { BTM_TRACE_DEBUG0 ("BTM_GetDeviceIDRoot "); #if BLE_INCLUDED == TRUE memcpy (irk, btm_cb.devcb.id_keys.irk, BT_OCTET16_LEN); #endif } /******************************************************************************* Loading @@ -276,10 +271,8 @@ void BTM_GetDeviceIDRoot (BT_OCTET16 irk) *******************************************************************************/ void BTM_GetDeviceDHK (BT_OCTET16 dhk) { #if BLE_INCLUDED == TRUE BTM_TRACE_DEBUG0 ("BTM_GetDeviceDHK"); memcpy (dhk, btm_cb.devcb.id_keys.dhk, BT_OCTET16_LEN); #endif } /******************************************************************************* Loading @@ -294,7 +287,6 @@ void BTM_GetDeviceDHK (BT_OCTET16 dhk) *******************************************************************************/ void BTM_ReadConnectionAddr (BD_ADDR remote_bda, BD_ADDR local_conn_addr, tBLE_ADDR_TYPE *p_addr_type) { #if BLE_INCLUDED == TRUE tACL_CONN *p_acl = btm_bda_to_acl(remote_bda); if (p_acl == NULL) Loading @@ -307,9 +299,8 @@ void BTM_ReadConnectionAddr (BD_ADDR remote_bda, BD_ADDR local_conn_addr, tBLE_A BTM_TRACE_DEBUG2 ("BTM_ReadConnectionAddr address type: %d addr: 0x%02x", p_acl->conn_addr_type, p_acl->conn_addr[0]); #endif } /******************************************************************************* ** ** Function BTM_IsBleConnection Loading @@ -322,7 +313,6 @@ void BTM_ReadConnectionAddr (BD_ADDR remote_bda, BD_ADDR local_conn_addr, tBLE_A *******************************************************************************/ BOOLEAN BTM_IsBleConnection (UINT16 conn_handle) { #if (BLE_INCLUDED == TRUE) UINT8 xx; tACL_CONN *p; Loading @@ -335,9 +325,6 @@ BOOLEAN BTM_IsBleConnection (UINT16 conn_handle) p = &btm_cb.acl_db[xx]; return(p->is_le_link); #else return FALSE; #endif } /******************************************************************************* Loading @@ -353,7 +340,6 @@ BOOLEAN BTM_IsBleConnection (UINT16 conn_handle) BOOLEAN BTM_ReadRemoteConnectionAddr(BD_ADDR pseudo_addr, BD_ADDR conn_addr, tBLE_ADDR_TYPE *p_addr_type) { BOOLEAN st = TRUE; #if BLE_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev(pseudo_addr); memcpy(conn_addr, pseudo_addr, BD_ADDR_LEN); Loading @@ -361,7 +347,6 @@ BOOLEAN BTM_ReadRemoteConnectionAddr(BD_ADDR pseudo_addr, BD_ADDR conn_addr, tBL { *p_addr_type = p_dev_rec->ble.ble_addr_type; } #endif return st; } /******************************************************************************* Loading @@ -379,7 +364,7 @@ BOOLEAN BTM_ReadRemoteConnectionAddr(BD_ADDR pseudo_addr, BD_ADDR conn_addr, tBL *******************************************************************************/ void BTM_SecurityGrant(BD_ADDR bd_addr, UINT8 res) { #if (BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE) #if SMP_INCLUDED == TRUE tSMP_STATUS res_smp = (res == BTM_SUCCESS) ? SMP_SUCCESS : SMP_REPEATED_ATTEMPTS; BTM_TRACE_DEBUG0 ("BTM_SecurityGrant"); SMP_SecurityGrant(bd_addr, res_smp); Loading @@ -402,7 +387,7 @@ void BTM_SecurityGrant(BD_ADDR bd_addr, UINT8 res) *******************************************************************************/ void BTM_BlePasskeyReply (BD_ADDR bd_addr, UINT8 res, UINT32 passkey) { #if (BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE) #if SMP_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr); tSMP_STATUS res_smp = (res == BTM_SUCCESS) ? SMP_SUCCESS : SMP_PASSKEY_ENTRY_FAIL; Loading Loading @@ -432,7 +417,7 @@ void BTM_BlePasskeyReply (BD_ADDR bd_addr, UINT8 res, UINT32 passkey) *******************************************************************************/ void BTM_BleOobDataReply(BD_ADDR bd_addr, UINT8 res, UINT8 len, UINT8 *p_data) { #if (BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE) #if SMP_INCLUDED == TRUE tSMP_STATUS res_smp = (res == BTM_SUCCESS) ? SMP_SUCCESS : SMP_OOB_FAIL; tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr); Loading Loading @@ -463,7 +448,7 @@ void BTM_BleOobDataReply(BD_ADDR bd_addr, UINT8 res, UINT8 len, UINT8 *p_data) *******************************************************************************/ void BTM_BleSetConnScanParams (UINT16 scan_interval, UINT16 scan_window) { #if (BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE) #if SMP_INCLUDED == TRUE tBTM_BLE_CB *p_ble_cb = &btm_cb.ble_ctr_cb; BOOLEAN new_param = FALSE; Loading Loading @@ -517,7 +502,6 @@ void BTM_BleSetPrefConnParams (BD_ADDR bd_addr, UINT16 min_conn_int, UINT16 max_conn_int, UINT16 slave_latency, UINT16 supervision_tout) { #if BLE_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr); BTM_TRACE_API4 ("BTM_BleSetPrefConnParams min: %u max: %u latency: %u \ Loading Loading @@ -566,7 +550,6 @@ void BTM_BleSetPrefConnParams (BD_ADDR bd_addr, { BTM_TRACE_ERROR0("Illegal Connection Parameters"); } #endif /* BLE_INCLUDED */ } /******************************************************************************* Loading @@ -583,7 +566,6 @@ void BTM_BleSetPrefConnParams (BD_ADDR bd_addr, *******************************************************************************/ void BTM_ReadDevInfo (BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type, tBLE_ADDR_TYPE *p_addr_type) { #if BLE_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (remote_bda); tBTM_INQ_INFO *p_inq_info = BTM_InqDbRead(remote_bda); Loading Loading @@ -616,13 +598,8 @@ void BTM_ReadDevInfo (BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type, tBLE_ADDR } BTM_TRACE_DEBUG2 ("btm_find_dev_type - device_type = %d addr_type = %d", *p_dev_type , *p_addr_type); #endif return; } #if BLE_INCLUDED == TRUE /******************************************************************************* ** ** Function BTM_BleReceiverTest Loading Loading @@ -684,13 +661,9 @@ void BTM_BleTestEnd(tBTM_CMPL_CB *p_cmd_cmpl_cback) } } #endif /******************************************************************************* ** Internal Functions *******************************************************************************/ #if BLE_INCLUDED == TRUE void btm_ble_test_command_complete(UINT8 *p) { tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_le_test_cmd_cmpl_cb; Loading @@ -715,13 +688,11 @@ void btm_ble_test_command_complete(UINT8 *p) *******************************************************************************/ BOOLEAN BTM_IsBleLink (BD_ADDR bd_addr) { #if (BLE_INCLUDED == TRUE) tACL_CONN *p; BTM_TRACE_DEBUG0 ("BTM_IsBleLink"); if ((p = btm_bda_to_acl(bd_addr)) != NULL) return p->is_le_link; else #endif return FALSE; } /******************************************************************************* Loading @@ -742,9 +713,7 @@ BOOLEAN BTM_UseLeLink (BD_ADDR bd_addr) if ((p = btm_bda_to_acl(bd_addr)) != NULL) { #if (BLE_INCLUDED == TRUE) use_le = (p->is_le_link); #endif } else { Loading Loading @@ -1704,8 +1673,6 @@ UINT8 btm_proc_smp_cback(tSMP_EVT event, BD_ADDR bd_addr, tSMP_EVT_DATA *p_data) } #endif /* SMP_INCLUDED */ #endif /* BLE_INCLUDED */ /******************************************************************************* ** Loading @@ -1727,7 +1694,7 @@ BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len, BLE_SIGNATURE signature) { BOOLEAN ret = FALSE; #if (BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE) #if SMP_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_rec = btm_find_dev (bd_addr); UINT8 *p_buf, *pp; Loading Loading @@ -1826,7 +1793,7 @@ BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len, } } } #endif /* BLE_INCLUDED */ #endif /* SMP_INCLUDED */ return ret; } Loading @@ -1849,7 +1816,7 @@ BOOLEAN BTM_BleVerifySignature (BD_ADDR bd_addr, UINT8 *p_orig, UINT16 len, UINT UINT8 *p_comp) { BOOLEAN verified = FALSE; #if (BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE) #if SMP_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_rec = btm_find_dev (bd_addr); UINT8 p_mac[BTM_CMAC_TLEN_SIZE]; Loading Loading @@ -1878,11 +1845,10 @@ BOOLEAN BTM_BleVerifySignature (BD_ADDR bd_addr, UINT8 *p_orig, UINT16 len, UINT } } } #endif /* BLE_INCLUDED */ #endif /* SMP_INCLUDED */ return verified; } #if BLE_INCLUDED == TRUE /******************************************************************************* ** Utility functions for LE device IR/ER generation *******************************************************************************/ Loading Loading @@ -2221,5 +2187,4 @@ void btm_set_random_address(BD_ADDR random_bda) } #endif /* BTM_BLE_CONFORMANCE_TESTING */ #endif /* BLE_INCLUDED */ Loading
system/bta/dm/bta_dm_api.c +5 −3 Original line number Diff line number Diff line Loading @@ -1237,6 +1237,8 @@ void bta_dmexecutecallback (tBTA_DM_EXEC_CBACK* p_callback, void * p_param) } } #if BLE_INCLUDED == TRUE /******************************************************************************* ** ** Function BTA_DmAddBleKey Loading Loading @@ -1736,7 +1738,7 @@ void BTA_DmBleConfigLocalPrivacy(BOOLEAN privacy_enable) { UNUSED(privacy_enable); } #endif /******************************************************************************* ** Loading Loading @@ -1811,6 +1813,7 @@ void BTA_DmCloseACL(BD_ADDR bd_addr, BOOLEAN remove_dev) } } #if BLE_INCLUDED == TRUE /******************************************************************************* ** ** Function BTA_DmBleObserve Loading Loading @@ -1848,5 +1851,4 @@ BTA_API extern void BTA_DmBleObserve(BOOLEAN start, UINT8 duration, } #endif } #endif
system/bta/gatt/bta_gattc_cache.c +1 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ #include "sdpdefs.h" #include "bta_gattc_int.h" #include "btm_api.h" #include "btm_ble_api.h" static void bta_gattc_char_dscpt_disc_cmpl(UINT16 conn_id, tBTA_GATTC_SERV *p_srvc_cb); static tBTA_GATT_STATUS bta_gattc_sdp_service_disc(UINT16 conn_id, tBTA_GATTC_SERV *p_server_cb); Loading
system/bta/hh/bta_hh_utils.c +2 −0 Original line number Diff line number Diff line Loading @@ -165,6 +165,8 @@ void bta_hh_update_di_info(tBTA_HH_DEV_CB *p_cb, UINT16 vendor_id, UINT16 produc p_cb->dscp_info.version = version; #if (defined BTA_HH_LE_INCLUDED && BTA_HH_LE_INCLUDED == TRUE) p_cb->dscp_info.flag = flag; #else UNUSED(flag); #endif } /******************************************************************************* Loading
system/btif/src/bluetooth.c +2 −0 Original line number Diff line number Diff line Loading @@ -82,8 +82,10 @@ extern bthh_interface_t *btif_hh_get_interface(); extern bthl_interface_t *btif_hl_get_interface(); /*pan*/ extern btpan_interface_t *btif_pan_get_interface(); #if BLE_INCLUDED == TRUE /* gatt */ extern btgatt_interface_t *btif_gatt_get_interface(); #endif /* avrc */ extern btrc_interface_t *btif_rc_get_interface(); Loading
system/stack/btm/btm_ble.c +13 −48 Original line number Diff line number Diff line Loading @@ -22,6 +22,9 @@ * security functions. * ******************************************************************************/ #include "bt_target.h" #if BLE_INCLUDED == TRUE #include <string.h> Loading Loading @@ -64,7 +67,6 @@ extern void gatt_notify_enc_cmpl(BD_ADDR bd_addr); BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE dev_type, tBLE_ADDR_TYPE addr_type) { #if BLE_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_dev_rec; UINT8 i = 0; tBTM_INQ_INFO *p_info=NULL; Loading Loading @@ -133,7 +135,6 @@ BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE d p_info->results.device_type, p_info->results.ble_addr_type); } #endif return(TRUE); } Loading @@ -154,7 +155,7 @@ BOOLEAN BTM_SecAddBleDevice (BD_ADDR bd_addr, BD_NAME bd_name, tBT_DEVICE_TYPE d *******************************************************************************/ BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key, tBTM_LE_KEY_TYPE key_type) { #if (BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE) #if SMP_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_dev_rec; BTM_TRACE_DEBUG0 ("BTM_SecAddBleKey"); p_dev_rec = btm_find_dev (bd_addr); Loading Loading @@ -201,7 +202,6 @@ BOOLEAN BTM_SecAddBleKey (BD_ADDR bd_addr, tBTM_LE_KEY_VALUE *p_le_key, tBTM_LE_ *******************************************************************************/ void BTM_BleLoadLocalKeys(UINT8 key_type, tBTM_BLE_LOCAL_KEYS *p_key) { #if BLE_INCLUDED == TRUE tBTM_DEVCB *p_devcb = &btm_cb.devcb; BTM_TRACE_DEBUG0 ("BTM_BleLoadLocalKeys"); if (p_key != NULL) Loading @@ -221,7 +221,6 @@ void BTM_BleLoadLocalKeys(UINT8 key_type, tBTM_BLE_LOCAL_KEYS *p_key) break; } } #endif } /******************************************************************************* Loading @@ -239,9 +238,7 @@ void BTM_GetDeviceEncRoot (BT_OCTET16 er) { BTM_TRACE_DEBUG0 ("BTM_GetDeviceEncRoot"); #if BLE_INCLUDED == TRUE memcpy (er, btm_cb.devcb.er, BT_OCTET16_LEN); #endif } /******************************************************************************* Loading @@ -259,9 +256,7 @@ void BTM_GetDeviceIDRoot (BT_OCTET16 irk) { BTM_TRACE_DEBUG0 ("BTM_GetDeviceIDRoot "); #if BLE_INCLUDED == TRUE memcpy (irk, btm_cb.devcb.id_keys.irk, BT_OCTET16_LEN); #endif } /******************************************************************************* Loading @@ -276,10 +271,8 @@ void BTM_GetDeviceIDRoot (BT_OCTET16 irk) *******************************************************************************/ void BTM_GetDeviceDHK (BT_OCTET16 dhk) { #if BLE_INCLUDED == TRUE BTM_TRACE_DEBUG0 ("BTM_GetDeviceDHK"); memcpy (dhk, btm_cb.devcb.id_keys.dhk, BT_OCTET16_LEN); #endif } /******************************************************************************* Loading @@ -294,7 +287,6 @@ void BTM_GetDeviceDHK (BT_OCTET16 dhk) *******************************************************************************/ void BTM_ReadConnectionAddr (BD_ADDR remote_bda, BD_ADDR local_conn_addr, tBLE_ADDR_TYPE *p_addr_type) { #if BLE_INCLUDED == TRUE tACL_CONN *p_acl = btm_bda_to_acl(remote_bda); if (p_acl == NULL) Loading @@ -307,9 +299,8 @@ void BTM_ReadConnectionAddr (BD_ADDR remote_bda, BD_ADDR local_conn_addr, tBLE_A BTM_TRACE_DEBUG2 ("BTM_ReadConnectionAddr address type: %d addr: 0x%02x", p_acl->conn_addr_type, p_acl->conn_addr[0]); #endif } /******************************************************************************* ** ** Function BTM_IsBleConnection Loading @@ -322,7 +313,6 @@ void BTM_ReadConnectionAddr (BD_ADDR remote_bda, BD_ADDR local_conn_addr, tBLE_A *******************************************************************************/ BOOLEAN BTM_IsBleConnection (UINT16 conn_handle) { #if (BLE_INCLUDED == TRUE) UINT8 xx; tACL_CONN *p; Loading @@ -335,9 +325,6 @@ BOOLEAN BTM_IsBleConnection (UINT16 conn_handle) p = &btm_cb.acl_db[xx]; return(p->is_le_link); #else return FALSE; #endif } /******************************************************************************* Loading @@ -353,7 +340,6 @@ BOOLEAN BTM_IsBleConnection (UINT16 conn_handle) BOOLEAN BTM_ReadRemoteConnectionAddr(BD_ADDR pseudo_addr, BD_ADDR conn_addr, tBLE_ADDR_TYPE *p_addr_type) { BOOLEAN st = TRUE; #if BLE_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev(pseudo_addr); memcpy(conn_addr, pseudo_addr, BD_ADDR_LEN); Loading @@ -361,7 +347,6 @@ BOOLEAN BTM_ReadRemoteConnectionAddr(BD_ADDR pseudo_addr, BD_ADDR conn_addr, tBL { *p_addr_type = p_dev_rec->ble.ble_addr_type; } #endif return st; } /******************************************************************************* Loading @@ -379,7 +364,7 @@ BOOLEAN BTM_ReadRemoteConnectionAddr(BD_ADDR pseudo_addr, BD_ADDR conn_addr, tBL *******************************************************************************/ void BTM_SecurityGrant(BD_ADDR bd_addr, UINT8 res) { #if (BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE) #if SMP_INCLUDED == TRUE tSMP_STATUS res_smp = (res == BTM_SUCCESS) ? SMP_SUCCESS : SMP_REPEATED_ATTEMPTS; BTM_TRACE_DEBUG0 ("BTM_SecurityGrant"); SMP_SecurityGrant(bd_addr, res_smp); Loading @@ -402,7 +387,7 @@ void BTM_SecurityGrant(BD_ADDR bd_addr, UINT8 res) *******************************************************************************/ void BTM_BlePasskeyReply (BD_ADDR bd_addr, UINT8 res, UINT32 passkey) { #if (BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE) #if SMP_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr); tSMP_STATUS res_smp = (res == BTM_SUCCESS) ? SMP_SUCCESS : SMP_PASSKEY_ENTRY_FAIL; Loading Loading @@ -432,7 +417,7 @@ void BTM_BlePasskeyReply (BD_ADDR bd_addr, UINT8 res, UINT32 passkey) *******************************************************************************/ void BTM_BleOobDataReply(BD_ADDR bd_addr, UINT8 res, UINT8 len, UINT8 *p_data) { #if (BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE) #if SMP_INCLUDED == TRUE tSMP_STATUS res_smp = (res == BTM_SUCCESS) ? SMP_SUCCESS : SMP_OOB_FAIL; tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr); Loading Loading @@ -463,7 +448,7 @@ void BTM_BleOobDataReply(BD_ADDR bd_addr, UINT8 res, UINT8 len, UINT8 *p_data) *******************************************************************************/ void BTM_BleSetConnScanParams (UINT16 scan_interval, UINT16 scan_window) { #if (BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE) #if SMP_INCLUDED == TRUE tBTM_BLE_CB *p_ble_cb = &btm_cb.ble_ctr_cb; BOOLEAN new_param = FALSE; Loading Loading @@ -517,7 +502,6 @@ void BTM_BleSetPrefConnParams (BD_ADDR bd_addr, UINT16 min_conn_int, UINT16 max_conn_int, UINT16 slave_latency, UINT16 supervision_tout) { #if BLE_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr); BTM_TRACE_API4 ("BTM_BleSetPrefConnParams min: %u max: %u latency: %u \ Loading Loading @@ -566,7 +550,6 @@ void BTM_BleSetPrefConnParams (BD_ADDR bd_addr, { BTM_TRACE_ERROR0("Illegal Connection Parameters"); } #endif /* BLE_INCLUDED */ } /******************************************************************************* Loading @@ -583,7 +566,6 @@ void BTM_BleSetPrefConnParams (BD_ADDR bd_addr, *******************************************************************************/ void BTM_ReadDevInfo (BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type, tBLE_ADDR_TYPE *p_addr_type) { #if BLE_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (remote_bda); tBTM_INQ_INFO *p_inq_info = BTM_InqDbRead(remote_bda); Loading Loading @@ -616,13 +598,8 @@ void BTM_ReadDevInfo (BD_ADDR remote_bda, tBT_DEVICE_TYPE *p_dev_type, tBLE_ADDR } BTM_TRACE_DEBUG2 ("btm_find_dev_type - device_type = %d addr_type = %d", *p_dev_type , *p_addr_type); #endif return; } #if BLE_INCLUDED == TRUE /******************************************************************************* ** ** Function BTM_BleReceiverTest Loading Loading @@ -684,13 +661,9 @@ void BTM_BleTestEnd(tBTM_CMPL_CB *p_cmd_cmpl_cback) } } #endif /******************************************************************************* ** Internal Functions *******************************************************************************/ #if BLE_INCLUDED == TRUE void btm_ble_test_command_complete(UINT8 *p) { tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_le_test_cmd_cmpl_cb; Loading @@ -715,13 +688,11 @@ void btm_ble_test_command_complete(UINT8 *p) *******************************************************************************/ BOOLEAN BTM_IsBleLink (BD_ADDR bd_addr) { #if (BLE_INCLUDED == TRUE) tACL_CONN *p; BTM_TRACE_DEBUG0 ("BTM_IsBleLink"); if ((p = btm_bda_to_acl(bd_addr)) != NULL) return p->is_le_link; else #endif return FALSE; } /******************************************************************************* Loading @@ -742,9 +713,7 @@ BOOLEAN BTM_UseLeLink (BD_ADDR bd_addr) if ((p = btm_bda_to_acl(bd_addr)) != NULL) { #if (BLE_INCLUDED == TRUE) use_le = (p->is_le_link); #endif } else { Loading Loading @@ -1704,8 +1673,6 @@ UINT8 btm_proc_smp_cback(tSMP_EVT event, BD_ADDR bd_addr, tSMP_EVT_DATA *p_data) } #endif /* SMP_INCLUDED */ #endif /* BLE_INCLUDED */ /******************************************************************************* ** Loading @@ -1727,7 +1694,7 @@ BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len, BLE_SIGNATURE signature) { BOOLEAN ret = FALSE; #if (BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE) #if SMP_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_rec = btm_find_dev (bd_addr); UINT8 *p_buf, *pp; Loading Loading @@ -1826,7 +1793,7 @@ BOOLEAN BTM_BleDataSignature (BD_ADDR bd_addr, UINT8 *p_text, UINT16 len, } } } #endif /* BLE_INCLUDED */ #endif /* SMP_INCLUDED */ return ret; } Loading @@ -1849,7 +1816,7 @@ BOOLEAN BTM_BleVerifySignature (BD_ADDR bd_addr, UINT8 *p_orig, UINT16 len, UINT UINT8 *p_comp) { BOOLEAN verified = FALSE; #if (BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE) #if SMP_INCLUDED == TRUE tBTM_SEC_DEV_REC *p_rec = btm_find_dev (bd_addr); UINT8 p_mac[BTM_CMAC_TLEN_SIZE]; Loading Loading @@ -1878,11 +1845,10 @@ BOOLEAN BTM_BleVerifySignature (BD_ADDR bd_addr, UINT8 *p_orig, UINT16 len, UINT } } } #endif /* BLE_INCLUDED */ #endif /* SMP_INCLUDED */ return verified; } #if BLE_INCLUDED == TRUE /******************************************************************************* ** Utility functions for LE device IR/ER generation *******************************************************************************/ Loading Loading @@ -2221,5 +2187,4 @@ void btm_set_random_address(BD_ADDR random_bda) } #endif /* BTM_BLE_CONFORMANCE_TESTING */ #endif /* BLE_INCLUDED */