Merge branch 'fix/rrm_config_set_v5.4' into 'release/v5.4'

Set rrm config condition in case RRM monitoring is enabled

See merge request espressif/esp-idf!39431
This commit is contained in:
Jiang Jiang Jian
2025-05-28 17:56:45 +08:00

View File

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -415,13 +415,17 @@ static void roaming_app_rssi_low_handler(void* arg, esp_event_base_t event_base,
static void trigger_network_assisted_roam(void)
{
#if PERIODIC_RRM_MONITORING
if (g_roaming_app.config.rrm_monitor) {
ROAM_NEIGHBOR_LIST_LOCK();
}
#endif /*PERIODIC_RRM_MONITORING*/
if (esp_wnm_send_bss_transition_mgmt_query(REASON_RSSI, g_roaming_app.btm_neighbor_list, 1) < 0) {
ESP_LOGD(ROAMING_TAG, "failed to send btm query");
}
#if PERIODIC_RRM_MONITORING
if (g_roaming_app.config.rrm_monitor) {
ROAM_NEIGHBOR_LIST_UNLOCK();
}
#endif /*PERIODIC_RRM_MONITORING*/
ESP_LOGD(ROAMING_TAG, "Sent BTM Query");
gettimeofday(&g_roaming_app.last_roamed_time, NULL);