|
@@ -2851,8 +2851,8 @@ static void csr_purge_old_scan_results(tpAniSirGlobal mac_ctx)
|
|
|
{
|
|
|
tListElem *pentry, *tmp_entry;
|
|
|
tCsrScanResult *presult, *oldest_bss = NULL;
|
|
|
- uint64_t oldest_entry = 0;
|
|
|
- uint64_t curr_time = (uint64_t)qdf_mc_timer_get_system_time();
|
|
|
+ uint32_t oldest_entry = 0;
|
|
|
+ uint32_t curr_time = qdf_mc_timer_get_system_ticks();
|
|
|
|
|
|
csr_ll_unlock(&mac_ctx->scan.scanResultList);
|
|
|
pentry = csr_ll_peek_head(&mac_ctx->scan.scanResultList,
|
|
@@ -2861,10 +2861,10 @@ static void csr_purge_old_scan_results(tpAniSirGlobal mac_ctx)
|
|
|
tmp_entry = csr_ll_next(&mac_ctx->scan.scanResultList, pentry,
|
|
|
LL_ACCESS_NOLOCK);
|
|
|
presult = GET_BASE_ADDR(pentry, tCsrScanResult, Link);
|
|
|
- if ((curr_time - presult->Result.BssDescriptor.received_time) >
|
|
|
+ if ((curr_time - presult->Result.BssDescriptor.nReceivedTime) >
|
|
|
oldest_entry) {
|
|
|
oldest_entry = curr_time -
|
|
|
- presult->Result.BssDescriptor.received_time;
|
|
|
+ presult->Result.BssDescriptor.nReceivedTime;
|
|
|
oldest_bss = presult;
|
|
|
}
|
|
|
pentry = tmp_entry;
|
|
@@ -2874,9 +2874,9 @@ static void csr_purge_old_scan_results(tpAniSirGlobal mac_ctx)
|
|
|
if (csr_ll_remove_entry(&mac_ctx->scan.scanResultList,
|
|
|
&oldest_bss->Link, LL_ACCESS_NOLOCK)) {
|
|
|
sms_log(mac_ctx, LOG1,
|
|
|
- FL("Current time delta (%llu) of BSSID to be removed" MAC_ADDRESS_STR),
|
|
|
+ FL("Current time delta (%d) of BSSID to be removed" MAC_ADDRESS_STR),
|
|
|
(curr_time -
|
|
|
- oldest_bss->Result.BssDescriptor.received_time),
|
|
|
+ oldest_bss->Result.BssDescriptor.nReceivedTime),
|
|
|
MAC_ADDR_ARRAY(
|
|
|
oldest_bss->Result.BssDescriptor.bssId));
|
|
|
csr_free_scan_result_entry(mac_ctx, oldest_bss);
|
|
@@ -2954,9 +2954,8 @@ csr_remove_from_tmp_list(tpAniSirGlobal mac_ctx,
|
|
|
* hidden ssid from the profile i.e., forget the SSID
|
|
|
* via GUI that SSID shouldn't see in the profile
|
|
|
*/
|
|
|
- uint64_t time_gap =
|
|
|
- (uint64_t)qdf_mc_timer_get_system_time() -
|
|
|
- timer;
|
|
|
+ unsigned long time_gap = qdf_mc_timer_get_system_time() -
|
|
|
+ timer;
|
|
|
if ((0 == bss_dscp->Result.ssId.length)
|
|
|
&& (time_gap <= HIDDEN_TIMER)
|
|
|
&& tmpSsid.length) {
|
|
@@ -3090,7 +3089,7 @@ tCsrScanResult *csr_scan_append_bss_description(tpAniSirGlobal pMac,
|
|
|
* hidden ssid from the profile i.e., forget the SSID
|
|
|
* via GUI that SSID shouldn't see in the profile
|
|
|
*/
|
|
|
- if (((uint64_t)qdf_mc_timer_get_system_time() - timer) <=
|
|
|
+ if ((qdf_mc_timer_get_system_time() - timer) <=
|
|
|
HIDDEN_TIMER) {
|
|
|
pCsrBssDescription->Result.ssId = tmpSsid;
|
|
|
pCsrBssDescription->Result.timer = timer;
|
|
@@ -4875,8 +4874,8 @@ static bool csr_scan_age_out_bss(tpAniSirGlobal pMac, tCsrScanResult *pResult)
|
|
|
FL("Connected BSS, Set Aging Count=%d for BSS "
|
|
|
MAC_ADDRESS_STR), pResult->AgingCount,
|
|
|
MAC_ADDR_ARRAY(pResult->Result.BssDescriptor.bssId));
|
|
|
- pResult->Result.BssDescriptor.received_time =
|
|
|
- (uint64_t)qdf_mc_timer_get_system_time();
|
|
|
+ pResult->Result.BssDescriptor.nReceivedTime =
|
|
|
+ (uint32_t) qdf_mc_timer_get_system_ticks();
|
|
|
return fRet;
|
|
|
}
|
|
|
/*
|
|
@@ -5927,20 +5926,23 @@ static void csr_purge_scan_result_by_age(void *pv)
|
|
|
tpAniSirGlobal mac_ctx = PMAC_STRUCT(pv);
|
|
|
tListElem *entry, *tmp_entry;
|
|
|
tCsrScanResult *result;
|
|
|
- uint64_t ageout_time =
|
|
|
- mac_ctx->scan.scanResultCfgAgingTime * SYSTEM_TIME_SEC_TO_MSEC;
|
|
|
- uint64_t cur_time = qdf_mc_timer_get_system_time();
|
|
|
+ unsigned long ageout_time =
|
|
|
+ mac_ctx->scan.scanResultCfgAgingTime * QDF_TICKS_PER_SECOND/10;
|
|
|
+ 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=%llu"), 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);
|
|
|
result = GET_BASE_ADDR(entry, tCsrScanResult, Link);
|
|
|
-
|
|
|
- if ((cur_time - result->Result.BssDescriptor.received_time) >
|
|
|
+ /*
|
|
|
+ * qdf_mc_timer_get_system_ticks() returns in 10ms interval.
|
|
|
+ * so ageout time value also updated to 10ms interval value.
|
|
|
+ */
|
|
|
+ if ((cur_time - result->Result.BssDescriptor.nReceivedTime) >
|
|
|
ageout_time) {
|
|
|
bssId = result->Result.BssDescriptor.bssId;
|
|
|
sms_log(mac_ctx, LOGW,
|
|
@@ -7061,7 +7063,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac,
|
|
|
pBssDescr->capabilityInfo = *((uint16_t *)&parsed_frm->capabilityInfo);
|
|
|
qdf_mem_copy((uint8_t *) &pBssDescr->bssId,
|
|
|
(uint8_t *) macHeader->bssId, sizeof(tSirMacAddr));
|
|
|
- pBssDescr->received_time = (uint64_t)qdf_mc_timer_get_system_time();
|
|
|
+ pBssDescr->nReceivedTime = (uint32_t) qdf_mc_timer_get_system_ticks();
|
|
|
sms_log(pMac, LOG2, FL("Bssid= "MAC_ADDRESS_STR" chan= %d, rssi = %d"),
|
|
|
MAC_ADDR_ARRAY(pBssDescr->bssId), pBssDescr->channelId,
|
|
|
pBssDescr->rssi);
|