diff --git a/qdf/inc/qdf_time.h b/qdf/inc/qdf_time.h index 97cc43d5dc..50cec4673a 100644 --- a/qdf/inc/qdf_time.h +++ b/qdf/inc/qdf_time.h @@ -91,11 +91,20 @@ static inline qdf_time_t qdf_get_system_uptime(void) * Return: * The time since system booted in nanoseconds */ + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(3, 10, 0)) static inline s64 qdf_get_bootbased_boottime_ns(void) { return ktime_get_boot_ns(); } +#else +static inline s64 qdf_get_bootbased_boottime_ns(void) +{ + return ktime_to_ns(ktime_get_boottime()); +} +#endif + /** * qdf_get_system_timestamp - Return current timestamp *