Home
last modified time | relevance | path

Searched refs:btm_cb (Results 1 – 23 of 23) sorted by relevance

/system/bt/stack/btm/
Dbtm_devctl.cc85 memset(btm_cb.cfg.bd_name, 0, sizeof(tBTM_LOC_BD_NAME)); in btm_dev_init()
87 btm_cb.devcb.read_local_name_timer = alarm_new("btm.read_local_name_timer"); in btm_dev_init()
88 btm_cb.devcb.read_rssi_timer = alarm_new("btm.read_rssi_timer"); in btm_dev_init()
89 btm_cb.devcb.read_failed_contact_counter_timer = in btm_dev_init()
91 btm_cb.devcb.read_automatic_flush_timeout_timer = in btm_dev_init()
93 btm_cb.devcb.read_link_quality_timer = in btm_dev_init()
95 btm_cb.devcb.read_inq_tx_power_timer = in btm_dev_init()
97 btm_cb.devcb.qos_setup_timer = alarm_new("btm.qos_setup_timer"); in btm_dev_init()
98 btm_cb.devcb.read_tx_power_timer = alarm_new("btm.read_tx_power_timer"); in btm_dev_init()
100 btm_cb.btm_acl_pkt_types_supported = in btm_dev_init()
[all …]
Dbtm_main.cc33 tBTM_CB btm_cb; variable
50 memset(&btm_cb, 0, sizeof(tBTM_CB)); in btm_init()
51 btm_cb.page_queue = fixed_queue_new(SIZE_MAX); in btm_init()
52 btm_cb.sec_pending_q = fixed_queue_new(SIZE_MAX); in btm_init()
53 btm_cb.sec_collision_timer = alarm_new("btm.sec_collision_timer"); in btm_init()
54 btm_cb.pairing_timer = alarm_new("btm.pairing_timer"); in btm_init()
57 btm_cb.trace_level = BTM_INITIAL_TRACE_LEVEL; in btm_init()
59 btm_cb.trace_level = BT_TRACE_LEVEL_NONE; /* No traces */ in btm_init()
71 btm_cb.sec_dev_rec = list_new(osi_free); in btm_init()
78 fixed_queue_free(btm_cb.page_queue, NULL); in btm_free()
[all …]
Dbtm_pm.cc110 btm_cb.pm_reg_db[*p_pm_id].mask = BTM_PM_REC_NOT_USED; in BTM_PmRegister()
116 if (btm_cb.pm_reg_db[xx].mask == BTM_PM_REC_NOT_USED) { in BTM_PmRegister()
120 btm_cb.pm_reg_db[xx].cback = p_cb; in BTM_PmRegister()
122 btm_cb.pm_reg_db[xx].mask = mask; in BTM_PmRegister()
168 p_cb = &(btm_cb.pm_mode_db[acl_ind]); in BTM_SetPowerMode()
203 (btm_cb.pm_reg_db[pm_id].mask & BTM_PM_REG_SET)) || in BTM_SetPowerMode()
205 (btm_cb.pm_pend_link != MAX_L2CAP_LINKS))) { in BTM_SetPowerMode()
211 btm_cb.pm_reg_db[temp_pm_id].mask |= BTM_PM_REG_SET; in BTM_SetPowerMode()
218 btm_cb.pm_pend_link); in BTM_SetPowerMode()
222 (btm_cb.pm_pend_link != MAX_L2CAP_LINKS)) { in BTM_SetPowerMode()
[all …]
Dbtm_sec.cc243 if (btm_cb.devcb.id_keys.ir == zero) { in BTM_SecRegister()
250 btm_cb.api = *p_cb_info; in BTM_SecRegister()
252 btm_cb.api.p_le_callback); in BTM_SecRegister()
271 if (btm_cb.p_rmt_name_callback[i] == NULL) { in BTM_SecAddRmtNameNotifyCallback()
272 btm_cb.p_rmt_name_callback[i] = p_callback; in BTM_SecAddRmtNameNotifyCallback()
294 if (btm_cb.p_rmt_name_callback[i] == p_callback) { in BTM_SecDeleteRmtNameNotifyCallback()
295 btm_cb.p_rmt_name_callback[i] = NULL; in BTM_SecDeleteRmtNameNotifyCallback()
366 if ((btm_cb.cfg.pin_type != pin_type) && in BTM_SetPinType()
371 btm_cb.cfg.pin_type = pin_type; in BTM_SetPinType()
372 btm_cb.cfg.pin_code_len = pin_code_len; in BTM_SetPinType()
[all …]
Dbtm_acl.cc79 btm_cb.btm_def_link_super_tout = HCI_DEFAULT_INACT_TOUT; in btm_acl_init()
80 btm_cb.acl_disc_reason = 0xff; in btm_acl_init()
99 tACL_CONN* p = &btm_cb.acl_db[0]; in btm_bda_to_acl()
123 tACL_CONN* p = &btm_cb.acl_db[0]; in btm_handle_to_acl_index()
210 BTM_SetLinkPolicy(p->remote_addr, &btm_cb.btm_def_link_policy); in btm_acl_created()
215 for (xx = 0, p = &btm_cb.acl_db[0]; xx < MAX_L2CAP_LINKS; xx++, p++) { in btm_acl_created()
227 bda, btm_cb.ble_ctr_cb.addr_mgnt_cb.private_addr); in btm_acl_created()
303 btm_cb.acl_db[idx].conn_addr = address; in btm_acl_update_conn_addr()
320 if (btm_cb.devcb.p_switch_role_cb && in btm_acl_report_role_change()
321 (bda && btm_cb.devcb.switch_role_ref_data.remote_bd_addr == *bda)) { in btm_acl_report_role_change()
[all …]
Dbtm_ble_privacy.cc68 tBTM_BLE_RESOLVE_Q* p_q = &btm_cb.ble_ctr_cb.resolving_list_pend_q; in btm_ble_enq_resolving_list_pending()
90 tBTM_BLE_RESOLVE_Q* p_q = &btm_cb.ble_ctr_cb.resolving_list_pend_q; in btm_ble_brcm_find_resolving_pending_entry()
116 tBTM_BLE_RESOLVE_Q* p_q = &btm_cb.ble_ctr_cb.resolving_list_pend_q; in btm_ble_deq_resolving_pending()
146 btm_cb.ble_ctr_cb.irk_list_mask[byte] &= (~(1 << bit)); in btm_ble_clear_irk_index()
168 if ((btm_cb.ble_ctr_cb.irk_list_mask[byte] & (1 << bit)) == 0) { in btm_ble_find_irk_index()
169 btm_cb.ble_ctr_cb.irk_list_mask[byte] |= (1 << bit); in btm_ble_find_irk_index()
243 memset(btm_cb.ble_ctr_cb.irk_list_mask, 0, irk_mask_size); in btm_ble_clear_resolving_list_complete()
246 btm_cb.ble_ctr_cb.resolving_list_avail_size = in btm_ble_clear_resolving_list_complete()
250 btm_cb.ble_ctr_cb.resolving_list_avail_size); in btm_ble_clear_resolving_list_complete()
252 list_foreach(btm_cb.sec_dev_rec, clear_resolving_list_bit, NULL); in btm_ble_clear_resolving_list_complete()
[all …]
Dbtm_ble_gap.cc389 tBTM_BLE_INQ_CB* p_inq = &btm_cb.ble_ctr_cb.inq_var; in BTM_BleObserve()
398 btm_cb.btm_inq_vars.scan_type, p_inq->scan_interval, in BTM_BleObserve()
405 if (BTM_BLE_IS_OBS_ACTIVE(btm_cb.ble_ctr_cb.scan_activity)) { in BTM_BleObserve()
410 btm_cb.ble_ctr_cb.p_obs_results_cb = p_results_cb; in BTM_BleObserve()
411 btm_cb.ble_ctr_cb.p_obs_cmpl_cb = p_cmpl_cb; in BTM_BleObserve()
415 if (!BTM_BLE_IS_SCAN_ACTIVE(btm_cb.ble_ctr_cb.scan_activity)) { in BTM_BleObserve()
429 btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type, BTM_BLE_DEFAULT_SFP); in BTM_BleObserve()
436 btm_cb.ble_ctr_cb.scan_activity |= BTM_LE_OBSERVE_ACTIVE; in BTM_BleObserve()
440 alarm_set_on_mloop(btm_cb.ble_ctr_cb.observer_timer, duration_ms, in BTM_BleObserve()
444 } else if (BTM_BLE_IS_OBS_ACTIVE(btm_cb.ble_ctr_cb.scan_activity)) { in BTM_BleObserve()
[all …]
Dbtm_sco.cc86 btm_cb.sco_cb.sco_disc_reason = BTM_INVALID_SCO_DISC_REASON; in btm_sco_init()
87 btm_cb.sco_cb.def_esco_parms = esco_parameters_for_codec(ESCO_CODEC_CVSD); in btm_sco_init()
88 btm_cb.sco_cb.def_esco_parms.max_latency_ms = 12; in btm_sco_init()
89 btm_cb.sco_cb.sco_route = ESCO_DATA_PATH_PCM; in btm_sco_init()
114 if (sco_inx < BTM_MAX_SCO_LINKS) p_sco = &btm_cb.sco_cb.sco_db[sco_inx]; in btm_esco_conn_rsp()
122 if (!btm_cb.sco_cb.esco_supported) { in btm_esco_conn_rsp()
136 *p_setup = btm_cb.sco_cb.def_esco_parms; in btm_esco_conn_rsp()
141 btm_cb.btm_sco_pkt_types_supported); in btm_esco_conn_rsp()
161 (btm_cb.btm_sco_pkt_types_supported & BTM_SCO_EXCEPTION_PKTS_MASK)); in btm_esco_conn_rsp()
169 btm_cb.sco_cb.sco_route; in btm_esco_conn_rsp()
[all …]
Dbtm_inq.cc172 btm_cb.btm_inq_vars.discoverable_mode &= (~BTM_BLE_DISCOVERABLE_MASK); in BTM_SetDiscoverability()
173 btm_cb.btm_inq_vars.discoverable_mode |= in BTM_SetDiscoverability()
223 if ((window != btm_cb.btm_inq_vars.inq_scan_window) || in BTM_SetDiscoverability()
224 (interval != btm_cb.btm_inq_vars.inq_scan_period)) { in BTM_SetDiscoverability()
226 btm_cb.btm_inq_vars.inq_scan_window = window; in BTM_SetDiscoverability()
227 btm_cb.btm_inq_vars.inq_scan_period = interval; in BTM_SetDiscoverability()
230 if (btm_cb.btm_inq_vars.connectable_mode & BTM_CONNECTABLE_MASK) in BTM_SetDiscoverability()
234 btm_cb.btm_inq_vars.discoverable_mode &= (~BTM_DISCOVERABLE_MASK); in BTM_SetDiscoverability()
235 btm_cb.btm_inq_vars.discoverable_mode |= inq_mode; in BTM_SetDiscoverability()
284 if (scan_type != btm_cb.btm_inq_vars.inq_scan_type) { in BTM_SetInquiryScanType()
[all …]
Dbtm_ble.cc188 tBTM_DEVCB* p_devcb = &btm_cb.devcb; in BTM_BleLoadLocalKeys()
213 return btm_cb.devcb.ble_encryption_key_value; in BTM_GetDeviceEncRoot()
221 return btm_cb.devcb.id_keys.irk; in BTM_GetDeviceIDRoot()
229 return btm_cb.devcb.id_keys.dhk; in BTM_GetDeviceDHK()
284 p = &btm_cb.acl_db[xx]; in BTM_IsBleConnection()
686 btm_cb.devcb.p_le_test_cmd_cmpl_cb = p_cmd_cmpl_cback; in BTM_BleReceiverTest()
711 btm_cb.devcb.p_le_test_cmd_cmpl_cb = p_cmd_cmpl_cback; in BTM_BleTransmitterTest()
729 btm_cb.devcb.p_le_test_cmd_cmpl_cb = p_cmd_cmpl_cback; in BTM_BleTestEnd()
738 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_le_test_cmd_cmpl_cb; in btm_ble_test_command_complete()
740 btm_cb.devcb.p_le_test_cmd_cmpl_cb = NULL; in btm_ble_test_command_complete()
[all …]
Dbtm_dev.cc84 p_dev_rec->timestamp = btm_cb.dev_rec_count++; in BTM_SecAddDevice()
157 list_remove(btm_cb.sec_dev_rec, p_dev_rec); in wipe_secrets_and_remove()
259 } else if (bd_addr == btm_cb.connecting_bda) in btm_sec_alloc_dev()
260 memcpy(p_dev_rec->dev_class, btm_cb.connecting_dc, DEV_CLASS_LEN); in btm_sec_alloc_dev()
340 list_node_t* n = list_foreach(btm_cb.sec_dev_rec, is_handle_equal, &handle); in btm_find_dev_by_handle()
370 list_foreach(btm_cb.sec_dev_rec, is_address_equal, (void*)&bd_addr); in btm_find_dev()
390 list_node_t* end = list_end(btm_cb.sec_dev_rec); in btm_consolidate_dev()
391 list_node_t* node = list_begin(btm_cb.sec_dev_rec); in btm_consolidate_dev()
472 list_node_t* end = list_end(btm_cb.sec_dev_rec); in btm_find_oldest_dev_rec()
473 for (list_node_t* node = list_begin(btm_cb.sec_dev_rec); node != end; in btm_find_oldest_dev_rec()
[all …]
Dbtm_ble_bgconn.cc129 tBTM_BLE_INQ_CB* p_inq = &btm_cb.ble_ctr_cb.inq_var; in btm_update_scanner_filter_policy()
145 btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type, scan_policy); in btm_update_scanner_filter_policy()
324 tBTM_BLE_CB* p_cb = &btm_cb.ble_ctr_cb; in BTM_SetLeConnectionModeToFast()
338 tBTM_BLE_CB* p_cb = &btm_cb.ble_ctr_cb; in BTM_SetLeConnectionModeToSlow()
350 tBTM_BLE_CB* p_cb = &btm_cb.ble_ctr_cb; in btm_ble_start_auto_conn()
383 if (btm_cb.ble_ctr_cb.rl_state != BTM_BLE_RL_IDLE && in btm_ble_start_auto_conn()
419 btm_cb.ble_ctr_cb.wl_state &= ~BTM_BLE_WL_INIT; in btm_ble_stop_auto_conn()
465 if (btm_cb.ble_ctr_cb.wl_state & BTM_BLE_WL_INIT) { in BTM_WhiteListAdd()
476 if (btm_cb.ble_ctr_cb.wl_state & BTM_BLE_WL_INIT) { in BTM_WhiteListRemove()
Dbtm_ble_addr.cc63 tBTM_LE_RANDOM_CB* p_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb; in btm_gen_resolve_paddr_low()
77 interval_ms = btm_cb.ble_ctr_cb.rpa_tout * 1000; in btm_gen_resolve_paddr_low()
207 list_node_t* n = list_foreach(btm_cb.sec_dev_rec, btm_ble_match_random_bda, in btm_ble_resolve_random_addr()
224 list_node_t* end = list_end(btm_cb.sec_dev_rec); in btm_find_dev_by_identity_addr()
225 for (list_node_t* node = list_begin(btm_cb.sec_dev_rec); node != end; in btm_find_dev_by_identity_addr()
380 if (btm_cb.ble_ctr_cb.privacy_mode != BTM_PRIVACY_NONE) { in btm_ble_refresh_local_resolvable_private_addr()
385 p->conn_addr = btm_cb.ble_ctr_cb.addr_mgnt_cb.private_addr; in btm_ble_refresh_local_resolvable_private_addr()
Dbtm_ble_connection_establishment.cc35 return btm_cb.ble_ctr_cb.conn_state; in btm_ble_get_conn_st()
40 btm_cb.ble_ctr_cb.conn_state = new_st; in btm_ble_set_conn_st()
214 btm_cb.ble_ctr_cb.inq_var.adv_mode = BTM_BLE_ADV_DISABLE; in btm_ble_conn_complete()
Dbtm_int.h45 extern tBTM_CB btm_cb;
Dbtm_ble_batchscan.cc327 addr_type = btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type; in btm_ble_set_batchscan_param()
/system/bt/main/shim/
Dbtm_api.cc44 extern tBTM_CB btm_cb;
62 return (btm_cb.btm_inq_vars.inqparms.max_resps && in max_responses_reached()
63 btm_cb.btm_inq_vars.inq_cmpl_info.num_resp >= in max_responses_reached()
64 btm_cb.btm_inq_vars.inqparms.max_resps); in max_responses_reached()
68 return btm_cb.btm_inq_vars.inq_active & BTM_PERIODIC_INQUIRY_ACTIVE; in is_periodic_inquiry_active()
88 return btm_cb.btm_inq_vars.inqparms.mode & BTM_BLE_INQUIRY_MASK; in is_observing_or_active_scanning()
116 } else if (p_i->inq_count == btm_cb.btm_inq_vars.inq_counter && in btm_api_process_inquiry_result()
132 p_i->inq_count = btm_cb.btm_inq_vars.inq_counter; in btm_api_process_inquiry_result()
135 if (p_i->inq_count != btm_cb.btm_inq_vars.inq_counter) { in btm_api_process_inquiry_result()
137 btm_cb.btm_inq_vars.inq_cmpl_info.num_resp++; in btm_api_process_inquiry_result()
[all …]
Dbtm.cc44 extern tBTM_CB btm_cb;
/system/bt/internal_include/
Dbt_trace.h229 if (btm_cb.trace_level >= BT_TRACE_LEVEL_ERROR) \
234 if (btm_cb.trace_level >= BT_TRACE_LEVEL_WARNING) \
239 if (btm_cb.trace_level >= BT_TRACE_LEVEL_API) \
244 if (btm_cb.trace_level >= BT_TRACE_LEVEL_EVENT) \
249 if (btm_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) \
/system/bt/stack/avdt/
Davdt_l2c.cc203 (btm_cb.btm_acl_pkt_types_supported | HCI_PKT_TYPES_MASK_NO_3_DH1 | in avdt_l2c_connect_ind_cback()
322 (btm_cb.btm_acl_pkt_types_supported | in avdt_l2c_connect_cfm_cback()
/system/bt/stack/l2cap/
Dl2c_link.cc208 BTM_SetLinkSuperTout(ci.bd_addr, btm_cb.btm_def_link_super_tout); in l2c_link_hci_conn_comp()
369 if (btm_cb.acl_disc_reason != HCI_ERR_HOST_REJECT_SECURITY) in l2c_link_hci_disc_comp()
370 btm_cb.acl_disc_reason = reason; in l2c_link_hci_disc_comp()
372 p_lcb->disc_reason = btm_cb.acl_disc_reason; in l2c_link_hci_disc_comp()
/system/bt/stack/smp/
Dsmp_keys.cc967 if (btm_cb.security_mode == BTM_SEC_MODE_SC) { in smp_calculate_link_key_from_long_term_key()
976 } else if (btm_cb.security_mode == BTM_SEC_MODE_SP) { 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()
Dsmp_act.cc171 (btm_cb.security_mode == BTM_SEC_MODE_SC) ? true : false; in smp_send_app_cback()
444 (btm_cb.security_mode == BTM_SEC_MODE_SC) ? true : false; in smp_proc_sec_req()