diff options
author | Aditya Kodukula <quic_akodukul@quicinc.com> | 2019-12-18 15:28:39 +0530 |
---|---|---|
committer | Paul Chen <chenpaul@google.com> | 2020-12-01 02:47:37 +0000 |
commit | a63e604b378f4beed7c4771f1b9ccd4a1fb86b23 (patch) | |
tree | 4fbcf3bd1032cf2df0047edf0a7d0fe01a4ec48f | |
parent | 3d3b3ef7eae193bfdd5dd2f2ac5edc073a335a6a (diff) | |
download | qcacld-a63e604b378f4beed7c4771f1b9ccd4a1fb86b23.tar.gz |
qcacld-3.0: Drop Excessive Disassoc frames
Currently, In function lim_is_pkt_candidate_for_drop
to drop excessive management frames subType should be
SIR_MAC_MGMT_ASSOC_REQ, SIR_MAC_MGMT_DISASSOC and
SIR_MAC_MGMT_DEAUTH. As subType can not be equal to
3 management subtypes at same time,excessive frames for Assoc,
Disassoc and Deauth will never drop.
To drop excessive frames keep a check of OR instead of AND for
ASSOC, DISASSOC AND DEAUTH subTypes. Send diag event after all
duplicate checks in lim_process_disassoc_frame and
lim_process_deauth_frame.
Change-Id: I595378d409804d3fbd9c5d22a37090d6dc429075
CRs-Fixed: 2588832
Bug: 172349044
Signed-off-by: Aditya Kodukula <quic_akodukul@quicinc.com>
-rw-r--r-- | core/mac/src/pe/lim/lim_process_deauth_frame.c | 19 | ||||
-rw-r--r-- | core/mac/src/pe/lim/lim_process_disassoc_frame.c | 18 |
2 files changed, 18 insertions, 19 deletions
diff --git a/core/mac/src/pe/lim/lim_process_deauth_frame.c b/core/mac/src/pe/lim/lim_process_deauth_frame.c index 9f0f7dec44..49cfb4c1c1 100644 --- a/core/mac/src/pe/lim/lim_process_deauth_frame.c +++ b/core/mac/src/pe/lim/lim_process_deauth_frame.c @@ -159,16 +159,6 @@ lim_process_deauth_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, reasonCode, lim_dot11_reason_str(reasonCode), MAC_ADDR_ARRAY(pHdr->sa)); - if (pMac->roam.configParam.enable_fatal_event && - (reasonCode != eSIR_MAC_UNSPEC_FAILURE_REASON && - reasonCode != eSIR_MAC_DEAUTH_LEAVING_BSS_REASON && - reasonCode != eSIR_MAC_DISASSOC_LEAVING_BSS_REASON)) { - cds_flush_logs(WLAN_LOG_TYPE_FATAL, - WLAN_LOG_INDICATOR_HOST_DRIVER, - WLAN_LOG_REASON_DISCONNECT, - false, false); - } - lim_diag_event_report(pMac, WLAN_PE_DIAG_DEAUTH_FRAME_EVENT, psessionEntry, 0, reasonCode); @@ -319,6 +309,15 @@ lim_process_deauth_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, lim_perform_deauth(pMac, psessionEntry, reasonCode, pHdr->sa, frame_rssi); + if (pMac->roam.configParam.enable_fatal_event && + (reasonCode != eSIR_MAC_UNSPEC_FAILURE_REASON && + reasonCode != eSIR_MAC_DEAUTH_LEAVING_BSS_REASON && + reasonCode != eSIR_MAC_DISASSOC_LEAVING_BSS_REASON)) { + cds_flush_logs(WLAN_LOG_TYPE_FATAL, + WLAN_LOG_INDICATOR_HOST_DRIVER, + WLAN_LOG_REASON_DISCONNECT, + false, false); + } } /*** end lim_process_deauth_frame() ***/ diff --git a/core/mac/src/pe/lim/lim_process_disassoc_frame.c b/core/mac/src/pe/lim/lim_process_disassoc_frame.c index 7b41e1b9c2..e9c447be84 100644 --- a/core/mac/src/pe/lim/lim_process_disassoc_frame.c +++ b/core/mac/src/pe/lim/lim_process_disassoc_frame.c @@ -157,15 +157,6 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, lim_diag_event_report(pMac, WLAN_PE_DIAG_DISASSOC_FRAME_EVENT, psessionEntry, 0, reasonCode); - if (pMac->roam.configParam.enable_fatal_event && - (reasonCode != eSIR_MAC_UNSPEC_FAILURE_REASON && - reasonCode != eSIR_MAC_DEAUTH_LEAVING_BSS_REASON && - reasonCode != eSIR_MAC_DISASSOC_LEAVING_BSS_REASON)) { - cds_flush_logs(WLAN_LOG_TYPE_FATAL, - WLAN_LOG_INDICATOR_HOST_DRIVER, - WLAN_LOG_REASON_DISCONNECT, - false, false); - } /** * Extract 'associated' context for STA, if any. * This is maintained by DPH and created by LIM. @@ -314,6 +305,15 @@ lim_process_disassoc_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo, lim_perform_disassoc(pMac, frame_rssi, reasonCode, psessionEntry, pHdr->sa); + if (pMac->roam.configParam.enable_fatal_event && + (reasonCode != eSIR_MAC_UNSPEC_FAILURE_REASON && + reasonCode != eSIR_MAC_DEAUTH_LEAVING_BSS_REASON && + reasonCode != eSIR_MAC_DISASSOC_LEAVING_BSS_REASON)) { + cds_flush_logs(WLAN_LOG_TYPE_FATAL, + WLAN_LOG_INDICATOR_HOST_DRIVER, + WLAN_LOG_REASON_DISCONNECT, + false, false); + } } /*** end lim_process_disassoc_frame() ***/ #ifdef FEATURE_WLAN_TDLS |