From 41ab91471afa413d348f0891c09088afa08d0af0 Mon Sep 17 00:00:00 2001 From: Zhi Wei Jian Date: Wed, 7 Jan 2026 17:24:26 +0800 Subject: [PATCH] fix(ble/bluedroid): Delete BLE_HOST_EXECUTE_CBACK_EN (cherry picked from commit 436fe484fe3698ad54c3313953d913d951caf864) Co-authored-by: zhiweijian --- .../bt/host/bluedroid/bta/dm/bta_dm_act.c | 22 ---------------- .../bt/host/bluedroid/bta/dm/bta_dm_api.c | 25 ------------------- .../bt/host/bluedroid/bta/dm/bta_dm_main.c | 3 --- .../bluedroid/bta/dm/include/bta_dm_int.h | 15 ----------- .../common/include/common/bt_target.h | 4 --- 5 files changed, 69 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 dfe1c952f4..55e3589c35 100644 --- a/components/bt/host/bluedroid/bta/dm/bta_dm_act.c +++ b/components/bt/host/bluedroid/bta/dm/bta_dm_act.c @@ -4659,28 +4659,6 @@ void bta_dm_eir_update_uuid(tBT_UUID uuid, BOOLEAN adding) } #endif -#if (BLE_HOST_EXECUTE_CBACK_EN == TRUE) -/******************************************************************************* -** -** Function bta_dm_execute_callback -** -** Description Just execute a generic call back in the context of the BTU/BTA tack -** -** -** Returns void -** -*******************************************************************************/ -void bta_dm_execute_callback(tBTA_DM_MSG *p_data) -{ - /* sanity check */ - if (p_data->exec_cback.p_exec_cback == NULL) { - return; - } - - p_data->exec_cback.p_exec_cback(p_data->exec_cback.p_param); -} -#endif // #if (BLE_HOST_EXECUTE_CBACK_EN == TRUE) - /******************************************************************************* ** ** Function bta_dm_encrypt_cback 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 e67dc84186..1dc86e925c 100644 --- a/components/bt/host/bluedroid/bta/dm/bta_dm_api.c +++ b/components/bt/host/bluedroid/bta/dm/bta_dm_api.c @@ -1175,31 +1175,6 @@ tBTA_STATUS BTA_DmRemoveLocalDiRecord(UINT32 handle) } #endif ///SDP_INCLUDED == TRUE -#if (BLE_HOST_EXECUTE_CBACK_EN == TRUE) -/******************************************************************************* -** -** Function bta_dmexecutecallback -** -** Description This function will request BTA to execute a call back in the context of BTU task -** This API was named in lower case because it is only intended -** for the internal customers(like BTIF). -** -** Returns void -** -*******************************************************************************/ -void bta_dmexecutecallback (tBTA_DM_EXEC_CBACK *p_callback, void *p_param) -{ - tBTA_DM_API_EXECUTE_CBACK *p_msg; - - if ((p_msg = (tBTA_DM_API_EXECUTE_CBACK *) osi_malloc(sizeof(tBTA_DM_API_EXECUTE_CBACK))) != NULL) { - p_msg->hdr.event = BTA_DM_API_EXECUTE_CBACK_EVT; - p_msg->p_param = p_param; - p_msg->p_exec_cback = p_callback; - bta_sys_sendmsg(p_msg); - } -} -#endif // #if (BLE_HOST_EXECUTE_CBACK_EN == TRUE) - /******************************************************************************* ** ** Function BTA_DmAddBleKey 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 cbcf05c0a9..cc80d0ffc1 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_EXECUTE_CBACK_EN == TRUE) - bta_dm_execute_callback, /* BTA_DM_API_EXECUTE_CBACK_EVT */ -#endif // #if (BLE_HOST_EXECUTE_CBACK_EN == TRUE) #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) 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 88fd5dc159..79e9e3fc93 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_EXECUTE_CBACK_EN == TRUE) - BTA_DM_API_EXECUTE_CBACK_EVT, -#endif // #if (BLE_HOST_EXECUTE_CBACK_EN == TRUE) #if (BLE_HOST_REMOVE_ALL_ACL_EN == TRUE) BTA_DM_API_REMOVE_ALL_ACL_EVT, #endif // #if (BLE_HOST_REMOVE_ALL_ACL_EN == TRUE) @@ -724,15 +721,6 @@ typedef struct { UINT8 transport; } tBTA_DM_API_REMOVE_DEVICE; -#if (BLE_HOST_EXECUTE_CBACK_EN == TRUE) -/* data type for BTA_DM_API_EXECUTE_CBACK_EVT */ -typedef struct { - BT_HDR hdr; - void *p_param; - tBTA_DM_EXEC_CBACK *p_exec_cback; -} tBTA_DM_API_EXECUTE_CBACK; -#endif // #if (BLE_HOST_EXECUTE_CBACK_EN == TRUE) - /* data type for tBTA_DM_API_SET_ENCRYPTION */ typedef struct { BT_HDR hdr; @@ -1738,9 +1726,6 @@ typedef union { #endif /* #if (BTA_DM_QOS_INCLUDED == TRUE) */ tBTA_DM_API_DI_DISC di_disc; -#if (BLE_HOST_EXECUTE_CBACK_EN == TRUE) - tBTA_DM_API_EXECUTE_CBACK exec_cback; -#endif // #if (BLE_HOST_EXECUTE_CBACK_EN == TRUE) tBTA_DM_API_SET_ENCRYPTION set_encryption; #if BLE_INCLUDED == TRUE 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 0b77119217..45d3ebd60f 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_EXECUTE_CBACK_EN -#define BLE_HOST_EXECUTE_CBACK_EN FALSE -#endif - #ifndef BLE_HOST_REMOVE_ALL_ACL_EN #define BLE_HOST_REMOVE_ALL_ACL_EN FALSE #endif