wlan: Add Find AP feature

Add changes to handle find AP indication for find AP feature.
After getting this indication, host will disconnect from the
current AP since current AP is no more available.

DUT will connect to new found AP using supplicant once it
disconnects with current AP.

CRs-Fixed: 755225
Change-Id: I5e49c4f6424a8a8278bc681fb7481ebcd82d6628
diff --git a/CORE/MAC/src/pe/lim/limSession.c b/CORE/MAC/src/pe/lim/limSession.c
index 58b7571..cbd2e4d 100644
--- a/CORE/MAC/src/pe/lim/limSession.c
+++ b/CORE/MAC/src/pe/lim/limSession.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2014, 2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -236,6 +236,20 @@
 
 }
 
+tANI_S8 limGetInfraSessionId(tpAniSirGlobal pMac)
+{
+    tANI_U8 i;
+    for (i = 0; i < pMac->lim.maxBssId; i++)
+    {
+        if ((pMac->lim.gpSession[i].valid) &&
+           (pMac->lim.gpSession[i].limSystemRole == eLIM_STA_ROLE))
+        {
+            return i;
+        }
+    }
+    limLog(pMac, LOG4, FL("Session lookup fails for infra mode"));
+    return -1;
+}
 
 /*--------------------------------------------------------------------------
   \brief peFindSessionByBssIdx() - looks up the PE session given the bssIdx.