summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepthi Gowri <deepthi@codeaurora.org>2016-10-28 15:00:38 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-11-02 00:24:40 -0700
commita551c97bd4aa6c7fb3be52f360b9fe9e3cd2a4de (patch)
tree182250c336e4179f4e13c055e86dfb63328512cc
parentc30fe933a0842c21ae2620dd5d510d7c25d0e818 (diff)
qcacld-3.0: Use system time instead of jiffies for BSS received time
During late suspend jiffies will not be incremented. Because of this scan results are not age out as the delta of current time and the BSS received time is not correct. To address this, use the system time instead of jiffies for the BSS received time and also make sure to use system time in all other functions. Change-Id: I4a9cd35ad5109ee2a33cfcafc9b03d5fcd80bb3f CRs-Fixed: 1083225
-rw-r--r--core/hdd/inc/wlan_hdd_main.h4
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c10
-rw-r--r--core/hdd/src/wlan_hdd_ipa.c6
-rw-r--r--core/hdd/src/wlan_hdd_p2p.c10
-rw-r--r--core/hdd/src/wlan_hdd_scan.c10
-rw-r--r--core/mac/inc/sir_api.h4
-rw-r--r--core/mac/src/pe/lim/lim_api.c4
-rw-r--r--core/mac/src/pe/lim/lim_p2p.c8
-rw-r--r--core/mac/src/pe/lim/lim_scan_result_utils.c6
-rw-r--r--core/sme/src/csr/csr_api_scan.c40
-rw-r--r--core/sme/src/csr/csr_host_scan_roam.c11
-rw-r--r--core/sme/src/csr/csr_inside_api.h1
-rw-r--r--core/sme/src/rrm/sme_rrm.c12
13 files changed, 66 insertions, 60 deletions
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index 92bb43634916..dbab5eba0196 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -1070,10 +1070,10 @@ struct hdd_adapter_s {
int temperature;
/* Time stamp for last completed RoC request */
- unsigned long last_roc_ts;
+ uint64_t last_roc_ts;
/* Time stamp for start RoC request */
- unsigned long start_roc_ts;
+ uint64_t start_roc_ts;
/* State for synchronous OCB requests to WMI */
struct sir_ocb_set_config_response ocb_set_config_resp;
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index e2e97b276f3d..7807c42aa327 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -10689,8 +10689,14 @@ struct cfg80211_bss *wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter,
qie_age->oui_2 = QCOM_OUI2;
qie_age->oui_3 = QCOM_OUI3;
qie_age->type = QCOM_VENDOR_IE_AGE_TYPE;
+ /*
+ * Lowi expects the timestamp of bss in units of 1/10 ms. In driver
+ * all bss related timestamp is in units of ms. Due to this when scan
+ * results are sent to lowi the scan age is high.To address this,
+ * send age in units of 1/10 ms.
+ */
qie_age->age =
- qdf_mc_timer_get_system_ticks() - bss_desc->nReceivedTime;
+ (qdf_mc_timer_get_system_time() - bss_desc->received_time)/10;
qie_age->tsf_delta = bss_desc->tsf_delta;
memcpy(&qie_age->beacon_tsf, bss_desc->timeStamp,
sizeof(qie_age->beacon_tsf));
@@ -10864,7 +10870,7 @@ int wlan_hdd_cfg80211_update_bss(struct wiphy *wiphy,
*/
if ((scan_time == 0) ||
(scan_time <
- pScanResult->BssDescriptor.nReceivedTime)) {
+ pScanResult->BssDescriptor.received_time)) {
bss_status =
wlan_hdd_cfg80211_inform_bss_frame(pAdapter,
&pScanResult->BssDescriptor);
diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c
index 6097b7c99350..7576c5702caa 100644
--- a/core/hdd/src/wlan_hdd_ipa.c
+++ b/core/hdd/src/wlan_hdd_ipa.c
@@ -362,7 +362,7 @@ static uint8_t vdev_to_iface[CSR_ROAM_SESSION_MAX];
* @rx_destructor_call: IPA Rx packet destructor count
*/
struct uc_rt_debug_info {
- unsigned long time;
+ uint64_t time;
uint64_t ipa_excep_count;
uint64_t rx_drop_count;
uint64_t net_sent_count;
@@ -726,7 +726,7 @@ static void hdd_ipa_uc_rt_debug_host_fill(void *ctext)
dump_info = &hdd_ipa->rt_bug_buffer[
hdd_ipa->rt_buf_fill_index % HDD_IPA_UC_RT_DEBUG_BUF_COUNT];
- dump_info->time = qdf_mc_timer_get_system_time();
+ dump_info->time = (uint64_t)qdf_mc_timer_get_system_time();
dump_info->ipa_excep_count = hdd_ipa->stats.num_rx_excep;
dump_info->rx_drop_count = hdd_ipa->ipa_rx_internel_drop_count;
dump_info->net_sent_count = hdd_ipa->ipa_rx_net_send_count;
@@ -779,7 +779,7 @@ void hdd_ipa_uc_rt_debug_host_dump(hdd_context_t *hdd_ctx)
HDD_IPA_UC_RT_DEBUG_BUF_COUNT;
dump_info = &hdd_ipa->rt_bug_buffer[dump_index];
HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR,
- "%12lu:%10llu:%10llu:%10llu:%10llu:%10llu:%10llu:%10llu\n",
+ "%12llu:%10llu:%10llu:%10llu:%10llu:%10llu:%10llu:%10llu\n",
dump_info->time, dump_info->ipa_excep_count,
dump_info->rx_drop_count, dump_info->net_sent_count,
dump_info->tx_mcbc_count, dump_info->tx_fwd_count,
diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c
index a355915222ad..7fe1b20428a4 100644
--- a/core/hdd/src/wlan_hdd_p2p.c
+++ b/core/hdd/src/wlan_hdd_p2p.c
@@ -218,7 +218,8 @@ QDF_STATUS wlan_hdd_remain_on_channel_callback(tHalHandle hHal, void *pCtx,
cookie,
&pRemainChanCtx->chan,
GFP_KERNEL);
- pAdapter->last_roc_ts = qdf_mc_timer_get_system_time();
+ pAdapter->last_roc_ts =
+ (uint64_t)qdf_mc_timer_get_system_time();
}
/* Schedule any pending RoC: Any new roc request during this time
@@ -867,7 +868,7 @@ static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy,
hdd_conn_is_connected(
WLAN_HDD_GET_STATION_CTX_PTR(sta_adapter))) {
if (pAdapter->last_roc_ts != 0 &&
- ((qdf_mc_timer_get_system_time() -
+ (((uint64_t)qdf_mc_timer_get_system_time() -
pAdapter->last_roc_ts) <
pHddCtx->config->p2p_listen_defer_interval)) {
if (pRemainChanCtx->duration > HDD_P2P_MAX_ROC_DURATION)
@@ -988,7 +989,7 @@ void hdd_remain_chan_ready_handler(hdd_adapter_t *pAdapter,
cfgState = WLAN_HDD_GET_CFG_STATE_PTR(pAdapter);
hdd_notice("Ready on chan ind %d", scan_id);
- pAdapter->start_roc_ts = qdf_mc_timer_get_system_time();
+ pAdapter->start_roc_ts = (uint64_t)qdf_mc_timer_get_system_time();
mutex_lock(&cfgState->remain_on_chan_ctx_lock);
pRemainChanCtx = cfgState->remain_on_chan_ctx;
if (pRemainChanCtx != NULL) {
@@ -1301,7 +1302,8 @@ static int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
mutex_lock(&cfgState->remain_on_chan_ctx_lock);
if (cfgState->remain_on_chan_ctx) {
- uint32_t current_time = qdf_mc_timer_get_system_time();
+ uint64_t current_time =
+ (uint64_t)qdf_mc_timer_get_system_time();
int remaining_roc_time =
((int) cfgState->remain_on_chan_ctx->duration -
(current_time - pAdapter->start_roc_ts));
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index d909dacc2baa..40b1e6f3b520 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -482,9 +482,9 @@ static int hdd_indicate_scan_result(hdd_scan_info_t *scanInfo,
/* AGE */
event.cmd = IWEVCUSTOM;
p = custom;
- p += scnprintf(p, MAX_CUSTOM_LEN, " Age: %lu",
- qdf_mc_timer_get_system_ticks() -
- descriptor->nReceivedTime);
+ p += scnprintf(p, MAX_CUSTOM_LEN, " Age: %llu",
+ qdf_mc_timer_get_system_time() -
+ descriptor->received_time);
event.u.data.length = p - custom;
current_event = iwe_stream_add_point(scanInfo->info, current_event, end,
&event, custom);
@@ -860,7 +860,7 @@ static int __iw_set_scan(struct net_device *dev, struct iw_request_info *info,
scanRequest.uIEFieldLen = pAdapter->scan_info.scanAddIE.length;
scanRequest.pIEField = pAdapter->scan_info.scanAddIE.addIEdata;
}
- scanRequest.timestamp = qdf_mc_timer_get_system_ticks();
+ scanRequest.timestamp = qdf_mc_timer_get_system_time();
status = sme_scan_request((WLAN_HDD_GET_CTX(pAdapter))->hHal,
pAdapter->sessionId, &scanRequest,
&hdd_scan_request_callback, dev);
@@ -1533,7 +1533,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
qdf_mem_zero(&scan_req, sizeof(scan_req));
- scan_req.timestamp = qdf_mc_timer_get_system_ticks();
+ scan_req.timestamp = qdf_mc_timer_get_system_time();
/* Even though supplicant doesn't provide any SSIDs, n_ssids is
* set to 1. Because of this, driver is assuming that this is not
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index 9ccfc9179699..362aa55d3b93 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -724,8 +724,8 @@ typedef struct sSirBssDescription {
/* used only in scan case. */
uint8_t channelIdSelf;
uint8_t sSirBssDescriptionRsvd[3];
- /* base on a tick count. It is a time stamp, not a relative time. */
- uint32_t nReceivedTime;
+ /* Based on system time, not a relative time. */
+ uint64_t received_time;
uint32_t parentTSF;
uint32_t startTSF[2];
uint8_t mdiePresent;
diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c
index 9cdf5d054af7..901c564df9da 100644
--- a/core/mac/src/pe/lim/lim_api.c
+++ b/core/mac/src/pe/lim/lim_api.c
@@ -1868,8 +1868,8 @@ lim_roam_fill_bss_descr(tpAniSirGlobal pMac,
qdf_mem_copy((uint8_t *) &bss_desc_ptr->bssId,
(uint8_t *) mac_hdr->bssId,
sizeof(tSirMacAddr));
- bss_desc_ptr->nReceivedTime =
- (uint32_t)qdf_mc_timer_get_system_ticks();
+ bss_desc_ptr->received_time =
+ (uint64_t)qdf_mc_timer_get_system_time();
if (parsed_frm_ptr->mdiePresent) {
bss_desc_ptr->mdiePresent = parsed_frm_ptr->mdiePresent;
qdf_mem_copy((uint8_t *)bss_desc_ptr->mdie,
diff --git a/core/mac/src/pe/lim/lim_p2p.c b/core/mac/src/pe/lim/lim_p2p.c
index 64a1a54997d4..41098542cfc7 100644
--- a/core/mac/src/pe/lim/lim_p2p.c
+++ b/core/mac/src/pe/lim/lim_p2p.c
@@ -173,11 +173,11 @@ void lim_process_insert_single_shot_noa_timeout(tpAniSirGlobal pMac)
*------------------------------------------------------------------*/
void lim_convert_active_channel_to_passive_channel(tpAniSirGlobal pMac)
{
- uint32_t currentTime;
- uint32_t lastTime = 0;
- uint32_t timeDiff;
+ uint64_t currentTime;
+ uint64_t lastTime = 0;
+ uint64_t timeDiff;
uint8_t i;
- currentTime = qdf_mc_timer_get_system_time();
+ currentTime = (uint64_t)qdf_mc_timer_get_system_time();
for (i = 1; i < SIR_MAX_24G_5G_CHANNEL_RANGE; i++) {
if ((pMac->lim.dfschannelList.timeStamp[i]) != 0) {
lastTime = pMac->lim.dfschannelList.timeStamp[i];
diff --git a/core/mac/src/pe/lim/lim_scan_result_utils.c b/core/mac/src/pe/lim/lim_scan_result_utils.c
index 3f8c94def4e0..81db887c7e91 100644
--- a/core/mac/src/pe/lim/lim_scan_result_utils.c
+++ b/core/mac/src/pe/lim/lim_scan_result_utils.c
@@ -177,14 +177,14 @@ lim_collect_bss_description(tpAniSirGlobal pMac,
MAC_ADDR_ARRAY(pHdr->bssId), pBssDescr->rssi,
pBssDescr->rssi_raw);
- pBssDescr->nReceivedTime = (uint32_t) qdf_mc_timer_get_system_ticks();
+ pBssDescr->received_time = (uint64_t)qdf_mc_timer_get_system_time();
pBssDescr->tsf_delta = WMA_GET_RX_TSF_DELTA(pRxPacketInfo);
pBssDescr->seq_ctrl = pHdr->seqControl;
lim_log(pMac, LOG1,
- FL("BSSID: "MAC_ADDRESS_STR " tsf_delta = %u ReceivedTime = %u ssid = %s"),
+ FL("BSSID: "MAC_ADDRESS_STR " tsf_delta = %u ReceivedTime = %llu ssid = %s"),
MAC_ADDR_ARRAY(pHdr->bssId), pBssDescr->tsf_delta,
- pBssDescr->nReceivedTime,
+ pBssDescr->received_time,
((pBPR->ssidPresent) ? (char *)pBPR->ssId.ssId : ""));
lim_log(pMac, LOG1, FL("Seq Ctrl: Frag Num: %d, Seq Num: LO:%02x HI:%02x"),
diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c
index 1371f206925d..9d15c3ed54a6 100644
--- a/core/sme/src/csr/csr_api_scan.c
+++ b/core/sme/src/csr/csr_api_scan.c
@@ -2851,8 +2851,8 @@ static void csr_purge_old_scan_results(tpAniSirGlobal mac_ctx)
{
tListElem *pentry, *tmp_entry;
tCsrScanResult *presult, *oldest_bss = NULL;
- uint32_t oldest_entry = 0;
- uint32_t curr_time = qdf_mc_timer_get_system_ticks();
+ uint64_t oldest_entry = 0;
+ uint64_t curr_time = (uint64_t)qdf_mc_timer_get_system_time();
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.nReceivedTime) >
+ if ((curr_time - presult->Result.BssDescriptor.received_time) >
oldest_entry) {
oldest_entry = curr_time -
- presult->Result.BssDescriptor.nReceivedTime;
+ presult->Result.BssDescriptor.received_time;
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 (%d) of BSSID to be removed" MAC_ADDRESS_STR),
+ FL("Current time delta (%llu) of BSSID to be removed" MAC_ADDRESS_STR),
(curr_time -
- oldest_bss->Result.BssDescriptor.nReceivedTime),
+ oldest_bss->Result.BssDescriptor.received_time),
MAC_ADDR_ARRAY(
oldest_bss->Result.BssDescriptor.bssId));
csr_free_scan_result_entry(mac_ctx, oldest_bss);
@@ -2954,8 +2954,9 @@ 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
*/
- unsigned long time_gap = qdf_mc_timer_get_system_time() -
- timer;
+ uint64_t time_gap =
+ (uint64_t)qdf_mc_timer_get_system_time() -
+ timer;
if ((0 == bss_dscp->Result.ssId.length)
&& (time_gap <= HIDDEN_TIMER)
&& tmpSsid.length) {
@@ -3089,7 +3090,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 ((qdf_mc_timer_get_system_time() - timer) <=
+ if (((uint64_t)qdf_mc_timer_get_system_time() - timer) <=
HIDDEN_TIMER) {
pCsrBssDescription->Result.ssId = tmpSsid;
pCsrBssDescription->Result.timer = timer;
@@ -4875,8 +4876,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.nReceivedTime =
- (uint32_t) qdf_mc_timer_get_system_ticks();
+ pResult->Result.BssDescriptor.received_time =
+ (uint64_t)qdf_mc_timer_get_system_time();
return fRet;
}
/*
@@ -5896,23 +5897,20 @@ static void csr_purge_scan_result_by_age(void *pv)
tpAniSirGlobal mac_ctx = PMAC_STRUCT(pv);
tListElem *entry, *tmp_entry;
tCsrScanResult *result;
- unsigned long ageout_time =
- mac_ctx->scan.scanResultCfgAgingTime * QDF_TICKS_PER_SECOND/10;
- unsigned long cur_time = qdf_mc_timer_get_system_ticks();
+ uint64_t ageout_time =
+ mac_ctx->scan.scanResultCfgAgingTime * SYSTEM_TIME_SEC_TO_MSEC;
+ uint64_t cur_time = qdf_mc_timer_get_system_time();
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=%ld"), ageout_time);
+ sms_log(mac_ctx, LOG1, FL(" Ageout time=%llu"), ageout_time);
while (entry) {
tmp_entry = csr_ll_next(&mac_ctx->scan.scanResultList, entry,
LL_ACCESS_NOLOCK);
result = GET_BASE_ADDR(entry, tCsrScanResult, Link);
- /*
- * 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) >
+
+ if ((cur_time - result->Result.BssDescriptor.received_time) >
ageout_time) {
bssId = result->Result.BssDescriptor.bssId;
sms_log(mac_ctx, LOGW,
@@ -7033,7 +7031,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->nReceivedTime = (uint32_t) qdf_mc_timer_get_system_ticks();
+ pBssDescr->received_time = (uint64_t)qdf_mc_timer_get_system_time();
sms_log(pMac, LOG2, FL("Bssid= "MAC_ADDRESS_STR" chan= %d, rssi = %d"),
MAC_ADDR_ARRAY(pBssDescr->bssId), pBssDescr->channelId,
pBssDescr->rssi);
diff --git a/core/sme/src/csr/csr_host_scan_roam.c b/core/sme/src/csr/csr_host_scan_roam.c
index def107552ff4..cfe5cbc431d8 100644
--- a/core/sme/src/csr/csr_host_scan_roam.c
+++ b/core/sme/src/csr/csr_host_scan_roam.c
@@ -149,9 +149,7 @@ void csr_neighbor_roam_process_scan_results(tpAniSirGlobal mac_ctx,
tpCsrNeighborRoamControlInfo n_roam_info =
&mac_ctx->roam.neighborRoamInfo[sessionid];
tpCsrNeighborRoamBSSInfo bss_info;
- uint32_t age_ticks = 0;
- uint32_t limit_ticks =
- qdf_system_msecs_to_ticks(ROAM_AP_AGE_LIMIT_MS);
+ uint64_t age = 0;
uint8_t num_candidates = 0;
uint8_t num_dropped = 0;
/*
@@ -296,9 +294,10 @@ void csr_neighbor_roam_process_scan_results(tpAniSirGlobal mac_ctx,
}
/* check the age of the AP */
- age_ticks = (uint32_t) qdf_mc_timer_get_system_ticks() -
- descr->nReceivedTime;
- if (age_constraint == true && age_ticks > limit_ticks) {
+ age = (uint64_t) qdf_mc_timer_get_system_time() -
+ descr->received_time;
+ if (age_constraint == true &&
+ age > ROAM_AP_AGE_LIMIT_MS) {
num_dropped++;
QDF_TRACE(QDF_MODULE_ID_SME,
QDF_TRACE_LEVEL_WARN,
diff --git a/core/sme/src/csr/csr_inside_api.h b/core/sme/src/csr/csr_inside_api.h
index 03338de19033..47470725407d 100644
--- a/core/sme/src/csr/csr_inside_api.h
+++ b/core/sme/src/csr/csr_inside_api.h
@@ -66,6 +66,7 @@
#define CSR_MAX_BSS_SUPPORT 512
#define SYSTEM_TIME_MSEC_TO_USEC 1000
+#define SYSTEM_TIME_SEC_TO_MSEC 1000
/* This number minus 1 means the number of times a channel is scanned before a BSS is remvoed from */
/* cache scan result */
diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c
index b73c016176cc..11d3f69cb208 100644
--- a/core/sme/src/rrm/sme_rrm.c
+++ b/core/sme/src/rrm/sme_rrm.c
@@ -71,7 +71,7 @@
#define RRM_ROAM_SCORE_NEIGHBOR_IAPP_LIST 30
#endif
-unsigned long rrm_scan_timer;
+uint64_t rrm_scan_timer;
/**
* rrm_ll_purge_neighbor_cache() -Purges all the entries in the neighbor cache
@@ -529,7 +529,7 @@ static QDF_STATUS sme_rrm_send_scan_result(tpAniSirGlobal mac_ctx,
while (scan_results) {
next_result = sme_scan_result_get_next(mac_ctx, result_handle);
- sms_log(mac_ctx, LOG1, "Scan res timer:%lu, rrm scan timer:%lu",
+ sms_log(mac_ctx, LOG1, "Scan res timer:%lu, rrm scan timer:%llu",
scan_results->timer, rrm_scan_timer);
if (scan_results->timer >= rrm_scan_timer) {
roam_info->pBssDesc = &scan_results->BssDescriptor;
@@ -651,7 +651,7 @@ static QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx)
tpRrmSMEContext sme_rrm_ctx = &mac_ctx->rrm.rrmSmeContext;
uint32_t session_id;
tSirScanType scan_type;
- unsigned long current_time;
+ uint64_t current_time;
status = csr_roam_get_session_id_from_bssid(mac_ctx,
&sme_rrm_ctx->sessionBssId, &session_id);
@@ -720,8 +720,8 @@ static QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx)
* and hence there is a check to see if the requests are atleast
* 1 second apart.
*/
- current_time = qdf_mc_timer_get_system_time();
- sms_log(mac_ctx, LOG1, "prev scan triggered before %ld ms, totalchannels %d",
+ current_time = (uint64_t)qdf_mc_timer_get_system_time();
+ sms_log(mac_ctx, LOG1, "prev scan triggered before %llu ms, totalchannels %d",
current_time - rrm_scan_timer,
sme_rrm_ctx->channelList.numOfChannels);
if ((abs(current_time - rrm_scan_timer) > 1000) &&
@@ -731,7 +731,7 @@ static QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx)
scan_req.idle_time = 1;
}
- rrm_scan_timer = qdf_mc_timer_get_system_time();
+ rrm_scan_timer = (uint64_t)qdf_mc_timer_get_system_time();
/* set BSSType to default type */
scan_req.BSSType = eCSR_BSS_TYPE_ANY;