Lines Matching refs:btm_cb
83 memset(btm_cb.cfg.bd_name, 0, sizeof(tBTM_LOC_BD_NAME)); in btm_dev_init()
85 btm_cb.devcb.read_local_name_timer = alarm_new("btm.read_local_name_timer"); in btm_dev_init()
86 btm_cb.devcb.read_rssi_timer = alarm_new("btm.read_rssi_timer"); in btm_dev_init()
87 btm_cb.devcb.read_failed_contact_counter_timer = in btm_dev_init()
89 btm_cb.devcb.read_automatic_flush_timeout_timer = in btm_dev_init()
91 btm_cb.devcb.read_link_quality_timer = in btm_dev_init()
93 btm_cb.devcb.read_inq_tx_power_timer = in btm_dev_init()
95 btm_cb.devcb.qos_setup_timer = alarm_new("btm.qos_setup_timer"); in btm_dev_init()
96 btm_cb.devcb.read_tx_power_timer = alarm_new("btm.read_tx_power_timer"); in btm_dev_init()
98 btm_cb.btm_acl_pkt_types_supported = in btm_dev_init()
103 btm_cb.btm_sco_pkt_types_supported = in btm_dev_init()
125 if (btm_cb.devcb.p_rln_cmpl_cb) { in btm_db_reset()
126 p_cb = btm_cb.devcb.p_rln_cmpl_cb; in btm_db_reset()
127 btm_cb.devcb.p_rln_cmpl_cb = NULL; in btm_db_reset()
132 if (btm_cb.devcb.p_rssi_cmpl_cb) { in btm_db_reset()
133 p_cb = btm_cb.devcb.p_rssi_cmpl_cb; in btm_db_reset()
134 btm_cb.devcb.p_rssi_cmpl_cb = NULL; in btm_db_reset()
143 if (btm_cb.devcb.p_failed_contact_counter_cmpl_cb) { in btm_db_reset()
144 p_cb = btm_cb.devcb.p_failed_contact_counter_cmpl_cb; in btm_db_reset()
145 btm_cb.devcb.p_failed_contact_counter_cmpl_cb = NULL; in btm_db_reset()
154 if (btm_cb.devcb.p_automatic_flush_timeout_cmpl_cb) { in btm_db_reset()
155 p_cb = btm_cb.devcb.p_automatic_flush_timeout_cmpl_cb; in btm_db_reset()
156 btm_cb.devcb.p_automatic_flush_timeout_cmpl_cb = NULL; in btm_db_reset()
180 list_foreach(btm_cb.sec_dev_rec, set_sec_state_idle, NULL); in reset_complete()
183 btm_cb.btm_inq_vars.inq_counter = 1; in reset_complete()
184 btm_cb.btm_inq_vars.inq_scan_window = HCI_DEF_INQUIRYSCAN_WINDOW; in reset_complete()
185 btm_cb.btm_inq_vars.inq_scan_period = HCI_DEF_INQUIRYSCAN_INTERVAL; in reset_complete()
186 btm_cb.btm_inq_vars.inq_scan_type = HCI_DEF_SCAN_TYPE; in reset_complete()
188 btm_cb.btm_inq_vars.page_scan_window = HCI_DEF_PAGESCAN_WINDOW; in reset_complete()
189 btm_cb.btm_inq_vars.page_scan_period = HCI_DEF_PAGESCAN_INTERVAL; in reset_complete()
190 btm_cb.btm_inq_vars.page_scan_type = HCI_DEF_SCAN_TYPE; in reset_complete()
192 btm_cb.ble_ctr_cb.conn_state = BLE_CONN_IDLE; in reset_complete()
215 BTM_SetPinType(btm_cb.cfg.pin_type, btm_cb.cfg.pin_code, in reset_complete()
216 btm_cb.cfg.pin_code_len); in reset_complete()
259 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_rln_cmpl_cb; in btm_read_local_name_timeout()
260 btm_cb.devcb.p_rln_cmpl_cb = NULL; in btm_read_local_name_timeout()
281 btm_cb.btm_acl_pkt_types_supported = in btm_decode_ext_features_page()
285 btm_cb.btm_acl_pkt_types_supported |= in btm_decode_ext_features_page()
289 btm_cb.btm_acl_pkt_types_supported |= in btm_decode_ext_features_page()
294 btm_cb.btm_acl_pkt_types_supported |= in btm_decode_ext_features_page()
300 btm_cb.btm_acl_pkt_types_supported |= in btm_decode_ext_features_page()
309 btm_cb.btm_acl_pkt_types_supported |= in btm_decode_ext_features_page()
314 btm_cb.btm_acl_pkt_types_supported |= in btm_decode_ext_features_page()
320 btm_cb.btm_acl_pkt_types_supported); in btm_decode_ext_features_page()
323 btm_cb.btm_sco_pkt_types_supported = 0; in btm_decode_ext_features_page()
324 btm_cb.sco_cb.esco_supported = false; in btm_decode_ext_features_page()
326 btm_cb.btm_sco_pkt_types_supported = ESCO_PKT_TYPES_MASK_HV1; in btm_decode_ext_features_page()
329 btm_cb.btm_sco_pkt_types_supported |= ESCO_PKT_TYPES_MASK_HV2; in btm_decode_ext_features_page()
332 btm_cb.btm_sco_pkt_types_supported |= ESCO_PKT_TYPES_MASK_HV3; in btm_decode_ext_features_page()
336 btm_cb.btm_sco_pkt_types_supported |= ESCO_PKT_TYPES_MASK_EV3; in btm_decode_ext_features_page()
339 btm_cb.btm_sco_pkt_types_supported |= ESCO_PKT_TYPES_MASK_EV4; in btm_decode_ext_features_page()
342 btm_cb.btm_sco_pkt_types_supported |= ESCO_PKT_TYPES_MASK_EV5; in btm_decode_ext_features_page()
343 if (btm_cb.btm_sco_pkt_types_supported & BTM_ESCO_LINK_ONLY_MASK) { in btm_decode_ext_features_page()
344 btm_cb.sco_cb.esco_supported = true; in btm_decode_ext_features_page()
349 btm_cb.btm_sco_pkt_types_supported |= ESCO_PKT_TYPES_MASK_NO_2_EV5; in btm_decode_ext_features_page()
351 btm_cb.btm_sco_pkt_types_supported |= in btm_decode_ext_features_page()
357 btm_cb.btm_sco_pkt_types_supported |= ESCO_PKT_TYPES_MASK_NO_3_EV5; in btm_decode_ext_features_page()
359 btm_cb.btm_sco_pkt_types_supported |= in btm_decode_ext_features_page()
365 btm_cb.btm_sco_pkt_types_supported); in btm_decode_ext_features_page()
369 btm_cb.btm_def_link_policy |= HCI_ENABLE_MASTER_SLAVE_SWITCH; in btm_decode_ext_features_page()
371 btm_cb.btm_def_link_policy &= ~HCI_ENABLE_MASTER_SLAVE_SWITCH; in btm_decode_ext_features_page()
374 btm_cb.btm_def_link_policy |= HCI_ENABLE_HOLD_MODE; in btm_decode_ext_features_page()
376 btm_cb.btm_def_link_policy &= ~HCI_ENABLE_HOLD_MODE; in btm_decode_ext_features_page()
379 btm_cb.btm_def_link_policy |= HCI_ENABLE_SNIFF_MODE; in btm_decode_ext_features_page()
381 btm_cb.btm_def_link_policy &= ~HCI_ENABLE_SNIFF_MODE; in btm_decode_ext_features_page()
384 btm_cb.btm_def_link_policy |= HCI_ENABLE_PARK_MODE; in btm_decode_ext_features_page()
386 btm_cb.btm_def_link_policy &= ~HCI_ENABLE_PARK_MODE; in btm_decode_ext_features_page()
431 p = (uint8_t*)btm_cb.cfg.bd_name; in BTM_SetLocalDeviceName()
433 strlcpy(btm_cb.cfg.bd_name, p_name, BTM_MAX_LOC_BD_NAME_LEN); in BTM_SetLocalDeviceName()
453 *p_name = btm_cb.cfg.bd_name; in BTM_ReadLocalDeviceName()
470 if (btm_cb.devcb.p_rln_cmpl_cb) return (BTM_NO_RESOURCES); in BTM_ReadLocalDeviceNameFromController()
473 btm_cb.devcb.p_rln_cmpl_cb = p_rln_cmpl_cback; in BTM_ReadLocalDeviceNameFromController()
476 alarm_set_on_mloop(btm_cb.devcb.read_local_name_timer, in BTM_ReadLocalDeviceNameFromController()
494 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_rln_cmpl_cb; in btm_read_local_name_complete()
497 alarm_cancel(btm_cb.devcb.read_local_name_timer); in btm_read_local_name_complete()
500 btm_cb.devcb.p_rln_cmpl_cb = NULL; in btm_read_local_name_complete()
522 if (!memcmp(btm_cb.devcb.dev_class, dev_class, DEV_CLASS_LEN)) in BTM_SetDeviceClass()
525 memcpy(btm_cb.devcb.dev_class, dev_class, DEV_CLASS_LEN); in BTM_SetDeviceClass()
544 return ((uint8_t*)btm_cb.devcb.dev_class); in BTM_ReadDeviceClass()
579 tBTM_DEV_STATUS_CB* p_prev = btm_cb.devcb.p_dev_status_cb; in BTM_RegisterForDeviceStatusNotif()
581 btm_cb.devcb.p_dev_status_cb = p_cb; in BTM_RegisterForDeviceStatusNotif()
655 if (btm_cb.devcb.p_vend_spec_cb[i] == NULL) { in BTM_RegisterForVSEvents()
658 } else if (btm_cb.devcb.p_vend_spec_cb[i] == p_cb) { in BTM_RegisterForVSEvents()
661 btm_cb.devcb.p_vend_spec_cb[i] = NULL; in BTM_RegisterForVSEvents()
671 btm_cb.devcb.p_vend_spec_cb[free_idx] = p_cb; in BTM_RegisterForVSEvents()
702 if (btm_cb.devcb.p_vend_spec_cb[i]) in btm_vendor_specific_evt()
703 (*btm_cb.devcb.p_vend_spec_cb[i])(evt_len, p); in btm_vendor_specific_evt()
801 if (btm_cb.devcb.p_stored_link_key_cmpl_cb) return (BTM_BUSY); in BTM_DeleteStoredLinkKey()
808 btm_cb.devcb.p_stored_link_key_cmpl_cb = p_cb; in BTM_DeleteStoredLinkKey()
833 tBTM_CMPL_CB* p_cb = btm_cb.devcb.p_stored_link_key_cmpl_cb; in btm_delete_stored_link_key_complete()
837 btm_cb.devcb.p_stored_link_key_cmpl_cb = NULL; in btm_delete_stored_link_key_complete()
864 tBTM_DEV_STATUS_CB* p_cb = btm_cb.devcb.p_dev_status_cb; in btm_report_device_status()
898 if (btm_cb.p_bqr_report_receiver == nullptr) { in BTM_BT_Quality_Report_VSE_CBack()
903 btm_cb.p_bqr_report_receiver(length, p_stream); in BTM_BT_Quality_Report_VSE_CBack()
931 btm_cb.p_bqr_report_receiver = p_bqr_report_receiver; in BTM_BT_Quality_Report_VSE_Register()
933 btm_cb.p_bqr_report_receiver = nullptr; in BTM_BT_Quality_Report_VSE_Register()