From c3587d0340ccfa91d6efff47cbcae8adb1eda181 Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Mon, 5 Aug 2019 11:25:26 +0530 Subject: [PATCH] qcacld-3.0: Filter the blacklist BSSID in scan for ssid Currently the driver sends a unicast probe request to the BSSID which is blacklisted, which in turns violate the SPEC, as the BSSID maybe rejected as part of OCE assoc reject. Fix is to check if the BSSID is blacklisted, don't go for unicast probes. Change-Id: I14f283d7425d40706cef29db38b48333ee9a7fff CRs-Fixed: 2500273 --- core/sme/src/csr/csr_api_roam.c | 9 +++++---- core/sme/src/csr/csr_api_scan.c | 17 +++++++++-------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 90c53a762d9a..52e11ab5b378 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -8238,7 +8238,11 @@ QDF_STATUS csr_roam_connect(struct mac_context *mac, uint32_t sessionId, status); fCallCallback = true; } - } else if (status != QDF_STATUS_E_EXISTS) { + } else if (status == QDF_STATUS_E_EXISTS && + pProfile->BSSIDs.numOfBSSIDs) { + sme_debug("Scan entries removed either due to rssi reject or assoc disallowed"); + fCallCallback = true; + } else { /* scan for this SSID */ status = csr_scan_for_ssid(mac, sessionId, pProfile, roamId, true); @@ -8249,9 +8253,6 @@ QDF_STATUS csr_roam_connect(struct mac_context *mac, uint32_t sessionId, } else { sme_debug("SSID scan requested"); } - } else { - sme_debug("Scan entries removed either due to rssi reject or assoc disallowed"); - fCallCallback = true; } } else { fCallCallback = true; diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index ce4fe8400bed..471c7db98390 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -2772,7 +2772,7 @@ QDF_STATUS csr_scan_get_result(struct mac_context *mac_ctx, qdf_list_t *list = NULL; struct scan_filter *filter = NULL; struct wlan_objmgr_pdev *pdev = NULL; - uint32_t num_bss; + uint32_t num_bss = 0; if (results) *results = CSR_INVALID_SCANRESULT_HANDLE; @@ -2800,16 +2800,20 @@ QDF_STATUS csr_scan_get_result(struct mac_context *mac_ctx, list = ucfg_scan_get_result(pdev, pFilter ? filter : NULL); - if (list) - sme_debug("num_entries %d", qdf_list_size(list)); - + if (list) { + num_bss = qdf_list_size(list); + sme_debug("num_entries %d", num_bss); + } /* Filter the scan list with the blacklist, rssi reject, avoided APs */ if (pFilter && pFilter->csrPersona == QDF_STA_MODE) wlan_blm_filter_bssid(pdev, list); if (!list || (list && !qdf_list_size(list))) { sme_debug("scan list empty"); - status = QDF_STATUS_E_NULL_VALUE; + if (num_bss) + status = QDF_STATUS_E_EXISTS; + else + status = QDF_STATUS_E_NULL_VALUE; goto error; } @@ -2823,9 +2827,6 @@ QDF_STATUS csr_scan_get_result(struct mac_context *mac_ctx, ret_list->pCurEntry = NULL; status = csr_parse_scan_list(mac_ctx, ret_list, list); - num_bss = csr_ll_count(&ret_list->List); - sme_debug("status: %d No of BSS: %d", - status, num_bss); if (QDF_IS_STATUS_ERROR(status) || !results) /* Fail or No one wants the result. */ csr_scan_result_purge(mac_ctx, (tScanResultHandle) ret_list);