qcacmn: Make inline OS-abstraction APIs as non-inline

OS-abstraction API's are made non-inline to avoid direct
usage of kernel API's.

Change-Id: Ib35aa9271d98054ab582fc079e62714bb7fdae99
Cette révision appartient à :
Debasis Das
2020-07-28 17:22:44 +05:30
révisé par snandini
Parent 6ed59fa1e3
révision 2c411d6e74
16 fichiers modifiés avec 1140 ajouts et 63 suppressions

Voir le fichier

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2018, 2021 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
@@ -35,6 +35,126 @@ typedef __qdf_hrtimer_data_t qdf_hrtimer_data_t;
typedef enum qdf_hrtimer_restart_status(*qdf_hrtimer_func_t)
(qdf_hrtimer_data_t *timer);
#ifdef ENHANCED_OS_ABSTRACTION
/**
* qdf_hrtimer_start() - Starts hrtimer in given context
* @timer: pointer to the qdf_hrtimer_data_t object
* @interval: interval to forward as qdf_ktime_t object
* @mode: mode of qdf_hrtimer_data_t
*
* Starts hrtimer in given context
*
* Return: void
*/
void qdf_hrtimer_start(qdf_hrtimer_data_t *timer, qdf_ktime_t interval,
enum qdf_hrtimer_mode mode);
/**
* qdf_hrtimer_cancel() - Cancels hrtimer in given context
* @timer: pointer to the qdf_hrtimer_data_t object
*
* Cancels hrtimer in given context
*
* Return: int
*/
int qdf_hrtimer_cancel(qdf_hrtimer_data_t *timer);
/**
* qdf_hrtimer_init() - init hrtimer based on context
* @timer: pointer to the qdf_hrtimer_data_t object
* @callback: callback function to be fired
* @qdf_clock_id: clock type
* @qdf_hrtimer_mode: mode of qdf_hrtimer_data_t
* @qdf_context_mode: interrupt context mode
*
* starts hrtimer in a context passed as per qdf_context_mode
*
* Return: void
*/
void qdf_hrtimer_init(qdf_hrtimer_data_t *timer,
qdf_hrtimer_func_t callback,
enum qdf_clock_id clock,
enum qdf_hrtimer_mode mode,
enum qdf_context_mode ctx);
/**
* qdf_hrtimer_kill() - kills hrtimer in given context
* @timer: pointer to the hrtimer object
*
* kills hrtimer in given context
*
* Return: void
*/
void qdf_hrtimer_kill(__qdf_hrtimer_data_t *timer);
/**
* qdf_hrtimer_get_remaining() - check remaining time in the timer
* @timer: pointer to the qdf_hrtimer_data_t object
*
* check whether the timer is on one of the queues
*
* Return: remaining time as qdf_ktime_t object
*/
qdf_ktime_t qdf_hrtimer_get_remaining(qdf_hrtimer_data_t *timer);
/**
* qdf_hrtimer_is_queued() - check whether the timer is on one of the queues
* @timer: pointer to the qdf_hrtimer_data_t object
*
* check whether the timer is on one of the queues
*
* Return: false when the timer was not in queue
* true when the timer was in queue
*/
bool qdf_hrtimer_is_queued(qdf_hrtimer_data_t *timer);
/**
* qdf_hrtimer_callback_running() - check if callback is running
* @timer: pointer to the qdf_hrtimer_data_t object
*
* check whether the timer is running the callback function
*
* Return: false when callback is not running
* true when callback is running
*/
bool qdf_hrtimer_callback_running(qdf_hrtimer_data_t *timer);
/**
* qdf_hrtimer_active() - check if timer is active
* @timer: pointer to the qdf_hrtimer_data_t object
*
* Check if timer is active. A timer is active, when it is enqueued into
* the rbtree or the callback function is running.
*
* Return: false if timer is not active
* true if timer is active
*/
bool qdf_hrtimer_active(qdf_hrtimer_data_t *timer);
/**
* qdf_hrtimer_cb_get_time() - get remaining time in callback
* @timer: pointer to the qdf_hrtimer_data_t object
*
* Get remaining time in the hrtimer callback
*
* Return: time remaining as qdf_ktime_t object
*/
qdf_ktime_t qdf_hrtimer_cb_get_time(qdf_hrtimer_data_t *timer);
/**
* qdf_hrtimer_forward() - forward the hrtimer
* @timer: pointer to the qdf_hrtimer_data_t object
* @now: current time as qdf_ktime_t object
* @interval: interval to forward as qdf_ktime_t object
*
* Forward the timer expiry so it will expire in the future
*
* Return: the number of overruns
*/
uint64_t qdf_hrtimer_forward(qdf_hrtimer_data_t *timer,
qdf_ktime_t now,
qdf_ktime_t interval);
#else
/**
* qdf_hrtimer_start() - Starts hrtimer in given context
* @timer: pointer to the qdf_hrtimer_data_t object
@@ -186,5 +306,6 @@ static inline uint64_t qdf_hrtimer_forward(qdf_hrtimer_data_t *timer,
{
return __qdf_hrtimer_forward(timer, now, interval);
}
#endif
#endif /* _QDF_HRTIMER_H */