wlan: Reflect code review of CL#660898.

conn_state stuck connecting and scan failed -EBUSY
change con_state to connecting only for INFRA_STA type.

Change-Id: Ie4995d9dbf0114d1dbf04d5b649e3ec89bea6aba
CR-Fixed: 422187
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 4902862..1c6e7f0 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -4361,16 +4361,15 @@
          * has a direct path to call hdd_smeRoamCallback(), which will change the conn_state
          * If direct path, conn_state will be accordingly changed to NotConnected or Associated 
          * by either hdd_AssociationCompletionHandler() or hdd_DisConnectHandler() in sme_RoamCallback()
-           */
-        hdd_connSetConnectionState(WLAN_HDD_GET_STATION_CTX_PTR(pAdapter),
-                                             eConnectionState_Connecting);
+         * if sme_RomConnect is to be queued, Connecting state will remain until it is completed.
+         */
+        if (WLAN_HDD_INFRA_STATION == pAdapter->device_mode)
+            hdd_connSetConnectionState(WLAN_HDD_GET_STATION_CTX_PTR(pAdapter),
+                                                 eConnectionState_Connecting);
         
         status = sme_RoamConnect( WLAN_HDD_GET_HAL_CTX(pAdapter), 
                             pAdapter->sessionId, pRoamProfile, &roamId);
 
-        pRoamProfile->ChannelInfo.ChannelList = NULL;
-        pRoamProfile->ChannelInfo.numOfChannels = 0;
-
         if( (eHAL_STATUS_SUCCESS != status) &&
             (WLAN_HDD_INFRA_STATION == pAdapter->device_mode) )
 
@@ -4381,6 +4380,10 @@
             hdd_connSetConnectionState(WLAN_HDD_GET_STATION_CTX_PTR(pAdapter),
                                              eConnectionState_NotConnected);
         }
+
+        pRoamProfile->ChannelInfo.ChannelList = NULL;
+        pRoamProfile->ChannelInfo.numOfChannels = 0;
+
     }
     else
     {