From ef379aff98afd47fb9ce3ee67343de2166685645 Mon Sep 17 00:00:00 2001 From: Zhi Wei Jian Date: Wed, 7 Jan 2026 17:23:26 +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 ce963358f0b..fc4d7de4013 100644 --- a/components/bt/host/bluedroid/bta/dm/bta_dm_act.c +++ b/components/bt/host/bluedroid/bta/dm/bta_dm_act.c @@ -1273,37 +1273,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 4de5574b12e..23be2947f88 100644 --- a/components/bt/host/bluedroid/bta/dm/bta_dm_main.c +++ b/components/bt/host/bluedroid/bta/dm/bta_dm_main.c @@ -177,9 +177,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 a78dd608018..2049f61c0ae 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 @@ -166,9 +166,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, @@ -1217,15 +1214,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; @@ -1798,9 +1786,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) @@ -2405,7 +2390,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 9978b56214b..acb00522697 100644 --- a/components/bt/host/bluedroid/common/include/common/bt_target.h +++ b/components/bt/host/bluedroid/common/include/common/bt_target.h @@ -1522,10 +1522,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