From 86c3dcc99a0b2f04ca378c3d18e4dd33d1fbfdb1 Mon Sep 17 00:00:00 2001 From: Yeshwanth Sriram Guntuka Date: Thu, 28 Mar 2019 16:08:43 +0530 Subject: [PATCH] qcacld-3.0: Free active RRM current req on STA roaming Scan on channels triggered as part of active mode RRM beacon report request fails on receiving roaming indication from firmware due to get_session_id_from_bssid failure. So current req in RRM PE context will not be freed and as a result all subsequent beacon report requests will fail. Fix is to free current req in RRM PE context on scan req failure due to STA roaming to a different AP. Change-Id: Ib911ddcc7538bb5f3711647bb83a1978d1a1af73 CRs-Fixed: 2419044 --- core/sme/src/rrm/sme_rrm.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c index 52af2972d3f95..b4e24fec0a88c 100644 --- a/core/sme/src/rrm/sme_rrm.c +++ b/core/sme/src/rrm/sme_rrm.c @@ -654,12 +654,26 @@ static QDF_STATUS sme_rrm_scan_request_callback(mac_handle_t mac_handle, tpRrmSMEContext pSmeRrmContext = &mac->rrm.rrmSmeContext; uint32_t time_tick; QDF_STATUS qdf_status; + uint32_t session_id; + bool valid_result = true; + + /* + * RRM scan response received after roaming to different AP. + * Post message to PE for rrm cleanup. + */ + qdf_status = csr_roam_get_session_id_from_bssid(mac, + &pSmeRrmContext->sessionBssId, + &session_id); + if (qdf_status == QDF_STATUS_E_FAILURE) { + sme_debug("Cleanup RRM context due to STA roaming"); + valid_result = false; + } /* if any more channels are pending, start a timer of a random value * within randomization interval. */ - if ((pSmeRrmContext->currentIndex + 1) < - pSmeRrmContext->channelList.numOfChannels) { + if (((pSmeRrmContext->currentIndex + 1) < + pSmeRrmContext->channelList.numOfChannels) && valid_result) { sme_rrm_send_scan_result(mac, 1, &pSmeRrmContext->channelList. ChannelList[pSmeRrmContext