diff options
| author | Amarnath Hullur Subramanyam <amarnath@qca.qualcomm.com> | 2015-10-02 10:37:13 -0700 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2015-10-05 15:00:35 +0530 |
| commit | de869be25a354558fe68d3e4db029cde45ec6df4 (patch) | |
| tree | ced535a4de9d635b9264921510047828b9de462b | |
| parent | c574beb7b7e718f7af769ebdb11a249e3b24eed1 (diff) | |
qcacld-2.0: extscan: Maintain boot time since extscan start
Firmware is returning the timestamp offset from start of
extscan instead of start from wifi on for extscan cached results.
Thus, change the boot time since wifi on to maintain boot time
since extscan start.
CRs-Fixed: 917695
Change-Id: I9689f09463bfb2c1859acbabad866c09da7c50f1
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_main.h | 4 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 12 | ||||
| -rwxr-xr-x | CORE/HDD/src/wlan_hdd_main.c | 1 |
3 files changed, 10 insertions, 7 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h index 3766332d667a..55e755d563dc 100644 --- a/CORE/HDD/inc/wlan_hdd_main.h +++ b/CORE/HDD/inc/wlan_hdd_main.h @@ -1509,8 +1509,8 @@ struct hdd_context_s struct completion ready_to_extwow; #endif - /* Time since boot up to WiFi turn ON (in micro seconds) */ - v_U64_t wifi_turn_on_time_since_boot; + /* Time since boot up to extscan start (in micro seconds) */ + v_U64_t ext_scan_start_since_boot; /* RoC request queue and work */ struct delayed_work rocReqWork; diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index ef5d74f94968..15afb268df89 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -4074,6 +4074,10 @@ static int __wlan_hdd_cfg80211_extscan_start(struct wiphy *wiphy, goto fail; } + pHddCtx->ext_scan_start_since_boot = vos_get_monotonic_boottime(); + hddLog(LOG1, FL("Timestamp since boot: %llu"), + pHddCtx->ext_scan_start_since_boot); + /* request was sent -- wait for the response */ rc = wait_for_completion_timeout(&context->response_event, msecs_to_jiffies(WLAN_WAIT_TIME_EXTSCAN)); @@ -22020,13 +22024,13 @@ wlan_hdd_cfg80211_extscan_cached_results_ind(void *ctx, ap = &result->ap[0]; for (j = 0; j < result->num_results; j++) { /* - * Firmware returns timestamp from WiFi turn ON till - * BSSID was cached (in seconds). Add this with - * time gap between system boot up to WiFi turn ON + * Firmware returns timestamp from ext scan start till + * BSSID was cached (in micro seconds). Add this with + * time gap between system boot up to ext scan start * to derive the time since boot when the * BSSID was cached. */ - ap->ts += pHddCtx->wifi_turn_on_time_since_boot; + ap->ts += pHddCtx->ext_scan_start_since_boot; hddLog(LOG1, "Timestamp %llu " "Ssid: %s " "Bssid (" MAC_ADDRESS_STR ") " diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index e6949748e07c..d6b4513b6cbc 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -12505,7 +12505,6 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc) mutex_init(&pHddCtx->sap_lock); pHddCtx->isLoadInProgress = FALSE; - pHddCtx->wifi_turn_on_time_since_boot = vos_get_monotonic_boottime(); #if defined(CONFIG_HDD_INIT_WITH_RTNL_LOCK) if (rtnl_lock_enable == TRUE) { |
