From 3855eaadc7bda9725e1187f3e0fb9425c57d9a41 Mon Sep 17 00:00:00 2001 From: tinlin Date: Mon, 21 May 2018 17:43:04 +0800 Subject: [PATCH] qcacld-3.0: Report BSS of only requested RC in Rrm Propagation from cld2.0 to cld3.0. When receiving beacon request for radio measurement, sta reports BSS in all valid channels regardless of specified regulatory class in request. To fix this, let sta report only BSS of requested RC. Change-Id: I98c80ab3d53dd9d63225349e3c7657f48c758957 CRs-Fixed: 2237989 --- core/sme/src/rrm/sme_rrm.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c index 151daf1ec31c..be5ee7a972e5 100644 --- a/core/sme/src/rrm/sme_rrm.c +++ b/core/sme/src/rrm/sme_rrm.c @@ -26,6 +26,7 @@ #include "sme_inside.h" #include "sme_api.h" #include "cfg_api.h" +#include "cds_regdomain.h" #ifdef FEATURE_WLAN_DIAG_SUPPORT #include "host_diag_core_event.h" @@ -869,6 +870,7 @@ QDF_STATUS sme_rrm_process_beacon_report_req_ind(tpAniSirGlobal pMac, tpSirBeaconReportReqInd pBeaconReq = (tpSirBeaconReportReqInd) pMsgBuf; tpRrmSMEContext pSmeRrmContext = &pMac->rrm.rrmSmeContext; uint32_t len = 0, i = 0; + uint8_t temp = 0; sme_debug("Received Beacon report request ind Channel = %d", pBeaconReq->channelInfo.channelNum); @@ -886,7 +888,19 @@ QDF_STATUS sme_rrm_process_beacon_report_req_ind(tpAniSirGlobal pMac, } csr_get_cfg_valid_channels(pMac, pSmeRrmContext->channelList. ChannelList, &len); - pSmeRrmContext->channelList.numOfChannels = (uint8_t) len; + + for (i = 0; i < len; i++) { + if (wlan_reg_dmn_get_opclass_from_channel( + pMac->scan.countryCodeCurrent, + pSmeRrmContext->channelList.ChannelList[i], + BWALL) == + pBeaconReq->channelInfo.regulatoryClass) { + pSmeRrmContext->channelList.ChannelList[temp] = + pSmeRrmContext->channelList.ChannelList[i]; + temp++; + } + } + pSmeRrmContext->channelList.numOfChannels = (uint8_t)temp; } else { len = 0; pSmeRrmContext->channelList.numOfChannels = 0;