feat(ble/bluedroid): add CS Security Requirements host support (Core 6.3)

(cherry picked from commit 919622c01c)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
This commit is contained in:
Zhi Wei Jian
2026-06-26 20:37:44 +08:00
committed by BOT
parent aed8603a42
commit 1b340fe82b
17 changed files with 389 additions and 9 deletions
@@ -1012,7 +1012,11 @@ typedef void (tBTM_UPDATE_DUPLICATE_EXCEPTIONAL_LIST_CMPL_CBACK) (tBTM_STATUS st
#define BTM_BLE_5_GAP_UTP_SEND_COMPLETE_EVT 84
#define BTM_BLE_5_GAP_UTP_RECEIVE_EVT 85
#endif // #if (BLE_FEAT_LE_UTP == TRUE)
#define BTM_BLE_5_GAP_UNKNOWN_EVT 91
#if (BT_BLE_FEAT_CS_SECURITY_REQUIREMENTS == TRUE)
#define BTM_BLE_GAP_CS_SET_SECURITY_REQUIREMENTS_CMPL_EVT 88
#define BTM_BLE_GAP_CS_SET_DEFAULT_SECURITY_REQUIREMENTS_CMPL_EVT 89
#endif // (BT_BLE_FEAT_CS_SECURITY_REQUIREMENTS == TRUE)
#define BTM_BLE_5_GAP_UNKNOWN_EVT 90
typedef UINT8 tBTM_BLE_5_GAP_EVENT;
#if (BLE_FEAT_ISO_EN == TRUE)
@@ -1555,6 +1559,16 @@ typedef struct {
UINT16 conn_handle;
} tBTM_BLE_CS_SEC_ENABLE_CMPL_EVT;
#if (BT_BLE_FEAT_CS_SECURITY_REQUIREMENTS == TRUE)
typedef struct {
UINT8 status;
UINT16 conn_handle;
} tBTM_BLE_CS_SET_SECURITY_REQUIREMENTS_CMPL_EVT;
typedef struct {
UINT8 status;
} tBTM_BLE_CS_SET_DEFAULT_SECURITY_REQUIREMENTS_CMPL_EVT;
#endif // (BT_BLE_FEAT_CS_SECURITY_REQUIREMENTS == TRUE)
typedef struct {
UINT8 status;
@@ -2057,6 +2071,10 @@ typedef union {
#if (BLE_FEAT_LE_UTP == TRUE)
tBTM_BLE_UTP_RECEIVE utp_receive;
#endif // #if (BLE_FEAT_LE_UTP == TRUE)
#if (BT_BLE_FEAT_CS_SECURITY_REQUIREMENTS == TRUE)
tBTM_BLE_CS_SET_SECURITY_REQUIREMENTS_CMPL_EVT cs_set_security_requirements;
tBTM_BLE_CS_SET_DEFAULT_SECURITY_REQUIREMENTS_CMPL_EVT cs_set_default_security_requirements;
#endif // (BT_BLE_FEAT_CS_SECURITY_REQUIREMENTS == TRUE)
} tBTM_BLE_5_GAP_CB_PARAMS;
typedef struct {
@@ -3397,5 +3415,9 @@ void BTM_BleGapCsSetProcPatams(UINT16 conn_handle, UINT8 config_id, UINT16 max_p
UINT8 SNR_control_initiator, UINT8 SNR_control_reflector);
void BTM_BleGapCsProcEnable(UINT16 conn_handle, UINT8 config_id, UINT8 enable);
#endif // (BT_BLE_FEAT_CHANNEL_SOUNDING == TRUE)
#if (BT_BLE_FEAT_CS_SECURITY_REQUIREMENTS == TRUE)
void BTM_BleGapCsSetSecurityRequirements(UINT16 conn_handle, UINT64 cs_security_requirements);
void BTM_BleGapCsSetDefaultSecurityRequirements(UINT64 cs_security_requirements);
#endif // (BT_BLE_FEAT_CS_SECURITY_REQUIREMENTS == TRUE)
#endif
@@ -493,6 +493,10 @@
#define HCI_BLE_CS_SET_PROCEDURE_ENABLE (0x0094 | HCI_GRP_BLE_CMDS)
#endif // (BT_BLE_FEAT_CHANNEL_SOUNDING == TRUE)
#if (BT_BLE_FEAT_CS_SECURITY_REQUIREMENTS == TRUE)
#define HCI_BLE_CS_SET_SECURITY_REQUIREMENTS (0x00A7 | HCI_GRP_BLE_CMDS)
#define HCI_BLE_CS_SET_DEFAULT_SECURITY_REQUIREMENTS (0x00A8 | HCI_GRP_BLE_CMDS)
#endif // (BT_BLE_FEAT_CS_SECURITY_REQUIREMENTS == TRUE)
#if (BLE_FEAT_LE_UTP == TRUE)
#define HCI_BLE_ENABLE_UTP_OTA_MODE (0x009F | HCI_GRP_BLE_CMDS)
@@ -1415,5 +1415,12 @@ UINT8 btsnd_hcic_ble_cs_set_procedure_params(UINT16 conn_handle, UINT8 config_id
UINT8 btsnd_hcic_ble_cs_procedure_enable(UINT16 conn_handle, UINT8 config_id, UINT8 enable);
#endif // (BT_BLE_FEAT_CHANNEL_SOUNDING == TRUE)
#if (BT_BLE_FEAT_CS_SECURITY_REQUIREMENTS == TRUE)
#define HCIC_PARAM_SIZE_CS_SET_SECURITY_REQUIREMENTS_LEN 10
#define HCIC_PARAM_SIZE_CS_SET_DEFAULT_SECURITY_REQUIREMENTS_LEN 8
UINT8 btsnd_hcic_ble_cs_set_security_requirements(UINT16 conn_handle, UINT64 cs_security_requirements);
UINT8 btsnd_hcic_ble_cs_set_default_security_requirements(UINT64 cs_security_requirements);
#endif // (BT_BLE_FEAT_CS_SECURITY_REQUIREMENTS == TRUE)
#endif