diff --git a/components/bt/esp_ble_mesh/mesh_core/bluedroid_host/mesh_bearer_adapt.c b/components/bt/esp_ble_mesh/mesh_core/bluedroid_host/mesh_bearer_adapt.c index 904790dbcc2..a16fe928bf0 100644 --- a/components/bt/esp_ble_mesh/mesh_core/bluedroid_host/mesh_bearer_adapt.c +++ b/components/bt/esp_ble_mesh/mesh_core/bluedroid_host/mesh_bearer_adapt.c @@ -502,7 +502,7 @@ int bt_le_update_white_list(struct bt_mesh_white_list *wl) } if (BTM_BleUpdateAdvWhitelist(wl->add_remove, wl->remote_bda, - wl->addr_type, (tBTM_ADD_WHITELIST_CBACK *)wl->update_wl_comp_cb) == false) { + wl->addr_type, (tBTM_UPDATE_WHITELIST_CBACK *)wl->update_wl_comp_cb) == false) { return -EIO; } diff --git a/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h b/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h index d569cc50247..0fa1c4471ae 100644 --- a/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h +++ b/components/bt/host/bluedroid/api/include/api/esp_gap_ble_api.h @@ -650,6 +650,7 @@ typedef enum { typedef enum{ ESP_BLE_WHITELIST_REMOVE = 0X00, /*!< remove mac from whitelist */ ESP_BLE_WHITELIST_ADD = 0X01, /*!< add address to whitelist */ + ESP_BLE_WHITELIST_CLEAR = 0x02, /*!< clear all device in whitelist */ } esp_ble_wl_operation_t; #if (BLE_42_FEATURE_SUPPORT == TRUE) typedef enum { diff --git a/components/bt/host/bluedroid/bta/dm/bta_dm_act.c b/components/bt/host/bluedroid/bta/dm/bta_dm_act.c index cf721f24a9d..9e936409b66 100644 --- a/components/bt/host/bluedroid/bta/dm/bta_dm_act.c +++ b/components/bt/host/bluedroid/bta/dm/bta_dm_act.c @@ -845,14 +845,14 @@ void bta_dm_ble_set_channels (tBTA_DM_MSG *p_data) void bta_dm_update_white_list(tBTA_DM_MSG *p_data) { #if (BLE_INCLUDED == TRUE) - BTM_BleUpdateAdvWhitelist(p_data->white_list.add_remove, p_data->white_list.remote_addr, p_data->white_list.addr_type, p_data->white_list.add_wl_cb); + BTM_BleUpdateAdvWhitelist(p_data->white_list.add_remove, p_data->white_list.remote_addr, p_data->white_list.addr_type, p_data->white_list.update_wl_cb); #endif ///BLE_INCLUDED == TRUE } void bta_dm_clear_white_list(tBTA_DM_MSG *p_data) { #if (BLE_INCLUDED == TRUE) - BTM_BleClearWhitelist(); + BTM_BleClearWhitelist(p_data->white_list.update_wl_cb); #endif } diff --git a/components/bt/host/bluedroid/bta/dm/bta_dm_api.c b/components/bt/host/bluedroid/bta/dm/bta_dm_api.c index 5ec562e7406..8f7e6d0ac63 100644 --- a/components/bt/host/bluedroid/bta/dm/bta_dm_api.c +++ b/components/bt/host/bluedroid/bta/dm/bta_dm_api.c @@ -324,26 +324,26 @@ void BTA_DmBleSetChannels(const uint8_t *channels, tBTA_CMPL_CB *set_channels_c } -void BTA_DmUpdateWhiteList(BOOLEAN add_remove, BD_ADDR remote_addr, tBLE_ADDR_TYPE addr_type, tBTA_ADD_WHITELIST_CBACK *add_wl_cb) +void BTA_DmUpdateWhiteList(BOOLEAN add_remove, BD_ADDR remote_addr, tBLE_ADDR_TYPE addr_type, tBTA_UPDATE_WHITELIST_CBACK *update_wl_cb) { tBTA_DM_API_UPDATE_WHITE_LIST *p_msg; if ((p_msg = (tBTA_DM_API_UPDATE_WHITE_LIST *)osi_malloc(sizeof(tBTA_DM_API_UPDATE_WHITE_LIST))) != NULL) { p_msg->hdr.event = BTA_DM_API_UPDATE_WHITE_LIST_EVT; p_msg->add_remove = add_remove; p_msg->addr_type = addr_type; - p_msg->add_wl_cb = add_wl_cb; + p_msg->update_wl_cb = update_wl_cb; memcpy(p_msg->remote_addr, remote_addr, sizeof(BD_ADDR)); bta_sys_sendmsg(p_msg); } } -void BTA_DmClearWhiteList(void) +void BTA_DmClearWhiteList(tBTA_UPDATE_WHITELIST_CBACK *update_wl_cb) { - tBTA_DM_API_ENABLE *p_msg; - if ((p_msg = (tBTA_DM_API_ENABLE *)osi_malloc(sizeof(tBTA_DM_API_ENABLE))) != NULL) { + tBTA_DM_API_UPDATE_WHITE_LIST *p_msg; + if ((p_msg = (tBTA_DM_API_UPDATE_WHITE_LIST *)osi_malloc(sizeof(tBTA_DM_API_UPDATE_WHITE_LIST))) != NULL) { p_msg->hdr.event = BTA_DM_API_CLEAR_WHITE_LIST_EVT; - p_msg->p_sec_cback = NULL; + p_msg->update_wl_cb = update_wl_cb; bta_sys_sendmsg(p_msg); } diff --git a/components/bt/host/bluedroid/bta/dm/include/bta_dm_int.h b/components/bt/host/bluedroid/bta/dm/include/bta_dm_int.h index 34ba5f4cf55..243a9f3648b 100644 --- a/components/bt/host/bluedroid/bta/dm/include/bta_dm_int.h +++ b/components/bt/host/bluedroid/bta/dm/include/bta_dm_int.h @@ -279,7 +279,7 @@ typedef struct { BOOLEAN add_remove; BD_ADDR remote_addr; tBLE_ADDR_TYPE addr_type; - tBTA_ADD_WHITELIST_CBACK *add_wl_cb; + tBTA_UPDATE_WHITELIST_CBACK *update_wl_cb; }tBTA_DM_API_UPDATE_WHITE_LIST; typedef struct { diff --git a/components/bt/host/bluedroid/bta/gatt/bta_gattc_co.c b/components/bt/host/bluedroid/bta/gatt/bta_gattc_co.c index c5f17d79eb9..01b107cee96 100644 --- a/components/bt/host/bluedroid/bta/gatt/bta_gattc_co.c +++ b/components/bt/host/bluedroid/bta/gatt/bta_gattc_co.c @@ -517,8 +517,8 @@ void bta_gattc_co_get_addr_list(BD_ADDR *addr_list) void bta_gattc_co_cache_addr_save(BD_ADDR bd_addr, hash_key_t hash_key) { esp_err_t err_code; - UINT8 num = ++cache_env->num_addr; UINT8 index = 0; + UINT8 new_index = cache_env->num_addr; UINT8 *p_buf = osi_malloc(MAX_ADDR_LIST_CACHE_BUF); // check the address list has the same hash key or not if (bta_gattc_co_find_hash_in_cache(hash_key) != INVALID_ADDR_NUM) { @@ -530,20 +530,22 @@ void bta_gattc_co_cache_addr_save(BD_ADDR bd_addr, hash_key_t hash_key) memcpy(cache_env->cache_addr[index].hash_key, hash_key, sizeof(hash_key_t)); } else { //if the bd_addr didn't in the address list, added the bd_addr to the last of the address list. - memcpy(cache_env->cache_addr[num - 1].hash_key, hash_key, sizeof(hash_key_t)); - memcpy(cache_env->cache_addr[num - 1].addr, bd_addr, sizeof(BD_ADDR)); + memcpy(cache_env->cache_addr[new_index].hash_key, hash_key, sizeof(hash_key_t)); + memcpy(cache_env->cache_addr[new_index].addr, bd_addr, sizeof(BD_ADDR)); + cache_env->num_addr++; } } else { - APPL_TRACE_DEBUG("%s(), num = %d", __func__, num); - memcpy(cache_env->cache_addr[num - 1].addr, bd_addr, sizeof(BD_ADDR)); - memcpy(cache_env->cache_addr[num - 1].hash_key, hash_key, sizeof(hash_key_t)); + APPL_TRACE_DEBUG("%s(), num = %d", __func__, new_index + 1); + memcpy(cache_env->cache_addr[new_index].addr, bd_addr, sizeof(BD_ADDR)); + memcpy(cache_env->cache_addr[new_index].hash_key, hash_key, sizeof(hash_key_t)); + cache_env->num_addr++; } nvs_handle_t *fp = &cache_env->addr_fp; - UINT16 length = num*(sizeof(BD_ADDR) + sizeof(hash_key_t)); + UINT16 length = cache_env->num_addr * (sizeof(BD_ADDR) + sizeof(hash_key_t)); - for (UINT8 i = 0; i < num; i++) { + for (UINT8 i = 0; i < cache_env->num_addr; i++) { //copy the address to the buffer. memcpy(p_buf + i*(sizeof(BD_ADDR) + sizeof(hash_key_t)), cache_env->cache_addr[i].addr, sizeof(BD_ADDR)); //copy the hash key to the buffer. diff --git a/components/bt/host/bluedroid/bta/include/bta/bta_api.h b/components/bt/host/bluedroid/bta/include/bta/bta_api.h index 07f0c057f32..3a38169f130 100644 --- a/components/bt/host/bluedroid/bta/include/bta/bta_api.h +++ b/components/bt/host/bluedroid/bta/include/bta/bta_api.h @@ -420,7 +420,7 @@ typedef tBTM_START_ADV_CMPL_CBACK tBTA_START_ADV_CMPL_CBACK; typedef tBTM_START_STOP_ADV_CMPL_CBACK tBTA_START_STOP_ADV_CMPL_CBACK; -typedef tBTM_ADD_WHITELIST_CBACK tBTA_ADD_WHITELIST_CBACK; +typedef tBTM_UPDATE_WHITELIST_CBACK tBTA_UPDATE_WHITELIST_CBACK; typedef tBTM_SET_PKT_DATA_LENGTH_CBACK tBTA_SET_PKT_DATA_LENGTH_CBACK; @@ -1756,9 +1756,9 @@ void BTA_DmSetQos(BD_ADDR bd_addr, UINT32 t_poll, tBTM_CMPL_CB *p_cb); *******************************************************************************/ void BTA_DmBleSetChannels(const uint8_t *channels, tBTA_CMPL_CB *set_channels_cb); -extern void BTA_DmUpdateWhiteList(BOOLEAN add_remove, BD_ADDR remote_addr, tBLE_ADDR_TYPE addr_type, tBTA_ADD_WHITELIST_CBACK *add_wl_cb); +extern void BTA_DmUpdateWhiteList(BOOLEAN add_remove, BD_ADDR remote_addr, tBLE_ADDR_TYPE addr_type, tBTA_UPDATE_WHITELIST_CBACK *update_wl_cb); -extern void BTA_DmClearWhiteList(void); +extern void BTA_DmClearWhiteList(tBTA_UPDATE_WHITELIST_CBACK *update_wl_cb); extern void BTA_DmBleReadAdvTxPower(tBTA_CMPL_CB *cmpl_cb); #endif ///BLE_INCLUDED == TRUE diff --git a/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c b/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c index e5f5fee5df0..809f665f726 100644 --- a/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c +++ b/components/bt/host/bluedroid/btc/profile/std/gap/btc_gap_ble.c @@ -811,7 +811,7 @@ static void btc_gap_ble_set_channels_cmpl_callback(void *p_data) } -static void btc_add_whitelist_complete_callback(UINT8 status, tBTM_WL_OPERATION wl_opration) +static void btc_update_whitelist_complete_callback(UINT8 status, tBTM_WL_OPERATION wl_opration) { esp_ble_gap_cb_param_t param; bt_status_t ret; @@ -1607,10 +1607,10 @@ void btc_gap_ble_call_handler(btc_msg_t *msg) btc_ble_config_local_icon(arg->cfg_local_icon.icon); break; case BTC_GAP_BLE_ACT_UPDATE_WHITE_LIST: - BTA_DmUpdateWhiteList(arg->update_white_list.add_remove, arg->update_white_list.remote_bda, arg->update_white_list.wl_addr_type, btc_add_whitelist_complete_callback); + BTA_DmUpdateWhiteList(arg->update_white_list.add_remove, arg->update_white_list.remote_bda, arg->update_white_list.wl_addr_type, btc_update_whitelist_complete_callback); break; case BTC_GAP_BLE_ACT_CLEAR_WHITE_LIST: - BTA_DmClearWhiteList(); + BTA_DmClearWhiteList(btc_update_whitelist_complete_callback); break; case BTC_GAP_BLE_ACT_READ_RSSI: BTA_DmReadRSSI(arg->read_rssi.remote_addr, BTA_TRANSPORT_LE, btc_read_ble_rssi_cmpl_callback); diff --git a/components/bt/host/bluedroid/stack/btm/btm_ble_bgconn.c b/components/bt/host/bluedroid/stack/btm/btm_ble_bgconn.c index a15f40c8b88..dd6c0a176ea 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_ble_bgconn.c +++ b/components/bt/host/bluedroid/stack/btm/btm_ble_bgconn.c @@ -276,12 +276,12 @@ void btm_enq_wl_dev_operation(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_TYPE ad ** the white list. ** *******************************************************************************/ -BOOLEAN btm_update_dev_to_white_list(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_TYPE addr_type, tBTM_ADD_WHITELIST_CBACK *add_wl_cb) +BOOLEAN btm_update_dev_to_white_list(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_TYPE addr_type, tBTM_UPDATE_WHITELIST_CBACK *update_wl_cb) { if(addr_type > BLE_ADDR_RANDOM) { BTM_TRACE_ERROR("%s address type is error, unable to add device", __func__); - if (add_wl_cb){ - add_wl_cb(HCI_ERR_ILLEGAL_PARAMETER_FMT,to_add); + if (update_wl_cb){ + update_wl_cb(HCI_ERR_ILLEGAL_PARAMETER_FMT,to_add); } return FALSE; } @@ -313,8 +313,8 @@ BOOLEAN btm_update_dev_to_white_list(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_ // do nothing } else { BTC_TRACE_ERROR(" controller not support resolvable address"); - if (add_wl_cb){ - add_wl_cb(HCI_ERR_ILLEGAL_PARAMETER_FMT,to_add); + if (update_wl_cb){ + update_wl_cb(HCI_ERR_ILLEGAL_PARAMETER_FMT,to_add); } return FALSE; } @@ -325,8 +325,8 @@ BOOLEAN btm_update_dev_to_white_list(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_ if (to_add && p_cb->white_list_avail_size == 0) { BTM_TRACE_ERROR("%s Whitelist full, unable to add device", __func__); - if (add_wl_cb){ - add_wl_cb(HCI_ERR_MEMORY_FULL,to_add); + if (update_wl_cb){ + update_wl_cb(HCI_ERR_MEMORY_FULL,to_add); } return FALSE; } @@ -335,8 +335,8 @@ BOOLEAN btm_update_dev_to_white_list(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_ /* added the bd_addr to the connection hash map queue */ if(!background_connection_add((bt_bdaddr_t *)bd_addr)) { /* if the bd_addr already exist in whitelist, just callback return TRUE */ - if (add_wl_cb){ - add_wl_cb(HCI_SUCCESS,to_add); + if (update_wl_cb){ + update_wl_cb(HCI_SUCCESS,to_add); } return TRUE; } @@ -344,16 +344,16 @@ BOOLEAN btm_update_dev_to_white_list(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_ /* remove the bd_addr to the connection hash map queue */ if(!background_connection_remove((bt_bdaddr_t *)bd_addr)){ /* if the bd_addr don't exist in whitelist, just callback return TRUE */ - if (add_wl_cb){ - add_wl_cb(HCI_SUCCESS,to_add); + if (update_wl_cb){ + update_wl_cb(HCI_SUCCESS,to_add); } return TRUE; } } - if (add_wl_cb){ + if (update_wl_cb){ //save add whitelist complete callback - p_cb->add_wl_cb = add_wl_cb; + p_cb->update_wl_cb = update_wl_cb; } /* stop the auto connect */ btm_suspend_wl_activity(p_cb->wl_state); @@ -371,11 +371,17 @@ BOOLEAN btm_update_dev_to_white_list(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_ ** Description This function clears the white list. ** *******************************************************************************/ -void btm_ble_clear_white_list (void) +void btm_ble_clear_white_list (tBTM_UPDATE_WHITELIST_CBACK *update_wl_cb) { + tBTM_BLE_CB *p_cb = &btm_cb.ble_ctr_cb; + BTM_TRACE_EVENT ("btm_ble_clear_white_list"); btsnd_hcic_ble_clear_white_list(); background_connections_clear(); + + if (update_wl_cb) { + p_cb->update_wl_cb = update_wl_cb; + } } /******************************************************************************* @@ -399,6 +405,10 @@ void btm_ble_clear_white_list_complete(UINT8 *p_data, UINT16 evt_len) } else { BTM_TRACE_ERROR ("%s failed, status 0x%x\n", __func__, status); } + + if (p_cb->update_wl_cb) { + (*p_cb->update_wl_cb)(status, BTM_WHITELIST_CLEAR); + } } /******************************************************************************* @@ -429,9 +439,9 @@ void btm_ble_add_2_white_list_complete(UINT8 status) --btm_cb.ble_ctr_cb.white_list_avail_size; } // add whitelist complete callback - if (p_cb->add_wl_cb) + if (p_cb->update_wl_cb) { - (*p_cb->add_wl_cb)(status, BTM_WHITELIST_ADD); + (*p_cb->update_wl_cb)(status, BTM_WHITELIST_ADD); } } @@ -451,9 +461,9 @@ void btm_ble_remove_from_white_list_complete(UINT8 *p, UINT16 evt_len) if (*p == HCI_SUCCESS) { ++btm_cb.ble_ctr_cb.white_list_avail_size; } - if (p_cb->add_wl_cb) + if (p_cb->update_wl_cb) { - (*p_cb->add_wl_cb)(*p, BTM_WHITELIST_REMOVE); + (*p_cb->update_wl_cb)(*p, BTM_WHITELIST_REMOVE); } } diff --git a/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c b/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c index a23d322dc91..1a5b482be54 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c +++ b/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c @@ -321,9 +321,9 @@ void BTM_BleRegiseterConnParamCallback(tBTM_UPDATE_CONN_PARAM_CBACK *update_conn ** Returns void ** *******************************************************************************/ -BOOLEAN BTM_BleUpdateAdvWhitelist(BOOLEAN add_remove, BD_ADDR remote_bda, tBLE_ADDR_TYPE addr_type, tBTM_ADD_WHITELIST_CBACK *add_wl_cb) +BOOLEAN BTM_BleUpdateAdvWhitelist(BOOLEAN add_remove, BD_ADDR remote_bda, tBLE_ADDR_TYPE addr_type, tBTM_UPDATE_WHITELIST_CBACK *update_wl_cb) { - return btm_update_dev_to_white_list(add_remove, remote_bda, addr_type, add_wl_cb); + return btm_update_dev_to_white_list(add_remove, remote_bda, addr_type, update_wl_cb); } /******************************************************************************* @@ -335,9 +335,9 @@ BOOLEAN BTM_BleUpdateAdvWhitelist(BOOLEAN add_remove, BD_ADDR remote_bda, tBLE_A ** Returns void ** *******************************************************************************/ -void BTM_BleClearWhitelist(void) +void BTM_BleClearWhitelist(tBTM_UPDATE_WHITELIST_CBACK *update_wl_cb) { - btm_ble_clear_white_list(); + btm_ble_clear_white_list(update_wl_cb); } /******************************************************************************* @@ -1273,7 +1273,7 @@ BOOLEAN BTM_BleSetBgConnType(tBTM_BLE_CONN_TYPE bg_conn_type, void BTM_BleClearBgConnDev(void) { btm_ble_start_auto_conn(FALSE); - btm_ble_clear_white_list(); + btm_ble_clear_white_list(NULL); gatt_reset_bgdev_list(); } diff --git a/components/bt/host/bluedroid/stack/btm/include/btm_ble_int.h b/components/bt/host/bluedroid/stack/btm/include/btm_ble_int.h index 7a0bc2f14da..c709dd0a481 100644 --- a/components/bt/host/bluedroid/stack/btm/include/btm_ble_int.h +++ b/components/bt/host/bluedroid/stack/btm/include/btm_ble_int.h @@ -347,7 +347,7 @@ typedef struct { tBTM_BLE_SEL_CBACK *p_select_cback; /* white list information */ UINT8 white_list_avail_size; - tBTM_ADD_WHITELIST_CBACK *add_wl_cb; + tBTM_UPDATE_WHITELIST_CBACK *update_wl_cb; tBTM_BLE_WL_STATE wl_state; fixed_queue_t *conn_pending_q; @@ -442,10 +442,10 @@ void btm_ble_update_sec_key_size(BD_ADDR bd_addr, UINT8 enc_key_size); UINT8 btm_ble_read_sec_key_size(BD_ADDR bd_addr); /* white list function */ -BOOLEAN btm_update_dev_to_white_list(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_TYPE addr_type, tBTM_ADD_WHITELIST_CBACK *add_wl_cb); +BOOLEAN btm_update_dev_to_white_list(BOOLEAN to_add, BD_ADDR bd_addr, tBLE_ADDR_TYPE addr_type, tBTM_UPDATE_WHITELIST_CBACK *update_wl_cb); void btm_update_scanner_filter_policy(tBTM_BLE_SFP scan_policy); void btm_update_adv_filter_policy(tBTM_BLE_AFP adv_policy); -void btm_ble_clear_white_list (void); +void btm_ble_clear_white_list (tBTM_UPDATE_WHITELIST_CBACK *update_wl_cb); void btm_read_white_list_size_complete(UINT8 *p, UINT16 evt_len); void btm_ble_add_2_white_list_complete(UINT8 status); void btm_ble_remove_from_white_list_complete(UINT8 *p, UINT16 evt_len); diff --git a/components/bt/host/bluedroid/stack/include/stack/btm_api.h b/components/bt/host/bluedroid/stack/include/stack/btm_api.h index 25c23f563e9..ff4fc233f85 100644 --- a/components/bt/host/bluedroid/stack/include/stack/btm_api.h +++ b/components/bt/host/bluedroid/stack/include/stack/btm_api.h @@ -152,6 +152,7 @@ typedef struct { typedef enum{ BTM_WHITELIST_REMOVE = 0X00, BTM_WHITELIST_ADD = 0X01, + BTM_WHITELIST_CLEAR = 0x02, }tBTM_WL_OPERATION; @@ -190,7 +191,7 @@ typedef void (tBTM_SET_PKT_DATA_LENGTH_CBACK) (UINT8 status, tBTM_LE_SET_PKT_DAT typedef void (tBTM_SET_RAND_ADDR_CBACK) (UINT8 status); -typedef void (tBTM_ADD_WHITELIST_CBACK) (UINT8 status, tBTM_WL_OPERATION wl_opration); +typedef void (tBTM_UPDATE_WHITELIST_CBACK) (UINT8 status, tBTM_WL_OPERATION wl_opration); typedef void (tBTM_SET_LOCAL_PRIVACY_CBACK) (UINT8 status); diff --git a/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h b/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h index 537cded0774..16230bc7b5b 100644 --- a/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h +++ b/components/bt/host/bluedroid/stack/include/stack/btm_ble_api.h @@ -2270,7 +2270,7 @@ void BTM_BleTurnOnPrivacyOnRemote(BD_ADDR bd_addr, ** *******************************************************************************/ //extern -BOOLEAN BTM_BleUpdateAdvWhitelist(BOOLEAN add_remove, BD_ADDR emote_bda, tBLE_ADDR_TYPE addr_type, tBTM_ADD_WHITELIST_CBACK *add_wl_cb); +BOOLEAN BTM_BleUpdateAdvWhitelist(BOOLEAN add_remove, BD_ADDR emote_bda, tBLE_ADDR_TYPE addr_type, tBTM_UPDATE_WHITELIST_CBACK *update_wl_cb); /******************************************************************************* ** @@ -2281,7 +2281,7 @@ BOOLEAN BTM_BleUpdateAdvWhitelist(BOOLEAN add_remove, BD_ADDR emote_bda, tBLE_AD ** Returns void ** *******************************************************************************/ -void BTM_BleClearWhitelist(void); +void BTM_BleClearWhitelist(tBTM_UPDATE_WHITELIST_CBACK *update_wl_cb); /******************************************************************************* **