From d61bcf27e080de5d16aa07b9745c3e150fdcccb1 Mon Sep 17 00:00:00 2001 From: Will Huang Date: Mon, 18 Mar 2019 16:06:08 +0800 Subject: qcacld-3.0: Purge neighbor report cache if unsolicited Propagation from qcacld-2.0 to qcacld-3.0 If AP sends unsolicited neighbor reports to station proactively, the cached neighbor report list will grow longer and longer. Fix it by purging the cache on reception of unsolicited neighbor report. Change-Id: I2458607041caeb84cb553aa1b9fc6f4029a5cf1c CRs-Fixed: 2419615 --- core/sme/src/rrm/sme_rrm.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c index c36335471447..e4978f0f2ac1 100644 --- a/core/sme/src/rrm/sme_rrm.c +++ b/core/sme/src/rrm/sme_rrm.c @@ -1326,23 +1326,13 @@ static QDF_STATUS sme_rrm_process_neighbor_report(tpAniSirGlobal pMac, tpRrmNeighborReportDesc pNeighborReportDesc; uint8_t i = 0; QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; - uint32_t sessionId; - - /* Get the session id */ - status = - csr_roam_get_session_id_from_bssid(pMac, - (struct qdf_mac_addr *) pNeighborRpt->bssId, - &sessionId); - if (QDF_IS_STATUS_SUCCESS(status)) { -#ifdef FEATURE_WLAN_ESE - /* Clear the cache for ESE. */ - if (csr_roam_is_ese_assoc(pMac, sessionId)) { - rrm_ll_purge_neighbor_cache(pMac, - &pMac->rrm.rrmSmeContext. - neighborReportCache); - } -#endif - } + + /* Purge the cache on reception of unsolicited neighbor report */ + if (!pMac->rrm.rrmSmeContext.neighborReqControlInfo. + isNeighborRspPending) + rrm_ll_purge_neighbor_cache(pMac, + &pMac->rrm.rrmSmeContext. + neighborReportCache); for (i = 0; i < pNeighborRpt->numNeighborReports; i++) { pNeighborReportDesc = @@ -1395,6 +1385,7 @@ end: qdf_status = QDF_STATUS_E_FAILURE; rrm_indicate_neighbor_report_result(pMac, qdf_status); + return status; } -- cgit v1.2.3