diff --git a/source/core/services/vap_svc_mesh_ext.c b/source/core/services/vap_svc_mesh_ext.c index a3362df66..f019e64b7 100644 --- a/source/core/services/vap_svc_mesh_ext.c +++ b/source/core/services/vap_svc_mesh_ext.c @@ -1178,11 +1178,6 @@ static int process_ext_webconfig_set_data_sta_bssid(vap_svc_t *svc, void *arg) ext->ext_connected_scan_result_timeout_handler_id = 0; } - if (ext->ext_connect_algo_processor_id != 0) { - scheduler_cancel_timer_task(ctrl->sched, ext->ext_connect_algo_processor_id); - ext->ext_connect_algo_processor_id = 0; - } - if (ext->conn_state == connection_state_connection_in_progress || ext->conn_state == connection_state_connection_to_lcb_in_progress || ext->conn_state == connection_state_connection_to_nb_in_progress) { @@ -1201,6 +1196,11 @@ static int process_ext_webconfig_set_data_sta_bssid(vap_svc_t *svc, void *arg) return 0; } + if (ext->ext_connect_algo_processor_id != 0) { + scheduler_cancel_timer_task(ctrl->sched, ext->ext_connect_algo_processor_id); + ext->ext_connect_algo_processor_id = 0; + } + // If BSSID changed on the same band need to initiate disconnection before connection to avoid // HAL error. On different band try to connect to new BSSID before disconnection. // disconnect will be executed if new bssid is found in the scan results