Merge branch 'fix/rrm_config_set' into 'master'

Set rrm config condition in case RRM monitoring is enable

Closes WIFIBUG-1161

See merge request espressif/esp-idf!38841
This commit is contained in:
Jiang Jiang Jian
2025-05-14 17:41:29 +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 * 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) static void trigger_network_assisted_roam(void)
{ {
#if PERIODIC_RRM_MONITORING #if PERIODIC_RRM_MONITORING
ROAM_NEIGHBOR_LIST_LOCK(); if (g_roaming_app.config.rrm_monitor) {
ROAM_NEIGHBOR_LIST_LOCK();
}
#endif /*PERIODIC_RRM_MONITORING*/ #endif /*PERIODIC_RRM_MONITORING*/
if (esp_wnm_send_bss_transition_mgmt_query(REASON_RSSI, g_roaming_app.btm_neighbor_list, 1) < 0) { 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"); ESP_LOGD(ROAMING_TAG, "failed to send btm query");
} }
#if PERIODIC_RRM_MONITORING #if PERIODIC_RRM_MONITORING
ROAM_NEIGHBOR_LIST_UNLOCK(); if (g_roaming_app.config.rrm_monitor) {
ROAM_NEIGHBOR_LIST_UNLOCK();
}
#endif /*PERIODIC_RRM_MONITORING*/ #endif /*PERIODIC_RRM_MONITORING*/
ESP_LOGD(ROAMING_TAG, "Sent BTM Query"); ESP_LOGD(ROAMING_TAG, "Sent BTM Query");
gettimeofday(&g_roaming_app.last_roamed_time, NULL); gettimeofday(&g_roaming_app.last_roamed_time, NULL);