• Home
  • Raw
  • Download

Lines Matching refs:p_inq

115 static void btm_initiate_inquiry(tBTM_INQUIRY_VAR_ST* p_inq);
409 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in BTM_SetPeriodicInquiryMode() local
422 if (p_inq->inq_active || p_inq->inqfilt_active) return (BTM_BUSY); in BTM_SetPeriodicInquiryMode()
445 p_inq->inqparms = *p_inqparms; in BTM_SetPeriodicInquiryMode()
446 p_inq->per_min_delay = min_delay; in BTM_SetPeriodicInquiryMode()
447 p_inq->per_max_delay = max_delay; in BTM_SetPeriodicInquiryMode()
448 p_inq->inq_cmpl_info.num_resp = 0; /* Clear the results counter */ in BTM_SetPeriodicInquiryMode()
449 p_inq->p_inq_results_cb = p_results_cb; in BTM_SetPeriodicInquiryMode()
451 p_inq->inq_active = (uint8_t)( in BTM_SetPeriodicInquiryMode()
463 p_inq->state = BTM_INQ_CLR_FILT_STATE; in BTM_SetPeriodicInquiryMode()
467 p_inq->state = BTM_INQ_SET_FILT_STATE; in BTM_SetPeriodicInquiryMode()
475 p_inq->p_inq_results_cb = NULL; in BTM_SetPeriodicInquiryMode()
476 p_inq->state = BTM_INQ_INACTIVE_STATE; in BTM_SetPeriodicInquiryMode()
495 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in BTM_CancelPeriodicInquiry() local
512 if (p_inq->inqfilt_active) p_inq->pending_filt_complete_event++; in BTM_CancelPeriodicInquiry()
514 p_inq->inqfilt_active = false; in BTM_CancelPeriodicInquiry()
515 p_inq->inq_counter++; in BTM_CancelPeriodicInquiry()
538 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in BTM_SetConnectability() local
546 p_inq->connectable_mode &= (~BTM_BLE_CONNECTABLE_MASK); in BTM_SetConnectability()
547 p_inq->connectable_mode |= (page_mode & BTM_BLE_CONNECTABLE_MASK); in BTM_SetConnectability()
581 if ((window != p_inq->page_scan_window) || in BTM_SetConnectability()
582 (interval != p_inq->page_scan_period)) { in BTM_SetConnectability()
583 p_inq->page_scan_window = window; in BTM_SetConnectability()
584 p_inq->page_scan_period = interval; in BTM_SetConnectability()
589 if (p_inq->discoverable_mode & BTM_DISCOVERABLE_MASK) in BTM_SetConnectability()
593 p_inq->connectable_mode &= (~BTM_CONNECTABLE_MASK); in BTM_SetConnectability()
594 p_inq->connectable_mode |= page_mode; in BTM_SetConnectability()
651 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in BTM_CancelInquiry() local
659 if ((p_inq->inq_active & BTM_INQUIRY_ACTIVE_MASK) != 0 && in BTM_CancelInquiry()
660 (!(p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE))) { in BTM_CancelInquiry()
661 p_inq->inq_active = BTM_INQUIRY_INACTIVE; in BTM_CancelInquiry()
662 p_inq->state = BTM_INQ_INACTIVE_STATE; in BTM_CancelInquiry()
663 p_inq->p_inq_results_cb = NULL; /* Do not notify caller anymore */ in BTM_CancelInquiry()
664 p_inq->p_inq_cmpl_cb = NULL; /* Do not notify caller anymore */ in BTM_CancelInquiry()
669 if (p_inq->inqfilt_active) { in BTM_CancelInquiry()
670 p_inq->inqfilt_active = false; in BTM_CancelInquiry()
671 p_inq->pending_filt_complete_event++; in BTM_CancelInquiry()
675 if ((p_inq->inqparms.mode & BTM_BR_INQUIRY_MASK) != 0) { in BTM_CancelInquiry()
678 if ((p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) != 0) in BTM_CancelInquiry()
687 p_inq->inq_counter++; in BTM_CancelInquiry()
734 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in BTM_StartInquiry() local
742 if (p_inq->inq_active || p_inq->inqfilt_active) { in BTM_StartInquiry()
744 if (p_inq->scan_type == INQ_LE_OBSERVE && in BTM_StartInquiry()
745 p_inq->p_inq_ble_results_cb != nullptr) { in BTM_StartInquiry()
747 p_inq->scan_type = INQ_GENERAL; in BTM_StartInquiry()
748 p_inq->inq_active = BTM_INQUIRY_INACTIVE; in BTM_StartInquiry()
756 p_inq->scan_type = INQ_GENERAL; in BTM_StartInquiry()
776 p_inq->inqparms = *p_inqparms; in BTM_StartInquiry()
779 p_inq->state = BTM_INQ_ACTIVE_STATE; in BTM_StartInquiry()
780 p_inq->p_inq_cmpl_cb = p_cmpl_cb; in BTM_StartInquiry()
781 p_inq->p_inq_results_cb = p_results_cb; in BTM_StartInquiry()
782 p_inq->inq_cmpl_info.num_resp = 0; /* Clear the results counter */ in BTM_StartInquiry()
783 p_inq->inq_active = p_inqparms->mode; in BTM_StartInquiry()
786 p_inq->inq_active); in BTM_StartInquiry()
793 p_inq->inqparms.mode &= ~BTM_BLE_INQUIRY_MASK; in BTM_StartInquiry()
802 p_inq->inqparms.mode &= ~BTM_BLE_INQUIRY_MASK; in BTM_StartInquiry()
824 p_inq->state = BTM_INQ_SET_FILT_STATE; in BTM_StartInquiry()
831 p_inq->state = BTM_INQ_CLR_FILT_STATE; in BTM_StartInquiry()
848 p_inq->state = BTM_INQ_INACTIVE_STATE; in BTM_StartInquiry()
910 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in BTM_CancelRemoteDeviceName() local
915 if (p_inq->remname_active) { in BTM_CancelRemoteDeviceName()
916 if (BTM_UseLeLink(p_inq->remname_bda)) { in BTM_CancelRemoteDeviceName()
917 if (btm_ble_cancel_remote_name(p_inq->remname_bda)) in BTM_CancelRemoteDeviceName()
922 btsnd_hcic_rmt_name_req_cancel(p_inq->remname_bda); in BTM_CancelRemoteDeviceName()
1019 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in BTM_ClearInqDb() local
1022 if (p_inq->inq_active != BTM_INQUIRY_INACTIVE || p_inq->inqfilt_active) in BTM_ClearInqDb()
1072 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_inq_db_reset() local
1078 if (p_inq->inq_active != BTM_INQUIRY_INACTIVE) { in btm_inq_db_reset()
1079 temp_inq_active = p_inq->inq_active; /* Save so state can change BEFORE in btm_inq_db_reset()
1081 p_inq->inq_active = BTM_INQUIRY_INACTIVE; in btm_inq_db_reset()
1087 if (p_inq->p_inq_cmpl_cb) { in btm_inq_db_reset()
1089 (*p_inq->p_inq_cmpl_cb)(&num_responses); in btm_inq_db_reset()
1096 if (p_inq->remname_active) { in btm_inq_db_reset()
1097 alarm_cancel(p_inq->remote_name_timer); in btm_inq_db_reset()
1098 p_inq->remname_active = false; in btm_inq_db_reset()
1099 p_inq->remname_bda = RawAddress::kEmpty; in btm_inq_db_reset()
1101 if (p_inq->p_remname_cmpl_cb) { in btm_inq_db_reset()
1104 (*p_inq->p_remname_cmpl_cb)(&rem_name); in btm_inq_db_reset()
1105 p_inq->p_remname_cmpl_cb = NULL; in btm_inq_db_reset()
1111 if (p_inq->inqfilt_active) { in btm_inq_db_reset()
1112 p_inq->inqfilt_active = false; in btm_inq_db_reset()
1114 if (p_inq->p_inqfilter_cmpl_cb) { in btm_inq_db_reset()
1116 (*p_inq->p_inqfilter_cmpl_cb)(&status); in btm_inq_db_reset()
1120 p_inq->state = BTM_INQ_INACTIVE_STATE; in btm_inq_db_reset()
1121 p_inq->pending_filt_complete_event = 0; in btm_inq_db_reset()
1122 p_inq->p_inq_results_cb = NULL; in btm_inq_db_reset()
1126 p_inq->discoverable_mode = BTM_NON_DISCOVERABLE; in btm_inq_db_reset()
1127 p_inq->connectable_mode = BTM_NON_CONNECTABLE; in btm_inq_db_reset()
1128 p_inq->page_scan_type = BTM_SCAN_TYPE_STANDARD; in btm_inq_db_reset()
1129 p_inq->inq_scan_type = BTM_SCAN_TYPE_STANDARD; in btm_inq_db_reset()
1131 p_inq->discoverable_mode |= BTM_BLE_NON_DISCOVERABLE; in btm_inq_db_reset()
1132 p_inq->connectable_mode |= BTM_BLE_NON_CONNECTABLE; in btm_inq_db_reset()
1215 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_clr_inq_db() local
1216 tINQ_DB_ENT* p_ent = p_inq->inq_db; in btm_clr_inq_db()
1248 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_clr_inq_result_flt() local
1250 osi_free_and_reset((void**)&p_inq->p_bd_db); in btm_clr_inq_result_flt()
1251 p_inq->num_bd_entries = 0; in btm_clr_inq_result_flt()
1252 p_inq->max_bd_entries = 0; in btm_clr_inq_result_flt()
1266 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_inq_find_bdaddr() local
1267 tINQ_BDADDR* p_db = &p_inq->p_bd_db[0]; in btm_inq_find_bdaddr()
1271 if ((p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) || !p_db) in btm_inq_find_bdaddr()
1274 for (xx = 0; xx < p_inq->num_bd_entries; xx++, p_db++) { in btm_inq_find_bdaddr()
1275 if (p_db->bd_addr == p_bda && p_db->inq_count == p_inq->inq_counter) in btm_inq_find_bdaddr()
1279 if (xx < p_inq->max_bd_entries) { in btm_inq_find_bdaddr()
1280 p_db->inq_count = p_inq->inq_counter; in btm_inq_find_bdaddr()
1282 p_inq->num_bd_entries++; in btm_inq_find_bdaddr()
1440 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_event_filter_complete() local
1441 tBTM_CMPL_CB* p_cb = p_inq->p_inqfilter_cmpl_cb; in btm_event_filter_complete()
1451 if (p_inq->pending_filt_complete_event) { in btm_event_filter_complete()
1452 p_inq->pending_filt_complete_event--; in btm_event_filter_complete()
1458 if (p_inq->inqfilt_active) { in btm_event_filter_complete()
1474 if (p_inq->state == BTM_INQ_INACTIVE_STATE) { in btm_event_filter_complete()
1475 p_inq->inqfilt_active = false; in btm_event_filter_complete()
1486 (uint8_t)(p_inq->inqparms.mode & BTM_BR_INQUIRY_MASK)); in btm_event_filter_complete()
1490 p_inq->inqfilt_active = false; in btm_event_filter_complete()
1491 p_inq->inq_active = BTM_INQUIRY_INACTIVE; in btm_event_filter_complete()
1492 p_inq->state = BTM_INQ_INACTIVE_STATE; in btm_event_filter_complete()
1498 if (p_inq->state == BTM_INQ_CLR_FILT_STATE) { in btm_event_filter_complete()
1499 status = btm_set_inq_event_filter(p_inq->inqparms.filter_cond_type, in btm_event_filter_complete()
1500 &p_inq->inqparms.filter_cond); in btm_event_filter_complete()
1502 p_inq->state = BTM_INQ_SET_FILT_STATE; in btm_event_filter_complete()
1506 p_inq->inqfilt_active = false; in btm_event_filter_complete()
1511 (uint8_t)(p_inq->inqparms.mode & BTM_BR_INQUIRY_MASK)); in btm_event_filter_complete()
1515 p_inq->state = BTM_INQ_ACTIVE_STATE; in btm_event_filter_complete()
1516 p_inq->inqfilt_active = false; in btm_event_filter_complete()
1517 btm_initiate_inquiry(p_inq); in btm_event_filter_complete()
1548 static void btm_initiate_inquiry(tBTM_INQUIRY_VAR_ST* p_inq) { in btm_initiate_inquiry() argument
1550 tBTM_INQ_PARMS* p_inqparms = &p_inq->inqparms; in btm_initiate_inquiry()
1560 if (p_inq->inq_active & BTM_SSP_INQUIRY_ACTIVE) { in btm_initiate_inquiry()
1572 lap = (p_inq->inq_active & BTM_LIMITED_INQUIRY_ACTIVE) ? &limited_inq_lap in btm_initiate_inquiry()
1575 if (p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) { in btm_initiate_inquiry()
1576 btsnd_hcic_per_inq_mode(p_inq->per_max_delay, p_inq->per_min_delay, *lap, in btm_initiate_inquiry()
1582 p_inq->p_bd_db = (tINQ_BDADDR*)osi_calloc(BT_DEFAULT_BUFFER_SIZE); in btm_initiate_inquiry()
1583 p_inq->max_bd_entries = in btm_initiate_inquiry()
1613 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_process_inq_results() local
1614 tBTM_INQ_RESULTS_CB* p_inq_results_cb = p_inq->p_inq_results_cb; in btm_process_inq_results()
1630 if (!(p_inq->inq_active & BTM_BR_INQ_ACTIVE_MASK)) return; in btm_process_inq_results()
1664 if (p_inq->inqparms.max_resps && in btm_process_inq_results()
1665 p_inq->inq_cmpl_info.num_resp >= p_inq->inqparms.max_resps in btm_process_inq_results()
1684 if (p_inq->inqparms.report_dup && (rssi != 0) && p_i && in btm_process_inq_results()
1720 else if (p_i->inq_count == p_inq->inq_counter && in btm_process_inq_results()
1743 if (p_i->inq_count != p_inq->inq_counter) in btm_process_inq_results()
1744 p_inq->inq_cmpl_info.num_resp++; /* A new response was found */ in btm_process_inq_results()
1747 if (p_i->inq_count != p_inq->inq_counter) { in btm_process_inq_results()
1752 p_i->inq_count = p_inq->inq_counter; /* Mark entry for current inquiry */ in btm_process_inq_results()
1756 if (!(p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) && in btm_process_inq_results()
1757 p_inq->inqparms.max_resps && in btm_process_inq_results()
1758 p_inq->inq_cmpl_info.num_resp == p_inq->inqparms.max_resps && in btm_process_inq_results()
1760 ((((p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) != 0) && in btm_process_inq_results()
1762 (p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) == 0)) { in btm_process_inq_results()
1767 if ((p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) != 0) in btm_process_inq_results()
1845 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_process_inq_complete() local
1847 p_inq->inqparms.mode &= ~(mode); in btm_process_inq_complete()
1849 if (p_inq->scan_type == INQ_LE_OBSERVE && !p_inq->inq_active) { in btm_process_inq_complete()
1851 p_inq->p_inq_ble_results_cb = NULL; in btm_process_inq_complete()
1852 p_inq->p_inq_ble_cmpl_cb = NULL; in btm_process_inq_complete()
1853 p_inq->scan_type = INQ_NONE; in btm_process_inq_complete()
1864 if (p_inq->inq_active) { in btm_process_inq_complete()
1865 p_inq->inq_cmpl_info.status = (tBTM_STATUS)( in btm_process_inq_complete()
1870 if (!(p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) && in btm_process_inq_complete()
1871 p_inq->inqparms.mode == 0) { in btm_process_inq_complete()
1873 p_inq->state = BTM_INQ_INACTIVE_STATE; in btm_process_inq_complete()
1876 p_inq->inq_counter++; in btm_process_inq_complete()
1880 if ((p_inq->inq_cmpl_info.status == BTM_SUCCESS) && in btm_process_inq_complete()
1886 p_inq->p_inq_results_cb = NULL; in btm_process_inq_complete()
1887 p_inq->inq_active = BTM_INQUIRY_INACTIVE; in btm_process_inq_complete()
1888 p_inq->p_inq_cmpl_cb = NULL; in btm_process_inq_complete()
1892 p_inq->inq_cmpl_info.status, in btm_process_inq_complete()
1893 p_inq->inq_cmpl_info.num_resp); in btm_process_inq_complete()
1895 if (p_inq_cb) (p_inq_cb)((tBTM_INQUIRY_CMPL*)&p_inq->inq_cmpl_info); in btm_process_inq_complete()
1898 if (p_inq->inqparms.mode == 0 && in btm_process_inq_complete()
1899 p_inq->scan_type == INQ_GENERAL) // this inquiry is complete in btm_process_inq_complete()
1901 p_inq->scan_type = INQ_NONE; in btm_process_inq_complete()
1903 if (p_inq->p_inq_ble_results_cb != NULL) { in btm_process_inq_complete()
1905 BTM_BleObserve(1, 0, p_inq->p_inq_ble_results_cb, in btm_process_inq_complete()
1906 p_inq->p_inq_ble_cmpl_cb); in btm_process_inq_complete()
1955 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_initiate_rem_name() local
1968 if (p_inq->remname_active) { in btm_initiate_rem_name()
1973 p_inq->p_remname_cmpl_cb = p_cb; in btm_initiate_rem_name()
1974 p_inq->remname_bda = remote_bda; in btm_initiate_rem_name()
1976 alarm_set_on_mloop(p_inq->remote_name_timer, timeout_ms, in btm_initiate_rem_name()
1993 p_inq->remname_active = true; in btm_initiate_rem_name()
2015 tBTM_INQUIRY_VAR_ST* p_inq = &btm_cb.btm_inq_vars; in btm_process_remote_name() local
2016 tBTM_CMPL_CB* p_cb = p_inq->p_remname_cmpl_cb; in btm_process_remote_name()
2025 VLOG(2) << "Inquire BDA " << p_inq->remname_bda; in btm_process_remote_name()
2029 if ((p_inq->remname_active) && (!bda || (*bda == p_inq->remname_bda))) { in btm_process_remote_name()
2030 if (BTM_UseLeLink(p_inq->remname_bda)) { in btm_process_remote_name()
2032 btm_ble_cancel_remote_name(p_inq->remname_bda); in btm_process_remote_name()
2034 alarm_cancel(p_inq->remote_name_timer); in btm_process_remote_name()
2035 p_inq->remname_active = false; in btm_process_remote_name()
2065 p_inq->remname_bda = RawAddress::kEmpty; in btm_process_remote_name()
2067 p_inq->p_remname_cmpl_cb = NULL; in btm_process_remote_name()