}
if (!update)
result &= ~BTM_BLE_INQ_RESULT;
-#if BTM_USE_INQ_RESULTS_FILTER == TRUE
/* If the number of responses found and limited, issue a cancel inquiry */
if (p_inq->inqparms.max_resps &&
p_inq->inq_cmpl_info.num_resp == p_inq->inqparms.max_resps)
btm_acl_update_busy_level (BTM_BLI_INQ_DONE_EVT);
}
}
-#endif
/* background connection in selective connection mode */
if (btm_cb.ble_ctr_cb.bg_conn_type == BTM_BLE_CONN_SELECTIVE)
{
*******************************************************************************/
static void btm_clr_inq_result_flt (void)
{
-#if BTM_USE_INQ_RESULTS_FILTER == TRUE
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
if (p_inq->p_bd_db)
}
p_inq->num_bd_entries = 0;
p_inq->max_bd_entries = 0;
-#endif
}
/*******************************************************************************
*******************************************************************************/
BOOLEAN btm_inq_find_bdaddr (BD_ADDR p_bda)
{
-#if BTM_USE_INQ_RESULTS_FILTER == TRUE
tBTM_INQUIRY_VAR_ST *p_inq = &btm_cb.btm_inq_vars;
tINQ_BDADDR *p_db = &p_inq->p_bd_db[0];
UINT16 xx;
p_inq->num_bd_entries++;
}
-#endif
/* If here, New Entry */
return (FALSE);
}
}
else
{
-#if BTM_USE_INQ_RESULTS_FILTER == TRUE
btm_clr_inq_result_flt();
/* Allocate memory to hold bd_addrs responding */
}
if (!btsnd_hcic_inquiry(*lap, p_inqparms->duration, 0))
-#else
- if (!btsnd_hcic_inquiry(*lap, p_inqparms->duration, p_inqparms->max_resps))
-#endif /* BTM_USE_INQ_RESULTS_FILTER */
btm_process_inq_complete (BTM_NO_RESOURCES, (UINT8)(p_inqparms->mode & BTM_BR_INQUIRY_MASK));
}
}
p_i = btm_inq_db_find (bda);
-#if BTM_USE_INQ_RESULTS_FILTER == TRUE
/* Only process the num_resp is smaller than max_resps.
If results are queued to BTU task while canceling inquiry,
or when more than one result is in this response, > max_resp
/* BTM_TRACE_WARNING("INQ RES: Extra Response Received...ignoring"); */
return;
}
-#endif
/* Check if this address has already been processed for this inquiry */
if (btm_inq_find_bdaddr(bda))
#endif
p_i->inq_count = p_inq->inq_counter; /* Mark entry for current inquiry */
-#if BTM_USE_INQ_RESULTS_FILTER == TRUE
/* If the number of responses found and not unlimited, issue a cancel inquiry */
if (!(p_inq->inq_active & BTM_PERIODIC_INQUIRY_ACTIVE) &&
p_inq->inqparms.max_resps &&
#endif
btm_acl_update_busy_level (BTM_BLI_INQ_DONE_EVT);
}
-#endif
/* Initialize flag to FALSE. This flag is set/used by application */
p_i->inq_info.appl_knows_rem_name = FALSE;
}
#define BTM_MIN_INQ_TX_POWER -70
#define BTM_MAX_INQ_TX_POWER 20
-#if BTM_USE_INQ_RESULTS_FILTER == TRUE
typedef struct
{
UINT32 inq_count; /* Used for determining if a response has already been */
/* the same device. */
BD_ADDR bd_addr;
} tINQ_BDADDR;
-#endif
typedef struct
{
/* Used for determining whether or not duplicate devices */
/* have responded to the same inquiry */
TIMER_LIST_ENT inq_timer_ent;
-#if BTM_USE_INQ_RESULTS_FILTER == TRUE
tINQ_BDADDR *p_bd_db; /* Pointer to memory that holds bdaddrs */
UINT16 num_bd_entries; /* Number of entries in database */
UINT16 max_bd_entries; /* Maximum number of entries that can be stored */
-#endif
tINQ_DB_ENT inq_db[BTM_INQ_DB_SIZE];
tBTM_INQ_PARMS inqparms; /* Contains the parameters for the current inquiry */
tBTM_INQUIRY_CMPL inq_cmpl_info; /* Status and number of responses from the last inquiry */