qcacld-3.0: Prevent Runtime PM when connection in progress

Add logic to prevent runtime pm when connect and DHCP
in progress.

CRs-Fixed: 1072520
Change-Id: I3f44bb32aabe2d119c4bf3888f49891b44fc2c7b
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 115f696..c01fee7 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -11436,6 +11436,8 @@
 			hdd_conn_set_connection_state(pAdapter,
 			eConnectionState_Connecting);
 
+		qdf_runtime_pm_prevent_suspend(pAdapter->connect_rpm_ctx.
+					       connect);
 		status = sme_roam_connect(WLAN_HDD_GET_HAL_CTX(pAdapter),
 					  pAdapter->sessionId, pRoamProfile,
 					  &roamId);
@@ -11449,6 +11451,8 @@
 			/* change back to NotAssociated */
 			hdd_conn_set_connection_state(pAdapter,
 						      eConnectionState_NotConnected);
+			qdf_runtime_pm_allow_suspend(pAdapter->connect_rpm_ctx.
+						     connect);
 		}
 
 		pRoamProfile->ChannelInfo.ChannelList = NULL;