From 4760ce128d100b71cd5b447899dcd1ff2d277488 Mon Sep 17 00:00:00 2001 From: Yue Ma <yuem@codeaurora.org> Date: Mon, 16 Jun 2014 17:05:10 -0700 Subject: [PATCH] cnss: Add API to get kernel boot time Add API to expose kernel boot time which excludes suspend time so that WLAN host driver can get the time which matches kernel print timestamp. Change-Id: Ie5e55b405d355f2ac95a1a34c38964ee63c76b65 Signed-off-by: Yue Ma <yuem@codeaurora.org> --- drivers/net/wireless/cnss/cnss.c | 6 ++++++ include/net/cnss.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/net/wireless/cnss/cnss.c b/drivers/net/wireless/cnss/cnss.c index 031b151e69ab..0a4f02add7f1 100644 --- a/drivers/net/wireless/cnss/cnss.c +++ b/drivers/net/wireless/cnss/cnss.c @@ -1095,6 +1095,12 @@ void cnss_get_monotonic_boottime(struct timespec *ts) } EXPORT_SYMBOL(cnss_get_monotonic_boottime); +void cnss_get_boottime(struct timespec *ts) +{ + ktime_get_ts(ts); +} +EXPORT_SYMBOL(cnss_get_boottime); + int cnss_get_ramdump_mem(unsigned long *address, unsigned long *size) { struct resource *res; diff --git a/include/net/cnss.h b/include/net/cnss.h index 2ffe6d9dca3f..174b3f009f94 100644 --- a/include/net/cnss.h +++ b/include/net/cnss.h @@ -86,6 +86,7 @@ extern int cnss_get_fw_files_for_target(struct cnss_fw_files *pfw_files, extern void cnss_flush_work(void *work); extern void cnss_flush_delayed_work(void *dwork); extern void cnss_get_monotonic_boottime(struct timespec *ts); +extern void cnss_get_boottime(struct timespec *ts); extern int cnss_request_bus_bandwidth(int bandwidth); extern void cnss_pm_wake_lock_init(struct wakeup_source *ws, const char *name); -- GitLab