diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index f713be6e7dcc..f7c365686b45 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -18807,7 +18807,7 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter, enum nl80211_chan_width ch_width) { int status = 0; - QDF_STATUS qdf_status; + QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; struct hdd_context *hdd_ctx; struct hdd_station_ctx *hdd_sta_ctx; uint32_t roam_id = INVALID_ROAM_ID; @@ -19123,14 +19123,17 @@ static int wlan_hdd_cfg80211_connect_start(struct hdd_adapter *adapter, if ((QDF_STATUS_SUCCESS != qdf_status) && (QDF_STA_MODE == adapter->device_mode || QDF_P2P_CLIENT_MODE == adapter->device_mode)) { - hdd_err("Vdev %d connect failed with status %d", + hdd_err("Vdev %d connect failed with status %d to krnl", adapter->vdev_id, qdf_status); /* change back to NotAssociated */ hdd_conn_set_connection_state(adapter, eConnectionState_NotConnected); - qdf_runtime_pm_allow_suspend( - &hdd_ctx->runtime_context.connect); - hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_CONNECT); + hdd_connect_result(adapter->dev, + NULL, NULL, NULL, 0, NULL, 0, + WLAN_STATUS_UNSPECIFIED_FAILURE, + GFP_KERNEL, false, + eSIR_SME_INVALID_PARAMETERS); + status = 0; } /* Reset connect_in_progress */ @@ -19153,7 +19156,7 @@ ret_status: * Enable roaming on other STA adapter for failure case. * For success case, it is enabled in assoc completion handler */ - if (status) + if (status || qdf_status != QDF_STATUS_SUCCESS) wlan_hdd_enable_roaming(adapter, RSO_CONNECT_START); return status;