Lines Matching refs:btm_cb

110     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()
224 if (acl_ind != btm_cb.pm_pend_link) { in BTM_SetPowerMode()
262 *p_mode = btm_cb.pm_mode_db[acl_ind].state; in BTM_ReadPowerMode()
293 *pmState = btm_cb.pm_mode_db[acl_ind].state; in btm_read_power_mode_state()
324 if (BTM_PM_STS_ACTIVE == btm_cb.pm_mode_db[acl_ind].state || in BTM_SetSsrParams()
325 BTM_PM_STS_SNIFF == btm_cb.pm_mode_db[acl_ind].state) { in BTM_SetSsrParams()
326 btsnd_hcic_sniff_sub_rate(btm_cb.acl_db[acl_ind].hci_handle, max_lat, in BTM_SetSsrParams()
330 p_cb = &btm_cb.pm_mode_db[acl_ind]; in BTM_SetSsrParams()
354 if ((btm_cb.pm_pend_id != BTM_PM_SET_ONLY_ID) && in btm_pm_reset()
355 (btm_cb.pm_reg_db[btm_cb.pm_pend_id].mask & BTM_PM_REG_NOTIF)) { in btm_pm_reset()
356 cb = btm_cb.pm_reg_db[btm_cb.pm_pend_id].cback; in btm_pm_reset()
361 btm_cb.pm_reg_db[xx].mask = BTM_PM_REC_NOT_USED; in btm_pm_reset()
364 if (cb != NULL && btm_cb.pm_pend_link < MAX_L2CAP_LINKS) in btm_pm_reset()
365 (*cb)(btm_cb.acl_db[btm_cb.pm_pend_link].remote_addr, BTM_PM_STS_ERROR, in btm_pm_reset()
369 btm_cb.pm_pend_link = MAX_L2CAP_LINKS; in btm_pm_reset()
383 tBTM_PM_MCB* p_db = &btm_cb.pm_mode_db[ind]; /* per ACL link */ in btm_pm_sm_alloc()
402 tACL_CONN* p = &btm_cb.acl_db[0]; in btm_pm_find_acl_ind()
410 btm_cb.pm_mode_db[xx].state); in btm_pm_find_acl_ind()
516 if (btm_cb.pm_reg_db[xx].mask & BTM_PM_REG_SET) { in btm_pm_get_set_mode()
559 tBTM_PM_MCB* p_cb = &btm_cb.pm_mode_db[link_ind]; in btm_pm_snd_md_req()
587 btsnd_hcic_sniff_sub_rate(btm_cb.acl_db[link_ind].hci_handle, p_cb->max_lat, in btm_pm_snd_md_req()
593 btm_cb.pm_pend_link = MAX_L2CAP_LINKS; in btm_pm_snd_md_req()
596 btm_cb.pm_pend_id = pm_id; in btm_pm_snd_md_req()
609 btsnd_hcic_exit_sniff_mode(btm_cb.acl_db[link_ind].hci_handle); in btm_pm_snd_md_req()
610 btm_cb.pm_pend_link = link_ind; in btm_pm_snd_md_req()
613 btsnd_hcic_exit_park_mode(btm_cb.acl_db[link_ind].hci_handle); in btm_pm_snd_md_req()
614 btm_cb.pm_pend_link = link_ind; in btm_pm_snd_md_req()
623 btsnd_hcic_hold_mode(btm_cb.acl_db[link_ind].hci_handle, md_res.max, in btm_pm_snd_md_req()
625 btm_cb.pm_pend_link = link_ind; in btm_pm_snd_md_req()
629 btsnd_hcic_sniff_mode(btm_cb.acl_db[link_ind].hci_handle, md_res.max, in btm_pm_snd_md_req()
631 btm_cb.pm_pend_link = link_ind; in btm_pm_snd_md_req()
635 btsnd_hcic_park_mode(btm_cb.acl_db[link_ind].hci_handle, md_res.max, in btm_pm_snd_md_req()
637 btm_cb.pm_pend_link = link_ind; in btm_pm_snd_md_req()
644 if (btm_cb.pm_pend_link == MAX_L2CAP_LINKS) { in btm_pm_snd_md_req()
647 BTM_TRACE_DEBUG("pm_pend_link: %d", btm_cb.pm_pend_link); in btm_pm_snd_md_req()
669 if (btm_cb.pm_mode_db[xx].state & BTM_PM_STORED_MASK) { in btm_pm_check_stored()
670 btm_cb.pm_mode_db[xx].state &= ~BTM_PM_STORED_MASK; in btm_pm_check_stored()
694 if (btm_cb.pm_pend_link >= MAX_L2CAP_LINKS) return; in btm_pm_proc_cmd_status()
696 p_cb = &btm_cb.pm_mode_db[btm_cb.pm_pend_link]; in btm_pm_proc_cmd_status()
710 if ((btm_cb.pm_pend_id != BTM_PM_SET_ONLY_ID) && in btm_pm_proc_cmd_status()
711 (btm_cb.pm_reg_db[btm_cb.pm_pend_id].mask & BTM_PM_REG_NOTIF)) { in btm_pm_proc_cmd_status()
712 (*btm_cb.pm_reg_db[btm_cb.pm_pend_id].cback)( in btm_pm_proc_cmd_status()
713 btm_cb.acl_db[btm_cb.pm_pend_link].remote_addr, pm_status, 0, status); in btm_pm_proc_cmd_status()
720 p_cb->state, btm_cb.pm_pend_link, MAX_L2CAP_LINKS); in btm_pm_proc_cmd_status()
722 btm_cb.pm_pend_link = MAX_L2CAP_LINKS; in btm_pm_proc_cmd_status()
756 p = &btm_cb.acl_db[xx]; in btm_pm_proc_mode_change()
759 p_cb = &(btm_cb.pm_mode_db[xx]); in btm_pm_proc_mode_change()
794 if (btm_cb.pm_mode_db[zz].chg_ind) { in btm_pm_proc_mode_change()
806 if (btm_cb.pm_reg_db[yy].mask & BTM_PM_REG_NOTIF) { in btm_pm_proc_mode_change()
807 (*btm_cb.pm_reg_db[yy].cback)(p->remote_addr, mode, interval, hci_status); in btm_pm_proc_mode_change()
846 p_cb = &(btm_cb.pm_mode_db[xx]); in btm_pm_proc_ssr_evt()
848 p_acl = &btm_cb.acl_db[xx]; in btm_pm_proc_ssr_evt()
856 if (btm_cb.pm_reg_db[yy].mask & BTM_PM_REG_NOTIF) { in btm_pm_proc_ssr_evt()
858 (*btm_cb.pm_reg_db[yy].cback)(p_acl->remote_addr, BTM_PM_STS_SSR, in btm_pm_proc_ssr_evt()
908 if (btm_cb.is_paging || (!fixed_queue_is_empty(btm_cb.page_queue)) || in btm_pm_device_in_scan_state()
909 BTM_BL_PAGING_STARTED == btm_cb.busy_level) { in btm_pm_device_in_scan_state()
915 if ((btm_cb.btm_inq_vars.inq_active & in btm_pm_device_in_scan_state()