wlan: Fix for not receiving probe request.
Don't receive the probe request frame when we sent P2P action
frame to avoid latency for receiving feedback from firmware.
Change-Id: I40f014c65144d29cbbcf711ea46c4e2a58cb9305
CRs-Fixed: 480347
diff --git a/CORE/SME/inc/p2p_Api.h b/CORE/SME/inc/p2p_Api.h
index c0b7554..a751f54 100644
--- a/CORE/SME/inc/p2p_Api.h
+++ b/CORE/SME/inc/p2p_Api.h
@@ -39,14 +39,16 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
+
+
/******************************************************************************
*
* Name: p2p_Api.h
*
* Description: P2P FSM defines.
*
-* Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
-* Qualcomm Confidential and Proprietary.
+* Copyright 2008 (c) Qualcomm Technologies, Inc. All Rights Reserved.
+* Qualcomm Technologies Confidential and Proprietary.
*
******************************************************************************/
@@ -489,11 +491,11 @@
#endif
} tp2pContext, *tPp2pContext;
-
eHalStatus sme_RemainOnChannel( tHalHandle hHal, tANI_U8 sessionId,
tANI_U8 channel, tANI_U32 duration,
- remainOnChanCallback callback,
- void *pContext );
+ remainOnChanCallback callback,
+ void *pContext,
+ tANI_U8 isP2PProbeReqAllowed);
eHalStatus sme_ReportProbeReq( tHalHandle hHal, tANI_U8 flag );
eHalStatus sme_updateP2pIe( tHalHandle hHal, void *p2pIe,
tANI_U32 p2pIeLength );
@@ -509,11 +511,14 @@
eHalStatus p2pRemainOnChannel( tHalHandle hHal, tANI_U8 sessionId,
tANI_U8 channel, tANI_U32 duration,
remainOnChanCallback callback, void *pContext,
+ tANI_U8 isP2PProbeReqAllowed,
eP2PRemainOnChnReason reason);
#else
eHalStatus p2pRemainOnChannel( tHalHandle hHal, tANI_U8 sessionId,
tANI_U8 channel, tANI_U32 duration,
- remainOnChanCallback callback, void *pContext);
+ remainOnChanCallback callback,
+ void *pContext,
+ tANI_U8 isP2PProbeReqAllowed);
#endif
eHalStatus p2pSendAction( tHalHandle hHal, tANI_U8 sessionId,
const tANI_U8 *pBuf, tANI_U32 len,
diff --git a/CORE/SME/inc/smeInside.h b/CORE/SME/inc/smeInside.h
index c885744..e2c09c1 100644
--- a/CORE/SME/inc/smeInside.h
+++ b/CORE/SME/inc/smeInside.h
@@ -112,6 +112,7 @@
tANI_U8 chn;
tANI_U8 phyMode;
tANI_U32 duration;
+ tANI_U8 isP2PProbeReqAllowed;
void* callback;
void* callbackCtx;
}tRemainChlCmd;
diff --git a/CORE/SME/src/p2p/p2p_Api.c b/CORE/SME/src/p2p/p2p_Api.c
index 75efe47..87be42b 100644
--- a/CORE/SME/src/p2p/p2p_Api.c
+++ b/CORE/SME/src/p2p/p2p_Api.c
@@ -39,6 +39,8 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
+
+
#include "sme_Api.h"
#include "smsDebug.h"
#include "csrInsideApi.h"
@@ -122,6 +124,7 @@
pMsg->phyMode = p2pRemainonChn->u.remainChlCmd.phyMode;
pMsg->duration = p2pRemainonChn->u.remainChlCmd.duration;
pMsg->sessionId = p2pRemainonChn->sessionId;
+ pMsg->isProbeRequestAllowed = p2pRemainonChn->u.remainChlCmd.isP2PProbeReqAllowed;
#ifdef WLAN_FEATURE_P2P_INTERNAL
pMsg->sessionId = pSession->sessionId;
if( p2pContext->probeRspIeLength )
@@ -738,7 +741,7 @@
eHalStatus p2pRemainOnChannel(tHalHandle hHal, tANI_U8 sessionId,
tANI_U8 channel, tANI_U32 duration,
remainOnChanCallback callback,
- void *pContext
+ void *pContext, tANI_U8 isP2PProbeReqAllowed
#ifdef WLAN_FEATURE_P2P_INTERNAL
, eP2PRemainOnChnReason reason
#endif
@@ -771,6 +774,7 @@
pRemainChlCmd->sessionId = sessionId;
pRemainChlCmd->u.remainChlCmd.chn = channel;
pRemainChlCmd->u.remainChlCmd.duration = duration;
+ pRemainChlCmd->u.remainChlCmd.isP2PProbeReqAllowed = isP2PProbeReqAllowed;
pRemainChlCmd->u.remainChlCmd.callback = callback;
pRemainChlCmd->u.remainChlCmd.callbackCtx = pContext;
@@ -1069,7 +1073,7 @@
p2pContext->PeerFound = TRUE;
smsLog( pMac, LOGE, "%s Calling remain on channel ", __func__);
status = p2pRemainOnChannel( pMac, p2pContext->SMEsessionId, p2pContext->P2PListenChannel/*pScanResult->BssDescriptor.channelId*/, P2P_REMAIN_ON_CHAN_TIMEOUT_LOW,
- NULL, NULL, eP2PRemainOnChnReasonSendFrame);
+ NULL, NULL, TRUE, eP2PRemainOnChnReasonSendFrame);
if(status != eHAL_STATUS_SUCCESS)
{
smsLog( pMac, LOGE, "%s remain on channel failed", __func__);
@@ -1364,7 +1368,7 @@
if(p2pRemainOnChannel( pMac, pP2pContext->SMEsessionId,
pP2pContext->P2PListenChannel, P2P_REMAIN_ON_CHAN_TIMEOUT_LOW,
- NULL, NULL, eP2PRemainOnChnReasonSendFrame))
+ NULL, NULL, TRUE, eP2PRemainOnChnReasonSendFrame))
{
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s remain on channel failed", __func__);
}
@@ -1470,7 +1474,7 @@
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s Calling RemainOnChannel with duration %d on channel %d",
__func__, p2pContext->listenDuration, p2pContext->P2PListenChannel);
status = p2pRemainOnChannel( p2pContext->hHal, p2pContext->SMEsessionId, p2pContext->P2PListenChannel, p2pContext->listenDuration,
- p2pListenStateDiscoverableCallback, p2pContext, eP2PRemainOnChnReasonListen);
+ p2pListenStateDiscoverableCallback, p2pContext, TRUE, eP2PRemainOnChnReasonListen);
}
else
{
@@ -1552,7 +1556,7 @@
__func__, pMac->p2pContext[sessionId].listenDuration, pMac->p2pContext[sessionId].P2PListenChannel);
p2pRemainOnChannel( pMac, pMac->p2pContext[sessionId].SMEsessionId, pMac->p2pContext[sessionId].P2PListenChannel,
pMac->p2pContext[sessionId].listenDuration, p2pListenStateDiscoverableCallback,
- &pMac->p2pContext[sessionId], eP2PRemainOnChnReasonListen);
+ &pMac->p2pContext[sessionId], TRUE, eP2PRemainOnChnReasonListen);
}
else
{
@@ -1573,7 +1577,7 @@
__func__, pMac->p2pContext[sessionId].listenDuration, pMac->p2pContext[sessionId].P2PListenChannel);
p2pRemainOnChannel( pMac, pMac->p2pContext[sessionId].SMEsessionId, pMac->p2pContext[sessionId].P2PListenChannel,
pMac->p2pContext[sessionId].listenDuration, p2pListenStateDiscoverableCallback,
- &pMac->p2pContext[sessionId], eP2PRemainOnChnReasonListen);
+ &pMac->p2pContext[sessionId], TRUE, eP2PRemainOnChnReasonListen);
}
else
{
@@ -1605,7 +1609,7 @@
__func__, pMac->p2pContext[sessionId].listenDuration, pMac->p2pContext[sessionId].P2PListenChannel);
p2pRemainOnChannel( pMac, pMac->p2pContext[sessionId].SMEsessionId, pMac->p2pContext[sessionId].P2PListenChannel,
pMac->p2pContext[sessionId].listenDuration, p2pListenStateDiscoverableCallback,
- &pMac->p2pContext[sessionId], eP2PRemainOnChnReasonListen);
+ &pMac->p2pContext[sessionId], TRUE, eP2PRemainOnChnReasonListen);
}
break;
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index 4ecbe9d..85dbe6f 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -5641,18 +5641,19 @@
\param context - HDD Callback param
\return eHalStatus
---------------------------------------------------------------------------*/
-
eHalStatus sme_RemainOnChannel(tHalHandle hHal, tANI_U8 sessionId,
tANI_U8 channel, tANI_U32 duration,
- remainOnChanCallback callback,
- void *pContext)
+ remainOnChanCallback callback,
+ void *pContext,
+ tANI_U8 isP2PProbeReqAllowed)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
if ( eHAL_STATUS_SUCCESS == ( status = sme_AcquireGlobalLock( &pMac->sme ) ) )
{
- status = p2pRemainOnChannel (hHal, sessionId, channel, duration, callback, pContext
+ status = p2pRemainOnChannel (hHal, sessionId, channel, duration, callback, pContext,
+ isP2PProbeReqAllowed
#ifdef WLAN_FEATURE_P2P_INTERNAL
, eP2PRemainOnChnReasonUnknown
#endif