mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fix(ble/bluedroid): Delete BLE_ANDROID_CONTROLLER_SCAN_FILTER
This commit is contained in:
@@ -6353,142 +6353,6 @@ void bta_ble_scan_setup_cb(tBTM_BLE_BATCH_SCAN_EVT evt, tBTM_BLE_REF_VALUE ref_v
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function bta_ble_scan_pf_cmpl
|
||||
**
|
||||
** Description ADV payload filtering operation complete callback
|
||||
**
|
||||
**
|
||||
** Returns TRUE if handled, otherwise FALSE.
|
||||
**
|
||||
*******************************************************************************/
|
||||
static void bta_ble_scan_cfg_cmpl(tBTM_BLE_PF_ACTION action, tBTM_BLE_SCAN_COND_OP cfg_op,
|
||||
tBTM_BLE_PF_AVBL_SPACE avbl_space, tBTM_STATUS status,
|
||||
tBTM_BLE_REF_VALUE ref_value)
|
||||
{
|
||||
tBTA_STATUS st = (status == BTM_SUCCESS) ? BTA_SUCCESS : BTA_FAILURE;
|
||||
|
||||
APPL_TRACE_DEBUG("bta_ble_scan_cfg_cmpl: %d, %d, %d, %d", action, cfg_op, avbl_space, status);
|
||||
|
||||
if (bta_dm_cb.p_scan_filt_cfg_cback) {
|
||||
bta_dm_cb.p_scan_filt_cfg_cback(action, cfg_op, avbl_space, st, ref_value);
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function bta_dm_cfg_filter_cond
|
||||
**
|
||||
** Description This function configure adv payload filtering condition
|
||||
**
|
||||
** Parameters:
|
||||
**
|
||||
*******************************************************************************/
|
||||
void bta_dm_cfg_filter_cond (tBTA_DM_MSG *p_data)
|
||||
{
|
||||
tBTM_STATUS st = BTM_MODE_UNSUPPORTED;
|
||||
tBTA_STATUS status = BTA_FAILURE;
|
||||
|
||||
tBTM_BLE_VSC_CB cmn_vsc_cb;
|
||||
|
||||
APPL_TRACE_DEBUG("bta_dm_cfg_filter_cond");
|
||||
BTM_BleGetVendorCapabilities(&cmn_vsc_cb);
|
||||
if (0 != cmn_vsc_cb.filter_support) {
|
||||
if ((st = BTM_BleCfgFilterCondition(p_data->ble_cfg_filter_cond.action,
|
||||
p_data->ble_cfg_filter_cond.cond_type,
|
||||
(tBTM_BLE_PF_FILT_INDEX)p_data->ble_cfg_filter_cond.filt_index,
|
||||
(tBTM_BLE_PF_COND_PARAM *)p_data->ble_cfg_filter_cond.p_cond_param,
|
||||
bta_ble_scan_cfg_cmpl, p_data->ble_cfg_filter_cond.ref_value))
|
||||
== BTM_CMD_STARTED) {
|
||||
bta_dm_cb.p_scan_filt_cfg_cback = p_data->ble_cfg_filter_cond.p_filt_cfg_cback;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (p_data->ble_cfg_filter_cond.p_filt_cfg_cback) {
|
||||
p_data->ble_cfg_filter_cond.p_filt_cfg_cback(BTA_DM_BLE_PF_CONFIG_EVT,
|
||||
p_data->ble_cfg_filter_cond.cond_type, 0, status,
|
||||
p_data->ble_cfg_filter_cond.ref_value);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function bta_dm_enable_scan_filter
|
||||
**
|
||||
** Description This function enable/disable adv payload filtering condition
|
||||
**
|
||||
** Parameters:
|
||||
**
|
||||
*******************************************************************************/
|
||||
void bta_dm_enable_scan_filter(tBTA_DM_MSG *p_data)
|
||||
{
|
||||
tBTM_STATUS st = BTM_MODE_UNSUPPORTED;
|
||||
tBTA_STATUS status = BTA_FAILURE;
|
||||
|
||||
tBTM_BLE_VSC_CB cmn_vsc_cb;
|
||||
APPL_TRACE_DEBUG("bta_dm_enable_scan_filter");
|
||||
BTM_BleGetVendorCapabilities(&cmn_vsc_cb);
|
||||
|
||||
if (0 != cmn_vsc_cb.filter_support) {
|
||||
if ((st = BTM_BleEnableDisableFilterFeature(p_data->ble_enable_scan_filt.action,
|
||||
p_data->ble_enable_scan_filt.p_filt_status_cback,
|
||||
(tBTM_BLE_REF_VALUE)p_data->ble_enable_scan_filt.ref_value)) == BTM_CMD_STARTED) {
|
||||
bta_dm_cb.p_scan_filt_status_cback = p_data->ble_enable_scan_filt.p_filt_status_cback;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_data->ble_enable_scan_filt.p_filt_status_cback) {
|
||||
p_data->ble_enable_scan_filt.p_filt_status_cback (BTA_DM_BLE_PF_ENABLE_EVT,
|
||||
p_data->ble_enable_scan_filt.ref_value, status);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function bta_dm_scan_filter_param_setup
|
||||
**
|
||||
** Description This function sets up scan filter params
|
||||
**
|
||||
** Parameters:
|
||||
**
|
||||
*******************************************************************************/
|
||||
void bta_dm_scan_filter_param_setup (tBTA_DM_MSG *p_data)
|
||||
{
|
||||
tBTM_STATUS st = BTM_MODE_UNSUPPORTED;
|
||||
tBTA_STATUS status = BTA_FAILURE;
|
||||
|
||||
tBTM_BLE_VSC_CB cmn_vsc_cb;
|
||||
|
||||
APPL_TRACE_DEBUG("bta_dm_scan_filter_param_setup");
|
||||
BTM_BleGetVendorCapabilities(&cmn_vsc_cb);
|
||||
if (0 != cmn_vsc_cb.filter_support) {
|
||||
if ((st = BTM_BleAdvFilterParamSetup(p_data->ble_scan_filt_param_setup.action,
|
||||
p_data->ble_scan_filt_param_setup.filt_index,
|
||||
(tBTM_BLE_PF_FILT_PARAMS *)&p_data->ble_scan_filt_param_setup.filt_params,
|
||||
p_data->ble_scan_filt_param_setup.p_target,
|
||||
p_data->ble_scan_filt_param_setup.p_filt_param_cback,
|
||||
p_data->ble_scan_filt_param_setup.ref_value)) == BTM_CMD_STARTED) {
|
||||
bta_dm_cb.p_scan_filt_param_cback = p_data->ble_scan_filt_param_setup.p_filt_param_cback;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (p_data->ble_scan_filt_param_setup.p_filt_param_cback) {
|
||||
p_data->ble_scan_filt_param_setup.p_filt_param_cback (BTA_DM_BLE_PF_ENABLE_EVT, 0,
|
||||
p_data->ble_scan_filt_param_setup.ref_value, status);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (BLE_HOST_ENERGY_INFO_EN == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
|
||||
@@ -2078,187 +2078,6 @@ void BTA_DmBleSetKeyMaterial(const uint8_t *session_key, const uint8_t *iv)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_DmBleCfgFilterCondition
|
||||
**
|
||||
** Description This function is called to configure the adv data payload filter
|
||||
** condition.
|
||||
**
|
||||
** Parameters action: to read/write/clear
|
||||
** cond_type: filter condition type
|
||||
** filt_index - Filter index
|
||||
** p_cond: filter condition parameter
|
||||
** p_cmpl_back - Command completed callback
|
||||
** ref_value - Reference value
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
void BTA_DmBleCfgFilterCondition(tBTA_DM_BLE_SCAN_COND_OP action,
|
||||
tBTA_DM_BLE_PF_COND_TYPE cond_type,
|
||||
tBTA_DM_BLE_PF_FILT_INDEX filt_index,
|
||||
tBTA_DM_BLE_PF_COND_PARAM *p_cond,
|
||||
tBTA_DM_BLE_PF_CFG_CBACK *p_cmpl_cback,
|
||||
tBTA_DM_BLE_REF_VALUE ref_value)
|
||||
{
|
||||
#if BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE
|
||||
tBTA_DM_API_CFG_FILTER_COND *p_msg;
|
||||
APPL_TRACE_API ("BTA_DmBleCfgFilterCondition: %d, %d", action, cond_type);
|
||||
|
||||
UINT16 len = sizeof(tBTA_DM_API_CFG_FILTER_COND) +
|
||||
sizeof(tBTA_DM_BLE_PF_COND_PARAM);
|
||||
UINT8 *p;
|
||||
|
||||
if (NULL != p_cond) {
|
||||
switch (cond_type) {
|
||||
case BTA_DM_BLE_PF_SRVC_DATA_PATTERN:
|
||||
case BTA_DM_BLE_PF_MANU_DATA:
|
||||
/* Length of pattern and pattern mask and other elements in */
|
||||
/* tBTA_DM_BLE_PF_MANU_COND */
|
||||
len += ((p_cond->manu_data.data_len) * 2) +
|
||||
sizeof(UINT16) + sizeof(UINT16) + sizeof(UINT8);
|
||||
break;
|
||||
|
||||
case BTA_DM_BLE_PF_LOCAL_NAME:
|
||||
len += ((p_cond->local_name.data_len) + sizeof(UINT8));
|
||||
break;
|
||||
|
||||
case BTM_BLE_PF_SRVC_UUID:
|
||||
case BTM_BLE_PF_SRVC_SOL_UUID:
|
||||
len += sizeof(tBLE_BD_ADDR) + sizeof(tBTA_DM_BLE_PF_COND_MASK);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((p_msg = (tBTA_DM_API_CFG_FILTER_COND *) osi_malloc(len)) != NULL) {
|
||||
memset (p_msg, 0, len);
|
||||
|
||||
p_msg->hdr.event = BTA_DM_API_CFG_FILTER_COND_EVT;
|
||||
p_msg->action = action;
|
||||
p_msg->cond_type = cond_type;
|
||||
p_msg->filt_index = filt_index;
|
||||
p_msg->p_filt_cfg_cback = p_cmpl_cback;
|
||||
p_msg->ref_value = ref_value;
|
||||
if (p_cond) {
|
||||
p_msg->p_cond_param = (tBTA_DM_BLE_PF_COND_PARAM *)(p_msg + 1);
|
||||
memcpy(p_msg->p_cond_param, p_cond, sizeof(tBTA_DM_BLE_PF_COND_PARAM));
|
||||
|
||||
p = (UINT8 *)(p_msg->p_cond_param + 1);
|
||||
|
||||
if (cond_type == BTA_DM_BLE_PF_SRVC_DATA_PATTERN ||
|
||||
cond_type == BTA_DM_BLE_PF_MANU_DATA) {
|
||||
p_msg->p_cond_param->manu_data.p_pattern = p;
|
||||
p_msg->p_cond_param->manu_data.data_len = p_cond->manu_data.data_len;
|
||||
memcpy(p_msg->p_cond_param->manu_data.p_pattern, p_cond->manu_data.p_pattern,
|
||||
p_cond->manu_data.data_len);
|
||||
p += p_cond->manu_data.data_len;
|
||||
|
||||
if (cond_type == BTA_DM_BLE_PF_MANU_DATA) {
|
||||
p_msg->p_cond_param->manu_data.company_id_mask =
|
||||
p_cond->manu_data.company_id_mask;
|
||||
if ( p_cond->manu_data.p_pattern_mask != NULL) {
|
||||
p_msg->p_cond_param->manu_data.p_pattern_mask = p;
|
||||
memcpy(p_msg->p_cond_param->manu_data.p_pattern_mask,
|
||||
p_cond->manu_data.p_pattern_mask, p_cond->manu_data.data_len);
|
||||
}
|
||||
}
|
||||
} else if (cond_type == BTA_DM_BLE_PF_LOCAL_NAME) {
|
||||
p_msg->p_cond_param->local_name.p_data = p;
|
||||
p_msg->p_cond_param->local_name.data_len =
|
||||
p_cond->local_name.data_len;
|
||||
memcpy(p_msg->p_cond_param->local_name.p_data,
|
||||
p_cond->local_name.p_data, p_cond->local_name.data_len);
|
||||
} else if ((cond_type == BTM_BLE_PF_SRVC_UUID
|
||||
|| cond_type == BTM_BLE_PF_SRVC_SOL_UUID)) {
|
||||
if (p_cond->srvc_uuid.p_target_addr != NULL) {
|
||||
p_msg->p_cond_param->srvc_uuid.p_target_addr = (tBLE_BD_ADDR *)(p);
|
||||
p_msg->p_cond_param->srvc_uuid.p_target_addr->type =
|
||||
p_cond->srvc_uuid.p_target_addr->type;
|
||||
memcpy(p_msg->p_cond_param->srvc_uuid.p_target_addr->bda,
|
||||
p_cond->srvc_uuid.p_target_addr->bda, BD_ADDR_LEN);
|
||||
p = (UINT8 *)( p_msg->p_cond_param->srvc_uuid.p_target_addr + 1);
|
||||
}
|
||||
if (p_cond->srvc_uuid.p_uuid_mask) {
|
||||
p_msg->p_cond_param->srvc_uuid.p_uuid_mask = (tBTA_DM_BLE_PF_COND_MASK *)p;
|
||||
memcpy(p_msg->p_cond_param->srvc_uuid.p_uuid_mask,
|
||||
p_cond->srvc_uuid.p_uuid_mask, sizeof(tBTA_DM_BLE_PF_COND_MASK));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bta_sys_sendmsg(p_msg);
|
||||
}
|
||||
#else
|
||||
UNUSED(action);
|
||||
UNUSED(cond_type);
|
||||
UNUSED(filt_index);
|
||||
UNUSED(p_cond);
|
||||
UNUSED(p_cmpl_cback);
|
||||
UNUSED(ref_value);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_DmBleScanFilterSetup
|
||||
**
|
||||
** Description This function is called to setup the adv data payload filter param
|
||||
**
|
||||
** Parameters p_target: enable the filter condition on a target device; if NULL
|
||||
** filt_index - Filter index
|
||||
** p_filt_params -Filter parameters
|
||||
** ref_value - Reference value
|
||||
** action - Add, delete or clear
|
||||
** p_cmpl_back - Command completed callback
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
void BTA_DmBleScanFilterSetup(UINT8 action, tBTA_DM_BLE_PF_FILT_INDEX filt_index,
|
||||
tBTA_DM_BLE_PF_FILT_PARAMS *p_filt_params,
|
||||
tBLE_BD_ADDR *p_target,
|
||||
tBTA_DM_BLE_PF_PARAM_CBACK *p_cmpl_cback,
|
||||
tBTA_DM_BLE_REF_VALUE ref_value)
|
||||
{
|
||||
#if BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE
|
||||
tBTA_DM_API_SCAN_FILTER_PARAM_SETUP *p_msg;
|
||||
APPL_TRACE_API ("BTA_DmBleScanFilterSetup: %d", action);
|
||||
|
||||
UINT16 len = sizeof(tBTA_DM_API_SCAN_FILTER_PARAM_SETUP) + sizeof(tBLE_BD_ADDR);
|
||||
|
||||
if ((p_msg = (tBTA_DM_API_SCAN_FILTER_PARAM_SETUP *) osi_malloc(len)) != NULL) {
|
||||
memset (p_msg, 0, len);
|
||||
|
||||
p_msg->hdr.event = BTA_DM_API_SCAN_FILTER_SETUP_EVT;
|
||||
p_msg->action = action;
|
||||
p_msg->filt_index = filt_index;
|
||||
if (p_filt_params) {
|
||||
memcpy(&p_msg->filt_params, p_filt_params, sizeof(tBTA_DM_BLE_PF_FILT_PARAMS));
|
||||
}
|
||||
p_msg->p_filt_param_cback = p_cmpl_cback;
|
||||
p_msg->ref_value = ref_value;
|
||||
|
||||
if (p_target) {
|
||||
p_msg->p_target = (tBLE_BD_ADDR *)(p_msg + 1);
|
||||
memcpy(p_msg->p_target, p_target, sizeof(tBLE_BD_ADDR));
|
||||
}
|
||||
|
||||
bta_sys_sendmsg(p_msg);
|
||||
}
|
||||
#else
|
||||
UNUSED(action);
|
||||
UNUSED(filt_index);
|
||||
UNUSED(p_filt_params);
|
||||
UNUSED(p_target);
|
||||
UNUSED(p_cmpl_cback);
|
||||
UNUSED(ref_value);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if (BLE_HOST_ENERGY_INFO_EN == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
@@ -2287,45 +2106,6 @@ void BTA_DmBleGetEnergyInfo(tBTA_BLE_ENERGY_INFO_CBACK *p_cmpl_cback)
|
||||
}
|
||||
#endif // #if (BLE_HOST_ENERGY_INFO_EN == TRUE)
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_DmEnableScanFilter
|
||||
**
|
||||
** Description This function is called to enable the adv data payload filter
|
||||
**
|
||||
** Parameters action - enable or disable the APCF feature
|
||||
** p_cmpl_cback - Command completed callback
|
||||
** ref_value - Reference value
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
void BTA_DmEnableScanFilter(UINT8 action, tBTA_DM_BLE_PF_STATUS_CBACK *p_cmpl_cback,
|
||||
tBTA_DM_BLE_REF_VALUE ref_value)
|
||||
{
|
||||
#if BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE
|
||||
tBTA_DM_API_ENABLE_SCAN_FILTER *p_msg;
|
||||
APPL_TRACE_API ("BTA_DmEnableScanFilter: %d\n", action);
|
||||
|
||||
UINT16 len = sizeof(tBTA_DM_API_ENABLE_SCAN_FILTER) + sizeof(tBLE_BD_ADDR);
|
||||
|
||||
if ((p_msg = (tBTA_DM_API_ENABLE_SCAN_FILTER *) osi_malloc(len)) != NULL) {
|
||||
memset (p_msg, 0, len);
|
||||
|
||||
p_msg->hdr.event = BTA_DM_API_SCAN_FILTER_ENABLE_EVT;
|
||||
p_msg->action = action;
|
||||
p_msg->ref_value = ref_value;
|
||||
p_msg->p_filt_status_cback = p_cmpl_cback;
|
||||
|
||||
bta_sys_sendmsg(p_msg);
|
||||
}
|
||||
#else
|
||||
UNUSED(action);
|
||||
UNUSED(p_cmpl_cback);
|
||||
UNUSED(ref_value);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_DmBleUpdateConnectionParams
|
||||
|
||||
@@ -178,11 +178,6 @@ const tBTA_DM_ACTION bta_dm_action[BTA_DM_MAX_EVT] = {
|
||||
bta_dm_ble_broadcast, /* BTA_DM_API_BLE_BROADCAST_EVT */
|
||||
#endif // #if (BLE_42_ADV_EN == TRUE)
|
||||
bta_dm_ble_set_data_length, /* BTA_DM_API_SET_DATA_LENGTH_EVT */
|
||||
#if BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE
|
||||
bta_dm_cfg_filter_cond, /* BTA_DM_API_CFG_FILTER_COND_EVT */
|
||||
bta_dm_scan_filter_param_setup, /* BTA_DM_API_SCAN_FILTER_SETUP_EVT */
|
||||
bta_dm_enable_scan_filter, /* BTA_DM_API_SCAN_FILTER_ENABLE_EVT */
|
||||
#endif
|
||||
#if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
bta_dm_ble_setup_storage, /* BTA_DM_API_BLE_SETUP_STORAGE_EVT */
|
||||
#endif // #if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
|
||||
@@ -162,11 +162,6 @@ enum {
|
||||
BTA_DM_API_BLE_BROADCAST_EVT,
|
||||
#endif // #if (BLE_42_ADV_EN == TRUE)
|
||||
BTA_DM_API_SET_DATA_LENGTH_EVT,
|
||||
#if BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE
|
||||
BTA_DM_API_CFG_FILTER_COND_EVT,
|
||||
BTA_DM_API_SCAN_FILTER_SETUP_EVT,
|
||||
BTA_DM_API_SCAN_FILTER_ENABLE_EVT,
|
||||
#endif
|
||||
#if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
BTA_DM_API_BLE_SETUP_STORAGE_EVT,
|
||||
#endif // #if (BLE_HOST_SETUP_STORAGE_EN == TRUE)
|
||||
@@ -1278,35 +1273,6 @@ typedef struct {
|
||||
UINT16 timeout;
|
||||
} tBTA_DM_API_UPDATE_CONN_PARAM;
|
||||
|
||||
#if BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE
|
||||
typedef struct {
|
||||
BT_HDR hdr;
|
||||
tBTA_DM_BLE_SCAN_COND_OP action;
|
||||
tBTA_DM_BLE_PF_COND_TYPE cond_type;
|
||||
tBTA_DM_BLE_PF_FILT_INDEX filt_index;
|
||||
tBTA_DM_BLE_PF_COND_PARAM *p_cond_param;
|
||||
tBTA_DM_BLE_PF_CFG_CBACK *p_filt_cfg_cback;
|
||||
tBTA_DM_BLE_REF_VALUE ref_value;
|
||||
} tBTA_DM_API_CFG_FILTER_COND;
|
||||
|
||||
typedef struct {
|
||||
BT_HDR hdr;
|
||||
UINT8 action;
|
||||
tBTA_DM_BLE_PF_STATUS_CBACK *p_filt_status_cback;
|
||||
tBTA_DM_BLE_REF_VALUE ref_value;
|
||||
} tBTA_DM_API_ENABLE_SCAN_FILTER;
|
||||
|
||||
typedef struct {
|
||||
BT_HDR hdr;
|
||||
UINT8 action;
|
||||
tBTA_DM_BLE_PF_FILT_INDEX filt_index;
|
||||
tBTA_DM_BLE_PF_FILT_PARAMS filt_params;
|
||||
tBLE_BD_ADDR *p_target;
|
||||
tBTA_DM_BLE_PF_PARAM_CBACK *p_filt_param_cback;
|
||||
tBTA_DM_BLE_REF_VALUE ref_value;
|
||||
} tBTA_DM_API_SCAN_FILTER_PARAM_SETUP;
|
||||
#endif
|
||||
|
||||
#if (BLE_50_DTM_TEST_EN == TRUE)
|
||||
typedef struct {
|
||||
BT_HDR hdr;
|
||||
@@ -1811,11 +1777,6 @@ typedef union {
|
||||
tBTA_DM_API_BLE_ADV_PARAMS_ALL ble_set_adv_params_all;
|
||||
tBTA_DM_API_SET_ADV_CONFIG ble_set_adv_data;
|
||||
tBTA_DM_API_SET_ADV_CONFIG_RAW ble_set_adv_data_raw;
|
||||
#if BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE
|
||||
tBTA_DM_API_SCAN_FILTER_PARAM_SETUP ble_scan_filt_param_setup;
|
||||
tBTA_DM_API_CFG_FILTER_COND ble_cfg_filter_cond;
|
||||
tBTA_DM_API_ENABLE_SCAN_FILTER ble_enable_scan_filt;
|
||||
#endif
|
||||
tBTA_DM_API_UPDATE_CONN_PARAM ble_update_conn_params;
|
||||
tBTA_DM_API_BLE_SET_DATA_LENGTH ble_set_data_length;
|
||||
tBTA_DM_APT_SET_DEV_ADDR set_addr;
|
||||
@@ -2402,11 +2363,6 @@ extern void bta_dm_ble_update_duplicate_exceptional_list(tBTA_DM_MSG *p_data);
|
||||
#if SMP_INCLUDED == TRUE
|
||||
extern void bta_dm_co_security_param_init(void);
|
||||
#endif
|
||||
#if BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE
|
||||
extern void bta_dm_cfg_filter_cond (tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_scan_filter_param_setup (tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_enable_scan_filter(tBTA_DM_MSG *p_data);
|
||||
#endif
|
||||
extern void btm_dm_ble_multi_adv_disable(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_multi_adv_data(tBTA_DM_MSG *p_data);
|
||||
extern void bta_dm_ble_multi_adv_upd_param(tBTA_DM_MSG *p_data);
|
||||
|
||||
@@ -573,7 +573,6 @@ enum {
|
||||
BTA_DM_BLE_SCAN_COND_DELETE,
|
||||
BTA_DM_BLE_SCAN_COND_CLEAR = 2
|
||||
};
|
||||
typedef UINT8 tBTA_DM_BLE_SCAN_COND_OP;
|
||||
|
||||
/* ADV payload filtering vendor specific call event */
|
||||
enum {
|
||||
@@ -581,18 +580,6 @@ enum {
|
||||
BTA_BLE_SCAN_PF_COND_EVT
|
||||
};
|
||||
|
||||
/* filter selection bit index */
|
||||
#define BTA_DM_BLE_PF_ADDR_FILTER BTM_BLE_PF_ADDR_FILTER
|
||||
#define BTA_DM_BLE_PF_SRVC_DATA BTM_BLE_PF_SRVC_DATA
|
||||
#define BTA_DM_BLE_PF_SRVC_UUID BTM_BLE_PF_SRVC_UUID
|
||||
#define BTA_DM_BLE_PF_SRVC_SOL_UUID BTM_BLE_PF_SRVC_SOL_UUID
|
||||
#define BTA_DM_BLE_PF_LOCAL_NAME BTM_BLE_PF_LOCAL_NAME
|
||||
#define BTA_DM_BLE_PF_MANU_DATA BTM_BLE_PF_MANU_DATA
|
||||
#define BTA_DM_BLE_PF_SRVC_DATA_PATTERN BTM_BLE_PF_SRVC_DATA_PATTERN
|
||||
#define BTA_DM_BLE_PF_TYPE_ALL BTM_BLE_PF_TYPE_ALL
|
||||
#define BTA_DM_BLE_PF_TYPE_MAX BTM_BLE_PF_TYPE_MAX
|
||||
typedef UINT8 tBTA_DM_BLE_PF_COND_TYPE;
|
||||
|
||||
typedef union {
|
||||
UINT16 uuid16_mask;
|
||||
UINT32 uuid32_mask;
|
||||
@@ -628,18 +615,6 @@ typedef struct {
|
||||
as data pattern, set to all 0xff, match exact data */
|
||||
} tBTA_DM_BLE_PF_SRVC_PATTERN_COND;
|
||||
|
||||
typedef union {
|
||||
tBLE_BD_ADDR target_addr;
|
||||
tBTA_DM_BLE_PF_LOCAL_NAME_COND local_name; /* local name filtering */
|
||||
tBTA_DM_BLE_PF_MANU_COND manu_data; /* manufacturer data filtering */
|
||||
tBTA_DM_BLE_PF_UUID_COND srvc_uuid; /* service UUID filtering */
|
||||
tBTA_DM_BLE_PF_UUID_COND solicitate_uuid; /* solicited service UUID filtering */
|
||||
tBTA_DM_BLE_PF_SRVC_PATTERN_COND srvc_data; /* service data pattern */
|
||||
} tBTA_DM_BLE_PF_COND_PARAM;
|
||||
|
||||
typedef UINT8 tBTA_DM_BLE_PF_FILT_INDEX;
|
||||
typedef UINT8 tBTA_DM_BLE_PF_AVBL_SPACE;
|
||||
|
||||
typedef INT8 tBTA_DM_RSSI_VALUE;
|
||||
typedef UINT8 tBTA_DM_LINK_QUALITY_VALUE;
|
||||
|
||||
@@ -1049,64 +1024,6 @@ typedef void (tBTA_DM_SEC_CBACK)(tBTA_DM_SEC_EVT event, tBTA_DM_SEC *p_data);
|
||||
|
||||
typedef UINT32 tBTA_DM_BLE_REF_VALUE;
|
||||
|
||||
#define BTA_DM_BLE_PF_ENABLE_EVT BTM_BLE_PF_ENABLE
|
||||
#define BTA_DM_BLE_PF_CONFIG_EVT BTM_BLE_PF_CONFIG
|
||||
typedef UINT8 tBTA_DM_BLE_PF_EVT;
|
||||
|
||||
#define BTA_DM_BLE_PF_ENABLE 1
|
||||
#define BTA_DM_BLE_PF_CONFIG 2
|
||||
typedef UINT8 tBTA_DM_BLE_PF_ACTION;
|
||||
|
||||
/* Config callback */
|
||||
typedef void (tBTA_DM_BLE_PF_CFG_CBACK) (tBTA_DM_BLE_PF_ACTION action,
|
||||
tBTA_DM_BLE_PF_COND_TYPE cfg_cond,
|
||||
tBTA_DM_BLE_PF_AVBL_SPACE avbl_space, tBTA_STATUS status,
|
||||
tBTA_DM_BLE_REF_VALUE ref_value);
|
||||
/* Param callback */
|
||||
typedef void (tBTA_DM_BLE_PF_PARAM_CBACK) (UINT8 action_type, tBTA_DM_BLE_PF_AVBL_SPACE avbl_space,
|
||||
tBTA_DM_BLE_REF_VALUE ref_value, tBTA_STATUS status);
|
||||
|
||||
/* Status callback */
|
||||
typedef void (tBTA_DM_BLE_PF_STATUS_CBACK) (UINT8 action, tBTA_STATUS status,
|
||||
tBTA_DM_BLE_REF_VALUE ref_value);
|
||||
|
||||
|
||||
#define BTA_DM_BLE_PF_BRDCAST_ADDR_FILT 1
|
||||
#define BTA_DM_BLE_PF_SERV_DATA_CHG_FILT 2
|
||||
#define BTA_DM_BLE_PF_SERV_UUID 4
|
||||
#define BTA_DM_BLE_PF_SERV_SOLC_UUID 8
|
||||
#define BTA_DM_BLE_PF_LOC_NAME_CHECK 16
|
||||
#define BTA_DM_BLE_PF_MANUF_NAME_CHECK 32
|
||||
#define BTA_DM_BLE_PF_SERV_DATA_CHECK 64
|
||||
typedef UINT16 tBTA_DM_BLE_PF_FEAT_SEL;
|
||||
|
||||
#define BTA_DM_BLE_PF_LIST_LOGIC_OR 1
|
||||
#define BTA_DM_BLE_PF_LIST_LOGIC_AND 2
|
||||
typedef UINT16 tBTA_DM_BLE_PF_LIST_LOGIC_TYPE;
|
||||
|
||||
#define BTA_DM_BLE_PF_FILT_LOGIC_OR 0
|
||||
#define BTA_DM_BLE_PF_FILT_LOGIC_AND 1
|
||||
typedef UINT16 tBTA_DM_BLE_PF_FILT_LOGIC_TYPE;
|
||||
|
||||
typedef UINT8 tBTA_DM_BLE_PF_RSSI_THRESHOLD;
|
||||
typedef UINT8 tBTA_DM_BLE_PF_DELIVERY_MODE;
|
||||
typedef UINT16 tBTA_DM_BLE_PF_TIMEOUT;
|
||||
typedef UINT8 tBTA_DM_BLE_PF_TIMEOUT_CNT;
|
||||
typedef UINT16 tBTA_DM_BLE_PF_ADV_TRACK_ENTRIES;
|
||||
|
||||
typedef struct {
|
||||
tBTA_DM_BLE_PF_FEAT_SEL feat_seln;
|
||||
tBTA_DM_BLE_PF_LIST_LOGIC_TYPE list_logic_type;
|
||||
tBTA_DM_BLE_PF_FILT_LOGIC_TYPE filt_logic_type;
|
||||
tBTA_DM_BLE_PF_RSSI_THRESHOLD rssi_high_thres;
|
||||
tBTA_DM_BLE_PF_RSSI_THRESHOLD rssi_low_thres;
|
||||
tBTA_DM_BLE_PF_DELIVERY_MODE dely_mode;
|
||||
tBTA_DM_BLE_PF_TIMEOUT found_timeout;
|
||||
tBTA_DM_BLE_PF_TIMEOUT lost_timeout;
|
||||
tBTA_DM_BLE_PF_TIMEOUT_CNT found_timeout_cnt;
|
||||
tBTA_DM_BLE_PF_ADV_TRACK_ENTRIES num_of_tracking_entries;
|
||||
} tBTA_DM_BLE_PF_FILT_PARAMS;
|
||||
|
||||
/* Search callback events */
|
||||
#define BTA_DM_INQ_RES_EVT 0 /* Inquiry result for a peer device. */
|
||||
#define BTA_DM_INQ_CMPL_EVT 1 /* Inquiry complete. */
|
||||
@@ -3211,71 +3128,6 @@ extern void BTA_DmBleReadScanReports(tBTA_BLE_BATCH_SCAN_MODE scan_type,
|
||||
*******************************************************************************/
|
||||
extern void BTA_DmBleDisableBatchScan(tBTA_DM_BLE_REF_VALUE ref_value);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_DmEnableScanFilter
|
||||
**
|
||||
** Description This function is called to enable the adv data payload filter
|
||||
**
|
||||
** Parameters action - enable or disable the APCF feature
|
||||
** p_cmpl_cback - Command completed callback
|
||||
** ref_value - Reference value
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void BTA_DmEnableScanFilter(UINT8 action,
|
||||
tBTA_DM_BLE_PF_STATUS_CBACK *p_cmpl_cback,
|
||||
tBTA_DM_BLE_REF_VALUE ref_value);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_DmBleScanFilterSetup
|
||||
**
|
||||
** Description This function is called to setup the filter params
|
||||
**
|
||||
** Parameters p_target: enable the filter condition on a target device; if NULL
|
||||
** filt_index - Filter index
|
||||
** p_filt_params -Filter parameters
|
||||
** ref_value - Reference value
|
||||
** action - Add, delete or clear
|
||||
** p_cmpl_back - Command completed callback
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void BTA_DmBleScanFilterSetup(UINT8 action,
|
||||
tBTA_DM_BLE_PF_FILT_INDEX filt_index,
|
||||
tBTA_DM_BLE_PF_FILT_PARAMS *p_filt_params,
|
||||
tBLE_BD_ADDR *p_target,
|
||||
tBTA_DM_BLE_PF_PARAM_CBACK *p_cmpl_cback,
|
||||
tBTA_DM_BLE_REF_VALUE ref_value);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_DmBleCfgFilterCondition
|
||||
**
|
||||
** Description This function is called to configure the adv data payload filter
|
||||
** condition.
|
||||
**
|
||||
** Parameters action: to read/write/clear
|
||||
** cond_type: filter condition type
|
||||
** filt_index - Filter index
|
||||
** p_cond: filter condition parameter
|
||||
** p_cmpl_back - Command completed callback
|
||||
** ref_value - Reference value
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void BTA_DmBleCfgFilterCondition(tBTA_DM_BLE_SCAN_COND_OP action,
|
||||
tBTA_DM_BLE_PF_COND_TYPE cond_type,
|
||||
tBTA_DM_BLE_PF_FILT_INDEX filt_index,
|
||||
tBTA_DM_BLE_PF_COND_PARAM *p_cond,
|
||||
tBTA_DM_BLE_PF_CFG_CBACK *p_cmpl_cback,
|
||||
tBTA_DM_BLE_REF_VALUE ref_value);
|
||||
|
||||
|
||||
#if (BLE_HOST_ENERGY_INFO_EN == TRUE)
|
||||
/*******************************************************************************
|
||||
**
|
||||
|
||||
@@ -1618,10 +1618,6 @@
|
||||
#define BLE_INCLUDED FALSE
|
||||
#endif
|
||||
|
||||
#ifndef BLE_ANDROID_CONTROLLER_SCAN_FILTER
|
||||
#define BLE_ANDROID_CONTROLLER_SCAN_FILTER FALSE
|
||||
#endif
|
||||
|
||||
#ifndef BLE_HOST_ENERGY_INFO_EN
|
||||
#define BLE_HOST_ENERGY_INFO_EN FALSE
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4579,9 +4579,7 @@ void btm_ble_init (void)
|
||||
osi_event_bind(p_cb->adv_rpt_ready, btu_get_current_thread(), 0);
|
||||
#endif // #if (BLE_42_SCAN_EN == TRUE)
|
||||
#if BLE_VND_INCLUDED == FALSE
|
||||
#if BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE
|
||||
btm_ble_adv_filter_init();
|
||||
#endif // #if BLE_ANDROID_CONTROLLER_SCAN_FILTER == TRUE
|
||||
|
||||
#endif
|
||||
#if (BLE_VENDOR_HCI_EN == TRUE)
|
||||
BTM_RegisterForVSEvents(btm_ble_vs_evt_callback, TRUE);
|
||||
|
||||
Reference in New Issue
Block a user