wlan: Do not attempt TDLS connection in case of concurrency.

Currently TDLS is operational only when there is a single
active session. Hence, ensure that TDLS sessions are not
created during multiple active concurrent sessions.
Thus , this commit speaks to not attempt TDLS connection when
another concurrent session is trying to get established.
This goes with the assumption that before the concurrent
session is attempted to form , the supplicant shall issue
the scan's which shall ensure that the TDLS sessions on the
current active session are deleted / torn down.
CRs-Fixed: 669605
Change-Id: I7ebfa1c43251b86a522f5f66939083fd04c1ff7d
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 4ad62e6..a3e6d06 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -6405,7 +6405,7 @@
 
                 if ( pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)
                 {
-                    if (0 != wlan_hdd_tdls_init (pAdapter))
+                    if (0 != wlan_hdd_sta_tdls_init (pAdapter))
                     {
                         hddLog(VOS_TRACE_LEVEL_ERROR,
                             "%s: tdls initialization failed", __func__);
@@ -12714,6 +12714,12 @@
 
         return -ENOTSUPP;
         }
+
+        if (vos_max_concurrent_connections_reached())
+        {
+            hddLog(VOS_TRACE_LEVEL_INFO, FL("Reached max concurrent connections"));
+            return -EINVAL;
+        }
     }
 
     if (WLAN_IS_TDLS_SETUP_ACTION(action_code))