Lines Matching refs:p_inq

356   tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars;  in BTM_SetConnectability()  local
364 p_inq->connectable_mode &= (~BTM_BLE_CONNECTABLE_MASK); in BTM_SetConnectability()
365 p_inq->connectable_mode |= (page_mode & BTM_BLE_CONNECTABLE_MASK); in BTM_SetConnectability()
384 if ((window != p_inq->page_scan_window) || in BTM_SetConnectability()
385 (interval != p_inq->page_scan_period)) { in BTM_SetConnectability()
386 p_inq->page_scan_window = window; in BTM_SetConnectability()
387 p_inq->page_scan_period = interval; in BTM_SetConnectability()
392 if (p_inq->discoverable_mode & BTM_DISCOVERABLE_MASK) in BTM_SetConnectability()
396 p_inq->connectable_mode &= (~BTM_CONNECTABLE_MASK); in BTM_SetConnectability()
397 p_inq->connectable_mode |= page_mode; in BTM_SetConnectability()
437 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in BTM_CancelInquiry() local
444 if ((p_inq->inq_active & BTM_INQUIRY_ACTIVE_MASK) != 0) { in BTM_CancelInquiry()
445 p_inq->inq_active = BTM_INQUIRY_INACTIVE; in BTM_CancelInquiry()
446 p_inq->state = BTM_INQ_INACTIVE_STATE; in BTM_CancelInquiry()
447 p_inq->p_inq_results_cb = NULL; /* Do not notify caller anymore */ in BTM_CancelInquiry()
448 p_inq->p_inq_cmpl_cb = NULL; /* Do not notify caller anymore */ in BTM_CancelInquiry()
450 if ((p_inq->inqparms.mode & BTM_BR_INQUIRY_MASK) != 0) { in BTM_CancelInquiry()
453 if ((p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) != 0) in BTM_CancelInquiry()
456 p_inq->inq_counter++; in BTM_CancelInquiry()
498 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in BTM_StartInquiry() local
506 if (p_inq->inq_active) { in BTM_StartInquiry()
521 p_inq->inqparms = {}; in BTM_StartInquiry()
522 p_inq->inqparms.mode = BTM_GENERAL_INQUIRY | BTM_BLE_GENERAL_INQUIRY; in BTM_StartInquiry()
523 p_inq->inqparms.duration = BTIF_DM_DEFAULT_INQ_MAX_DURATION; in BTM_StartInquiry()
526 p_inq->state = BTM_INQ_ACTIVE_STATE; in BTM_StartInquiry()
527 p_inq->p_inq_cmpl_cb = p_cmpl_cb; in BTM_StartInquiry()
528 p_inq->p_inq_results_cb = p_results_cb; in BTM_StartInquiry()
529 p_inq->inq_cmpl_info.num_resp = 0; /* Clear the results counter */ in BTM_StartInquiry()
530 p_inq->inq_active = p_inq->inqparms.mode; in BTM_StartInquiry()
533 p_inq->inq_active); in BTM_StartInquiry()
536 btm_ble_start_inquiry(p_inq->inqparms.duration); in BTM_StartInquiry()
539 p_inq->inqparms.mode &= ~BTM_BLE_INQUIRY_MASK; in BTM_StartInquiry()
544 if (p_inq->inq_active & BTM_SSP_INQUIRY_ACTIVE) { in BTM_StartInquiry()
552 p_inq->p_bd_db = (tINQ_BDADDR*)osi_calloc(BT_DEFAULT_BUFFER_SIZE); in BTM_StartInquiry()
553 p_inq->max_bd_entries = in BTM_StartInquiry()
557 general_inq_lap, p_inq->inqparms.duration, 0); in BTM_StartInquiry()
622 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in BTM_CancelRemoteDeviceName() local
627 if (p_inq->remname_active) { in BTM_CancelRemoteDeviceName()
628 if (BTM_UseLeLink(p_inq->remname_bda)) { in BTM_CancelRemoteDeviceName()
633 btsnd_hcic_rmt_name_req_cancel(p_inq->remname_bda); in BTM_CancelRemoteDeviceName()
730 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in BTM_ClearInqDb() local
733 if (p_inq->inq_active != BTM_INQUIRY_INACTIVE) return (BTM_BUSY); in BTM_ClearInqDb()
759 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_inq_db_reset() local
764 if (p_inq->inq_active != BTM_INQUIRY_INACTIVE) { in btm_inq_db_reset()
765 temp_inq_active = p_inq->inq_active; /* Save so state can change BEFORE in btm_inq_db_reset()
767 p_inq->inq_active = BTM_INQUIRY_INACTIVE; in btm_inq_db_reset()
772 if (p_inq->p_inq_cmpl_cb) { in btm_inq_db_reset()
774 (*p_inq->p_inq_cmpl_cb)(&num_responses); in btm_inq_db_reset()
781 if (p_inq->remname_active) { in btm_inq_db_reset()
782 alarm_cancel(p_inq->remote_name_timer); in btm_inq_db_reset()
783 p_inq->remname_active = false; in btm_inq_db_reset()
784 p_inq->remname_bda = RawAddress::kEmpty; in btm_inq_db_reset()
786 if (p_inq->p_remname_cmpl_cb) { in btm_inq_db_reset()
789 (*p_inq->p_remname_cmpl_cb)(&rem_name); in btm_inq_db_reset()
790 p_inq->p_remname_cmpl_cb = NULL; in btm_inq_db_reset()
794 p_inq->state = BTM_INQ_INACTIVE_STATE; in btm_inq_db_reset()
795 p_inq->p_inq_results_cb = NULL; in btm_inq_db_reset()
799 p_inq->discoverable_mode = BTM_NON_DISCOVERABLE; in btm_inq_db_reset()
800 p_inq->connectable_mode = BTM_NON_CONNECTABLE; in btm_inq_db_reset()
801 p_inq->page_scan_type = BTM_SCAN_TYPE_STANDARD; in btm_inq_db_reset()
802 p_inq->inq_scan_type = BTM_SCAN_TYPE_STANDARD; in btm_inq_db_reset()
804 p_inq->discoverable_mode |= BTM_BLE_NON_DISCOVERABLE; in btm_inq_db_reset()
805 p_inq->connectable_mode |= BTM_BLE_NON_CONNECTABLE; in btm_inq_db_reset()
888 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_clr_inq_db() local
889 tINQ_DB_ENT* p_ent = p_inq->inq_db; in btm_clr_inq_db()
921 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_clr_inq_result_flt() local
923 osi_free_and_reset((void**)&p_inq->p_bd_db); in btm_clr_inq_result_flt()
924 p_inq->num_bd_entries = 0; in btm_clr_inq_result_flt()
925 p_inq->max_bd_entries = 0; in btm_clr_inq_result_flt()
939 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_inq_find_bdaddr() local
940 tINQ_BDADDR* p_db = &p_inq->p_bd_db[0]; in btm_inq_find_bdaddr()
946 for (xx = 0; xx < p_inq->num_bd_entries; xx++, p_db++) { in btm_inq_find_bdaddr()
947 if (p_db->bd_addr == p_bda && p_db->inq_count == p_inq->inq_counter) in btm_inq_find_bdaddr()
951 if (xx < p_inq->max_bd_entries) { in btm_inq_find_bdaddr()
952 p_db->inq_count = p_inq->inq_counter; in btm_inq_find_bdaddr()
954 p_inq->num_bd_entries++; in btm_inq_find_bdaddr()
1049 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_process_inq_results() local
1050 tBTM_INQ_RESULTS_CB* p_inq_results_cb = p_inq->p_inq_results_cb; in btm_process_inq_results()
1064 if (!(p_inq->inq_active & BTM_BR_INQ_ACTIVE_MASK)) return; in btm_process_inq_results()
1156 else if (p_i->inq_count == p_inq->inq_counter && in btm_process_inq_results()
1179 if (p_i->inq_count != p_inq->inq_counter) in btm_process_inq_results()
1180 p_inq->inq_cmpl_info.num_resp++; /* A new response was found */ in btm_process_inq_results()
1183 if (p_i->inq_count != p_inq->inq_counter) { in btm_process_inq_results()
1188 p_i->inq_count = p_inq->inq_counter; /* Mark entry for current inquiry */ in btm_process_inq_results()
1267 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_process_inq_complete() local
1269 p_inq->inqparms.mode &= ~(mode); in btm_process_inq_complete()
1277 if (p_inq->inq_active) { in btm_process_inq_complete()
1278 p_inq->inq_cmpl_info.status = (tBTM_STATUS)( in btm_process_inq_complete()
1283 if (p_inq->inqparms.mode == 0) { in btm_process_inq_complete()
1285 p_inq->state = BTM_INQ_INACTIVE_STATE; in btm_process_inq_complete()
1288 p_inq->inq_counter++; in btm_process_inq_complete()
1292 if ((p_inq->inq_cmpl_info.status == BTM_SUCCESS) && in btm_process_inq_complete()
1298 p_inq->p_inq_results_cb = NULL; in btm_process_inq_complete()
1299 p_inq->inq_active = BTM_INQUIRY_INACTIVE; in btm_process_inq_complete()
1300 p_inq->p_inq_cmpl_cb = NULL; in btm_process_inq_complete()
1304 p_inq->inq_cmpl_info.status, in btm_process_inq_complete()
1305 p_inq->inq_cmpl_info.num_resp); in btm_process_inq_complete()
1307 if (p_inq_cb) (p_inq_cb)((tBTM_INQUIRY_CMPL*)&p_inq->inq_cmpl_info); in btm_process_inq_complete()
1355 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_initiate_rem_name() local
1360 if (p_inq->remname_active) { in btm_initiate_rem_name()
1365 p_inq->p_remname_cmpl_cb = p_cb; in btm_initiate_rem_name()
1366 p_inq->remname_bda = remote_bda; in btm_initiate_rem_name()
1368 alarm_set_on_mloop(p_inq->remote_name_timer, timeout_ms, in btm_initiate_rem_name()
1385 p_inq->remname_active = true; in btm_initiate_rem_name()
1407 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_process_remote_name() local
1408 tBTM_CMPL_CB* p_cb = p_inq->p_remname_cmpl_cb; in btm_process_remote_name()
1417 VLOG(2) << "Inquire BDA " << p_inq->remname_bda; in btm_process_remote_name()
1421 if ((p_inq->remname_active) && (!bda || (*bda == p_inq->remname_bda))) { in btm_process_remote_name()
1422 if (BTM_UseLeLink(p_inq->remname_bda)) { in btm_process_remote_name()
1424 btm_ble_cancel_remote_name(p_inq->remname_bda); in btm_process_remote_name()
1426 alarm_cancel(p_inq->remote_name_timer); in btm_process_remote_name()
1427 p_inq->remname_active = false; in btm_process_remote_name()
1457 p_inq->remname_bda = RawAddress::kEmpty; in btm_process_remote_name()
1459 p_inq->p_remname_cmpl_cb = NULL; in btm_process_remote_name()