• Home
  • Raw
  • Download

Lines Matching refs:btm_cb

77   btm_cb.btm_def_link_super_tout = HCI_DEFAULT_INACT_TOUT;  in btm_acl_init()
78 btm_cb.acl_disc_reason = 0xff; in btm_acl_init()
97 tACL_CONN* p = &btm_cb.acl_db[0]; in btm_bda_to_acl()
121 tACL_CONN* p = &btm_cb.acl_db[0]; in btm_handle_to_acl_index()
208 BTM_SetLinkPolicy(p->remote_addr, &btm_cb.btm_def_link_policy); in btm_acl_created()
213 for (xx = 0, p = &btm_cb.acl_db[0]; xx < MAX_L2CAP_LINKS; xx++, p++) { in btm_acl_created()
225 bda, btm_cb.ble_ctr_cb.addr_mgnt_cb.private_addr); in btm_acl_created()
301 btm_cb.acl_db[idx].conn_addr = address; in btm_acl_update_conn_addr()
318 if (btm_cb.devcb.p_switch_role_cb && in btm_acl_report_role_change()
319 (bda && btm_cb.devcb.switch_role_ref_data.remote_bd_addr == *bda)) { in btm_acl_report_role_change()
320 memcpy(&ref_data, &btm_cb.devcb.switch_role_ref_data, in btm_acl_report_role_change()
323 (*btm_cb.devcb.p_switch_role_cb)(&ref_data); in btm_acl_report_role_change()
324 memset(&btm_cb.devcb.switch_role_ref_data, 0, in btm_acl_report_role_change()
326 btm_cb.devcb.p_switch_role_cb = NULL; in btm_acl_report_role_change()
357 if (btm_cb.p_bl_changed_cb) { in btm_acl_removed()
363 (*btm_cb.p_bl_changed_cb)(&evt_data); in btm_acl_removed()
371 p->hci_handle, p->transport, btm_cb.ble_ctr_cb.inq_var.connectable_mode, in btm_acl_removed()
415 tACL_CONN* p = &btm_cb.acl_db[0]; in btm_acl_device_down()
437 bool old_inquiry_state = btm_cb.is_inquiry; in btm_acl_update_busy_level()
449 btm_cb.is_paging = true; in btm_acl_update_busy_level()
454 btm_cb.is_paging = false; in btm_acl_update_busy_level()
459 btm_cb.is_inquiry = true; in btm_acl_update_busy_level()
464 btm_cb.is_inquiry = false; in btm_acl_update_busy_level()
469 btm_cb.is_inquiry = false; in btm_acl_update_busy_level()
475 if (btm_cb.is_paging || btm_cb.is_inquiry) in btm_acl_update_busy_level()
480 if ((busy_level != btm_cb.busy_level) || in btm_acl_update_busy_level()
481 (old_inquiry_state != btm_cb.is_inquiry)) { in btm_acl_update_busy_level()
484 btm_cb.busy_level = busy_level; in btm_acl_update_busy_level()
485 if (btm_cb.p_bl_changed_cb && (btm_cb.bl_evt_mask & BTM_BL_UPDATE_MASK)) { in btm_acl_update_busy_level()
488 (*btm_cb.p_bl_changed_cb)(&btm_bl_event_data); in btm_acl_update_busy_level()
548 btm_cb.devcb.p_switch_role_cb); in BTM_SwitchRole()
554 if (btm_cb.devcb.p_switch_role_cb && p_cb) { in BTM_SwitchRole()
556 << btm_cb.devcb.switch_role_ref_data.remote_bd_addr; in BTM_SwitchRole()
623 btm_cb.devcb.switch_role_ref_data.remote_bd_addr = remote_bd_addr; in BTM_SwitchRole()
624 btm_cb.devcb.switch_role_ref_data.role = new_role; in BTM_SwitchRole()
626 btm_cb.devcb.switch_role_ref_data.hci_status = HCI_ERR_UNSUPPORTED_VALUE; in BTM_SwitchRole()
627 btm_cb.devcb.p_switch_role_cb = p_cb; in BTM_SwitchRole()
655 p = &btm_cb.acl_db[xx]; in btm_acl_encrypt_change()
681 btm_acl_report_role_change(btm_cb.devcb.switch_role_ref_data.hci_status, in btm_acl_encrypt_change()
685 if (btm_cb.p_bl_changed_cb && (btm_cb.bl_evt_mask & BTM_BL_ROLE_CHG_MASK)) { in btm_acl_encrypt_change()
688 evt.new_role = btm_cb.devcb.switch_role_ref_data.role; in btm_acl_encrypt_change()
689 evt.p_bda = &btm_cb.devcb.switch_role_ref_data.remote_bd_addr; in btm_acl_encrypt_change()
690 evt.hci_status = btm_cb.devcb.switch_role_ref_data.hci_status; in btm_acl_encrypt_change()
693 (*btm_cb.p_bl_changed_cb)(&btm_bl_event_data); in btm_acl_encrypt_change()
817 btm_cb.btm_def_link_policy = settings; in BTM_SetDefaultLinkPolicy()
872 tACL_CONN* p_acl_cb = &btm_cb.acl_db[0]; in btm_read_remote_version_complete()
990 p_acl_cb = &btm_cb.acl_db[acl_idx]; in btm_read_remote_features()
1052 p_acl_cb = &btm_cb.acl_db[acl_idx]; in btm_read_remote_features_complete()
1135 p_acl_cb = &btm_cb.acl_db[acl_idx]; in btm_read_remote_ext_features_complete()
1187 p_acl_cb = &btm_cb.acl_db[acl_idx]; in btm_read_remote_ext_features_failed()
1215 btm_set_packet_types(p_acl_cb, btm_cb.btm_acl_pkt_types_supported); in btm_establish_continue()
1217 if (btm_cb.btm_def_link_policy) in btm_establish_continue()
1218 BTM_SetLinkPolicy(p_acl_cb->remote_addr, &btm_cb.btm_def_link_policy); in btm_establish_continue()
1228 if (btm_cb.p_bl_changed_cb) { in btm_establish_continue()
1237 (*btm_cb.p_bl_changed_cb)(&evt_data); in btm_establish_continue()
1255 btm_cb.btm_def_link_super_tout = timeout; in BTM_SetDefaultLinkSuperTout()
1350 if (btm_cb.acl_db[i].in_use) ++num_acl; in BTM_GetNumAclLinks()
1367 uint8_t res = btm_cb.acl_disc_reason; in btm_get_acl_disc_reason_code()
1412 if (xx < MAX_L2CAP_LINKS) btm_cb.acl_db[xx].clock_offset = clock_offset; in btm_process_clk_off_comp_evt()
1480 (bd_addr) ? bd_addr : &btm_cb.devcb.switch_role_ref_data.remote_bd_addr; in btm_acl_role_changed()
1482 tBTM_ROLE_SWITCH_CMPL* p_data = &btm_cb.devcb.switch_role_ref_data; in btm_acl_role_changed()
1538 if (btm_cb.p_bl_changed_cb && (btm_cb.bl_evt_mask & BTM_BL_ROLE_CHG_MASK)) { in btm_acl_role_changed()
1546 (*btm_cb.p_bl_changed_cb)(&btm_bl_event_data); in btm_acl_role_changed()
1591 if (!btm_cb.btm_scn[x]) { in BTM_AllocateSCN()
1592 btm_cb.btm_scn[x] = true; in BTM_AllocateSCN()
1617 if (!btm_cb.btm_scn[scn - 1]) { in BTM_TryAllocateSCN()
1618 btm_cb.btm_scn[scn - 1] = true; in BTM_TryAllocateSCN()
1637 btm_cb.btm_scn[scn - 1] = false; in BTM_FreeSCN()
1660 btm_cb.btm_acl_pkt_types_supported); in btm_set_packet_types()
1665 (btm_cb.btm_acl_pkt_types_supported & BTM_ACL_EXCEPTION_PKTS_MASK)); in btm_set_packet_types()
1696 pkt_types = btm_cb.btm_acl_pkt_types_supported; in btm_get_max_packet_size()
1842 if (p_level) *p_level = btm_cb.busy_level; in BTM_RegBusyLevelNotif()
1844 btm_cb.bl_evt_mask = evt_mask; in BTM_RegBusyLevelNotif()
1847 btm_cb.p_bl_changed_cb = NULL; in BTM_RegBusyLevelNotif()
1848 else if (btm_cb.p_bl_changed_cb) in BTM_RegBusyLevelNotif()
1851 btm_cb.p_bl_changed_cb = p_cb; in BTM_RegBusyLevelNotif()
1867 tACL_CONN* p = &btm_cb.acl_db[0]; in BTM_SetQoS()
1872 if (btm_cb.devcb.p_qos_setup_cmpl_cb) return (BTM_BUSY); in BTM_SetQoS()
1876 btm_cb.devcb.p_qos_setup_cmpl_cb = p_cb; in BTM_SetQoS()
1877 alarm_set_on_mloop(btm_cb.devcb.qos_setup_timer, BTM_DEV_REPLY_TIMEOUT_MS, in BTM_SetQoS()
1900 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_qos_setup_cmpl_cb; in btm_qos_setup_timeout()
1901 btm_cb.devcb.p_qos_setup_cmpl_cb = NULL; in btm_qos_setup_timeout()
1917 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_qos_setup_cmpl_cb; in btm_qos_setup_complete()
1921 alarm_cancel(btm_cb.devcb.qos_setup_timer); in btm_qos_setup_complete()
1922 btm_cb.devcb.p_qos_setup_cmpl_cb = NULL; in btm_qos_setup_complete()
1961 if (btm_cb.devcb.p_rssi_cmpl_cb) return (BTM_BUSY); in BTM_ReadRSSI()
1974 btm_cb.devcb.p_rssi_cmpl_cb = p_cb; in BTM_ReadRSSI()
1975 alarm_set_on_mloop(btm_cb.devcb.read_rssi_timer, BTM_DEV_REPLY_TIMEOUT_MS, in BTM_ReadRSSI()
2005 if (btm_cb.devcb.p_failed_contact_counter_cmpl_cb) return (BTM_BUSY); in BTM_ReadFailedContactCounter()
2012 btm_cb.devcb.p_failed_contact_counter_cmpl_cb = p_cb; in BTM_ReadFailedContactCounter()
2013 alarm_set_on_mloop(btm_cb.devcb.read_failed_contact_counter_timer, in BTM_ReadFailedContactCounter()
2044 if (btm_cb.devcb.p_automatic_flush_timeout_cmpl_cb) return (BTM_BUSY); in BTM_ReadAutomaticFlushTimeout()
2052 btm_cb.devcb.p_automatic_flush_timeout_cmpl_cb = p_cb; in BTM_ReadAutomaticFlushTimeout()
2053 alarm_set_on_mloop(btm_cb.devcb.read_automatic_flush_timeout_timer, in BTM_ReadAutomaticFlushTimeout()
2077 if (btm_cb.devcb.p_link_qual_cmpl_cb) return (BTM_BUSY); in BTM_ReadLinkQuality()
2081 btm_cb.devcb.p_link_qual_cmpl_cb = p_cb; in BTM_ReadLinkQuality()
2082 alarm_set_on_mloop(btm_cb.devcb.read_link_quality_timer, in BTM_ReadLinkQuality()
2115 if (btm_cb.devcb.p_tx_power_cmpl_cb) return (BTM_BUSY); in BTM_ReadTxPower()
2119 btm_cb.devcb.p_tx_power_cmpl_cb = p_cb; in BTM_ReadTxPower()
2120 alarm_set_on_mloop(btm_cb.devcb.read_tx_power_timer, in BTM_ReadTxPower()
2125 btm_cb.devcb.read_tx_pwr_addr = remote_bda; in BTM_ReadTxPower()
2148 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_tx_power_cmpl_cb; in btm_read_tx_power_timeout()
2149 btm_cb.devcb.p_tx_power_cmpl_cb = NULL; in btm_read_tx_power_timeout()
2164 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_tx_power_cmpl_cb; in btm_read_tx_power_complete()
2166 tACL_CONN* p_acl_cb = &btm_cb.acl_db[0]; in btm_read_tx_power_complete()
2169 alarm_cancel(btm_cb.devcb.read_tx_power_timer); in btm_read_tx_power_complete()
2170 btm_cb.devcb.p_tx_power_cmpl_cb = NULL; in btm_read_tx_power_complete()
2193 result.rem_bda = btm_cb.devcb.read_tx_pwr_addr; in btm_read_tx_power_complete()
2216 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_rssi_cmpl_cb; in btm_read_rssi_timeout()
2217 btm_cb.devcb.p_rssi_cmpl_cb = NULL; in btm_read_rssi_timeout()
2233 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_rssi_cmpl_cb; in btm_read_rssi_complete()
2235 tACL_CONN* p_acl_cb = &btm_cb.acl_db[0]; in btm_read_rssi_complete()
2238 alarm_cancel(btm_cb.devcb.read_rssi_timer); in btm_read_rssi_complete()
2239 btm_cb.devcb.p_rssi_cmpl_cb = NULL; in btm_read_rssi_complete()
2281 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_failed_contact_counter_cmpl_cb; in btm_read_failed_contact_counter_timeout()
2282 btm_cb.devcb.p_failed_contact_counter_cmpl_cb = NULL; in btm_read_failed_contact_counter_timeout()
2299 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_failed_contact_counter_cmpl_cb; in btm_read_failed_contact_counter_complete()
2301 tACL_CONN* p_acl_cb = &btm_cb.acl_db[0]; in btm_read_failed_contact_counter_complete()
2304 alarm_cancel(btm_cb.devcb.read_failed_contact_counter_timer); in btm_read_failed_contact_counter_complete()
2305 btm_cb.devcb.p_failed_contact_counter_cmpl_cb = NULL; in btm_read_failed_contact_counter_complete()
2348 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_automatic_flush_timeout_cmpl_cb; in btm_read_automatic_flush_timeout_timeout()
2349 btm_cb.devcb.p_automatic_flush_timeout_cmpl_cb = nullptr; in btm_read_automatic_flush_timeout_timeout()
2366 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_automatic_flush_timeout_cmpl_cb; in btm_read_automatic_flush_timeout_complete()
2368 tACL_CONN* p_acl_cb = &btm_cb.acl_db[0]; in btm_read_automatic_flush_timeout_complete()
2371 alarm_cancel(btm_cb.devcb.read_automatic_flush_timeout_timer); in btm_read_automatic_flush_timeout_complete()
2372 btm_cb.devcb.p_automatic_flush_timeout_cmpl_cb = nullptr; in btm_read_automatic_flush_timeout_complete()
2414 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_link_qual_cmpl_cb; in btm_read_link_quality_timeout()
2415 btm_cb.devcb.p_link_qual_cmpl_cb = NULL; in btm_read_link_quality_timeout()
2430 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_link_qual_cmpl_cb; in btm_read_link_quality_complete()
2432 tACL_CONN* p_acl_cb = &btm_cb.acl_db[0]; in btm_read_link_quality_complete()
2435 alarm_cancel(btm_cb.devcb.read_link_quality_timer); in btm_read_link_quality_complete()
2436 btm_cb.devcb.p_link_qual_cmpl_cb = NULL; in btm_read_link_quality_complete()
2515 if (new_level != 0xFF) btm_cb.trace_level = new_level; in BTM_SetTraceLevel()
2517 return (btm_cb.trace_level); in BTM_SetTraceLevel()
2574 p_buf = (BT_HDR*)fixed_queue_try_dequeue(btm_cb.page_queue); in btm_acl_resubmit_page()
2585 btm_cb.connecting_bda = p_dev_rec->bd_addr; in btm_acl_resubmit_page()
2586 memcpy(btm_cb.connecting_dc, p_dev_rec->dev_class, DEV_CLASS_LEN); in btm_acl_resubmit_page()
2590 btm_cb.paging = false; in btm_acl_resubmit_page()
2606 while ((p = (BT_HDR*)fixed_queue_try_dequeue(btm_cb.page_queue)) != NULL) in btm_acl_reset_paging()
2609 btm_cb.paging = false; in btm_acl_reset_paging()
2622 VLOG(2) << __func__ << ":" << btm_cb.discing << " , paging:" << btm_cb.paging in btm_acl_paging()
2625 if (btm_cb.discing) { in btm_acl_paging()
2626 btm_cb.paging = true; in btm_acl_paging()
2627 fixed_queue_enqueue(btm_cb.page_queue, p); in btm_acl_paging()
2630 VLOG(1) << "connecting_bda: " << btm_cb.connecting_bda; in btm_acl_paging()
2631 if (btm_cb.paging && bda != btm_cb.connecting_bda) { in btm_acl_paging()
2632 fixed_queue_enqueue(btm_cb.page_queue, p); in btm_acl_paging()
2635 btm_cb.connecting_bda = p_dev_rec->bd_addr; in btm_acl_paging()
2636 memcpy(btm_cb.connecting_dc, p_dev_rec->dev_class, DEV_CLASS_LEN); in btm_acl_paging()
2641 btm_cb.paging = true; in btm_acl_paging()
2661 if (btm_cb.p_bl_changed_cb) { in btm_acl_notif_conn_collision()
2669 (*btm_cb.p_bl_changed_cb)(&evt_data); in btm_acl_notif_conn_collision()