Home
last modified time | relevance | path

Searched refs:p_dev_rec (Results 1 – 19 of 19) sorted by relevance

/system/bt/stack/btm/
Dbtm_dev.cc70 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr); in BTM_SecAddDevice() local
71 if (!p_dev_rec) { in BTM_SecAddDevice()
72 p_dev_rec = btm_sec_allocate_dev_rec(); in BTM_SecAddDevice()
73 BTM_TRACE_API("%s: allocated p_dev_rec=%p, bd_addr=%s", __func__, p_dev_rec, in BTM_SecAddDevice()
76 p_dev_rec->bd_addr = bd_addr; in BTM_SecAddDevice()
77 p_dev_rec->hci_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_BR_EDR); in BTM_SecAddDevice()
81 memset(&p_dev_rec->conn_params, 0xff, sizeof(tBTM_LE_CONN_PRAMS)); in BTM_SecAddDevice()
84 p_dev_rec->timestamp = btm_cb.dev_rec_count++; in BTM_SecAddDevice()
92 p_dev_rec->bond_type = BOND_TYPE_UNKNOWN; in BTM_SecAddDevice()
95 if (dev_class) memcpy(p_dev_rec->dev_class, dev_class, DEV_CLASS_LEN); in BTM_SecAddDevice()
[all …]
Dbtm_sec.cc72 static bool btm_sec_start_get_name(tBTM_SEC_DEV_REC* p_dev_rec);
73 static void btm_sec_start_authentication(tBTM_SEC_DEV_REC* p_dev_rec);
74 static void btm_sec_start_encryption(tBTM_SEC_DEV_REC* p_dev_rec);
78 static tBTM_STATUS btm_sec_dd_create_conn(tBTM_SEC_DEV_REC* p_dev_rec);
90 static void btm_send_link_key_notif(tBTM_SEC_DEV_REC* p_dev_rec);
91 static bool btm_sec_check_prefetch_pin(tBTM_SEC_DEV_REC* p_dev_rec);
93 static uint8_t btm_sec_start_authorization(tBTM_SEC_DEV_REC* p_dev_rec);
96 static tBTM_STATUS btm_sec_send_hci_disconnect(tBTM_SEC_DEV_REC* p_dev_rec,
101 static bool btm_dev_authenticated(tBTM_SEC_DEV_REC* p_dev_rec);
102 static bool btm_dev_encrypted(tBTM_SEC_DEV_REC* p_dev_rec);
[all …]
Dbtm_ble_addr.cc118 bool btm_ble_init_pseudo_addr(tBTM_SEC_DEV_REC* p_dev_rec, in btm_ble_init_pseudo_addr() argument
120 if (p_dev_rec->ble.pseudo_addr.IsEmpty()) { in btm_ble_init_pseudo_addr()
121 p_dev_rec->ble.pseudo_addr = new_pseudo_addr; in btm_ble_init_pseudo_addr()
156 tBTM_SEC_DEV_REC* p_dev_rec) { in btm_ble_addr_resolvable() argument
159 if ((p_dev_rec->device_type & BT_DEVICE_TYPE_BLE) && in btm_ble_addr_resolvable()
160 (p_dev_rec->ble.key_type & BTM_LE_KEY_PID)) { in btm_ble_addr_resolvable()
163 if (rpa_matches_irk(rpa, p_dev_rec->ble.keys.irk)) { in btm_ble_addr_resolvable()
164 btm_ble_init_pseudo_addr(p_dev_rec, rpa); in btm_ble_addr_resolvable()
178 tBTM_SEC_DEV_REC* p_dev_rec = static_cast<tBTM_SEC_DEV_REC*>(data); in btm_ble_match_random_bda() local
180 BTM_TRACE_DEBUG("sec_flags = %02x device_type = %d", p_dev_rec->sec_flags, in btm_ble_match_random_bda()
[all …]
Dbtm_ble.cc81 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr); in BTM_SecAddBleDevice() local
82 if (!p_dev_rec) { in BTM_SecAddBleDevice()
83 p_dev_rec = btm_sec_allocate_dev_rec(); in BTM_SecAddBleDevice()
85 p_dev_rec->bd_addr = bd_addr; in BTM_SecAddBleDevice()
86 p_dev_rec->hci_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_BR_EDR); in BTM_SecAddBleDevice()
87 p_dev_rec->ble_hci_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); in BTM_SecAddBleDevice()
90 p_dev_rec->conn_params.min_conn_int = BTM_BLE_CONN_PARAM_UNDEF; in BTM_SecAddBleDevice()
91 p_dev_rec->conn_params.max_conn_int = BTM_BLE_CONN_PARAM_UNDEF; in BTM_SecAddBleDevice()
92 p_dev_rec->conn_params.supervision_tout = BTM_BLE_CONN_PARAM_UNDEF; in BTM_SecAddBleDevice()
93 p_dev_rec->conn_params.slave_latency = BTM_BLE_CONN_PARAM_UNDEF; in BTM_SecAddBleDevice()
[all …]
Dbtm_ble_privacy.cc189 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(pseudo_bda); in btm_ble_update_resolving_list() local
190 if (p_dev_rec == NULL) return; in btm_ble_update_resolving_list()
193 p_dev_rec->ble.in_controller_list |= BTM_RESOLVING_LIST_BIT; in btm_ble_update_resolving_list()
195 p_dev_rec->ble.resolving_list_index = btm_ble_find_irk_index(); in btm_ble_update_resolving_list()
197 p_dev_rec->ble.in_controller_list &= ~BTM_RESOLVING_LIST_BIT; in btm_ble_update_resolving_list()
200 btm_ble_clear_irk_index(p_dev_rec->ble.resolving_list_index); in btm_ble_update_resolving_list()
201 p_dev_rec->ble.resolving_list_index = 0; in btm_ble_update_resolving_list()
207 tBTM_SEC_DEV_REC* p_dev_rec = static_cast<tBTM_SEC_DEV_REC*>(data); in clear_resolving_list_bit() local
208 p_dev_rec->ble.in_controller_list &= ~BTM_RESOLVING_LIST_BIT; in clear_resolving_list_bit()
412 tBTM_STATUS btm_ble_remove_resolving_list_entry(tBTM_SEC_DEV_REC* p_dev_rec) { in btm_ble_remove_resolving_list_entry() argument
[all …]
Dbtm_acl.cc147 bool btm_ble_get_acl_remote_addr(tBTM_SEC_DEV_REC* p_dev_rec, in btm_ble_get_acl_remote_addr() argument
152 if (p_dev_rec == NULL) { in btm_ble_get_acl_remote_addr()
157 switch (p_dev_rec->ble.active_addr_type) { in btm_ble_get_acl_remote_addr()
159 conn_addr = p_dev_rec->bd_addr; in btm_ble_get_acl_remote_addr()
160 *p_addr_type = p_dev_rec->ble.ble_addr_type; in btm_ble_get_acl_remote_addr()
164 conn_addr = p_dev_rec->ble.cur_rand_addr; in btm_ble_get_acl_remote_addr()
169 conn_addr = p_dev_rec->ble.identity_addr; in btm_ble_get_acl_remote_addr()
170 *p_addr_type = p_dev_rec->ble.identity_addr_type; in btm_ble_get_acl_remote_addr()
175 p_dev_rec->ble.active_addr_type); in btm_ble_get_acl_remote_addr()
196 tBTM_SEC_DEV_REC* p_dev_rec = NULL; in btm_acl_created() local
[all …]
Dbtm_ble_bgconn.cc174 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(address); in BTM_BackgroundConnectAddressKnown() local
177 if (p_dev_rec == NULL || (p_dev_rec->device_type & BT_DEVICE_TYPE_BLE) == 0) in BTM_BackgroundConnectAddressKnown()
181 if (!p_dev_rec->ble.identity_addr.IsEmpty()) { in BTM_BackgroundConnectAddressKnown()
186 if (p_dev_rec->ble.ble_addr_type == BLE_ADDR_PUBLIC || in BTM_BackgroundConnectAddressKnown()
203 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr); in btm_add_dev_to_controller() local
205 if (p_dev_rec != NULL && p_dev_rec->device_type & BT_DEVICE_TYPE_BLE) { in btm_add_dev_to_controller()
207 if (!p_dev_rec->ble.identity_addr.IsEmpty()) { in btm_add_dev_to_controller()
208 background_connection_add(p_dev_rec->ble.identity_addr_type, in btm_add_dev_to_controller()
209 p_dev_rec->ble.identity_addr); in btm_add_dev_to_controller()
211 background_connection_add(p_dev_rec->ble.ble_addr_type, bd_addr); in btm_add_dev_to_controller()
[all …]
Dbtm_int.h89 extern void btm_cont_rswitch(tACL_CONN* p, tBTM_SEC_DEV_REC* p_dev_rec,
180 tBTM_SEC_DEV_REC* p_dev_rec);
182 tBTM_SEC_DEV_REC* p_dev_rec);
183 extern bool btm_ble_resolving_list_load_dev(tBTM_SEC_DEV_REC* p_dev_rec);
184 extern void btm_ble_resolving_list_remove_dev(tBTM_SEC_DEV_REC* p_dev_rec);
203 extern void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* p_dev_rec);
255 extern void btm_sec_dev_rec_cback_event(tBTM_SEC_DEV_REC* p_dev_rec,
258 tBTM_SEC_DEV_REC* p_dev_rec);
260 extern void btm_sec_clear_ble_keys(tBTM_SEC_DEV_REC* p_dev_rec);
263 extern bool btm_ble_init_pseudo_addr(tBTM_SEC_DEV_REC* p_dev_rec,
[all …]
Dbtm_main.cc87 tBTM_SEC_DEV_REC* p_dev_rec = static_cast<tBTM_SEC_DEV_REC*>(list_node(node)); in btm_free() local
91 wipe_secrets_and_remove(p_dev_rec); in btm_free()
Dbtm_ble_gap.cc673 tBTM_SEC_DEV_REC* p_dev_rec = static_cast<tBTM_SEC_DEV_REC*>(data); in is_resolving_list_bit_set() local
675 if ((p_dev_rec->ble.in_controller_list & BTM_RESOLVING_LIST_BIT) != 0) in is_resolving_list_bit_set()
696 tBTM_SEC_DEV_REC* p_dev_rec; in btm_set_conn_mode_adv_init_addr() local
715 if ((p_dev_rec = btm_find_or_alloc_dev(p_cb->direct_bda.bda)) != NULL && in btm_set_conn_mode_adv_init_addr()
716 p_dev_rec->ble.in_controller_list & BTM_RESOLVING_LIST_BIT) { in btm_set_conn_mode_adv_init_addr()
718 p_peer_addr_ptr = p_dev_rec->ble.identity_addr; in btm_set_conn_mode_adv_init_addr()
719 *p_peer_addr_type = p_dev_rec->ble.identity_addr_type; in btm_set_conn_mode_adv_init_addr()
747 tBTM_SEC_DEV_REC* p_dev_rec = in btm_set_conn_mode_adv_init_addr() local
749 p_peer_addr_ptr = p_dev_rec->ble.identity_addr; in btm_set_conn_mode_adv_init_addr()
750 *p_peer_addr_type = p_dev_rec->ble.identity_addr_type; in btm_set_conn_mode_adv_init_addr()
Dbtm_devctl.cc169 tBTM_SEC_DEV_REC* p_dev_rec = static_cast<tBTM_SEC_DEV_REC*>(data); in set_sec_state_idle() local
170 p_dev_rec->sec_state = BTM_SEC_STATE_IDLE; in set_sec_state_idle()
/system/bt/stack/smp/
Dsmp_act.cc251 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(p_cb->pairing_bda); in smp_send_pair_req() local
255 if (p_dev_rec) btm_sec_clear_ble_keys(p_dev_rec); in smp_send_pair_req()
512 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(p_cb->pairing_bda); in smp_proc_pair_cmd() local
518 if (p_dev_rec && (p_cb->role == HCI_ROLE_SLAVE)) in smp_proc_pair_cmd()
519 btm_sec_clear_ble_keys(p_dev_rec); in smp_proc_pair_cmd()
782 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(p_cb->pairing_bda); in smp_br_process_pairing_command() local
786 if (!p_dev_rec->new_encryption_key_is_p256 && p_cb->role == HCI_ROLE_SLAVE) { in smp_br_process_pairing_command()
794 if (p_dev_rec && (p_cb->role == HCI_ROLE_SLAVE)) in smp_br_process_pairing_command()
795 btm_sec_clear_ble_keys(p_dev_rec); in smp_br_process_pairing_command()
827 p_dev_rec->new_encryption_key_is_p256 = false; in smp_br_process_pairing_command()
[all …]
Dsmp_keys.cc938 tBTM_SEC_DEV_REC* p_dev_rec; in smp_calculate_link_key_from_long_term_key() local
957 p_dev_rec = btm_find_dev(p_cb->pairing_bda); in smp_calculate_link_key_from_long_term_key()
958 if (p_dev_rec == NULL) { in smp_calculate_link_key_from_long_term_key()
984 __func__, btm_cb.security_mode, p_dev_rec->sm4); in smp_calculate_link_key_from_long_term_key()
1001 tBTM_SEC_DEV_REC* p_dev_rec; in smp_calculate_long_term_key_from_link_key() local
1005 p_dev_rec = btm_find_dev(p_cb->pairing_bda); in smp_calculate_long_term_key_from_link_key()
1006 if (p_dev_rec == NULL) { in smp_calculate_long_term_key_from_link_key()
1026 std::reverse_copy(p_dev_rec->link_key.begin(), p_dev_rec->link_key.end(), in smp_calculate_long_term_key_from_link_key()
/system/bt/stack/gatt/
Dgatt_main.cc475 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev_by_handle(handle); in gatt_notify_phy_updated() local
476 if (!p_dev_rec) { in gatt_notify_phy_updated()
482 gatt_find_tcb_by_addr(p_dev_rec->ble.pseudo_addr, BT_TRANSPORT_LE); in gatt_notify_phy_updated()
498 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev_by_handle(handle); in gatt_notify_conn_update() local
499 if (!p_dev_rec) return; in gatt_notify_conn_update()
502 gatt_find_tcb_by_addr(p_dev_rec->ble.pseudo_addr, BT_TRANSPORT_LE); in gatt_notify_conn_update()
/system/bt/stack/hid/
Dhidh_api.cc537 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr); in hid_known_hid_device() local
538 if ((p_dev_rec != NULL) && in hid_known_hid_device()
539 ((p_dev_rec->dev_class[1] & BTM_COD_MAJOR_CLASS_MASK) == in hid_known_hid_device()
/system/bt/bta/hh/
Dbta_hh_le.cc1081 tBTM_SEC_DEV_REC* p_dev_rec; in bta_hh_start_security() local
1083 p_dev_rec = btm_find_dev(p_cb->addr); in bta_hh_start_security()
1084 if (p_dev_rec) { in bta_hh_start_security()
1085 if (p_dev_rec->sec_state == BTM_SEC_STATE_ENCRYPTING || in bta_hh_start_security()
1086 p_dev_rec->sec_state == BTM_SEC_STATE_AUTHENTICATING) { in bta_hh_start_security()
/system/bt/bta/hearing_aid/
Dhearing_aid.cc404 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(address); in OnGattConnected() local
405 if (p_dev_rec) { in OnGattConnected()
406 if (p_dev_rec->sec_state == BTM_SEC_STATE_ENCRYPTING || in OnGattConnected()
407 p_dev_rec->sec_state == BTM_SEC_STATE_AUTHENTICATING) { in OnGattConnected()
/system/bt/stack/l2cap/
Dl2c_ble.cc317 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_or_alloc_dev(bda); in l2cble_conn_comp() local
318 btm_acl_created(bda, NULL, p_dev_rec->sec_bd_name, handle, p_lcb->link_role, in l2cble_conn_comp()
Dl2c_utils.cc2224 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(p_lcb->remote_bd_addr); in l2cu_create_conn_after_switch() local
2255 clock_offset = (p_dev_rec) ? p_dev_rec->clock_offset : 0; in l2cu_create_conn_after_switch()