From 819590604c4c5633fa66f6d5dec04129358609fc Mon Sep 17 00:00:00 2001 From: Zhi Wei Jian Date: Wed, 7 Jan 2026 17:24:27 +0800 Subject: [PATCH] fix(ble/bluedroid): Delete BLE_HOST_REMOVE_ALL_ACL_EN (cherry picked from commit ad04f39cf9789ef4bd33b390d6c783fca33f488c) Co-authored-by: zhiweijian --- .../bt/host/bluedroid/bta/dm/bta_dm_act.c | 31 ------------------- .../bt/host/bluedroid/bta/dm/bta_dm_main.c | 3 -- .../bluedroid/bta/dm/include/bta_dm_int.h | 16 ---------- .../common/include/common/bt_target.h | 4 --- 4 files changed, 54 deletions(-) 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 55e3589c35..f6817785d9 100644 --- a/components/bt/host/bluedroid/bta/dm/bta_dm_act.c +++ b/components/bt/host/bluedroid/bta/dm/bta_dm_act.c @@ -1290,37 +1290,6 @@ void bta_dm_close_acl(tBTA_DM_MSG *p_data) } #endif // #if (BLE_HOST_REMOVE_AN_ACL_EN == TRUE) -#if (BLE_HOST_REMOVE_ALL_ACL_EN == TRUE) -/******************************************************************************* -** -** Function bta_dm_remove_all_acl -** -** Description This function forces to close all the ACL links specified by link type -**** -*******************************************************************************/ -void bta_dm_remove_all_acl(tBTA_DM_MSG *p_data) -{ - const tBTA_DM_LINK_TYPE link_type = p_data->remove_all_acl.link_type; - tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR; - - APPL_TRACE_DEBUG("%s link type = %d", __func__, link_type); - - for (UINT8 i = 0; i < bta_dm_cb.device_list.count; i++) { - BD_ADDR addr = {0}; - bdcpy(addr, bta_dm_cb.device_list.peer_device[i].peer_bdaddr); -#if defined (BLE_INCLUDED) && (BLE_INCLUDED == TRUE) - transport = bta_dm_cb.device_list.peer_device[i].transport; -#endif - if ((link_type == BTA_DM_LINK_TYPE_ALL) || - ((link_type == BTA_DM_LINK_TYPE_LE) && (transport == BT_TRANSPORT_LE)) || - ((link_type == BTA_DM_LINK_TYPE_BR_EDR) && (transport == BT_TRANSPORT_BR_EDR))) { - /* Disconnect the ACL link */ - btm_remove_acl(addr, transport); - } - } -} -#endif // #if (BLE_HOST_REMOVE_ALL_ACL_EN == TRUE) - /******************************************************************************* ** ** Function bta_dm_bond diff --git a/components/bt/host/bluedroid/bta/dm/bta_dm_main.c b/components/bt/host/bluedroid/bta/dm/bta_dm_main.c index cc80d0ffc1..3a3a383852 100644 --- a/components/bt/host/bluedroid/bta/dm/bta_dm_main.c +++ b/components/bt/host/bluedroid/bta/dm/bta_dm_main.c @@ -183,9 +183,6 @@ const tBTA_DM_ACTION bta_dm_action[BTA_DM_MAX_EVT] = { #endif // #if (BLE_HOST_SETUP_STORAGE_EN == TRUE) bta_dm_ble_disconnect, /* BTA_DM_API_BLE_DISCONNECT_EVT */ #endif -#if (BLE_HOST_REMOVE_ALL_ACL_EN == TRUE) - bta_dm_remove_all_acl, /* BTA_DM_API_REMOVE_ALL_ACL_EVT */ -#endif // #if (BLE_HOST_REMOVE_ALL_ACL_EN == TRUE) bta_dm_remove_device, /* BTA_DM_API_REMOVE_DEVICE_EVT */ bta_dm_ble_set_channels, /* BTA_DM_API_BLE_SET_CHANNELS_EVT */ bta_dm_update_white_list, /* BTA_DM_API_UPDATE_WHITE_LIST_EVT */ 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 79e9e3fc93..e53ddf4192 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 @@ -169,9 +169,6 @@ enum { BTA_DM_API_BLE_DISCONNECT_EVT, #endif -#if (BLE_HOST_REMOVE_ALL_ACL_EN == TRUE) - BTA_DM_API_REMOVE_ALL_ACL_EVT, -#endif // #if (BLE_HOST_REMOVE_ALL_ACL_EN == TRUE) BTA_DM_API_REMOVE_DEVICE_EVT, BTA_DM_API_BLE_SET_CHANNELS_EVT, BTA_DM_API_UPDATE_WHITE_LIST_EVT, @@ -1229,15 +1226,6 @@ typedef struct { } tBTA_DM_API_REMOVE_ACL; #endif // #if (BLE_HOST_REMOVE_AN_ACL_EN == TRUE) -#if (BLE_HOST_REMOVE_ALL_ACL_EN == TRUE) -/* data type for BTA_DM_API_REMOVE_ALL_ACL_EVT */ -typedef struct { - BT_HDR hdr; - tBTA_DM_LINK_TYPE link_type; - -} tBTA_DM_API_REMOVE_ALL_ACL; -#endif // #if (BLE_HOST_REMOVE_ALL_ACL_EN == TRUE) - typedef struct { BT_HDR hdr; BD_ADDR bd_addr; @@ -1813,9 +1801,6 @@ typedef union { #if (BLE_HOST_REMOVE_AN_ACL_EN == TRUE) tBTA_DM_API_REMOVE_ACL remove_acl; #endif // #if (BLE_HOST_REMOVE_AN_ACL_EN == TRUE) -#if (BLE_HOST_REMOVE_ALL_ACL_EN == TRUE) - tBTA_DM_API_REMOVE_ALL_ACL remove_all_acl; -#endif // #if (BLE_HOST_REMOVE_ALL_ACL_EN == TRUE) #if (BLE_FEAT_ISO_EN == TRUE) #if (BLE_FEAT_ISO_BIG_BROCASTER_EN == TRUE) @@ -2423,7 +2408,6 @@ extern void bta_dm_disable_test_mode(tBTA_DM_MSG *p_data); extern void bta_dm_execute_callback(tBTA_DM_MSG *p_data); -extern void bta_dm_remove_all_acl(tBTA_DM_MSG *p_data); #if (BLE_50_FEATURE_SUPPORT == TRUE) extern void bta_dm_ble_gap_read_phy(tBTA_DM_MSG *p_data); diff --git a/components/bt/host/bluedroid/common/include/common/bt_target.h b/components/bt/host/bluedroid/common/include/common/bt_target.h index 45d3ebd60f..74c423686c 100644 --- a/components/bt/host/bluedroid/common/include/common/bt_target.h +++ b/components/bt/host/bluedroid/common/include/common/bt_target.h @@ -1612,10 +1612,6 @@ #define BLE_INCLUDED FALSE #endif -#ifndef BLE_HOST_REMOVE_ALL_ACL_EN -#define BLE_HOST_REMOVE_ALL_ACL_EN FALSE -#endif - #ifndef BLE_HOST_REMOVE_AN_ACL_EN #define BLE_HOST_REMOVE_AN_ACL_EN FALSE #endif