From 65a1e6c272f23aa93cf865c0ecbaae650c7a298a Mon Sep 17 00:00:00 2001 From: Zhang Hai Peng Date: Wed, 30 Oct 2024 15:24:32 +0800 Subject: [PATCH] fix(ble/bluedroid): Support enable BLE topology check by API (cherry picked from commit dbc94c70562ad1f9734424a8cf20787d72d37a3d) Co-authored-by: zhanghaipeng --- components/bt/host/bluedroid/stack/btm/btm_ble_gap.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c b/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c index b34676c68c..5fdd3a5614 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c +++ b/components/bt/host/bluedroid/stack/btm/btm_ble_gap.c @@ -4617,6 +4617,12 @@ void btm_ble_free (void) #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 @@ -4629,6 +4635,7 @@ void btm_ble_free (void) *******************************************************************************/ BOOLEAN btm_ble_topology_check(tBTM_BLE_STATE_MASK request_state_mask) { + if(!enable_topology_check_flag) return TRUE; BOOLEAN rt = FALSE; UINT8 state_offset = 0;