/system/bt/stack/btm/ |
D | btm_devctl.c | 81 memset (&btm_cb.devcb, 0, sizeof (tBTM_DEVCB)); in btm_dev_init() 86 memset(btm_cb.cfg.bd_name, 0, sizeof(tBTM_LOC_BD_NAME)); in btm_dev_init() 89 btm_cb.devcb.read_local_name_timer = in btm_dev_init() 91 btm_cb.devcb.read_rssi_timer = alarm_new("btm.read_rssi_timer"); in btm_dev_init() 92 btm_cb.devcb.read_link_quality_timer = in btm_dev_init() 94 btm_cb.devcb.read_inq_tx_power_timer = in btm_dev_init() 96 btm_cb.devcb.qos_setup_timer = alarm_new("btm.qos_setup_timer"); in btm_dev_init() 97 btm_cb.devcb.read_tx_power_timer = alarm_new("btm.read_tx_power_timer"); in btm_dev_init() 99 btm_cb.btm_acl_pkt_types_supported = BTM_ACL_PKT_TYPES_MASK_DH1 + BTM_ACL_PKT_TYPES_MASK_DM1 + in btm_dev_init() 103 btm_cb.btm_sco_pkt_types_supported = BTM_SCO_PKT_TYPES_MASK_HV1 + in btm_dev_init() [all …]
|
D | btm_pm.c | 143 btm_cb.pm_reg_db[*p_pm_id].mask = BTM_PM_REC_NOT_USED; in BTM_PmRegister() 150 if(btm_cb.pm_reg_db[xx].mask == BTM_PM_REC_NOT_USED) in BTM_PmRegister() 157 btm_cb.pm_reg_db[xx].cback = p_cb; in BTM_PmRegister() 159 btm_cb.pm_reg_db[xx].mask = mask; in BTM_PmRegister() 203 p_cb = &(btm_cb.pm_mode_db[acl_ind]); in BTM_SetPowerMode() 232 (btm_cb.pm_reg_db[pm_id].mask & BTM_PM_REG_SET)) in BTM_SetPowerMode() 233 || ((pm_id == BTM_PM_SET_ONLY_ID) && (btm_cb.pm_pend_link != MAX_L2CAP_LINKS)) ) in BTM_SetPowerMode() 239 btm_cb.pm_reg_db[temp_pm_id].mask |= BTM_PM_REG_SET; in BTM_SetPowerMode() 245 BTM_TRACE_DEBUG( "btm_pm state:0x%x, pm_pend_link: %d", p_cb->state, btm_cb.pm_pend_link); in BTM_SetPowerMode() 250 (btm_cb.pm_pend_link != MAX_L2CAP_LINKS) ) /* command pending */ in BTM_SetPowerMode() [all …]
|
D | btm_sec.c | 249 if (memcmp(btm_cb.devcb.id_keys.ir, &temp_value, sizeof(BT_OCTET16)) == 0) in BTM_SecRegister() 260 btm_cb.api = *p_cb_info; in BTM_SecRegister() 262 LOG_INFO(LOG_TAG, "%s btm_cb.api.p_le_callback = 0x%p ", __func__, btm_cb.api.p_le_callback); in BTM_SecRegister() 281 btm_cb.api.p_link_key_callback = p_callback; in BTM_SecRegisterLinkKeyNotificationCallback() 301 if (btm_cb.p_rmt_name_callback[i] == NULL) in BTM_SecAddRmtNameNotifyCallback() 303 btm_cb.p_rmt_name_callback[i] = p_callback; in BTM_SecAddRmtNameNotifyCallback() 327 if (btm_cb.p_rmt_name_callback[i] == p_callback) in BTM_SecDeleteRmtNameNotifyCallback() 329 btm_cb.p_rmt_name_callback[i] = NULL; in BTM_SecDeleteRmtNameNotifyCallback() 401 if ( (btm_cb.cfg.pin_type != pin_type) in BTM_SetPinType() 407 btm_cb.cfg.pin_type = pin_type; in BTM_SetPinType() [all …]
|
D | btm_acl.c | 74 memset (&btm_cb.acl_db, 0, sizeof (btm_cb.acl_db)); in btm_acl_init() 75 memset (btm_cb.btm_scn, 0, BTM_MAX_SCN); /* Initialize the SCN usage to FALSE */ in btm_acl_init() 76 btm_cb.btm_def_link_policy = 0; in btm_acl_init() 77 btm_cb.p_bl_changed_cb = NULL; in btm_acl_init() 81 btm_cb.btm_def_link_super_tout = HCI_DEFAULT_INACT_TOUT; in btm_acl_init() 82 btm_cb.acl_disc_reason = 0xff ; in btm_acl_init() 100 tACL_CONN *p = &btm_cb.acl_db[0]; in btm_bda_to_acl() 133 tACL_CONN *p = &btm_cb.acl_db[0]; in btm_handle_to_acl_index() 233 BTM_SetLinkPolicy(p->remote_addr, &btm_cb.btm_def_link_policy); in btm_acl_created() 238 for (xx = 0, p = &btm_cb.acl_db[0]; xx < MAX_L2CAP_LINKS; xx++, p++) in btm_acl_created() [all …]
|
D | btm_main.c | 35 tBTM_CB btm_cb; variable 53 memset(&btm_cb, 0, sizeof(tBTM_CB)); in btm_init() 54 btm_cb.page_queue = fixed_queue_new(SIZE_MAX); in btm_init() 55 btm_cb.sec_pending_q = fixed_queue_new(SIZE_MAX); in btm_init() 56 btm_cb.sec_collision_timer = alarm_new("btm.sec_collision_timer"); in btm_init() 57 btm_cb.pairing_timer = alarm_new("btm.pairing_timer"); in btm_init() 60 btm_cb.trace_level = BTM_INITIAL_TRACE_LEVEL; in btm_init() 62 btm_cb.trace_level = BT_TRACE_LEVEL_NONE; /* No traces */ in btm_init() 76 btm_cb.sec_dev_rec = list_new(osi_free); in btm_init()
|
D | btm_sco.c | 91 p = &btm_cb.sco_cb.sco_db[sco_inx]; in btm_sco_flush_sco_data() 115 memset (&btm_cb.sco_cb, 0, sizeof(tSCO_CB)); 120 btm_cb.sco_cb.sco_db[i].xmit_data_q = fixed_queue_new(SIZE_MAX); 124 btm_cb.sco_cb.sco_disc_reason = BTM_INVALID_SCO_DISC_REASON; 126 btm_cb.sco_cb.def_esco_parms = btm_esco_defaults; /* Initialize with defaults */ 127 btm_cb.sco_cb.desired_sco_mode = BTM_DEFAULT_SCO_MODE; 155 p_sco = &btm_cb.sco_cb.sco_db[sco_inx]; 166 if (!btm_cb.sco_cb.esco_supported) 190 *p_setup = btm_cb.sco_cb.def_esco_parms; 195 btm_cb.btm_sco_pkt_types_supported); [all …]
|
D | btm_ble_privacy.c | 67 tBTM_BLE_RESOLVE_Q *p_q = &btm_cb.ble_ctr_cb.resolving_list_pend_q; in btm_ble_enq_resolving_list_pending() 89 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() 148 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() 174 btm_cb.ble_ctr_cb.irk_list_mask[byte] |= (1 << bit); in btm_ble_find_irk_index() 257 memset(btm_cb.ble_ctr_cb.irk_list_mask, 0, irk_mask_size); in btm_ble_clear_resolving_list_complete() 260 btm_cb.ble_ctr_cb.resolving_list_avail_size = in btm_ble_clear_resolving_list_complete() 264 __func__, btm_cb.ble_ctr_cb.resolving_list_avail_size); in btm_ble_clear_resolving_list_complete() 266 list_foreach(btm_cb.sec_dev_rec, clear_resolving_list_bit, NULL); in btm_ble_clear_resolving_list_complete() [all …]
|
D | btm_ble_gap.c | 262 tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var; in BTM_BleUpdateAdvFilterPolicy() 356 tBTM_BLE_INQ_CB *p_inq = &btm_cb.ble_ctr_cb.inq_var; in BTM_BleObserve() 362 BTM_TRACE_EVENT ("%s : scan_type:%d, %d, %d", __func__, btm_cb.btm_inq_vars.scan_type, in BTM_BleObserve() 371 if (BTM_BLE_IS_OBS_ACTIVE(btm_cb.ble_ctr_cb.scan_activity)) in BTM_BleObserve() 377 btm_cb.ble_ctr_cb.p_obs_results_cb = p_results_cb; in BTM_BleObserve() 378 btm_cb.ble_ctr_cb.p_obs_cmpl_cb = p_cmpl_cb; in BTM_BleObserve() 382 if (!BTM_BLE_IS_SCAN_ACTIVE(btm_cb.ble_ctr_cb.scan_activity)) in BTM_BleObserve() 397 btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type, in BTM_BleObserve() 403 btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type, in BTM_BleObserve() 413 btm_cb.ble_ctr_cb.scan_activity |= BTM_LE_OBSERVE_ACTIVE; in BTM_BleObserve() [all …]
|
D | btm_inq.c | 180 btm_cb.btm_inq_vars.discoverable_mode &= (~BTM_BLE_DISCOVERABLE_MASK); in BTM_SetDiscoverability() 181 btm_cb.btm_inq_vars.discoverable_mode |= (inq_mode & BTM_BLE_DISCOVERABLE_MASK); in BTM_SetDiscoverability() 242 if ((window != btm_cb.btm_inq_vars.inq_scan_window) || in BTM_SetDiscoverability() 243 (interval != btm_cb.btm_inq_vars.inq_scan_period)) in BTM_SetDiscoverability() 247 btm_cb.btm_inq_vars.inq_scan_window = window; in BTM_SetDiscoverability() 248 btm_cb.btm_inq_vars.inq_scan_period = interval; in BTM_SetDiscoverability() 254 if (btm_cb.btm_inq_vars.connectable_mode & BTM_CONNECTABLE_MASK) in BTM_SetDiscoverability() 259 btm_cb.btm_inq_vars.discoverable_mode &= (~BTM_DISCOVERABLE_MASK); in BTM_SetDiscoverability() 260 btm_cb.btm_inq_vars.discoverable_mode |= inq_mode; in BTM_SetDiscoverability() 310 if (scan_type != btm_cb.btm_inq_vars.inq_scan_type) in BTM_SetInquiryScanType() [all …]
|
D | btm_ble_bgconn.c | 119 tBTM_BLE_INQ_CB *p_inq = &btm_cb.ble_ctr_cb.inq_var; in btm_update_scanner_filter_policy() 129 if (btm_cb.cmn_ble_vsc_cb.extended_scan_support == 0) in btm_update_scanner_filter_policy() 133 btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type, in btm_update_scanner_filter_policy() 139 btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type, in btm_update_scanner_filter_policy() 195 tBTM_BLE_WL_OP *p_dev_op = btm_cb.ble_ctr_cb.wl_op_q; in btm_execute_wl_dev_operation() 219 tBTM_BLE_WL_OP *p_dev_op = btm_cb.ble_ctr_cb.wl_op_q; in btm_enq_wl_dev_operation() 255 tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb; in btm_update_dev_to_white_list() 297 tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb; in btm_ble_clear_white_list_complete() 318 btm_cb.ble_ctr_cb.white_list_avail_size = white_list_size; in btm_ble_white_list_init() 332 --btm_cb.ble_ctr_cb.white_list_avail_size; in btm_ble_add_2_white_list_complete() [all …]
|
D | btm_ble.c | 79 if (list_length(btm_cb.sec_dev_rec) > BTM_SEC_MAX_DEVICE_RECORDS) { in BTM_SecAddBleDevice() 85 list_append(btm_cb.sec_dev_rec, p_dev_rec); in BTM_SecAddBleDevice() 189 tBTM_DEVCB *p_devcb = &btm_cb.devcb; in BTM_BleLoadLocalKeys() 224 memcpy (ble_encr_key_value, btm_cb.devcb.ble_encryption_key_value, BT_OCTET16_LEN); in BTM_GetDeviceEncRoot() 242 memcpy (irk, btm_cb.devcb.id_keys.irk, BT_OCTET16_LEN); in BTM_GetDeviceIDRoot() 258 memcpy (dhk, btm_cb.devcb.id_keys.dhk, BT_OCTET16_LEN); in BTM_GetDeviceDHK() 309 p = &btm_cb.acl_db[xx]; in BTM_IsBleConnection() 488 tBTM_BLE_CB *p_ble_cb = &btm_cb.ble_ctr_cb; in BTM_BleSetConnScanParams() 712 btm_cb.devcb.p_le_test_cmd_cmpl_cb = p_cmd_cmpl_cback; in BTM_BleReceiverTest() 735 btm_cb.devcb.p_le_test_cmd_cmpl_cb = p_cmd_cmpl_cback; in BTM_BleTransmitterTest() [all …]
|
D | btm_dev.c | 74 if (list_length(btm_cb.sec_dev_rec) > BTM_SEC_MAX_DEVICE_RECORDS) { in BTM_SecAddDevice() 81 list_append(btm_cb.sec_dev_rec, p_dev_rec); in BTM_SecAddDevice() 94 p_dev_rec->timestamp = btm_cb.dev_rec_count++; in BTM_SecAddDevice() 247 if (list_length(btm_cb.sec_dev_rec) > BTM_SEC_MAX_DEVICE_RECORDS) { in btm_sec_alloc_dev() 252 list_append(btm_cb.sec_dev_rec, p_dev_rec); in btm_sec_alloc_dev() 269 else if (!memcmp (bd_addr, btm_cb.connecting_bda, BD_ADDR_LEN)) in btm_sec_alloc_dev() 270 memcpy (p_dev_rec->dev_class, btm_cb.connecting_dc, DEV_CLASS_LEN); in btm_sec_alloc_dev() 283 p_dev_rec->timestamp = btm_cb.dev_rec_count++; in btm_sec_alloc_dev() 392 list_node_t *n = list_foreach(btm_cb.sec_dev_rec, is_handle_equal, &handle); in btm_find_dev_by_handle() 432 list_node_t *n = list_foreach(btm_cb.sec_dev_rec, is_address_equal, bd_addr); in btm_find_dev() [all …]
|
D | btm_ble_addr.c | 53 tBTM_LE_RANDOM_CB *p_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb; in btm_gen_resolve_paddr_cmpl() 70 interval_ms = btm_cb.ble_ctr_cb.rpa_tout * 1000; in btm_gen_resolve_paddr_cmpl() 95 tBTM_LE_RANDOM_CB *p_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb; in btm_gen_resolve_paddr_low() 109 if (!SMP_Encrypt(btm_cb.devcb.id_keys.irk, BT_OCTET16_LEN, p->param_buf, 3, &output)) in btm_gen_resolve_paddr_low() 148 tBTM_LE_RANDOM_CB *p_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb; in btm_gen_non_resolve_paddr_cmpl() 188 tBTM_LE_RANDOM_CB *p_mgnt_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb; in btm_gen_non_resolvable_private_addr() 220 tBTM_LE_RANDOM_CB *p_mgnt_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb; in btm_ble_proc_resolve_x() 323 tBTM_LE_RANDOM_CB *p_mgnt_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb; in btm_ble_match_random_bda() 361 tBTM_LE_RANDOM_CB *p_mgnt_cb = &btm_cb.ble_ctr_cb.addr_mgnt_cb; in btm_ble_resolve_random_addr() 371 list_node_t * n = list_foreach(btm_cb.sec_dev_rec, btm_ble_match_random_bda, NULL); in btm_ble_resolve_random_addr() [all …]
|
D | btm_ble_multi_adv.c | 271 if (btm_cb.ble_ctr_cb.privacy_mode != BTM_PRIVACY_NONE) in btm_ble_multi_adv_set_params() 315 if (btm_cb.ble_ctr_cb.privacy_mode != BTM_PRIVACY_NONE) { in btm_ble_multi_adv_set_params() 420 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() 554 if (0 == btm_cb.cmn_ble_vsc_cb.adv_inst_max) in BTM_BleEnableAdvInstance() 622 if (0 == btm_cb.cmn_ble_vsc_cb.adv_inst_max) in BTM_BleUpdateAdvInstParam() 680 btm_ble_update_dmt_flag_bits(&p_data->flag, btm_cb.btm_inq_vars.connectable_mode, in BTM_BleCfgAdvInstData() 681 btm_cb.btm_inq_vars.discoverable_mode); in BTM_BleCfgAdvInstData() 774 if (btm_cb.ble_ctr_cb.privacy_mode != BTM_PRIVACY_NONE && in btm_ble_multi_adv_vse_cback() 777 memcpy(btm_cb.acl_db[idx].conn_addr, btm_multi_adv_cb.p_adv_inst[adv_inst - 1].rpa, in btm_ble_multi_adv_vse_cback() 792 if (btm_cb.ble_ctr_cb.inq_var.connectable_mode == BTM_BLE_CONNECTABLE) in btm_ble_multi_adv_vse_cback() [all …]
|
D | btm_int.h | 907 extern tBTM_CB btm_cb; 910 #define btm_cb (*btm_cb_ptr)
|
D | btm_ble_batchscan.c | 555 addr_type = btm_cb.ble_ctr_cb.addr_mgnt_cb.own_addr_type; in btm_ble_set_batchscan_param()
|
/system/bt/include/ |
D | bt_trace.h | 234 #define BTM_TRACE_ERROR(...) {if (btm_cb.trace_level >= BT_TRACE_LEVEL_ERROR) B… 235 #define BTM_TRACE_WARNING(...) {if (btm_cb.trace_level >= BT_TRACE_LEVEL_WARNING)… 236 #define BTM_TRACE_API(...) {if (btm_cb.trace_level >= BT_TRACE_LEVEL_API) BT_… 237 #define BTM_TRACE_EVENT(...) {if (btm_cb.trace_level >= BT_TRACE_LEVEL_EVENT) B… 238 #define BTM_TRACE_DEBUG(...) {if (btm_cb.trace_level >= BT_TRACE_LEVEL_DEBUG) B…
|
/system/bt/stack/avdt/ |
D | avdt_l2c.c | 208 btm_set_packet_types(p_acl_cb, (btm_cb.btm_acl_pkt_types_supported | in avdt_l2c_connect_ind_cback() 336 btm_set_packet_types(p_acl_cb, (btm_cb.btm_acl_pkt_types_supported | in avdt_l2c_connect_cfm_cback()
|
/system/bt/stack/l2cap/ |
D | l2c_link.c | 210 BTM_SetLinkSuperTout (ci.bd_addr, btm_cb.btm_def_link_super_tout); in l2c_link_hci_conn_comp() 389 if (btm_cb.acl_disc_reason != HCI_ERR_HOST_REJECT_SECURITY) in l2c_link_hci_disc_comp() 390 btm_cb.acl_disc_reason = reason; in l2c_link_hci_disc_comp() 392 p_lcb->disc_reason = btm_cb.acl_disc_reason; in l2c_link_hci_disc_comp()
|
D | l2c_ble.c | 878 tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb; in l2cble_init_direct_conn() 899 own_addr_type = btm_cb.ble_ctr_cb.privacy_mode ? BLE_ADDR_RANDOM : BLE_ADDR_PUBLIC; in l2cble_init_direct_conn() 902 if (btm_cb.ble_ctr_cb.privacy_mode >= BTM_PRIVACY_1_2) in l2cble_init_direct_conn()
|
/system/bt/stack/smp/ |
D | smp_keys.c | 1956 if (btm_cb.security_mode == BTM_SEC_MODE_SC) in smp_calculate_link_key_from_long_term_key() 1969 else if (btm_cb.security_mode == BTM_SEC_MODE_SP) in smp_calculate_link_key_from_long_term_key() 1980 __func__, btm_cb.security_mode, p_dev_rec->sm4); in smp_calculate_link_key_from_long_term_key()
|
D | smp_act.c | 216 (btm_cb.security_mode == BTM_SEC_MODE_SC) ? TRUE : FALSE; in smp_send_app_cback() 501 (btm_cb.security_mode == BTM_SEC_MODE_SC) ? TRUE : FALSE; in smp_proc_sec_req()
|