From: Chris Manton Date: Thu, 23 Oct 2014 19:36:14 +0000 (-0700) Subject: Remove always true BTM_USE_INQ_RESULTS_FILTER X-Git-Tag: android-x86-7.1-r1~1277^2~125 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=34b6a92011ac1ed94c9eaf4da9cbd1e7bfaef910;p=android-x86%2Fsystem-bt.git Remove always true BTM_USE_INQ_RESULTS_FILTER --- diff --git a/include/bt_target.h b/include/bt_target.h index 83bb0d18f..cae01534c 100644 --- a/include/bt_target.h +++ b/include/bt_target.h @@ -455,11 +455,6 @@ extern "C" { #define BTM_INQ_DB_SIZE 40 #endif -/* TRUE if inquiry filtering is desired from BTM. */ -#ifndef BTM_USE_INQ_RESULTS_FILTER -#define BTM_USE_INQ_RESULTS_FILTER TRUE -#endif - /* The default scan mode */ #ifndef BTM_DEFAULT_SCAN_TYPE #define BTM_DEFAULT_SCAN_TYPE BTM_SCAN_TYPE_INTERLACED diff --git a/stack/btm/btm_ble_gap.c b/stack/btm/btm_ble_gap.c index 4249b4b04..535fe3188 100644 --- a/stack/btm/btm_ble_gap.c +++ b/stack/btm/btm_ble_gap.c @@ -2535,7 +2535,6 @@ static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, UINT8 addr_type, UINT8 evt } 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) @@ -2557,7 +2556,6 @@ static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, UINT8 addr_type, UINT8 evt 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) { diff --git a/stack/btm/btm_inq.c b/stack/btm/btm_inq.c index 7b1e91a40..103553606 100644 --- a/stack/btm/btm_inq.c +++ b/stack/btm/btm_inq.c @@ -1587,7 +1587,6 @@ void btm_clr_inq_db (BD_ADDR p_bda) *******************************************************************************/ 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) @@ -1597,7 +1596,6 @@ static void btm_clr_inq_result_flt (void) } p_inq->num_bd_entries = 0; p_inq->max_bd_entries = 0; -#endif } /******************************************************************************* @@ -1612,7 +1610,6 @@ static void btm_clr_inq_result_flt (void) *******************************************************************************/ 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; @@ -1635,7 +1632,6 @@ BOOLEAN btm_inq_find_bdaddr (BD_ADDR p_bda) p_inq->num_bd_entries++; } -#endif /* If here, New Entry */ return (FALSE); } @@ -1931,7 +1927,6 @@ static void btm_initiate_inquiry (tBTM_INQUIRY_VAR_ST *p_inq) } else { -#if BTM_USE_INQ_RESULTS_FILTER == TRUE btm_clr_inq_result_flt(); /* Allocate memory to hold bd_addrs responding */ @@ -1944,9 +1939,6 @@ static void btm_initiate_inquiry (tBTM_INQUIRY_VAR_ST *p_inq) } 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)); } } @@ -2017,7 +2009,6 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode) 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 @@ -2038,7 +2029,6 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode) /* 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)) @@ -2127,7 +2117,6 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode) #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 && @@ -2149,7 +2138,6 @@ void btm_process_inq_results (UINT8 *p, UINT8 inq_res_mode) #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; } diff --git a/stack/btm/btm_int.h b/stack/btm/btm_int.h index 24b9287fc..1d41eb821 100644 --- a/stack/btm/btm_int.h +++ b/stack/btm/btm_int.h @@ -209,7 +209,6 @@ typedef struct #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 */ @@ -218,7 +217,6 @@ typedef struct /* the same device. */ BD_ADDR bd_addr; } tINQ_BDADDR; -#endif typedef struct { @@ -280,11 +278,9 @@ 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 */