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
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index e2e97b2..7807c42 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -10689,8 +10689,14 @@
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 @@
*/
if ((scan_time == 0) ||
(scan_time <
- pScanResult->BssDescriptor.nReceivedTime)) {
+ pScanResult->BssDescriptor.received_time)) {
bss_status =
wlan_hdd_cfg80211_inform_bss_frame(pAdapter,
&pScanResult->BssDescriptor);