diff options
| author | Ganesh Kondabattini <ganeshk@qti.qualcomm.com> | 2013-12-04 17:06:59 +0530 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@qca.qualcomm.com> | 2013-12-06 03:17:29 -0800 |
| commit | 4f212add2e8484058a653d208563412e262d552a (patch) | |
| tree | f4eef42c5b4d03ef73cdb6c02a390aa07d274980 | |
| parent | 4d5f2cf39f20dbc2aacc57c342b55127cd669f10 (diff) | |
CLD-P2P: Do not drop the probe request frames in SAP/P2P-GO mode.
WDA_GET_RX_BEACON_SENT is set 0 in CLD. So before dropping the
probe request frame check whether the session is in IBSS mode
or not.
Change-Id: Id9fff1032cf338ab0e132cf5faefbd14ca8fbc5c
CRs-Fixed: 583345
| -rw-r--r-- | CORE/MAC/src/pe/lim/limApi.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/CORE/MAC/src/pe/lim/limApi.c b/CORE/MAC/src/pe/lim/limApi.c index 047353c20df9..4fc5aaa2821e 100644 --- a/CORE/MAC/src/pe/lim/limApi.c +++ b/CORE/MAC/src/pe/lim/limApi.c @@ -2195,6 +2195,9 @@ tMgmtFrmDropReason limIsPktCandidateForDrop(tpAniSirGlobal pMac, tANI_U8 *pRxPac tANI_U32 framelen; tANI_U8 *pBody; tSirMacCapabilityInfo capabilityInfo; + tpSirMacMgmtHdr pHdr=NULL; + tpPESession psessionEntry=NULL; + tANI_U8 sessionId; /* * @@ -2230,12 +2233,6 @@ tMgmtFrmDropReason limIsPktCandidateForDrop(tpAniSirGlobal pMac, tANI_U8 *pRxPac framelen = WDA_GET_RX_PAYLOAD_LEN(pRxPacketInfo); pBody = WDA_GET_RX_MPDU_DATA(pRxPacketInfo); - /* Note sure if this is sufficient, basically this condition allows all probe responses and - * beacons from an infrastructure network - */ - *((tANI_U16*) &capabilityInfo) = sirReadU16(pBody+ LIM_BCN_PR_CAPABILITY_OFFSET); - if(!capabilityInfo.ibss) - return eMGMT_DROP_NO_DROP; #if 0 //Allow the mgmt frames to be queued if STA not in IBSS mode. if (pMac->lim.gLimSystemRole != eLIM_STA_IN_IBSS_ROLE) @@ -2249,9 +2246,15 @@ tMgmtFrmDropReason limIsPktCandidateForDrop(tpAniSirGlobal pMac, tANI_U8 *pRxPac //drop the frame if length is less than 12 if(framelen < LIM_MIN_BCN_PR_LENGTH) return eMGMT_DROP_INVALID_SIZE; - + *((tANI_U16*) &capabilityInfo) = sirReadU16(pBody+ LIM_BCN_PR_CAPABILITY_OFFSET); + /* Note sure if this is sufficient, basically this condition allows all probe responses and + * beacons from an infrastructure network + */ + if(!capabilityInfo.ibss) + return eMGMT_DROP_NO_DROP; + //This can be enhanced to even check the SSID before deciding to enque the frame. if(capabilityInfo.ess) return eMGMT_DROP_INFRA_BCN_IN_IBSS; @@ -2259,6 +2262,13 @@ tMgmtFrmDropReason limIsPktCandidateForDrop(tpAniSirGlobal pMac, tANI_U8 *pRxPac else if( (subType == SIR_MAC_MGMT_PROBE_REQ) && (!WDA_GET_RX_BEACON_SENT(pRxPacketInfo))) { + pHdr = WDA_GET_RX_MAC_HEADER(pRxPacketInfo); + psessionEntry = peFindSessionByBssid(pMac, pHdr->bssId, &sessionId); + if ((psessionEntry && + psessionEntry->limSystemRole != eLIM_STA_IN_IBSS_ROLE) || + (!psessionEntry)) + return eMGMT_DROP_NO_DROP; + //Drop the Probe Request in IBSS mode, if STA did not send out the last beacon //In IBSS, the node which sends out the beacon, is supposed to respond to ProbeReq return eMGMT_DROP_NOT_LAST_IBSS_BCN; |
