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:

committed by
Madan Koyyalamudi

parent
b4dce7b534
commit
82711507b5
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2018, 2021 The Linux Foundation. All rights reserved.
|
* 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
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* 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_hrtimer_mode mode,
|
||||||
enum qdf_context_mode ctx);
|
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
|
* qdf_hrtimer_kill() - kills hrtimer in given context
|
||||||
* @timer: pointer to the hrtimer object
|
* @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_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
|
* qdf_hrtimer_kill() - kills hrtimer in given context
|
||||||
* @timer: pointer to the hrtimer object
|
* @timer: pointer to the hrtimer object
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2021 The Linux Foundation. All rights reserved.
|
* Copyright (c) 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
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -51,6 +52,13 @@ void qdf_hrtimer_init(qdf_hrtimer_data_t *timer,
|
|||||||
|
|
||||||
qdf_export_symbol(qdf_hrtimer_init);
|
qdf_export_symbol(qdf_hrtimer_init);
|
||||||
|
|
||||||
|
qdf_ktime_t qdf_time_ms_to_ktime(uint64_t ms)
|
||||||
|
{
|
||||||
|
return __qdf_time_ms_to_ktime(ms);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(qdf_time_ms_to_ktime);
|
||||||
|
|
||||||
void qdf_hrtimer_kill(qdf_hrtimer_data_t *timer)
|
void qdf_hrtimer_kill(qdf_hrtimer_data_t *timer)
|
||||||
{
|
{
|
||||||
__qdf_hrtimer_kill(timer);
|
__qdf_hrtimer_kill(timer);
|
||||||
|
Reference in New Issue
Block a user