qcacld-3.0: Refactor lim_is_pkt_candidate_for_drop()
refactor lim_is_pkt_candidate_for_drop function to include logic IBSS mode. Change-Id: I3446e8f4d373e8f88d56d010a48a70cecf4b3062 CRs-Fixed: 2232890
This commit is contained in:
@@ -2654,29 +2654,17 @@ tMgmtFrmDropReason lim_is_pkt_candidate_for_drop(tpAniSirGlobal pMac,
|
||||
if ((subType == SIR_MAC_MGMT_BEACON) ||
|
||||
(subType == SIR_MAC_MGMT_PROBE_RSP)) {
|
||||
if (lim_is_beacon_miss_scenario(pMac, pRxPacketInfo)) {
|
||||
MTRACE(mac_trace
|
||||
(pMac, TRACE_CODE_INFO_LOG, 0,
|
||||
MTRACE(mac_trace(pMac, TRACE_CODE_INFO_LOG, 0,
|
||||
eLOG_NODROP_MISSED_BEACON_SCENARIO));
|
||||
return eMGMT_DROP_NO_DROP;
|
||||
}
|
||||
if (lim_is_system_in_scan_state(pMac)) {
|
||||
if (lim_is_system_in_scan_state(pMac))
|
||||
return eMGMT_DROP_NO_DROP;
|
||||
} else if (WMA_IS_RX_IN_SCAN(pRxPacketInfo)) {
|
||||
else if (WMA_IS_RX_IN_SCAN(pRxPacketInfo))
|
||||
return eMGMT_DROP_SCAN_MODE_FRAME;
|
||||
} else {
|
||||
/* Beacons and probe responses can come in any time
|
||||
* because of parallel scans. Don't drop them.
|
||||
*/
|
||||
return eMGMT_DROP_NO_DROP;
|
||||
}
|
||||
}
|
||||
|
||||
framelen = WMA_GET_RX_PAYLOAD_LEN(pRxPacketInfo);
|
||||
pBody = WMA_GET_RX_MPDU_DATA(pRxPacketInfo);
|
||||
|
||||
/* Drop INFRA Beacons and Probe Responses in IBSS Mode */
|
||||
if ((subType == SIR_MAC_MGMT_BEACON) ||
|
||||
(subType == SIR_MAC_MGMT_PROBE_RSP)) {
|
||||
/* drop the frame if length is less than 12 */
|
||||
if (framelen < LIM_MIN_BCN_PR_LENGTH)
|
||||
return eMGMT_DROP_INVALID_SIZE;
|
||||
@@ -2690,14 +2678,17 @@ tMgmtFrmDropReason lim_is_pkt_candidate_for_drop(tpAniSirGlobal pMac,
|
||||
if (!capabilityInfo.ibss)
|
||||
return eMGMT_DROP_NO_DROP;
|
||||
|
||||
/* Drop INFRA Beacons and Probe Responses in IBSS Mode */
|
||||
/* 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;
|
||||
|
||||
} else if ((subType == SIR_MAC_MGMT_PROBE_REQ) &&
|
||||
(!WMA_GET_RX_BEACON_SENT(pRxPacketInfo))) {
|
||||
pHdr = WMA_GET_RX_MAC_HEADER(pRxPacketInfo);
|
||||
psessionEntry =
|
||||
pe_find_session_by_bssid(pMac, pHdr->bssId, &sessionId);
|
||||
psessionEntry = pe_find_session_by_bssid(pMac,
|
||||
pHdr->bssId,
|
||||
&sessionId);
|
||||
if ((psessionEntry && !LIM_IS_IBSS_ROLE(psessionEntry)) ||
|
||||
(!psessionEntry))
|
||||
return eMGMT_DROP_NO_DROP;
|
||||
|
Reference in New Issue
Block a user