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