diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index cc404d77c744..41b3086e754a 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -8916,6 +8916,19 @@ QDF_STATUS sme_config_fast_roaming(tHalHandle hal, uint8_t session_id, tCsrRoamSession *session = CSR_GET_SESSION(mac_ctx, session_id); QDF_STATUS status; + /* do_not_roam flag is set in wlan_hdd_cfg80211_connect_start + * when supplicant initiate connect request with BSSID. + * This flag reset when supplicant sends vendor command to enable + * roaming after association. + * + * This request from wpa_supplicant will be skipped in this function + * if roaming is disabled using driver command or INI and do_not_roam + * flag remains set. So make sure to set do_not_roam flag as per + * wpa_supplicant even if roam request from wpa_supplicant ignored. + */ + if (session && session->pCurRoamProfile) + session->pCurRoamProfile->do_not_roam = !is_fast_roam_enabled; + if (!mac_ctx->roam.configParam.isFastRoamIniFeatureEnabled) { sms_log(mac_ctx, LOGE, FL("Fast roam is disabled through ini")); if (!is_fast_roam_enabled) @@ -8923,9 +8936,6 @@ QDF_STATUS sme_config_fast_roaming(tHalHandle hal, uint8_t session_id, return QDF_STATUS_E_FAILURE; } - if (session && session->pCurRoamProfile) - session->pCurRoamProfile->do_not_roam = !is_fast_roam_enabled; - status = csr_neighbor_roam_update_fast_roaming_enabled(mac_ctx, session_id, is_fast_roam_enabled); if (!QDF_IS_STATUS_SUCCESS(status)) {