mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 02:37:19 +02:00
Merge branch 'bugfix/fix_ble_adv_start_fail_v5.3' into 'release/v5.3'
fix(ble/bluedroid): Fixed crash issue in BLE SMP when a disconnection process is ongoing(v5.3) See merge request espressif/esp-idf!34528
This commit is contained in:
@ -4617,6 +4617,12 @@ void btm_ble_free (void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool enable_topology_check_flag = true;
|
||||||
|
void esp_qa_enable_topology_check(bool enable)
|
||||||
|
{
|
||||||
|
// This is a workaround: If the topology check is disabled, the 'Supported States' will not be checked.
|
||||||
|
enable_topology_check_flag = enable;
|
||||||
|
}
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
**
|
**
|
||||||
** Function btm_ble_topology_check
|
** Function btm_ble_topology_check
|
||||||
@ -4629,6 +4635,7 @@ void btm_ble_free (void)
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
BOOLEAN btm_ble_topology_check(tBTM_BLE_STATE_MASK request_state_mask)
|
BOOLEAN btm_ble_topology_check(tBTM_BLE_STATE_MASK request_state_mask)
|
||||||
{
|
{
|
||||||
|
if(!enable_topology_check_flag) return TRUE;
|
||||||
BOOLEAN rt = FALSE;
|
BOOLEAN rt = FALSE;
|
||||||
|
|
||||||
UINT8 state_offset = 0;
|
UINT8 state_offset = 0;
|
||||||
|
@ -331,8 +331,7 @@ BOOLEAN smp_send_msg_to_L2CAP(BD_ADDR rem_bda, BT_HDR *p_toL2CAP)
|
|||||||
|
|
||||||
if ((l2cap_ret = L2CA_SendFixedChnlData (fixed_cid, rem_bda, p_toL2CAP)) == L2CAP_DW_FAILED) {
|
if ((l2cap_ret = L2CA_SendFixedChnlData (fixed_cid, rem_bda, p_toL2CAP)) == L2CAP_DW_FAILED) {
|
||||||
smp_cb.total_tx_unacked -= 1;
|
smp_cb.total_tx_unacked -= 1;
|
||||||
SMP_TRACE_ERROR("SMP failed to pass msg:0x%0x to L2CAP",
|
SMP_TRACE_ERROR("SMP failed to pass msg to L2CAP");
|
||||||
*((UINT8 *)(p_toL2CAP + 1) + p_toL2CAP->offset));
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1125,7 +1124,7 @@ BOOLEAN smp_pairing_request_response_parameters_are_valid(tSMP_CB *p_cb)
|
|||||||
SMP_TRACE_DEBUG("%s for cmd code 0x%02x\n", __func__, p_cb->rcvd_cmd_code);
|
SMP_TRACE_DEBUG("%s for cmd code 0x%02x\n", __func__, p_cb->rcvd_cmd_code);
|
||||||
|
|
||||||
if (io_caps >= BTM_IO_CAP_MAX) {
|
if (io_caps >= BTM_IO_CAP_MAX) {
|
||||||
SMP_TRACE_WARNING("Rcvd from the peer cmd 0x%02x with IO Capabilty \
|
SMP_TRACE_WARNING("Rcvd from the peer cmd 0x%02x with IO Capability \
|
||||||
value (0x%02x) out of range).\n",
|
value (0x%02x) out of range).\n",
|
||||||
p_cb->rcvd_cmd_code, io_caps);
|
p_cb->rcvd_cmd_code, io_caps);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Reference in New Issue
Block a user