Home
last modified time | relevance | path

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

12

/system/bt/stack/btm/
Dbtm_dev.cc68 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr); in BTM_SecAddDevice() local
69 if (!p_dev_rec) { in BTM_SecAddDevice()
70 p_dev_rec = btm_sec_allocate_dev_rec(); in BTM_SecAddDevice()
71 BTM_TRACE_API("%s: allocated p_dev_rec=%p, bd_addr=%s", __func__, p_dev_rec, in BTM_SecAddDevice()
74 p_dev_rec->bd_addr = bd_addr; in BTM_SecAddDevice()
75 p_dev_rec->hci_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_BR_EDR); in BTM_SecAddDevice()
79 memset(&p_dev_rec->conn_params, 0xff, sizeof(tBTM_LE_CONN_PRAMS)); in BTM_SecAddDevice()
82 p_dev_rec->timestamp = btm_cb.dev_rec_count++; in BTM_SecAddDevice()
90 p_dev_rec->bond_type = tBTM_SEC_DEV_REC::BOND_TYPE_UNKNOWN; in BTM_SecAddDevice()
93 if (dev_class) memcpy(p_dev_rec->dev_class, dev_class, DEV_CLASS_LEN); in BTM_SecAddDevice()
[all …]
Dbtm_sec.cc77 extern bool btm_ble_init_pseudo_addr(tBTM_SEC_DEV_REC* p_dev_rec,
82 extern void HACK_acl_check_sm4(tBTM_SEC_DEV_REC& p_dev_rec);
89 static bool btm_sec_start_get_name(tBTM_SEC_DEV_REC* p_dev_rec);
90 static void btm_sec_start_authentication(tBTM_SEC_DEV_REC* p_dev_rec);
94 static tBTM_STATUS btm_sec_dd_create_conn(tBTM_SEC_DEV_REC* p_dev_rec);
106 static void btm_send_link_key_notif(tBTM_SEC_DEV_REC* p_dev_rec);
107 static bool btm_sec_check_prefetch_pin(tBTM_SEC_DEV_REC* p_dev_rec);
109 static tBTM_STATUS btm_sec_send_hci_disconnect(tBTM_SEC_DEV_REC* p_dev_rec,
114 static bool btm_dev_authenticated(tBTM_SEC_DEV_REC* p_dev_rec);
115 static bool btm_dev_encrypted(tBTM_SEC_DEV_REC* p_dev_rec);
[all …]
Dbtm_ble_addr.cc135 bool btm_ble_init_pseudo_addr(tBTM_SEC_DEV_REC* p_dev_rec, in btm_ble_init_pseudo_addr() argument
137 if (p_dev_rec->ble.pseudo_addr.IsEmpty()) { in btm_ble_init_pseudo_addr()
138 p_dev_rec->ble.pseudo_addr = new_pseudo_addr; in btm_ble_init_pseudo_addr()
173 tBTM_SEC_DEV_REC* p_dev_rec) { in btm_ble_addr_resolvable() argument
176 if ((p_dev_rec->device_type & BT_DEVICE_TYPE_BLE) && in btm_ble_addr_resolvable()
177 (p_dev_rec->ble.key_type & BTM_LE_KEY_PID)) { in btm_ble_addr_resolvable()
180 if (rpa_matches_irk(rpa, p_dev_rec->ble.keys.irk)) { in btm_ble_addr_resolvable()
181 btm_ble_init_pseudo_addr(p_dev_rec, rpa); in btm_ble_addr_resolvable()
192 tBTM_SEC_DEV_REC* p_dev_rec = static_cast<tBTM_SEC_DEV_REC*>(data); in btm_ble_match_random_bda() local
195 if (!(p_dev_rec->device_type & BT_DEVICE_TYPE_BLE) || in btm_ble_match_random_bda()
[all …]
Dbtm_ble.cc50 extern bool btm_ble_init_pseudo_addr(tBTM_SEC_DEV_REC* p_dev_rec,
66 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr); in BTM_SecAddBleDevice() local
67 if (!p_dev_rec) { in BTM_SecAddBleDevice()
68 p_dev_rec = btm_sec_allocate_dev_rec(); in BTM_SecAddBleDevice()
70 p_dev_rec->bd_addr = bd_addr; in BTM_SecAddBleDevice()
71 p_dev_rec->hci_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_BR_EDR); in BTM_SecAddBleDevice()
72 p_dev_rec->ble_hci_handle = BTM_GetHCIConnHandle(bd_addr, BT_TRANSPORT_LE); in BTM_SecAddBleDevice()
75 p_dev_rec->conn_params.min_conn_int = BTM_BLE_CONN_PARAM_UNDEF; in BTM_SecAddBleDevice()
76 p_dev_rec->conn_params.max_conn_int = BTM_BLE_CONN_PARAM_UNDEF; in BTM_SecAddBleDevice()
77 p_dev_rec->conn_params.supervision_tout = BTM_BLE_CONN_PARAM_UNDEF; in BTM_SecAddBleDevice()
[all …]
Dbtm_ble_privacy.cc192 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(pseudo_bda); in btm_ble_update_resolving_list() local
193 if (p_dev_rec == NULL) return; in btm_ble_update_resolving_list()
196 p_dev_rec->ble.in_controller_list |= BTM_RESOLVING_LIST_BIT; in btm_ble_update_resolving_list()
198 p_dev_rec->ble.resolving_list_index = btm_ble_find_irk_index(); in btm_ble_update_resolving_list()
200 p_dev_rec->ble.in_controller_list &= ~BTM_RESOLVING_LIST_BIT; in btm_ble_update_resolving_list()
203 btm_ble_clear_irk_index(p_dev_rec->ble.resolving_list_index); in btm_ble_update_resolving_list()
204 p_dev_rec->ble.resolving_list_index = 0; in btm_ble_update_resolving_list()
210 tBTM_SEC_DEV_REC* p_dev_rec = static_cast<tBTM_SEC_DEV_REC*>(data); in clear_resolving_list_bit() local
211 p_dev_rec->ble.in_controller_list &= ~BTM_RESOLVING_LIST_BIT; in clear_resolving_list_bit()
416 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_ble_bgconn.cc197 const RawAddress& bd_addr, const tBTM_SEC_DEV_REC* p_dev_rec) { in convert_to_address_with_type() argument
198 if (p_dev_rec == nullptr || !p_dev_rec->is_device_type_has_ble()) { in convert_to_address_with_type()
205 if (p_dev_rec->ble.identity_address_with_type.bda.IsEmpty()) { in convert_to_address_with_type()
207 .type = p_dev_rec->ble.ble_addr_type, in convert_to_address_with_type()
211 return p_dev_rec->ble.identity_address_with_type; in convert_to_address_with_type()
222 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr); in btm_add_dev_to_controller() local
224 if (p_dev_rec != NULL && p_dev_rec->device_type & BT_DEVICE_TYPE_BLE) { in btm_add_dev_to_controller()
226 if (!p_dev_rec->ble.identity_address_with_type.bda.IsEmpty()) { in btm_add_dev_to_controller()
230 PRIVATE_ADDRESS(p_dev_rec->ble.identity_address_with_type)); in btm_add_dev_to_controller()
232 p_dev_rec->ble.identity_address_with_type.type, in btm_add_dev_to_controller()
[all …]
Dbtm_ble_int.h119 extern bool btm_ble_read_resolving_list_entry(tBTM_SEC_DEV_REC* p_dev_rec);
122 tBTM_SEC_DEV_REC* p_dev_rec);
124 extern bool btm_ble_resolving_list_load_dev(tBTM_SEC_DEV_REC* p_dev_rec);
125 extern void btm_ble_resolving_list_remove_dev(tBTM_SEC_DEV_REC* p_dev_rec);
Dbtm_sec.h707 tBTM_STATUS btm_sec_execute_procedure(tBTM_SEC_DEV_REC* p_dev_rec);
745 void btm_sec_dev_rec_cback_event(tBTM_SEC_DEV_REC* p_dev_rec, tBTM_STATUS res,
759 void btm_sec_clear_ble_keys(tBTM_SEC_DEV_REC* p_dev_rec);
Dbtm_dev.h45 void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* p_dev_rec);
Dbtm_ble_gap.cc58 extern bool btm_ble_init_pseudo_addr(tBTM_SEC_DEV_REC* p_dev_rec,
67 const RawAddress& bd_addr, const tBTM_SEC_DEV_REC* p_dev_rec);
753 tBTM_SEC_DEV_REC* p_dev_rec = static_cast<tBTM_SEC_DEV_REC*>(data); in is_resolving_list_bit_set() local
755 if ((p_dev_rec->ble.in_controller_list & BTM_RESOLVING_LIST_BIT) != 0) in is_resolving_list_bit_set()
775 tBTM_SEC_DEV_REC* p_dev_rec; in btm_set_conn_mode_adv_init_addr() local
797 if ((p_dev_rec = btm_find_or_alloc_dev(p_cb->direct_bda.bda)) != NULL && in btm_set_conn_mode_adv_init_addr()
798 p_dev_rec->ble.in_controller_list & BTM_RESOLVING_LIST_BIT) { in btm_set_conn_mode_adv_init_addr()
800 p_peer_addr_ptr = p_dev_rec->ble.identity_address_with_type.bda; in btm_set_conn_mode_adv_init_addr()
801 *p_peer_addr_type = p_dev_rec->ble.identity_address_with_type.type; in btm_set_conn_mode_adv_init_addr()
827 tBTM_SEC_DEV_REC* p_dev_rec = in btm_set_conn_mode_adv_init_addr() local
[all …]
/system/bt/test/mock/
Dmock_stack_btm_ble_privacy.h93 std::function<tBTM_STATUS(tBTM_SEC_DEV_REC* p_dev_rec)> body{
94 [](tBTM_SEC_DEV_REC* p_dev_rec) { return 0; }};
95 tBTM_STATUS operator()(tBTM_SEC_DEV_REC* p_dev_rec) { in operator()
96 return body(p_dev_rec); in operator()
113 std::function<bool(tBTM_SEC_DEV_REC* p_dev_rec)> body{
114 [](tBTM_SEC_DEV_REC* p_dev_rec) { return false; }};
115 bool operator()(tBTM_SEC_DEV_REC* p_dev_rec) { return body(p_dev_rec); }; in operator()
134 std::function<bool(tBTM_SEC_DEV_REC* p_dev_rec)> body{
135 [](tBTM_SEC_DEV_REC* p_dev_rec) { return false; }};
136 bool operator()(tBTM_SEC_DEV_REC* p_dev_rec) { return body(p_dev_rec); }; in operator()
[all …]
Dmock_stack_btm_ble_privacy.cc96 tBTM_STATUS btm_ble_remove_resolving_list_entry(tBTM_SEC_DEV_REC* p_dev_rec) { in btm_ble_remove_resolving_list_entry() argument
99 p_dev_rec); in btm_ble_remove_resolving_list_entry()
105 bool btm_ble_read_resolving_list_entry(tBTM_SEC_DEV_REC* p_dev_rec) { in btm_ble_read_resolving_list_entry() argument
108 p_dev_rec); in btm_ble_read_resolving_list_entry()
115 bool btm_ble_resolving_list_load_dev(tBTM_SEC_DEV_REC* p_dev_rec) { in btm_ble_resolving_list_load_dev() argument
118 p_dev_rec); in btm_ble_resolving_list_load_dev()
120 void btm_ble_resolving_list_remove_dev(tBTM_SEC_DEV_REC* p_dev_rec) { in btm_ble_resolving_list_remove_dev() argument
123 p_dev_rec); in btm_ble_resolving_list_remove_dev()
Dmock_stack_btm_ble_addr.h84 std::function<bool(tBTM_SEC_DEV_REC* p_dev_rec,
86 body{[](tBTM_SEC_DEV_REC* p_dev_rec, const RawAddress& new_pseudo_addr) {
89 bool operator()(tBTM_SEC_DEV_REC* p_dev_rec, in operator()
91 return body(p_dev_rec, new_pseudo_addr); in operator()
99 std::function<bool(const RawAddress& rpa, tBTM_SEC_DEV_REC* p_dev_rec)> body{
100 [](const RawAddress& rpa, tBTM_SEC_DEV_REC* p_dev_rec) { return false; }};
101 bool operator()(const RawAddress& rpa, tBTM_SEC_DEV_REC* p_dev_rec) { in operator()
102 return body(rpa, p_dev_rec); in operator()
Dmock_stack_btm_ble_addr.cc84 bool btm_ble_init_pseudo_addr(tBTM_SEC_DEV_REC* p_dev_rec, in btm_ble_init_pseudo_addr() argument
88 p_dev_rec, new_pseudo_addr); in btm_ble_init_pseudo_addr()
91 tBTM_SEC_DEV_REC* p_dev_rec) { in btm_ble_addr_resolvable() argument
94 p_dev_rec); in btm_ble_addr_resolvable()
Dmock_stack_btm_ble_bgconn.h66 const tBTM_SEC_DEV_REC* p_dev_rec)>
68 const tBTM_SEC_DEV_REC* p_dev_rec) { return ble_bd_addr; }};
70 const tBTM_SEC_DEV_REC* p_dev_rec) { in operator()
71 return body(bd_addr, p_dev_rec); in operator()
Dmock_stack_btm_ble_bgconn.cc67 const RawAddress& bd_addr, const tBTM_SEC_DEV_REC* p_dev_rec) { in convert_to_address_with_type() argument
70 bd_addr, p_dev_rec); in convert_to_address_with_type()
Dmock_stack_btm_sec.cc170 tBTM_STATUS btm_sec_execute_procedure(tBTM_SEC_DEV_REC* p_dev_rec) { in btm_sec_execute_procedure() argument
252 void btm_sec_clear_ble_keys(tBTM_SEC_DEV_REC* p_dev_rec) { in btm_sec_clear_ble_keys() argument
263 void btm_sec_dev_rec_cback_event(tBTM_SEC_DEV_REC* p_dev_rec, in btm_sec_dev_rec_cback_event() argument
Dmock_stack_btm_dev.cc110 void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* p_dev_rec) { in wipe_secrets_and_remove() argument
Dmock_stack_btm_ble.cc130 uint8_t btm_ble_br_keys_req(tBTM_SEC_DEV_REC* p_dev_rec, in btm_ble_br_keys_req() argument
135 uint8_t btm_ble_io_capabilities_req(tBTM_SEC_DEV_REC* p_dev_rec, in btm_ble_io_capabilities_req() argument
/system/bt/stack/l2cap/
Dl2c_ble.cc1556 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_or_alloc_dev(bda); in l2cble_use_preferred_conn_params() local
1559 if ((p_lcb != NULL) && (p_dev_rec != NULL) && in l2cble_use_preferred_conn_params()
1560 (p_dev_rec->conn_params.min_conn_int >= BTM_BLE_CONN_INT_MIN) && in l2cble_use_preferred_conn_params()
1561 (p_dev_rec->conn_params.min_conn_int <= BTM_BLE_CONN_INT_MAX) && in l2cble_use_preferred_conn_params()
1562 (p_dev_rec->conn_params.max_conn_int >= BTM_BLE_CONN_INT_MIN) && in l2cble_use_preferred_conn_params()
1563 (p_dev_rec->conn_params.max_conn_int <= BTM_BLE_CONN_INT_MAX) && in l2cble_use_preferred_conn_params()
1564 (p_dev_rec->conn_params.peripheral_latency <= BTM_BLE_CONN_LATENCY_MAX) && in l2cble_use_preferred_conn_params()
1565 (p_dev_rec->conn_params.supervision_tout >= BTM_BLE_CONN_SUP_TOUT_MIN) && in l2cble_use_preferred_conn_params()
1566 (p_dev_rec->conn_params.supervision_tout <= BTM_BLE_CONN_SUP_TOUT_MAX) && in l2cble_use_preferred_conn_params()
1567 ((p_lcb->min_interval < p_dev_rec->conn_params.min_conn_int && in l2cble_use_preferred_conn_params()
[all …]
/system/bt/stack/acl/
Dble_acl.cc167 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev_by_handle(handle); in acl_ble_update_event_received() local
169 if (!p_dev_rec) return; in acl_ble_update_event_received()
171 gatt_notify_conn_update(p_dev_rec->ble.pseudo_addr, interval, latency, in acl_ble_update_event_received()
/system/bt/stack/smp/
Dsmp_act.cc262 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(p_cb->pairing_bda); in smp_send_pair_req() local
266 if (p_dev_rec) btm_sec_clear_ble_keys(p_dev_rec); in smp_send_pair_req()
522 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(p_cb->pairing_bda); in smp_proc_pair_cmd() local
528 if (p_dev_rec && (p_cb->role == HCI_ROLE_PERIPHERAL)) in smp_proc_pair_cmd()
529 btm_sec_clear_ble_keys(p_dev_rec); in smp_proc_pair_cmd()
802 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(p_cb->pairing_bda); in smp_br_process_pairing_command() local
806 if (!p_dev_rec->new_encryption_key_is_p256 && in smp_br_process_pairing_command()
815 if (p_dev_rec && (p_cb->role == HCI_ROLE_PERIPHERAL)) in smp_br_process_pairing_command()
816 btm_sec_clear_ble_keys(p_dev_rec); in smp_br_process_pairing_command()
849 p_dev_rec->new_encryption_key_is_p256 = false; in smp_br_process_pairing_command()
[all …]
Dsmp_keys.cc930 tBTM_SEC_DEV_REC* p_dev_rec; in smp_calculate_link_key_from_long_term_key() local
949 p_dev_rec = btm_find_dev(p_cb->pairing_bda); in smp_calculate_link_key_from_long_term_key()
950 if (p_dev_rec == NULL) { in smp_calculate_link_key_from_long_term_key()
976 __func__, btm_cb.security_mode, p_dev_rec->sm4); in smp_calculate_link_key_from_long_term_key()
993 tBTM_SEC_DEV_REC* p_dev_rec; in smp_calculate_long_term_key_from_link_key() local
997 p_dev_rec = btm_find_dev(p_cb->pairing_bda); in smp_calculate_long_term_key_from_link_key()
998 if (p_dev_rec == NULL) { in smp_calculate_long_term_key_from_link_key()
1018 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/main/shim/
Dbtm.cc664 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr); in GetAddressAndType() local
665 if (p_dev_rec != NULL && p_dev_rec->device_type & BT_DEVICE_TYPE_BLE) { in GetAddressAndType()
666 if (!p_dev_rec->ble.identity_address_with_type.bda.IsEmpty()) { in GetAddressAndType()
667 return ToAddressWithType(p_dev_rec->ble.identity_address_with_type.bda, in GetAddressAndType()
668 p_dev_rec->ble.identity_address_with_type.type); in GetAddressAndType()
670 return ToAddressWithType(p_dev_rec->ble.pseudo_addr, in GetAddressAndType()
671 p_dev_rec->ble.ble_addr_type); in GetAddressAndType()
/system/bt/stack/gatt/
Dgatt_main.cc181 const tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr); in gatt_find_in_device_record() local
182 if (p_dev_rec == nullptr) { in gatt_find_in_device_record()
186 if (p_dev_rec->device_type & BT_DEVICE_TYPE_BLE) { in gatt_find_in_device_record()
187 if (p_dev_rec->ble.identity_address_with_type.bda.IsEmpty()) { in gatt_find_in_device_record()
188 *address_with_type = {.type = p_dev_rec->ble.ble_addr_type, in gatt_find_in_device_record()
192 *address_with_type = p_dev_rec->ble.identity_address_with_type; in gatt_find_in_device_record()
504 tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev_by_handle(handle); in gatt_notify_phy_updated() local
505 if (!p_dev_rec) { in gatt_notify_phy_updated()
511 gatt_find_tcb_by_addr(p_dev_rec->ble.pseudo_addr, BT_TRANSPORT_LE); in gatt_notify_phy_updated()

12