qcacmn: Abstract ms_to_ktime in qdf

Add API qdf_time_ms_to_ktime which is an abstraction of ms_to_ktime
to the qdf layer.

Change-Id: Ie6510007b61bc3b3ac28648983b30a3c52e97098
CRs-Fixed: 3043864
This commit is contained in:
Ananya Barat
2022-01-13 16:01:59 +05:30
committed by Madan Koyyalamudi
parent b4dce7b534
commit 82711507b5
2 changed files with 28 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2014-2018, 2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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
@@ -77,6 +78,14 @@ void qdf_hrtimer_init(qdf_hrtimer_data_t *timer,
enum qdf_hrtimer_mode mode,
enum qdf_context_mode ctx);
/**
* qdf_time_ms_to_ktime() - Converts milliseconds to a qdf_ktime_t object
* @ms: time in milliseconds
*
* Return: milliseconds as ktime object
*/
qdf_ktime_t qdf_time_ms_to_ktime(uint64_t ms);
/**
* qdf_hrtimer_kill() - kills hrtimer in given context
* @timer: pointer to the hrtimer object
@@ -207,6 +216,17 @@ static inline void qdf_hrtimer_init(qdf_hrtimer_data_t *timer,
__qdf_hrtimer_init(timer, callback, clock, mode, ctx);
}
/**
* qdf_time_ms_to_ktime() - Converts milliseconds to a qdf_ktime_t object
* @ms: time in milliseconds
*
* Return: milliseconds as qdf_ktime_t object
*/
static inline qdf_ktime_t qdf_time_ms_to_ktime(uint64_t ms)
{
return __qdf_time_ms_to_ktime(ms);
}
/**
* qdf_hrtimer_kill() - kills hrtimer in given context
* @timer: pointer to the hrtimer object