From 383bedae883c8737abf60a0a4171f77d42be9042 Mon Sep 17 00:00:00 2001 From: zhiweijian Date: Thu, 6 Nov 2025 12:00:51 +0800 Subject: [PATCH] fix(ble/bluedroid): Fixed CTE IQ sample data copy error --- components/bt/host/bluedroid/stack/btu/btu_hcif.c | 8 ++++++++ components/bt/host/bluedroid/stack/l2cap/l2c_api.c | 4 ++-- components/bt/host/bluedroid/stack/smp/smp_api.c | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/components/bt/host/bluedroid/stack/btu/btu_hcif.c b/components/bt/host/bluedroid/stack/btu/btu_hcif.c index cf1503d269..4aa1701294 100644 --- a/components/bt/host/bluedroid/stack/btu/btu_hcif.c +++ b/components/bt/host/bluedroid/stack/btu/btu_hcif.c @@ -3067,6 +3067,10 @@ static void btu_ble_cte_connless_iq_report_evt(UINT8 *p) for (uint8_t i = 0; i < connless_iq_rpt.sample_count; i++) { STREAM_TO_UINT8(connless_iq_rpt.i_sample[i], p); + } + + for (uint8_t i = 0; i < connless_iq_rpt.sample_count; i++) + { STREAM_TO_UINT8(connless_iq_rpt.q_sample[i], p); } @@ -3098,6 +3102,10 @@ static void btu_ble_cte_conn_iq_report_evt(UINT8 *p) for (uint8_t i = 0; i < conn_iq_rpt.sample_count; i++) { STREAM_TO_UINT8(conn_iq_rpt.i_sample[i], p); + } + + for (uint8_t i = 0; i < conn_iq_rpt.sample_count; i++) + { STREAM_TO_UINT8(conn_iq_rpt.q_sample[i], p); } diff --git a/components/bt/host/bluedroid/stack/l2cap/l2c_api.c b/components/bt/host/bluedroid/stack/l2cap/l2c_api.c index 36d636768a..8030df8078 100644 --- a/components/bt/host/bluedroid/stack/l2cap/l2c_api.c +++ b/components/bt/host/bluedroid/stack/l2cap/l2c_api.c @@ -215,7 +215,7 @@ UINT16 L2CA_ConnectReq (UINT16 psm, BD_ADDR p_bd_addr) ** ** Parameters: PSM: L2CAP PSM for the connection ** BD address of the peer -** Enhaced retransmission mode configurations +** Enhanced retransmission mode configurations ** Returns the CID of the connection, or 0 if it failed to start ** @@ -760,7 +760,7 @@ bool L2CA_GetIdentifiers(uint16_t lcid, uint16_t *rcid, uint16_t *handle) ** ** NOTE This timeout takes effect after at least 1 channel has been ** established and removed. L2CAP maintains its own timer from -** whan a connection is established till the first channel is +** when a connection is established till the first channel is ** set up. *******************************************************************************/ BOOLEAN L2CA_SetIdleTimeout (UINT16 cid, UINT16 timeout, BOOLEAN is_global) diff --git a/components/bt/host/bluedroid/stack/smp/smp_api.c b/components/bt/host/bluedroid/stack/smp/smp_api.c index 5ac5cd7ef4..b99c94abd8 100644 --- a/components/bt/host/bluedroid/stack/smp/smp_api.c +++ b/components/bt/host/bluedroid/stack/smp/smp_api.c @@ -524,10 +524,10 @@ void SMP_SecureConnectionOobDataReply(UINT8 *p_data) ** Description This function is called to encrypt the data with the specified ** key ** -** Parameters: key - Pointer to key key[0] conatins the MSB +** Parameters: key - Pointer to key key[0] contains the MSB ** key_len - key length ** plain_text - Pointer to data to be encrypted -** plain_text[0] conatins the MSB +** plain_text[0] contains the MSB ** pt_len - plain text length ** p_out - output of the encrypted texts **