Home
last modified time | relevance | path

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

/hal_espressif-2.7.6/components/bt/host/bluedroid/stack/btm/
Dbtm_devctl.c79 memset (&btm_cb.devcb, 0, sizeof (tBTM_DEVCB)); in btm_dev_init()
84 memset(btm_cb.cfg.bd_name, 0, sizeof(tBTM_LOC_BD_NAME)); in btm_dev_init()
87 btm_cb.devcb.reset_timer.param = (TIMER_PARAM_TYPE)TT_DEV_RESET; in btm_dev_init()
88 btm_cb.devcb.rln_timer.param = (TIMER_PARAM_TYPE)TT_DEV_RLN; in btm_dev_init()
90 btm_cb.btm_acl_pkt_types_supported = BTM_ACL_PKT_TYPES_MASK_DH1 + BTM_ACL_PKT_TYPES_MASK_DM1 + in btm_dev_init()
94 btm_cb.btm_sco_pkt_types_supported = BTM_SCO_PKT_TYPES_MASK_HV1 + in btm_dev_init()
121 if (btm_cb.devcb.p_rln_cmpl_cb) { in btm_db_reset()
122 p_cb = btm_cb.devcb.p_rln_cmpl_cb; in btm_db_reset()
123 btm_cb.devcb.p_rln_cmpl_cb = NULL; in btm_db_reset()
130 if (btm_cb.devcb.p_rssi_cmpl_cb) { in btm_db_reset()
[all …]
Dbtm_sec.c240 if (memcmp(btm_cb.devcb.id_keys.ir, &temp_value, sizeof(BT_OCTET16)) == 0) { in BTM_SecRegister()
248 btm_cb.api = *p_cb_info; in BTM_SecRegister()
250 BTM_TRACE_DEBUG("%s btm_cb.api.p_le_callback = 0x%p\n", __func__, btm_cb.api.p_le_callback); in BTM_SecRegister()
269 btm_cb.api.p_link_key_callback = p_callback; in BTM_SecRegisterLinkKeyNotificationCallback()
289 if (btm_cb.p_rmt_name_callback[i] == NULL) { in BTM_SecAddRmtNameNotifyCallback()
290 btm_cb.p_rmt_name_callback[i] = p_callback; in BTM_SecAddRmtNameNotifyCallback()
314 if (btm_cb.p_rmt_name_callback[i] == p_callback) { in BTM_SecDeleteRmtNameNotifyCallback()
315 btm_cb.p_rmt_name_callback[i] = NULL; in BTM_SecDeleteRmtNameNotifyCallback()
387 if ( (btm_cb.cfg.pin_type != pin_type) in BTM_SetPinType()
392 btm_cb.cfg.pin_type = pin_type; in BTM_SetPinType()
[all …]
Dbtm_acl.c70 memset (&btm_cb.acl_db, 0, sizeof (btm_cb.acl_db)); in btm_acl_init()
71 memset (btm_cb.btm_scn, 0, BTM_MAX_SCN); /* Initialize the SCN usage to FALSE */ in btm_acl_init()
72 btm_cb.btm_def_link_policy = 0; in btm_acl_init()
73 btm_cb.p_bl_changed_cb = NULL; in btm_acl_init()
75 btm_cb.p_acl_db_list = list_new(osi_free_func); in btm_acl_init()
76 btm_cb.p_pm_mode_db_list = list_new(osi_free_func); in btm_acl_init()
79 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()
140 p_node = list_foreach(btm_cb.p_acl_db_list, btm_get_acl_db, (void *)&acl_params); in btm_bda_to_acl()
169 p_node = list_foreach(btm_cb.p_acl_db_list, btm_get_acl_db, (void *)&acl_params); in btm_handle_to_acl()
[all …]
Dbtm_pm.c139 btm_cb.pm_reg_db[*p_pm_id].mask = BTM_PM_REC_NOT_USED; in BTM_PmRegister()
145 if (btm_cb.pm_reg_db[xx].mask == BTM_PM_REC_NOT_USED) { in BTM_PmRegister()
151 btm_cb.pm_reg_db[xx].cback = p_cb; in BTM_PmRegister()
153 btm_cb.pm_reg_db[xx].mask = mask; in BTM_PmRegister()
228 (btm_cb.pm_reg_db[pm_id].mask & BTM_PM_REG_SET)) in BTM_SetPowerMode()
230 && (btm_cb.pm_pend_link_hdl != BTM_INVALID_HANDLE)) ) { in BTM_SetPowerMode()
235 btm_cb.pm_reg_db[temp_pm_id].mask |= BTM_PM_REG_SET; in BTM_SetPowerMode()
241 … BTM_TRACE_DEBUG( "btm_pm state:0x%x, pm_pend_link_hdl: %d", p_cb->state, btm_cb.pm_pend_link_hdl); in BTM_SetPowerMode()
246 (btm_cb.pm_pend_link_hdl != BTM_INVALID_HANDLE) ) { /* command pending */ in BTM_SetPowerMode()
247 if (p_acl_cb->hci_handle != btm_cb.pm_pend_link_hdl) { in BTM_SetPowerMode()
[all …]
Dbtm_sco.c88 p = &btm_cb.sco_cb.sco_db[sco_inx]; in btm_sco_flush_sco_data()
112 memset (&btm_cb.sco_cb, 0, sizeof(tSCO_CB)); in btm_sco_init()
116 btm_cb.sco_cb.sco_db[i].xmit_data_q = fixed_queue_new(QUEUE_SIZE_MAX); in btm_sco_init()
120 btm_cb.sco_cb.sco_disc_reason = BTM_INVALID_SCO_DISC_REASON; in btm_sco_init()
122 btm_cb.sco_cb.def_esco_parms = btm_esco_defaults; /* Initialize with defaults */ in btm_sco_init()
123 btm_cb.sco_cb.desired_sco_mode = BTM_DEFAULT_SCO_MODE; in btm_sco_init()
151 p_sco = &btm_cb.sco_cb.sco_db[sco_inx]; in btm_esco_conn_rsp()
161 if (!btm_cb.sco_cb.esco_supported) { in btm_esco_conn_rsp()
177 *p_setup = btm_cb.sco_cb.def_esco_parms; in btm_esco_conn_rsp()
182 btm_cb.btm_sco_pkt_types_supported); in btm_esco_conn_rsp()
[all …]
Dbtm_ble_gap.c352 tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var; in BTM_BleUpdateAdvFilterPolicy()
447 tBTM_BLE_INQ_CB *p_inq = &btm_cb.ble_ctr_cb.inq_var; in BTM_BleObserve()
453 BTM_TRACE_EVENT ("%s : scan_type:%d, %d, %d\n", __func__, btm_cb.btm_inq_vars.scan_type, in BTM_BleObserve()
462 if (BTM_BLE_IS_OBS_ACTIVE(btm_cb.ble_ctr_cb.scan_activity)) { in BTM_BleObserve()
467 btm_cb.ble_ctr_cb.p_obs_results_cb = p_results_cb; in BTM_BleObserve()
468 btm_cb.ble_ctr_cb.p_obs_cmpl_cb = p_cmpl_cb; in BTM_BleObserve()
472 if (!BTM_BLE_IS_SCAN_ACTIVE(btm_cb.ble_ctr_cb.scan_activity)) { in BTM_BleObserve()
485 btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type, in BTM_BleObserve()
489 btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type, in BTM_BleObserve()
497 btm_cb.ble_ctr_cb.scan_activity |= BTM_LE_OBSERVE_ACTIVE; in BTM_BleObserve()
[all …]
Dbtm_ble_privacy.c70 tBTM_BLE_RESOLVE_Q *p_q = &btm_cb.ble_ctr_cb.resolving_list_pend_q; in btm_ble_enq_resolving_list_pending()
92 tBTM_BLE_RESOLVE_Q *p_q = &btm_cb.ble_ctr_cb.resolving_list_pend_q; in btm_ble_brcm_find_resolving_pending_entry()
119 tBTM_BLE_RESOLVE_Q *p_q = &btm_cb.ble_ctr_cb.resolving_list_pend_q; in btm_ble_deq_resolving_pending()
149 btm_cb.ble_ctr_cb.irk_list_mask[byte] &= (~(1 << bit)); in btm_ble_clear_irk_index()
172 if ((btm_cb.ble_ctr_cb.irk_list_mask[byte] & (1 << bit)) == 0) { in btm_ble_find_irk_index()
173 btm_cb.ble_ctr_cb.irk_list_mask[byte] |= (1 << bit); in btm_ble_find_irk_index()
246 memset(btm_cb.ble_ctr_cb.irk_list_mask, 0, irk_mask_size); in btm_ble_clear_resolving_list_complete()
249 btm_cb.ble_ctr_cb.resolving_list_avail_size = in btm_ble_clear_resolving_list_complete()
253 __func__, btm_cb.ble_ctr_cb.resolving_list_avail_size); in btm_ble_clear_resolving_list_complete()
257 for (p_node = list_begin(btm_cb.p_sec_dev_rec_list); p_node; p_node = list_next(p_node)) { in btm_ble_clear_resolving_list_complete()
[all …]
Dbtm_main.c35 tBTM_CB btm_cb; variable
64 memset(&btm_cb, 0, sizeof(tBTM_CB)); in btm_init()
65 btm_cb.page_queue = fixed_queue_new(QUEUE_SIZE_MAX); in btm_init()
66 btm_cb.sec_pending_q = fixed_queue_new(QUEUE_SIZE_MAX); in btm_init()
69 btm_cb.trace_level = BTM_INITIAL_TRACE_LEVEL; in btm_init()
71 btm_cb.trace_level = BT_TRACE_LEVEL_NONE; in btm_init()
108 fixed_queue_free(btm_cb.page_queue, osi_free_func); in btm_free()
109 fixed_queue_free(btm_cb.sec_pending_q, osi_free_func); in btm_free()
Dbtm_inq.c229 if ((window != btm_cb.btm_inq_vars.inq_scan_window) || in BTM_SetDiscoverability()
230 (interval != btm_cb.btm_inq_vars.inq_scan_period)) { in BTM_SetDiscoverability()
232 btm_cb.btm_inq_vars.inq_scan_window = window; in BTM_SetDiscoverability()
233 btm_cb.btm_inq_vars.inq_scan_period = interval; in BTM_SetDiscoverability()
239 if (btm_cb.btm_inq_vars.connectable_mode & BTM_CONNECTABLE_MASK) { in BTM_SetDiscoverability()
244 btm_cb.btm_inq_vars.discoverable_mode &= (~BTM_DISCOVERABLE_MASK); in BTM_SetDiscoverability()
245 btm_cb.btm_inq_vars.discoverable_mode |= inq_mode; in BTM_SetDiscoverability()
297 if (scan_type != btm_cb.btm_inq_vars.inq_scan_type) { in BTM_SetInquiryScanType()
300 btm_cb.btm_inq_vars.inq_scan_type = scan_type; in BTM_SetInquiryScanType()
336 if (scan_type != btm_cb.btm_inq_vars.page_scan_type) { in BTM_SetPageScanType()
[all …]
Dbtm_ble_bgconn.c130 tBTM_BLE_INQ_CB *p_inq = &btm_cb.ble_ctr_cb.inq_var; in btm_update_scanner_filter_policy()
140 if (btm_cb.cmn_ble_vsc_cb.extended_scan_support == 0) { in btm_update_scanner_filter_policy()
143 btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type, in btm_update_scanner_filter_policy()
147 btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type, in btm_update_scanner_filter_policy()
227 tBTM_BLE_WL_OP *p_dev_op = btm_cb.ble_ctr_cb.wl_op_q; in btm_execute_wl_dev_operation()
249 tBTM_BLE_WL_OP *p_dev_op = btm_cb.ble_ctr_cb.wl_op_q; in btm_enq_wl_dev_operation()
324 tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb; in btm_update_dev_to_white_list()
390 tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb; in btm_ble_clear_white_list_complete()
414 btm_cb.ble_ctr_cb.white_list_avail_size = white_list_size; in btm_ble_white_list_init()
427 tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb; in btm_ble_add_2_white_list_complete()
[all …]
Dbtm_ble.c87 if (list_length(btm_cb.p_sec_dev_rec_list) < BTM_SEC_MAX_DEVICE_RECORDS) { in BTM_SecAddBleDevice()
90 list_append(btm_cb.p_sec_dev_rec_list, p_dev_rec); in BTM_SecAddBleDevice()
91 … BTM_TRACE_DEBUG ("allocate a new dev rec idx=0x%x\n", list_length(btm_cb.p_sec_dev_rec_list)); in BTM_SecAddBleDevice()
206 tBTM_DEVCB *p_devcb = &btm_cb.devcb; in BTM_BleLoadLocalKeys()
239 memcpy (ble_encr_key_value, btm_cb.devcb.ble_encryption_key_value, BT_OCTET16_LEN); in BTM_GetDeviceEncRoot()
257 memcpy (irk, btm_cb.devcb.id_keys.irk, BT_OCTET16_LEN); in BTM_GetDeviceIDRoot()
273 memcpy (dhk, btm_cb.devcb.id_keys.dhk, BT_OCTET16_LEN); in BTM_GetDeviceDHK()
514 tBTM_BLE_CB *p_ble_cb = &btm_cb.ble_ctr_cb; in BTM_BleSetConnScanParams()
724 btm_cb.devcb.p_le_test_cmd_cmpl_cb = p_cmd_cmpl_cback; in BTM_BleReceiverTest()
746 btm_cb.devcb.p_le_test_cmd_cmpl_cb = p_cmd_cmpl_cback; in BTM_BleTransmitterTest()
[all …]
Dbtm_dev.c75 if (list_length(btm_cb.p_sec_dev_rec_list) < BTM_SEC_MAX_DEVICE_RECORDS) { in BTM_SecAddDevice()
78 list_append(btm_cb.p_sec_dev_rec_list, p_dev_rec); in BTM_SecAddDevice()
99 p_dev_rec->timestamp = btm_cb.dev_rec_count++; in BTM_SecAddDevice()
322 if (list_length(btm_cb.p_sec_dev_rec_list) < BTM_SEC_MAX_DEVICE_RECORDS) { in btm_sec_alloc_dev()
326 list_append(btm_cb.p_sec_dev_rec_list, p_dev_rec); in btm_sec_alloc_dev()
359 if (!memcmp (bd_addr, btm_cb.connecting_bda, BD_ADDR_LEN)) { in btm_sec_alloc_dev()
360 memcpy (p_dev_rec->dev_class, btm_cb.connecting_dc, DEV_CLASS_LEN); in btm_sec_alloc_dev()
370 p_dev_rec->timestamp = btm_cb.dev_rec_count++; in btm_sec_alloc_dev()
414 list_remove(btm_cb.p_sec_dev_rec_list, p_dev_rec); in btm_sec_free_dev()
486 p_node = list_foreach(btm_cb.p_sec_dev_rec_list, btm_find_sec_dev_in_list, &context); in btm_find_dev_by_handle()
[all …]
Dbtm_ble_addr.c51 tBTM_LE_RANDOM_CB *p_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb; in btm_gen_resolve_paddr_cmpl()
69 if (btm_cb.ble_ctr_cb.inq_var.adv_mode == BTM_BLE_ADV_ENABLE){ in btm_gen_resolve_paddr_cmpl()
77 if (btm_cb.ble_ctr_cb.inq_var.state == BTM_BLE_SCANNING){ in btm_gen_resolve_paddr_cmpl()
90 btm_cb.ble_ctr_cb.rpa_tout); in btm_gen_resolve_paddr_cmpl()
117 tBTM_LE_RANDOM_CB *p_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb; in btm_gen_resolve_paddr_low()
130 if (!SMP_Encrypt(btm_cb.devcb.id_keys.irk, BT_OCTET16_LEN, p->param_buf, 3, &output)) { in btm_gen_resolve_paddr_low()
167 tBTM_LE_RANDOM_CB *p_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb; in btm_gen_non_resolve_paddr_cmpl()
206 tBTM_LE_RANDOM_CB *p_mgnt_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb; in btm_gen_non_resolvable_private_addr()
238 tBTM_LE_RANDOM_CB *p_mgnt_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb; in btm_ble_resolve_address_cmpl()
258 tBTM_LE_RANDOM_CB *p_mgnt_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb; in btm_ble_proc_resolve_x()
[all …]
Dbtm_ble_multi_adv.c269 if (btm_cb.ble_ctr_cb.privacy_mode != BTM_PRIVACY_NONE) { in btm_ble_multi_adv_set_params()
313 if (btm_cb.ble_ctr_cb.privacy_mode != BTM_PRIVACY_NONE) { in btm_ble_multi_adv_set_params()
409 if (!SMP_Encrypt(btm_cb.devcb.id_keys.irk, BT_OCTET16_LEN, p->param_buf, 3, &output)) { in btm_ble_multi_adv_gen_rpa_cmpl()
532 if (0 == btm_cb.cmn_ble_vsc_cb.adv_inst_max) { in BTM_BleEnableAdvInstance()
594 if (0 == btm_cb.cmn_ble_vsc_cb.adv_inst_max) { in BTM_BleUpdateAdvInstParam()
649 btm_ble_update_dmt_flag_bits(&p_data->flag, btm_cb.btm_inq_vars.connectable_mode, in BTM_BleCfgAdvInstData()
650 btm_cb.btm_inq_vars.discoverable_mode); in BTM_BleCfgAdvInstData()
738 if (btm_cb.ble_ctr_cb.privacy_mode != BTM_PRIVACY_NONE && in btm_ble_multi_adv_vse_cback()
753 if (btm_cb.ble_ctr_cb.inq_var.connectable_mode == BTM_BLE_CONNECTABLE) { in btm_ble_multi_adv_vse_cback()
754 btm_ble_set_connectability ( btm_cb.ble_ctr_cb.inq_var.connectable_mode ); in btm_ble_multi_adv_vse_cback()
[all …]
Dbtm_ble_batchscan.c531 addr_type = btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type; in btm_ble_set_batchscan_param()
/hal_espressif-2.7.6/components/bt/host/bluedroid/common/include/common/
Dbt_trace.h219 #define BTM_TRACE_ERROR(fmt, args...) {if (btm_cb.trace_level >= BT_TRACE_LEVEL_ERROR && BT_L…
220 #define BTM_TRACE_WARNING(fmt, args...) {if (btm_cb.trace_level >= BT_TRACE_LEVEL_WARNING && BT…
221 #define BTM_TRACE_API(fmt, args...) {if (btm_cb.trace_level >= BT_TRACE_LEVEL_API && BT_LOG…
222 #define BTM_TRACE_EVENT(fmt, args...) {if (btm_cb.trace_level >= BT_TRACE_LEVEL_EVENT && BT_L…
223 #define BTM_TRACE_DEBUG(fmt, args...) {if (btm_cb.trace_level >= BT_TRACE_LEVEL_DEBUG && BT_L…
/hal_espressif-2.7.6/components/bt/host/bluedroid/stack/l2cap/
Dl2c_link.c208 BTM_SetLinkSuperTout (ci.bd_addr, btm_cb.btm_def_link_super_tout); in l2c_link_hci_conn_comp()
372 if (btm_cb.acl_disc_reason != HCI_ERR_HOST_REJECT_SECURITY) { in l2c_link_hci_disc_comp()
373 btm_cb.acl_disc_reason = reason; in l2c_link_hci_disc_comp()
376 p_lcb->disc_reason = btm_cb.acl_disc_reason; in l2c_link_hci_disc_comp()
Dl2c_ble.c268 tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var; in l2cble_notify_le_connection()
788 tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb; in l2cble_init_direct_conn()
808 own_addr_type = btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type; in l2cble_init_direct_conn()
835 if (btm_cb.ble_ctr_cb.privacy_mode >= BTM_PRIVACY_1_2) { in l2cble_init_direct_conn()
/hal_espressif-2.7.6/components/bt/host/bluedroid/stack/smp/
Dsmp_utils.c604 …if(btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type == BLE_ADDR_RANDOM && memcmp(btm_cb.ble_ctr_cb.add… in smp_build_id_addr_cmd()
606 BDADDR_TO_STREAM (p, btm_cb.ble_ctr_cb.addr_mgnt_cb.static_rand_addr); in smp_build_id_addr_cmd()
Dsmp_keys.c1944 if (btm_cb.security_mode == BTM_SEC_MODE_SC) { in smp_calculate_link_key_from_long_term_key()
1954 } else if (btm_cb.security_mode == BTM_SEC_MODE_SP) { in smp_calculate_link_key_from_long_term_key()
1963 __func__, btm_cb.security_mode, p_dev_rec->sm4); in smp_calculate_link_key_from_long_term_key()
Dsmp_act.c181 (btm_cb.security_mode == BTM_SEC_MODE_SC) ? TRUE : FALSE; in smp_send_app_cback()
473 (btm_cb.security_mode == BTM_SEC_MODE_SC) ? TRUE : FALSE; in smp_proc_sec_req()
/hal_espressif-2.7.6/components/bt/host/bluedroid/bta/dm/
Dbta_dm_co.c107 btm_cb.devcb.loc_io_caps = bt_io_cap; in bta_dm_co_bt_set_io_cap()
/hal_espressif-2.7.6/components/bt/host/bluedroid/stack/btm/include/
Dbtm_int.h967 extern tBTM_CB btm_cb;
970 #define btm_cb (*btm_cb_ptr) macro