wlan: Peer cannot find P2P DUT when ListenChnl=OperChnl of conc STA-AP sess

Fixes peer device not able to search P2P DUT during P2P find when
DUT has a concurrent STA-AP session and P2P search listen channel
is same as STA-AP session operating channel.
Fix: Removed the special optimization when a concurrent session
exists with operating channel same as P2P listen channel since it
was causing issues in P2P search. The reason was STA-AP link
entering BMPS when returning to home channel causing P2P search
to miss Probe Reqs and hence not respond with Probe Rsp causing
peer device to NOT find us.

Change-Id: I121eb739c554016a496589405de0de88354ccab6
CR-Fixed: 416323
diff --git a/CORE/MAC/src/pe/lim/limP2P.c b/CORE/MAC/src/pe/lim/limP2P.c
index dccb438..a037337 100644
--- a/CORE/MAC/src/pe/lim/limP2P.c
+++ b/CORE/MAC/src/pe/lim/limP2P.c
@@ -111,8 +111,17 @@
 
 int limProcessRemainOnChnlReq(tpAniSirGlobal pMac, tANI_U32 *pMsg)
 {
+
+    /* CONC_OPER_AND_LISTEN_CHNL_SAME_OPTIMIZE - Currently removed the special optimization when a concurrent session
+     * exists with operating channel same as P2P listen channel since it was causing issues in P2P search. The reason was
+     * STA-AP link entering BMPS when returning to home channel causing P2P search to miss Probe Reqs and hence not
+     * respond with Probe Rsp causing peer device to NOT find us.
+     * If we need this optimization, we need to find a way to keep the STA-AP link awake (no BMPS) on home channel when in listen state
+     */
+#ifdef CONC_OPER_AND_LISTEN_CHNL_SAME_OPTIMIZE
     tANI_U8 i;
     tpPESession psessionEntry;
+#endif
 #ifdef WLAN_FEATURE_P2P_INTERNAL
     tpPESession pP2pSession;
 #endif
@@ -120,6 +129,7 @@
     tSirRemainOnChnReq *MsgBuff = (tSirRemainOnChnReq *)pMsg;
     pMac->lim.gpLimRemainOnChanReq = MsgBuff;
 
+#ifdef CONC_OPER_AND_LISTEN_CHNL_SAME_OPTIMIZE
     for (i =0; i < pMac->lim.maxBssId;i++)
     {
         psessionEntry = peFindSessionBySessionId(pMac,i);
@@ -175,7 +185,7 @@
             }
         }
     }
-
+#endif
     pMac->lim.gLimPrevMlmState = pMac->lim.gLimMlmState;
     pMac->lim.gLimMlmState     = eLIM_MLM_P2P_LISTEN_STATE;
 
@@ -186,10 +196,12 @@
                    limRemainOnChnlSuspendLinkHdlr, NULL);
     return FALSE;
 
+#ifdef CONC_OPER_AND_LISTEN_CHNL_SAME_OPTIMIZE
 error:
     limRemainOnChnRsp(pMac,eHAL_STATUS_FAILURE, NULL);
     /* pMsg is freed by the caller */
     return FALSE;
+#endif
 }