fix(ble/bluedroid): Delete BLE_HOST_BLE_SCAN_PARAM_UNUSED

(cherry picked from commit 5fdcc3bdea)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
This commit is contained in:
Zhi Wei Jian
2026-01-07 17:24:03 +08:00
parent f590e7c58d
commit 534e505ff6
7 changed files with 0 additions and 153 deletions

View File

@@ -5246,26 +5246,6 @@ void bta_dm_ble_set_conn_params (tBTA_DM_MSG *p_data)
p_data->ble_set_conn_params.slave_latency, p_data->ble_set_conn_params.supervision_tout);
}
#if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
/*******************************************************************************
**
** Function bta_dm_ble_set_conn_scan_params
**
** Description This function sets BLE scan parameters.
**
** Parameters:
**
*******************************************************************************/
void bta_dm_ble_set_scan_params(tBTA_DM_MSG *p_data)
{
BTM_BleSetScanParams(p_data->ble_set_scan_params.client_if,
p_data->ble_set_scan_params.scan_int,
p_data->ble_set_scan_params.scan_window,
p_data->ble_set_scan_params.scan_mode,
p_data->ble_set_scan_params.scan_param_setup_cback);
}
#endif // #if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
#if (BLE_42_SCAN_EN == TRUE)
/*******************************************************************************
**

View File

@@ -1456,42 +1456,6 @@ void BTA_DmSetBlePrefConnParams(BD_ADDR bd_addr,
#endif
}
#if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
/*******************************************************************************
**
** Function BTA_DmSetBleScanParams
**
** Description This function is called to set scan parameters
**
** Parameters: client_if - Client IF
** scan_interval - scan interval
** scan_window - scan window
** scan_mode - scan mode
** scan_param_setup_status_cback - Set scan param status callback
**
** Returns void
**
*******************************************************************************/
void BTA_DmSetBleScanParams(tGATT_IF client_if, UINT32 scan_interval,
UINT32 scan_window, tBLE_SCAN_MODE scan_mode,
tBLE_SCAN_PARAM_SETUP_CBACK scan_param_setup_cback)
{
tBTA_DM_API_BLE_SCAN_PARAMS *p_msg;
if ((p_msg = (tBTA_DM_API_BLE_SCAN_PARAMS *)osi_malloc(sizeof(tBTA_DM_API_BLE_SCAN_PARAMS))) != NULL) {
memset(p_msg, 0, sizeof(tBTA_DM_API_BLE_SCAN_PARAMS));
p_msg->hdr.event = BTA_DM_API_BLE_SCAN_PARAM_EVT;
p_msg->client_if = client_if;
p_msg->scan_int = scan_interval;
p_msg->scan_window = scan_window;
p_msg->scan_mode = scan_mode;
p_msg->scan_param_setup_cback = scan_param_setup_cback;
bta_sys_sendmsg(p_msg);
}
}
#endif // #if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
#if (BLE_42_SCAN_EN == TRUE)
/*******************************************************************************
**

View File

@@ -142,9 +142,6 @@ const tBTA_DM_ACTION bta_dm_action[BTA_DM_MAX_EVT] = {
#endif ///SMP_INCLUDED == TRUE
bta_dm_ble_set_bg_conn_type,
bta_dm_ble_set_conn_params, /* BTA_DM_API_BLE_CONN_PARAM_EVT */
#if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
bta_dm_ble_set_scan_params, /* BTA_DM_API_BLE_SCAN_PARAM_EVT */
#endif // #if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
#if (BLE_42_SCAN_EN == TRUE)
bta_dm_ble_set_scan_fil_params, /* BTA_DM_API_BLE_SCAN_FIL_PARAM_EVT */
#endif // #if (BLE_42_SCAN_EN == TRUE)

View File

@@ -128,9 +128,6 @@ enum {
#endif ///SMP_INCLUDED == TRUE
BTA_DM_API_BLE_SET_BG_CONN_TYPE,
BTA_DM_API_BLE_CONN_PARAM_EVT,
#if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
BTA_DM_API_BLE_SCAN_PARAM_EVT,
#endif // #if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
/*******This event added by Yulong at 2016/10/25 to
support the scan filter setting for the APP******/
#if (BLE_42_SCAN_EN == TRUE)
@@ -1810,9 +1807,6 @@ typedef union {
tBTA_DM_API_BLE_SEC_GRANT ble_sec_grant;
tBTA_DM_API_BLE_SET_BG_CONN_TYPE ble_set_bd_conn_type;
tBTA_DM_API_BLE_CONN_PARAMS ble_set_conn_params;
#if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
tBTA_DM_API_BLE_SCAN_PARAMS ble_set_scan_params;
#endif // #if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
tBTA_DM_API_BLE_SCAN_FILTER_PARAMS ble_set_scan_fil_params;
tBTA_DM_API_BLE_OBSERVE ble_observe;
tBTA_DM_API_BLE_SCAN ble_scan;

View File

@@ -1602,10 +1602,6 @@
#define BLE_HOST_BLE_OBSERVE_EN FALSE
#endif
#ifndef BLE_HOST_BLE_SCAN_PARAM_UNUSED
#define BLE_HOST_BLE_SCAN_PARAM_UNUSED FALSE
#endif
#ifndef BLE_HOST_SETUP_STORAGE_EN
#define BLE_HOST_SETUP_STORAGE_EN FALSE
#endif

View File

@@ -1625,67 +1625,6 @@ void BTM_BleReadAdvParams (UINT16 *adv_int_min, UINT16 *adv_int_max,
}
}
#if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
/*******************************************************************************
**
** Function BTM_BleSetScanParams
**
** Description This function is called to set scan parameters.
**
** Parameters client_if - Client IF
** scan_interval - Scan interval
** scan_window - Scan window
** scan_mode - Scan mode
** scan_setup_status_cback - Scan param setup status callback
**
** Returns void
**
*******************************************************************************/
void BTM_BleSetScanParams(tGATT_IF client_if, UINT32 scan_interval, UINT32 scan_window,
tBLE_SCAN_MODE scan_mode,
tBLE_SCAN_PARAM_SETUP_CBACK scan_setup_status_cback)
{
tBTM_BLE_INQ_CB *p_cb = &btm_cb.ble_ctr_cb.inq_var;
UINT32 max_scan_interval;
UINT32 max_scan_window;
BTM_TRACE_EVENT ("%s\n", __func__);
if (!controller_get_interface()->supports_ble()) {
return;
}
/* If not supporting extended scan support, use the older range for checking */
if (btm_cb.cmn_ble_vsc_cb.extended_scan_support == 0) {
max_scan_interval = BTM_BLE_SCAN_INT_MAX;
max_scan_window = BTM_BLE_SCAN_WIN_MAX;
} else {
/* If supporting extended scan support, use the new extended range for checking */
max_scan_interval = BTM_BLE_EXT_SCAN_INT_MAX;
max_scan_window = BTM_BLE_EXT_SCAN_WIN_MAX;
}
if (BTM_BLE_ISVALID_PARAM(scan_interval, BTM_BLE_SCAN_INT_MIN, max_scan_interval) &&
BTM_BLE_ISVALID_PARAM(scan_window, BTM_BLE_SCAN_WIN_MIN, max_scan_window) &&
(scan_mode == BTM_BLE_SCAN_MODE_ACTI || scan_mode == BTM_BLE_SCAN_MODE_PASS)) {
p_cb->scan_type = scan_mode;
p_cb->scan_interval = scan_interval;
p_cb->scan_window = scan_window;
if (scan_setup_status_cback != NULL) {
scan_setup_status_cback(client_if, BTM_SUCCESS);
}
} else {
if (scan_setup_status_cback != NULL) {
scan_setup_status_cback(client_if, BTM_ILLEGAL_VALUE);
}
BTM_TRACE_ERROR("Illegal params: scan_interval = %d scan_window = %d\n",
scan_interval, scan_window);
}
}
#endif // #if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
#if (BLE_42_SCAN_EN == TRUE)
tBTM_STATUS BTM_BleSetScanFilterParams(tGATT_IF client_if, UINT32 scan_interval, UINT32 scan_window,
tBLE_SCAN_MODE scan_mode, UINT8 addr_type_own, UINT8 scan_duplicate_filter, tBTM_BLE_SFP scan_filter_policy,

View File

@@ -2193,29 +2193,6 @@ void BTM_BleReadAdvParams (UINT16 *adv_int_min, UINT16 *adv_int_max,
//extern
void BTM_BleObtainVendorCapabilities(tBTM_BLE_VSC_CB *p_cmn_vsc_cb);
#if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
/*******************************************************************************
**
** Function BTM_BleSetScanParams
**
** Description This function is called to set Scan parameters.
**
** Parameters client_if - Client IF value
** scan_interval - Scan interval
** scan_window - Scan window
** scan_type - Scan type
** scan_setup_status_cback - Scan setup status callback
**
** Returns void
**
*******************************************************************************/
//extern
void BTM_BleSetScanParams(tGATT_IF client_if, UINT32 scan_interval,
UINT32 scan_window, tBLE_SCAN_MODE scan_type,
tBLE_SCAN_PARAM_SETUP_CBACK scan_setup_status_cback);
#endif // #if (BLE_HOST_BLE_SCAN_PARAM_UNUSED == TRUE)
/*******************************************************************************
**
** Function BTM_BleSetScanFilterParams