• Home
  • Raw
  • Download

Lines Matching refs:p_inq

145 static void         btm_initiate_inquiry (tBTM_INQUIRY_VAR_ST *p_inq);
481 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in BTM_SetPeriodicInquiryMode() local
493 if (p_inq->inq_active || p_inq->inqfilt_active) in BTM_SetPeriodicInquiryMode()
516 p_inq->inqparms = *p_inqparms; in BTM_SetPeriodicInquiryMode()
517 p_inq->per_min_delay = min_delay; in BTM_SetPeriodicInquiryMode()
518 p_inq->per_max_delay = max_delay; in BTM_SetPeriodicInquiryMode()
519 p_inq->inq_cmpl_info.num_resp = 0; /* Clear the results counter */ in BTM_SetPeriodicInquiryMode()
520 p_inq->p_inq_results_cb = p_results_cb; in BTM_SetPeriodicInquiryMode()
522 p_inq->inq_active = (UINT8)((p_inqparms->mode == BTM_LIMITED_INQUIRY) ? in BTM_SetPeriodicInquiryMode()
529 p_inq->state = BTM_INQ_ACTIVE_STATE; in BTM_SetPeriodicInquiryMode()
530 p_inq->inqfilt_active = FALSE; in BTM_SetPeriodicInquiryMode()
531 btm_initiate_inquiry (p_inq); in BTM_SetPeriodicInquiryMode()
540 p_inq->state = BTM_INQ_CLR_FILT_STATE; in BTM_SetPeriodicInquiryMode()
544 p_inq->state = BTM_INQ_SET_FILT_STATE; in BTM_SetPeriodicInquiryMode()
550 p_inq->p_inq_results_cb = NULL; in BTM_SetPeriodicInquiryMode()
551 p_inq->state = BTM_INQ_INACTIVE_STATE; in BTM_SetPeriodicInquiryMode()
574 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in BTM_CancelPeriodicInquiry() local
593 if(p_inq->inqfilt_active) in BTM_CancelPeriodicInquiry()
594 p_inq->pending_filt_complete_event++; in BTM_CancelPeriodicInquiry()
596 p_inq->inqfilt_active = FALSE; in BTM_CancelPeriodicInquiry()
597 p_inq->inq_counter++; in BTM_CancelPeriodicInquiry()
620 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in BTM_SetConnectability() local
631 p_inq->connectable_mode &= (~BTM_BLE_CONNECTABLE_MASK); in BTM_SetConnectability()
632 p_inq->connectable_mode |= (page_mode & BTM_BLE_CONNECTABLE_MASK); in BTM_SetConnectability()
672 if ((window != p_inq->page_scan_window) || in BTM_SetConnectability()
673 (interval != p_inq->page_scan_period)) in BTM_SetConnectability()
675 p_inq->page_scan_window = window; in BTM_SetConnectability()
676 p_inq->page_scan_period = interval; in BTM_SetConnectability()
682 if (p_inq->discoverable_mode & BTM_DISCOVERABLE_MASK) in BTM_SetConnectability()
687 p_inq->connectable_mode &= (~BTM_CONNECTABLE_MASK); in BTM_SetConnectability()
688 p_inq->connectable_mode |= page_mode; in BTM_SetConnectability()
758 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in BTM_CancelInquiry() local
767 if ((p_inq->inq_active &BTM_INQUIRY_ACTIVE_MASK) != 0 && in BTM_CancelInquiry()
768 (!(p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE))) in BTM_CancelInquiry()
770 p_inq->inq_active = BTM_INQUIRY_INACTIVE; in BTM_CancelInquiry()
771 p_inq->state = BTM_INQ_INACTIVE_STATE; in BTM_CancelInquiry()
772 p_inq->p_inq_results_cb = (tBTM_INQ_RESULTS_CB *) NULL; /* Do not notify caller anymore */ in BTM_CancelInquiry()
773 p_inq->p_inq_cmpl_cb = (tBTM_CMPL_CB *) NULL; /* Do not notify caller anymore */ in BTM_CancelInquiry()
777 if (p_inq->inqfilt_active) in BTM_CancelInquiry()
779 p_inq->inqfilt_active = FALSE; in BTM_CancelInquiry()
780 p_inq->pending_filt_complete_event++; in BTM_CancelInquiry()
785 if ((p_inq->inqparms.mode & BTM_BR_INQUIRY_MASK) != 0) in BTM_CancelInquiry()
791 if ((p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) != 0) in BTM_CancelInquiry()
803 p_inq->inq_counter++; in BTM_CancelInquiry()
844 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in BTM_StartInquiry() local
852 if (p_inq->inq_active || p_inq->inqfilt_active) in BTM_StartInquiry()
869 p_inq->inqparms = *p_inqparms; in BTM_StartInquiry()
872 p_inq->state = BTM_INQ_ACTIVE_STATE; in BTM_StartInquiry()
873 p_inq->p_inq_cmpl_cb = p_cmpl_cb; in BTM_StartInquiry()
874 p_inq->p_inq_results_cb = p_results_cb; in BTM_StartInquiry()
875 p_inq->inq_cmpl_info.num_resp = 0; /* Clear the results counter */ in BTM_StartInquiry()
876 p_inq->inq_active = p_inqparms->mode; in BTM_StartInquiry()
878 BTM_TRACE_DEBUG1("BTM_StartInquiry: p_inq->inq_active = 0x%02x", p_inq->inq_active); in BTM_StartInquiry()
886 p_inq->inqparms.mode &= ~ BTM_BLE_INQUIRY_MASK; in BTM_StartInquiry()
894 p_inq->inqparms.mode &= ~ BTM_BLE_INQUIRY_MASK; in BTM_StartInquiry()
909 p_inq->inqfilt_active = FALSE; in BTM_StartInquiry()
910 btm_initiate_inquiry (p_inq); in BTM_StartInquiry()
920 p_inq->state = BTM_INQ_SET_FILT_STATE; in BTM_StartInquiry()
927 p_inq->state = BTM_INQ_CLR_FILT_STATE; in BTM_StartInquiry()
938 p_inq->state = BTM_INQ_INACTIVE_STATE; in BTM_StartInquiry()
1022 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in BTM_CancelRemoteDeviceName() local
1032 if (p_inq->remname_active) in BTM_CancelRemoteDeviceName()
1035 BTM_ReadDevInfo(p_inq->remname_bda, &dev_type, &addr_type); in BTM_CancelRemoteDeviceName()
1038 if (btm_ble_cancel_remote_name(p_inq->remname_bda)) in BTM_CancelRemoteDeviceName()
1045 if (btsnd_hcic_rmt_name_req_cancel (p_inq->remname_bda)) in BTM_CancelRemoteDeviceName()
1228 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in BTM_ClearInqDb() local
1231 if (p_inq->inq_active != BTM_INQUIRY_INACTIVE || in BTM_ClearInqDb()
1232 p_inq->inqfilt_active) in BTM_ClearInqDb()
1376 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in btm_inq_db_reset() local
1381 btu_stop_timer (&p_inq->inq_timer_ent); in btm_inq_db_reset()
1384 if (p_inq->inq_active != BTM_INQUIRY_INACTIVE) in btm_inq_db_reset()
1386 temp_inq_active = p_inq->inq_active; /* Save so state can change BEFORE in btm_inq_db_reset()
1388 p_inq->inq_active = BTM_INQUIRY_INACTIVE; in btm_inq_db_reset()
1394 if (p_inq->p_inq_cmpl_cb) in btm_inq_db_reset()
1397 (*p_inq->p_inq_cmpl_cb)(&num_responses); in btm_inq_db_reset()
1403 if (p_inq->remname_active ) in btm_inq_db_reset()
1405 btu_stop_timer (&p_inq->rmt_name_timer_ent); in btm_inq_db_reset()
1406 p_inq->remname_active = FALSE; in btm_inq_db_reset()
1407 memset(p_inq->remname_bda, 0, BD_ADDR_LEN); in btm_inq_db_reset()
1409 if (p_inq->p_remname_cmpl_cb) in btm_inq_db_reset()
1413 (*p_inq->p_remname_cmpl_cb)(&rem_name); in btm_inq_db_reset()
1414 p_inq->p_remname_cmpl_cb = NULL; in btm_inq_db_reset()
1419 if (p_inq->inqfilt_active) in btm_inq_db_reset()
1421 p_inq->inqfilt_active = FALSE; in btm_inq_db_reset()
1423 if (p_inq->p_inqfilter_cmpl_cb) in btm_inq_db_reset()
1426 (*p_inq->p_inqfilter_cmpl_cb)(&status); in btm_inq_db_reset()
1430 p_inq->state = BTM_INQ_INACTIVE_STATE; in btm_inq_db_reset()
1431 p_inq->pending_filt_complete_event = 0; in btm_inq_db_reset()
1432 p_inq->p_inq_results_cb = NULL; in btm_inq_db_reset()
1436 p_inq->discoverable_mode = BTM_NON_DISCOVERABLE; in btm_inq_db_reset()
1437 p_inq->connectable_mode = BTM_NON_CONNECTABLE; in btm_inq_db_reset()
1438 p_inq->page_scan_type = BTM_SCAN_TYPE_STANDARD; in btm_inq_db_reset()
1439 p_inq->inq_scan_type = BTM_SCAN_TYPE_STANDARD; in btm_inq_db_reset()
1442 p_inq->discoverable_mode |= BTM_BLE_NON_DISCOVERABLE; in btm_inq_db_reset()
1443 p_inq->connectable_mode |= BTM_BLE_NON_CONNECTABLE; in btm_inq_db_reset()
1532 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in btm_clr_inq_db() local
1533 tINQ_DB_ENT *p_ent = p_inq->inq_db; in btm_clr_inq_db()
1578 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in btm_clr_inq_result_flt() local
1580 if (p_inq->p_bd_db) in btm_clr_inq_result_flt()
1582 GKI_freebuf(p_inq->p_bd_db); in btm_clr_inq_result_flt()
1583 p_inq->p_bd_db = NULL; in btm_clr_inq_result_flt()
1585 p_inq->num_bd_entries = 0; in btm_clr_inq_result_flt()
1586 p_inq->max_bd_entries = 0; in btm_clr_inq_result_flt()
1603 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in btm_inq_find_bdaddr() local
1604 tINQ_BDADDR *p_db = &p_inq->p_bd_db[0]; in btm_inq_find_bdaddr()
1608 if ((p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) || !p_db) in btm_inq_find_bdaddr()
1611 for (xx = 0; xx < p_inq->num_bd_entries; xx++, p_db++) in btm_inq_find_bdaddr()
1614 && p_db->inq_count == p_inq->inq_counter) in btm_inq_find_bdaddr()
1618 if (xx < p_inq->max_bd_entries) in btm_inq_find_bdaddr()
1620 p_db->inq_count = p_inq->inq_counter; in btm_inq_find_bdaddr()
1622 p_inq->num_bd_entries++; in btm_inq_find_bdaddr()
1805 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in btm_event_filter_complete() local
1806 tBTM_CMPL_CB *p_cb = p_inq->p_inqfilter_cmpl_cb; in btm_event_filter_complete()
1813 if(p_inq->pending_filt_complete_event) in btm_event_filter_complete()
1815 p_inq->pending_filt_complete_event--; in btm_event_filter_complete()
1821 if (p_inq->inqfilt_active == TRUE ) in btm_event_filter_complete()
1836 if (p_inq->state == BTM_INQ_INACTIVE_STATE) in btm_event_filter_complete()
1838 p_inq->inqfilt_active = FALSE; in btm_event_filter_complete()
1848 …btm_process_inq_complete (BTM_ERR_PROCESSING, (UINT8)(p_inq->inqparms.mode & BTM_BR_INQUIRY_MASK)); in btm_event_filter_complete()
1851 p_inq->inqfilt_active = FALSE; in btm_event_filter_complete()
1852 p_inq->inq_active = BTM_INQUIRY_INACTIVE; in btm_event_filter_complete()
1853 p_inq->state = BTM_INQ_INACTIVE_STATE; in btm_event_filter_complete()
1859 if (p_inq->state == BTM_INQ_CLR_FILT_STATE) in btm_event_filter_complete()
1861 …if ((status = btm_set_inq_event_filter (p_inq->inqparms.filter_cond_type, &p_inq->inqparms.filter_… in btm_event_filter_complete()
1863 p_inq->state = BTM_INQ_SET_FILT_STATE; in btm_event_filter_complete()
1867 p_inq->inqfilt_active = FALSE; in btm_event_filter_complete()
1870 …btm_process_inq_complete (BTM_ERR_PROCESSING, (UINT8)(p_inq->inqparms.mode & BTM_BR_INQUIRY_MASK)); in btm_event_filter_complete()
1875 p_inq->state = BTM_INQ_ACTIVE_STATE; in btm_event_filter_complete()
1876 p_inq->inqfilt_active = FALSE; in btm_event_filter_complete()
1877 btm_initiate_inquiry (p_inq); in btm_event_filter_complete()
1902 static void btm_initiate_inquiry (tBTM_INQUIRY_VAR_ST *p_inq) in btm_initiate_inquiry() argument
1905 tBTM_INQ_PARMS *p_inqparms = &p_inq->inqparms; in btm_initiate_inquiry()
1915 if (p_inq->inq_active & BTM_SSP_INQUIRY_ACTIVE) in btm_initiate_inquiry()
1924 lap = (p_inq->inq_active & BTM_LIMITED_INQUIRY_ACTIVE) ? &limited_inq_lap : &general_inq_lap; in btm_initiate_inquiry()
1926 if (p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) in btm_initiate_inquiry()
1928 if (!btsnd_hcic_per_inq_mode (p_inq->per_max_delay, in btm_initiate_inquiry()
1929 p_inq->per_min_delay, in btm_initiate_inquiry()
1940 if ((p_inq->p_bd_db = (tINQ_BDADDR *)GKI_getbuf(GKI_MAX_BUF_SIZE)) != NULL) in btm_initiate_inquiry()
1942 p_inq->max_bd_entries = (UINT16)(GKI_MAX_BUF_SIZE / sizeof(tINQ_BDADDR)); in btm_initiate_inquiry()
1943 memset(p_inq->p_bd_db, 0, GKI_MAX_BUF_SIZE); in btm_initiate_inquiry()
1980 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in btm_process_inq_results() local
1981 tBTM_INQ_RESULTS_CB *p_inq_results_cb = p_inq->p_inq_results_cb; in btm_process_inq_results()
2000 if (!(p_inq->inq_active & BTM_BR_INQ_ACTIVE_MASK)) in btm_process_inq_results()
2033 if (p_inq->inqparms.max_resps && in btm_process_inq_results()
2034 p_inq->inq_cmpl_info.num_resp >= p_inq->inqparms.max_resps in btm_process_inq_results()
2059 if(p_inq->inqparms.report_dup && (rssi != 0) && in btm_process_inq_results()
2104 else if (p_i->inq_count == p_inq->inq_counter in btm_process_inq_results()
2131 if (p_i->inq_count != p_inq->inq_counter) in btm_process_inq_results()
2132 p_inq->inq_cmpl_info.num_resp++; /* A new response was found */ in btm_process_inq_results()
2136 if (p_i->inq_count != p_inq->inq_counter) in btm_process_inq_results()
2144 p_i->inq_count = p_inq->inq_counter; /* Mark entry for current inquiry */ in btm_process_inq_results()
2148 if (!(p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) && in btm_process_inq_results()
2149 p_inq->inqparms.max_resps && in btm_process_inq_results()
2150 p_inq->inq_cmpl_info.num_resp == p_inq->inqparms.max_resps in btm_process_inq_results()
2153 && ((((p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) != 0) && in btm_process_inq_results()
2155 (p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) == 0) in btm_process_inq_results()
2163 if ((p_inq->inqparms.mode & BTM_BLE_INQUIRY_MASK) != 0) in btm_process_inq_results()
2233 if (p_inq->p_inq_change_cb) in btm_process_inq_results()
2234 (*p_inq->p_inq_change_cb) (&p_i->inq_info, TRUE); in btm_process_inq_results()
2296 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in btm_process_inq_complete() local
2303 p_inq->inqparms.mode &= ~(mode); in btm_process_inq_complete()
2313 if (p_inq->inq_active) in btm_process_inq_complete()
2315p_inq->inq_cmpl_info.status = (tBTM_STATUS)((status == HCI_SUCCESS) ? BTM_SUCCESS : BTM_ERR_PROCES… in btm_process_inq_complete()
2318 if (p_inq->inq_cmpl_info.status == BTM_SUCCESS) in btm_process_inq_complete()
2339 if (!(p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) && p_inq->inqparms.mode == 0) in btm_process_inq_complete()
2341 p_inq->state = BTM_INQ_INACTIVE_STATE; in btm_process_inq_complete()
2344 p_inq->inq_counter++; in btm_process_inq_complete()
2348 if((p_inq->inq_cmpl_info.status == BTM_SUCCESS) && in btm_process_inq_complete()
2355 p_inq->p_inq_results_cb = (tBTM_INQ_RESULTS_CB *) NULL; in btm_process_inq_complete()
2356 p_inq->inq_active = BTM_INQUIRY_INACTIVE; in btm_process_inq_complete()
2357 p_inq->p_inq_cmpl_cb = (tBTM_CMPL_CB *) NULL; in btm_process_inq_complete()
2361 p_inq->inq_cmpl_info.status, p_inq->inq_cmpl_info.num_resp); in btm_process_inq_complete()
2364 (p_inq_cb)((tBTM_INQUIRY_CMPL *) &p_inq->inq_cmpl_info); in btm_process_inq_complete()
2416 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in btm_initiate_rem_name() local
2437 if (p_inq->remname_active) in btm_initiate_rem_name()
2444 p_inq->p_remname_cmpl_cb = p_cb; in btm_initiate_rem_name()
2445 memcpy(p_inq->remname_bda, remote_bda, BD_ADDR_LEN); in btm_initiate_rem_name()
2446 btu_start_timer (&p_inq->rmt_name_timer_ent, in btm_initiate_rem_name()
2466 p_inq->remname_active = TRUE; in btm_initiate_rem_name()
2523 tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars; in btm_process_remote_name() local
2524 tBTM_CMPL_CB *p_cb = p_inq->p_remname_cmpl_cb; in btm_process_remote_name()
2549 …BTM_TRACE_EVENT6("Inquire BDA %02x:%02x:%02x:%02x:%02x:%02x",p_inq->remname_bda[0], p_inq->remname… in btm_process_remote_name()
2550 p_inq->remname_bda[2], p_inq->remname_bda[3], in btm_process_remote_name()
2551 p_inq->remname_bda[4], p_inq->remname_bda[5]); in btm_process_remote_name()
2556 if ((p_inq->remname_active ==TRUE)&& in btm_process_remote_name()
2558 (memcmp(bda, p_inq->remname_bda,BD_ADDR_LEN)==0)) || bda == NULL)) in btm_process_remote_name()
2562 BTM_ReadDevInfo(p_inq->remname_bda, &dev_type, &addr_type); in btm_process_remote_name()
2566 btm_ble_cancel_remote_name(p_inq->remname_bda); in btm_process_remote_name()
2569 btu_stop_timer (&p_inq->rmt_name_timer_ent); in btm_process_remote_name()
2570 p_inq->remname_active = FALSE; in btm_process_remote_name()
2603 memset(p_inq->remname_bda, 0, BD_ADDR_LEN); in btm_process_remote_name()
2605 p_inq->p_remname_cmpl_cb = NULL; in btm_process_remote_name()
2652 if (p_inq->inq_active) in btm_process_remote_name()
2683 p_inq_cb = p_inq->p_inq_cmpl_cb; in btm_process_remote_name()
2684 p_inq->state = BTM_INQ_INACTIVE_STATE; in btm_process_remote_name()
2685 p_inq->inq_active = BTM_INQUIRY_INACTIVE; in btm_process_remote_name()
2686 p_inq->p_inq_cmpl_cb = NULL; in btm_process_remote_name()
2690 (p_inq_cb)((tBTM_INQUIRY_CMPL *) &p_inq->inq_cmpl_info); in btm_process_remote_name()