From 3dcc43631b86dff7fef8b9da97d7a82d645f9a44 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Tue, 18 Dec 2018 13:11:40 -0800 Subject: [PATCH] qcacld-3.0: Remove csr_roam_connect_to_last_profile() Change Idb53c7cd871c0ccbacd3899f14fccc2a67935f4f ("qcacld-3.0: Remove sme_roam_connect_to_last_profile()" removed the only client of csr_roam_connect_to_last_profile(). Since this function is now obsolete, remove it, along with the helper function csr_roam_join_last_profile(). Change-Id: I3050cd9a704f9c2489a11c75cd439224e44b8748 CRs-Fixed: 2370964 --- core/sme/src/csr/csr_api_roam.c | 89 ------------------------------- core/sme/src/csr/csr_inside_api.h | 9 ---- 2 files changed, 98 deletions(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 4fd75b862972..18429bf72178 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -8238,95 +8238,6 @@ csr_roam_reassoc(struct mac_context *mac_ctx, uint32_t session_id, return status; } -static QDF_STATUS csr_roam_join_last_profile(struct mac_context *mac, - uint32_t sessionId) -{ - QDF_STATUS status = QDF_STATUS_E_FAILURE; - tScanResultHandle hBSSList = NULL; - tCsrScanResultFilter *pScanFilter = NULL; - uint32_t roamId; - struct csr_roam_profile *pProfile = NULL; - struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId); - - if (!pSession) { - sme_err("session %d not found ", sessionId); - return QDF_STATUS_E_FAILURE; - } - - if (pSession->pCurRoamProfile) { - csr_scan_abort_mac_scan(mac, sessionId, INVAL_SCAN_ID); - /* We have to make a copy of pCurRoamProfile because it - * will be free inside csr_roam_issue_connect - */ - pProfile = qdf_mem_malloc(sizeof(struct csr_roam_profile)); - if (NULL == pProfile) { - status = QDF_STATUS_E_NOMEM; - goto end; - } - status = csr_roam_copy_profile(mac, pProfile, - pSession->pCurRoamProfile); - if (!QDF_IS_STATUS_SUCCESS(status)) - goto end; - pScanFilter = qdf_mem_malloc(sizeof(tCsrScanResultFilter)); - if (NULL == pScanFilter) { - status = QDF_STATUS_E_NOMEM; - goto end; - } - status = csr_roam_prepare_filter_from_profile(mac, pProfile, - pScanFilter); - if (!QDF_IS_STATUS_SUCCESS(status)) - goto end; - roamId = GET_NEXT_ROAM_ID(&mac->roam); - status = csr_scan_get_result(mac, pScanFilter, &hBSSList); - if (QDF_IS_STATUS_SUCCESS(status)) { - /* we want to put the last connected BSS to the - * very beginning, if possible - */ - csr_move_bss_to_head_from_bssid(mac, - &pSession->connectedProfile.bssid, hBSSList); - status = csr_roam_issue_connect(mac, sessionId, - pProfile, hBSSList, eCsrHddIssued, - roamId, false, false); - if (!QDF_IS_STATUS_SUCCESS(status)) { - goto end; - } - } else { - /* scan for this SSID only incase AP suppresses SSID */ - status = csr_scan_for_ssid(mac, sessionId, pProfile, - roamId, true); - if (!QDF_IS_STATUS_SUCCESS(status)) - goto end; - } - } /* We have a profile */ - else { - sme_warn("cannot find a roaming profile"); - goto end; - } -end: - if (pScanFilter) { - csr_free_scan_filter(mac, pScanFilter); - qdf_mem_free(pScanFilter); - } - if (NULL != pProfile) { - csr_release_profile(mac, pProfile); - qdf_mem_free(pProfile); - } - return status; -} - -QDF_STATUS csr_roam_connect_to_last_profile(struct mac_context *mac, - uint32_t sessionId) -{ - QDF_STATUS status = QDF_STATUS_E_FAILURE; - - csr_roam_cancel_roaming(mac, sessionId); - csr_roam_remove_duplicate_command(mac, sessionId, NULL, eCsrHddIssued); - if (csr_is_conn_state_disconnected(mac, sessionId)) - status = csr_roam_join_last_profile(mac, sessionId); - - return status; -} - QDF_STATUS csr_roam_process_disassoc_deauth(struct mac_context *mac, tSmeCmd *pCommand, bool fDisassoc, bool fMICFailure) diff --git a/core/sme/src/csr/csr_inside_api.h b/core/sme/src/csr/csr_inside_api.h index 7dc3c51e957d..74ca69f88757 100644 --- a/core/sme/src/csr/csr_inside_api.h +++ b/core/sme/src/csr/csr_inside_api.h @@ -825,15 +825,6 @@ void csr_roam_free_connect_profile(tCsrRoamConnectedProfile *profile); */ QDF_STATUS csr_apply_channel_and_power_list(struct mac_context *mac); -/* - * csr_roam_connect_to_last_profile() - - * To disconnect and reconnect with the same profile - * - * Return QDF_STATUS. It returns fail if currently connected - */ -QDF_STATUS csr_roam_connect_to_last_profile(struct mac_context *mac, - uint32_t sessionId); - /* * csr_roam_disconnect() - * To disconnect from a network