wlan: Trigger SSR if scan is blocked due to connection state

If connection state is not reset, driver will not allow
scan as the scan is blocked if the connection is in progress.
If Scan failure happens more than 35 times or around 5 mins,
driver can issue SSR to restart the driver to recover from this
condition.

Change-Id: I7d98e56811e085b11a4663ebf552940a7000db9a
CRs-Fixed: 1056314
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index aae4589..7be4527 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -13034,9 +13034,18 @@
      */
     if (hdd_isConnectionInProgress(pHddCtx))
     {
-        hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Scan not allowed", __func__);
+        hddLog(VOS_TRACE_LEVEL_ERROR, FL("Scan not allowed"));
+        if (SCAN_ABORT_THRESHOLD < pHddCtx->con_scan_abort_cnt) {
+            VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+                    FL("Triggering SSR, SSR status = %d"), status);
+            vos_wlanRestart();
+        }
+        else
+            pHddCtx->con_scan_abort_cnt++;
+
         return -EBUSY;
     }
+    pHddCtx->con_scan_abort_cnt = 0;
 
     vos_mem_zero( &scanRequest, sizeof(scanRequest));