qcacmn: Add proper api for ktime_get_boot_ns for kernel 3.10
Kernel api ktime_get_boot_ns is not supported in kernel version 3.10 so add correct api for kernel 3.10. Change-Id: Id78d50d759db90a9c6edf4114f8af1a925dfb9bb CRs-Fixed: 2076538
This commit is contained in:

committed by
snandini

parent
60da5a87c4
commit
1c5d902876
@@ -91,11 +91,20 @@ static inline qdf_time_t qdf_get_system_uptime(void)
|
|||||||
* Return:
|
* Return:
|
||||||
* The time since system booted in nanoseconds
|
* 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)
|
static inline s64 qdf_get_bootbased_boottime_ns(void)
|
||||||
{
|
{
|
||||||
return ktime_get_boot_ns();
|
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
|
* qdf_get_system_timestamp - Return current timestamp
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user