summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/sme/inc/csr_internal.h1
-rw-r--r--core/sme/src/csr/csr_api_roam.c3
-rw-r--r--core/sme/src/csr/csr_api_scan.c57
-rw-r--r--core/sme/src/csr/csr_inside_api.h4
4 files changed, 10 insertions, 55 deletions
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index 6ff46559ff66..909d7802c3eb 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -707,7 +707,6 @@ typedef struct tagCsrScanStruct {
qdf_mc_timer_t hTimerStaApConcTimer;
#endif
qdf_mc_timer_t hTimerIdleScan;
- qdf_mc_timer_t hTimerResultCfgAging;
/*
* changes on every scan, it is used as a flag for whether 11d info is
* found on every scan
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index fd3d19bb2148..1f0b35de9d1e 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -876,9 +876,6 @@ QDF_STATUS csr_ready(tpAniSirGlobal pMac)
/* If the gScanAgingTime is set to '0' then scan results aging timeout
based on timer feature is not enabled */
- if (0 != pMac->scan.scanResultCfgAgingTime) {
- csr_scan_start_result_cfg_aging_timer(pMac);
- }
status = csr_apply_channel_and_power_list(pMac);
if (!QDF_IS_STATUS_SUCCESS(status)) {
sms_log(pMac, LOGE,
diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c
index c50f8b4187c4..386326e2c6a6 100644
--- a/core/sme/src/csr/csr_api_scan.c
+++ b/core/sme/src/csr/csr_api_scan.c
@@ -83,7 +83,6 @@
((pMac)->scan.nBssLimit <= (csr_ll_count(&(pMac)->scan.scanResultList)))
void csr_scan_get_result_timer_handler(void *);
-static void csr_scan_result_cfg_aging_timer_handler(void *pv);
static void csr_set_default_scan_timing(tpAniSirGlobal pMac, tSirScanType scanType,
tCsrScanRequest *pScanRequest);
#ifdef WLAN_AP_STA_CONCURRENCY
@@ -106,6 +105,7 @@ static bool csr_scan_validate_scan_result(tpAniSirGlobal pMac, uint8_t *pChannel
bool csr_roam_is_valid_channel(tpAniSirGlobal pMac, uint8_t channel);
void csr_prune_channel_list_for_mode(tpAniSirGlobal pMac,
tCsrChannel *pChannelList);
+static void csr_purge_scan_result_by_age(void *pv);
#define CSR_IS_SOCIAL_CHANNEL(channel) \
(((channel) == 1) || ((channel) == 6) || ((channel) == 11))
@@ -180,14 +180,6 @@ QDF_STATUS csr_scan_open(tpAniSirGlobal mac_ctx)
return status;
}
#endif
- status = qdf_mc_timer_init(&mac_ctx->scan.hTimerResultCfgAging,
- QDF_TIMER_TYPE_SW,
- csr_scan_result_cfg_aging_timer_handler,
- mac_ctx);
- if (!QDF_IS_STATUS_SUCCESS(status))
- sms_log(mac_ctx, LOGE,
- FL("Mem Alloc failed for CFG ResultAging timer"));
-
return status;
}
@@ -208,7 +200,6 @@ QDF_STATUS csr_scan_close(tpAniSirGlobal pMac)
csr_ll_close(&pMac->scan.channelPowerInfoList24);
csr_ll_close(&pMac->scan.channelPowerInfoList5G);
csr_scan_disable(pMac);
- qdf_mc_timer_destroy(&pMac->scan.hTimerResultCfgAging);
#ifdef WLAN_AP_STA_CONCURRENCY
qdf_mc_timer_destroy(&pMac->scan.hTimerStaApConcTimer);
#endif
@@ -225,8 +216,6 @@ QDF_STATUS csr_scan_enable(tpAniSirGlobal pMac)
QDF_STATUS csr_scan_disable(tpAniSirGlobal pMac)
{
-
- csr_scan_stop_timers(pMac);
pMac->scan.fScanEnable = false;
return QDF_STATUS_SUCCESS;
@@ -4719,6 +4708,9 @@ QDF_STATUS csr_scan_sme_scan_response(tpAniSirGlobal pMac,
if (eSmeCommandScan != pCommand->command)
goto error_handling;
+ /* Purge the scan results based on Aging */
+ if (pEntry && pMac->scan.scanResultCfgAgingTime)
+ csr_purge_scan_result_by_age(pMac);
scanStatus = (eSIR_SME_SUCCESS == pScanRsp->statusCode) ?
eCSR_SCAN_SUCCESS : eCSR_SCAN_FAILURE;
reason = pCommand->u.scanCmd.reason;
@@ -5717,14 +5709,6 @@ void csr_scan_call_callback(tpAniSirGlobal pMac, tSmeCmd *pCommand,
}
}
-void csr_scan_stop_timers(tpAniSirGlobal pMac)
-{
- if (0 != pMac->scan.scanResultCfgAgingTime) {
- csr_scan_stop_result_cfg_aging_timer(pMac);
- }
-
-}
-
#ifdef WLAN_AP_STA_CONCURRENCY
/**
* csr_sta_ap_conc_timer_handler - Function to handle STA,AP concurrency timer
@@ -5901,45 +5885,27 @@ static void csr_sta_ap_conc_timer_handler(void *pv)
}
#endif
-QDF_STATUS csr_scan_start_result_cfg_aging_timer(tpAniSirGlobal pMac)
-{
- QDF_STATUS status = QDF_STATUS_E_FAILURE;
-
- if (pMac->scan.fScanEnable) {
- status =
- qdf_mc_timer_start(&pMac->scan.hTimerResultCfgAging,
- CSR_SCAN_RESULT_CFG_AGING_INTERVAL /
- QDF_MC_TIMER_TO_MS_UNIT);
- }
- return status;
-}
-
-QDF_STATUS csr_scan_stop_result_cfg_aging_timer(tpAniSirGlobal pMac)
-{
- return qdf_mc_timer_stop(&pMac->scan.hTimerResultCfgAging);
-}
-
/**
- * csr_scan_result_cfg_aging_timer_handler() - Time based scan aging handler
+ * csr_purge_scan_result_by_age() - Purge scan results based on Age
* @pv: Global context
*
- * This routine is to handle scan aging based on user configured timer value.
+ * This routine is to purge scan results based on aging.
*
* Return: None
*/
-static void csr_scan_result_cfg_aging_timer_handler(void *pv)
+static void csr_purge_scan_result_by_age(void *pv)
{
tpAniSirGlobal mac_ctx = PMAC_STRUCT(pv);
tListElem *entry, *tmp_entry;
tCsrScanResult *result;
- uint32_t ageout_time =
+ unsigned long ageout_time =
mac_ctx->scan.scanResultCfgAgingTime * QDF_TICKS_PER_SECOND/10;
- uint32_t cur_time = (uint32_t) qdf_mc_timer_get_system_ticks();
+ unsigned long cur_time = qdf_mc_timer_get_system_ticks();
uint8_t *bssId;
csr_ll_lock(&mac_ctx->scan.scanResultList);
entry = csr_ll_peek_head(&mac_ctx->scan.scanResultList, LL_ACCESS_NOLOCK);
- sms_log(mac_ctx, LOG1, FL(" Ageout time=%d"), ageout_time);
+ sms_log(mac_ctx, LOG1, FL(" Ageout time=%ld"), ageout_time);
while (entry) {
tmp_entry = csr_ll_next(&mac_ctx->scan.scanResultList, entry,
LL_ACCESS_NOLOCK);
@@ -5959,9 +5925,6 @@ static void csr_scan_result_cfg_aging_timer_handler(void *pv)
entry = tmp_entry;
}
csr_ll_unlock(&mac_ctx->scan.scanResultList);
- qdf_mc_timer_start(&mac_ctx->scan.hTimerResultCfgAging,
- CSR_SCAN_RESULT_CFG_AGING_INTERVAL /
- QDF_MC_TIMER_TO_MS_UNIT);
}
bool csr_scan_remove_fresh_scan_command(tpAniSirGlobal pMac, uint8_t sessionId)
diff --git a/core/sme/src/csr/csr_inside_api.h b/core/sme/src/csr/csr_inside_api.h
index f4b62fba2af1..0593c7c83214 100644
--- a/core/sme/src/csr/csr_inside_api.h
+++ b/core/sme/src/csr/csr_inside_api.h
@@ -74,7 +74,6 @@
#define CSR_MIC_ERROR_TIMEOUT (60 * QDF_MC_TIMER_TO_SEC_UNIT) /* 60 seconds */
#define CSR_TKIP_COUNTER_MEASURE_TIMEOUT (60 * QDF_MC_TIMER_TO_SEC_UNIT) /* 60 seconds */
-#define CSR_SCAN_RESULT_CFG_AGING_INTERVAL (QDF_MC_TIMER_TO_SEC_UNIT) /* 1 second */
/* the following defines are NOT used by palTimer */
#define CSR_SCAN_AGING_TIME_NOT_CONNECT_NO_PS 50 /* 50 seconds */
#define CSR_SCAN_AGING_TIME_NOT_CONNECT_W_PS 300 /* 300 seconds */
@@ -265,9 +264,6 @@ QDF_STATUS csr_scan_copy_result_list(tpAniSirGlobal pMac, tScanResultHandle hIn,
QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal pMac, uint32_t sessionId,
tCsrRoamProfile *pProfile, uint32_t roamId,
bool notify);
-QDF_STATUS csr_scan_start_result_cfg_aging_timer(tpAniSirGlobal pMac);
-QDF_STATUS csr_scan_stop_result_cfg_aging_timer(tpAniSirGlobal pMac);
-void csr_scan_stop_timers(tpAniSirGlobal pMac);
/* To remove fresh scan commands from the pending queue */
bool csr_scan_remove_fresh_scan_command(tpAniSirGlobal pMac, uint8_t sessionId);
QDF_STATUS csr_scan_abort_mac_scan(tpAniSirGlobal pMac, uint8_t sessionId,