qcacld-3.0: Cleanup sme_scan_flush_result to use cmn scan API

Cleanup sme_scan_flush_result and csr_scan_flush_result to
use ucfg_scan_flush_results API to flush scan results.

Change-Id: If4ee6c56662d8b214c3b15325a5aef83c449d7c0
CRs-Fixed: 2450775
This commit is contained in:
Abhishek Singh
2019-05-10 17:30:27 +05:30
committed by nshrivas
parent d1cd4aed4f
commit b5c73a475c
7 changed files with 2 additions and 74 deletions

View File

@@ -7524,7 +7524,6 @@ static void hdd_skip_acs_scan_timer_handler(void *data)
mac_handle = hdd_ctx->mac_handle;
if (!mac_handle)
return;
sme_scan_flush_result(mac_handle);
}
#endif

View File

@@ -860,8 +860,7 @@ int hdd_reg_set_band(struct net_device *dev, u8 ui_band)
return -ETIMEDOUT;
}
}
sme_scan_flush_result(mac_handle);
ucfg_scan_flush_results(hdd_ctx->pdev, NULL);
}
if (QDF_IS_STATUS_ERROR(ucfg_reg_set_band(hdd_ctx->pdev, band))) {

View File

@@ -480,7 +480,6 @@ QDF_STATUS sme_get_ap_channel_from_scan_cache(
QDF_STATUS sme_get_ap_channel_from_scan(void *profile,
tScanResultHandle *scan_cache,
uint8_t *ap_chnl_id);
QDF_STATUS sme_scan_flush_result(mac_handle_t mac_handle);
tCsrScanResultInfo *sme_scan_result_get_first(mac_handle_t,
tScanResultHandle hScanResult);
tCsrScanResultInfo *sme_scan_result_get_next(mac_handle_t,

View File

@@ -2679,30 +2679,6 @@ QDF_STATUS sme_get_ap_channel_from_scan_cache(
return status;
}
/*
* sme_scan_flush_result() -
* A wrapper function to request CSR to clear scan results.
* This is a synchronous call
*
* Return QDF_STATUS
*/
QDF_STATUS sme_scan_flush_result(mac_handle_t mac_handle)
{
QDF_STATUS status = QDF_STATUS_E_FAILURE;
struct mac_context *mac = MAC_CONTEXT(mac_handle);
MTRACE(qdf_trace(QDF_MODULE_ID_SME,
TRACE_CODE_SME_RX_HDD_MSG_SCAN_FLUSH_RESULTS,
0, 0));
status = sme_acquire_global_lock(&mac->sme);
if (QDF_IS_STATUS_SUCCESS(status)) {
status = csr_scan_flush_result(mac);
sme_release_global_lock(&mac->sme);
}
return status;
}
/*
* sme_scan_result_get_first() -
* A wrapper function to request CSR to returns the first element of

View File

@@ -1293,7 +1293,7 @@ QDF_STATUS csr_stop(struct mac_context *mac)
csr_neighbor_roam_close(mac, sessionId);
for (sessionId = 0; sessionId < WLAN_MAX_VDEVS; sessionId++)
if (CSR_IS_SESSION_VALID(mac, sessionId))
csr_scan_flush_result(mac);
ucfg_scan_flush_results(mac->pdev, NULL);
/* Reset the domain back to the deault */
mac->scan.domainIdCurrent = mac->scan.domainIdDefault;

View File

@@ -426,31 +426,6 @@ static void csr_scan_add_result(struct mac_context *mac_ctx,
frm_type);
}
/*
* NOTE: This routine is being added to make
* sure that scan results are not being flushed
* while roaming. If the scan results are flushed,
* we are unable to recover from
* csr_roam_roaming_state_disassoc_rsp_processor.
* If it is needed to remove this routine,
* first ensure that we recover gracefully from
* csr_roam_roaming_state_disassoc_rsp_processor if
* csr_scan_get_result returns with a failure because
* of not being able to find the roaming BSS.
*/
static bool csr_scan_flush_denied(struct mac_context *mac)
{
uint8_t sessionId;
for (sessionId = 0; sessionId < WLAN_MAX_VDEVS; sessionId++) {
if (CSR_IS_SESSION_VALID(mac, sessionId)) {
if (csr_neighbor_middle_of_roaming(mac, sessionId))
return 1;
}
}
return 0;
}
static bool csr_scan_save_bss_description(struct mac_context *mac,
tSirBssDescription *pBSSDescription)
{
@@ -3093,17 +3068,6 @@ csr_flush_scan_results(struct mac_context *mac_ctx,
return status;
}
QDF_STATUS csr_scan_flush_result(struct mac_context *mac_ctx)
{
if (csr_scan_flush_denied(mac_ctx)) {
sme_err("scan flush denied in roam state");
return QDF_STATUS_E_FAILURE;
}
return csr_flush_scan_results(mac_ctx, NULL);
}
static inline void csr_flush_bssid(struct mac_context *mac_ctx,
uint8_t *bssid)
{

View File

@@ -390,15 +390,6 @@ QDF_STATUS csr_scan_get_result_for_bssid(struct mac_context *mac_ctx,
struct qdf_mac_addr *bssid,
tCsrScanResultInfo *res);
/*
* csr_scan_flush_result() -
* Clear scan results.
*
* mac - mac global pointer
* sessionId - Session Identifier
* Return QDF_STATUS
*/
QDF_STATUS csr_scan_flush_result(struct mac_context *mac_ctx);
/*
* csr_scan_filter_results() -
* Filter scan results based on valid channel list.