From ea81d9ac475783efc5a8ab166f89f0105761de0e Mon Sep 17 00:00:00 2001 From: Aniruddha Paul Date: Wed, 17 Jun 2020 13:07:12 +0530 Subject: [PATCH] qcacmn: Add qdf API wrapper for ktime_real_get Add qdf wrapper API to the ktime_real(). This gives the current wallclock in ktime format. Change-Id: If869985007225606075fb936593d5798ea0746e9 --- qdf/inc/qdf_time.h | 13 ++++++++++++- qdf/linux/src/i_qdf_time.h | 10 ++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/qdf/inc/qdf_time.h b/qdf/inc/qdf_time.h index 32cfeba0068e..31fb1c8be9e1 100644 --- a/qdf/inc/qdf_time.h +++ b/qdf/inc/qdf_time.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -66,6 +66,17 @@ static inline qdf_ktime_t qdf_ktime_get(void) return __qdf_ktime_get(); } +/** + * qdf_ktime_real_get - Gets the current wall clock as qdf_ktime_t object + * + * Return: current wall clock as qdf_ktime_t object + */ + +static inline qdf_ktime_t qdf_ktime_real_get(void) +{ + return __qdf_ktime_real_get(); +} + /** * qdf_ktime_add_ns - Adds qdf_ktime_t object and nanoseconds value and * returns the qdf_ktime_t object diff --git a/qdf/linux/src/i_qdf_time.h b/qdf/linux/src/i_qdf_time.h index 975380b33153..fc4803b48322 100644 --- a/qdf/linux/src/i_qdf_time.h +++ b/qdf/linux/src/i_qdf_time.h @@ -77,6 +77,16 @@ static inline ktime_t __qdf_ktime_get(void) return ktime_get(); } +/** + * __qdf_ktime_real_get() - Gets the current wall clock as ktime object + * + * Return: current wall clock as ktime object + */ +static inline ktime_t __qdf_ktime_real_get(void) +{ + return ktime_get_real(); +} + /** * __qdf_ktime_add_ns() - Adds ktime object and nanoseconds value and * returns the ktime object