summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Kondabattini <ganeshk@qti.qualcomm.com>2014-01-28 06:01:25 +0530
committerPrakash Dhavali <pdhavali@qca.qualcomm.com>2014-01-29 12:06:40 -0800
commit2dfa009a544e980ecc2ef5fe893ea40bb2078782 (patch)
treeb320a4889d0802c7cf0c74be1eda2d451214b43a
parentd3dbfd79792460a057e4f85579bf6a58464849c5 (diff)
CLD_P2P: Filter Beacon/Probe response frames in P2P Search.
During P2P Search the device can receive the beacons and probe response frames from the non P2P devices. These beacon and probe response frames are not going to have P2P Ie in it. Drop beacon and probe response frames which are not having the P2P IE. This avoids adding the BSS entries of non P2P devices to the scan cache. Change-Id: Ie04673b913a89ce9a018afecb6d1f2b372366887 CRs-Fixed: 598798
-rw-r--r--CORE/MAC/inc/aniGlobal.h2
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c2
-rw-r--r--CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c7
-rw-r--r--CORE/MAC/src/pe/lim/limScanResultUtils.c4
4 files changed, 14 insertions, 1 deletions
diff --git a/CORE/MAC/inc/aniGlobal.h b/CORE/MAC/inc/aniGlobal.h
index 5b637bd24d36..2f28e7acc800 100644
--- a/CORE/MAC/inc/aniGlobal.h
+++ b/CORE/MAC/inc/aniGlobal.h
@@ -916,6 +916,8 @@ tLimMlmOemDataRsp *gpLimMlmOemDataRsp;
/* Number of channel switch IEs sent so far */
tANI_U8 gLimDfsChanSwTxCount;
tANI_U8 gLimDfsTargetChanNum;
+ tANI_U8 fOffloadScanPending; /*Flag to track offload scan */
+ tANI_U8 fOffloadScanP2PSearch; /*Flag to track the p2p search */
} tAniSirLim, *tpAniSirLim;
typedef struct sLimMgmtFrameRegistration
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
index a6872a80508f..f903fe5ff95a 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
@@ -4876,6 +4876,8 @@ void limProcessRxScanEvent(tpAniSirGlobal pMac, void *buf)
break;
case SCAN_EVENT_START_FAILED:
case SCAN_EVENT_COMPLETED:
+ pMac->lim.fOffloadScanPending = 0;
+ pMac->lim.fOffloadScanP2PSearch = 0;
if (P2P_SCAN_TYPE_LISTEN == pScanEvent->p2pScanType)
{
limSendSmeRsp(pMac, eWNI_SME_REMAIN_ON_CHN_RSP,
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index aa683a63c6fd..6971a2f1eb53 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -1073,6 +1073,9 @@ static eHalStatus limSendHalStartScanOffloadReq(tpAniSirGlobal pMac,
tANI_U16 i, len;
tSirRetStatus rc = eSIR_SUCCESS;
+ pMac->lim.fOffloadScanPending = 0;
+ pMac->lim.fOffloadScanP2PSearch = 0;
+
/* The tSirScanOffloadReq will reserve the space for first channel,
so allocate the memory for (numChannels - 1) and uIEFieldLen */
len = sizeof(tSirScanOffloadReq) + (pScanReq->channelList.numChannels - 1) +
@@ -1150,6 +1153,10 @@ static eHalStatus limSendHalStartScanOffloadReq(tpAniSirGlobal pMac,
return eHAL_STATUS_FAILURE;
}
+ pMac->lim.fOffloadScanPending = 1;
+ if (pScanReq->p2pSearch)
+ pMac->lim.fOffloadScanP2PSearch = 1;
+
return eHAL_STATUS_SUCCESS;
}
diff --git a/CORE/MAC/src/pe/lim/limScanResultUtils.c b/CORE/MAC/src/pe/lim/limScanResultUtils.c
index 3710177c4217..e7f0b6de82bc 100644
--- a/CORE/MAC/src/pe/lim/limScanResultUtils.c
+++ b/CORE/MAC/src/pe/lim/limScanResultUtils.c
@@ -159,7 +159,9 @@ limCollectBssDescription(tpAniSirGlobal pMac,
/**
* Drop all the beacons and probe response without P2P IE during P2P search
*/
- if (NULL != pMac->lim.gpLimMlmScanReq && pMac->lim.gpLimMlmScanReq->p2pSearch)
+ if ((NULL != pMac->lim.gpLimMlmScanReq && pMac->lim.gpLimMlmScanReq->p2pSearch) ||
+ (pMac->fScanOffload && pMac->lim.fOffloadScanPending &&
+ pMac->lim.fOffloadScanP2PSearch))
{
if (NULL == limGetP2pIEPtr(pMac, (pBody + SIR_MAC_B_PR_SSID_OFFSET), ieLen))
{