diff --git a/qdf/inc/qdf_mc_timer.h b/qdf/inc/qdf_mc_timer.h index e5401c8f1b..bd1d65755c 100644 --- a/qdf/inc/qdf_mc_timer.h +++ b/qdf/inc/qdf_mc_timer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -249,6 +249,13 @@ unsigned long qdf_mc_timer_get_system_ticks(void); */ unsigned long qdf_mc_timer_get_system_time(void); +/** + * qdf_get_monotonic_boottime_ns() - Get kernel boottime in ns + * + * Return: kernel boottime in nano sec + */ +s64 qdf_get_monotonic_boottime_ns(void); + /** * qdf_timer_module_init() - initializes a QDF timer module. * diff --git a/qdf/linux/src/qdf_mc_timer.c b/qdf/linux/src/qdf_mc_timer.c index 3f3863fafd..4114024814 100644 --- a/qdf/linux/src/qdf_mc_timer.c +++ b/qdf/linux/src/qdf_mc_timer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -703,6 +703,15 @@ unsigned long qdf_mc_timer_get_system_time(void) } EXPORT_SYMBOL(qdf_mc_timer_get_system_time); +s64 qdf_get_monotonic_boottime_ns(void) +{ + struct timespec ts; + + ktime_get_ts(&ts); + return timespec_to_ns(&ts); +} +EXPORT_SYMBOL(qdf_get_monotonic_boottime_ns); + /** * qdf_timer_module_deinit() - Deinitializes a QDF timer module. *