wlan: Defer back to back scan only in connected state.

If dut is in connected state and scan is neither p2p
nor single channel scan, driver will not issue fresh scan.
Driver will return cached scan results if scan time is differ
with nDeferScanTimeInterval.

CRs-Fixed: 767742
Change-Id: Idf9c7e9db70c22aea27611aed3f22086ba568f2e
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 8bb7809..785e9c3 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -10643,6 +10643,15 @@
     return sme_isSta_p2p_clientConnected(pHddCtx->hHal);
 }
 
+/*
+ * API to find if there is any session connected
+ */
+VOS_STATUS hdd_is_any_session_connected(hdd_context_t *pHddCtx)
+{
+    return sme_is_any_session_connected(pHddCtx->hHal);
+}
+
+
 int wlan_hdd_scan_abort(hdd_adapter_t *pAdapter)
 {
     hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);