From a03a58e9f52afb5cec9708636aafc5f71d60010d Mon Sep 17 00:00:00 2001 From: Vignesh Viswanathan Date: Fri, 17 Aug 2018 11:37:56 +0530 Subject: [PATCH] qcacld-3.0: Drop Probe Requests on Scan Queue if queue is full Drop Probe request frames before posting on Scan Queue if the queue is already having too many beacon/probe frames to process. Change-Id: Iaad3d3ea0b50edf7ae7a9c5437ac5c210fe6a97f CRs-Fixed: 2298581 --- core/mac/src/pe/lim/lim_api.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index 3bd335dbf0ae..173d463f7d5a 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -68,6 +68,7 @@ #include "wlan_objmgr_psoc_obj.h" #include "os_if_nan.h" #include +#include #include #include "wlan_utility.h" #include @@ -1259,6 +1260,16 @@ static QDF_STATUS pe_handle_probe_req_frames(tpAniSirGlobal mac_ctx, { QDF_STATUS status; struct scheduler_msg msg = {0}; + uint32_t scan_queue_size = 0; + + /* Check if the probe request frame can be posted in the scan queue */ + status = scheduler_get_queue_size(QDF_MODULE_ID_SCAN, &scan_queue_size); + if (!QDF_IS_STATUS_SUCCESS(status) || + scan_queue_size > MAX_BCN_PROBE_IN_SCAN_QUEUE) { + pe_debug_rl("Dropping probe req frame, queue size %d", + scan_queue_size); + return QDF_STATUS_E_FAILURE; + } /* Forward to MAC via mesg = SIR_BB_XPORT_MGMT_MSG */ msg.type = SIR_BB_XPORT_MGMT_MSG;