qcacmn: Add wait_timeout API in qdf
Introduces QDF API for wait_queue_timeout() to allow driver to use. This API helps to wait for the event for configured time Change-Id: I9640368120fd09b19f64f028f1eb3aab46b7c97a CRs-Fixed: 2177109
This commit is contained in:
@@ -164,10 +164,32 @@ static inline int qdf_status_to_os_return(QDF_STATUS status)
|
|||||||
#define qdf_wait_queue_interruptible(wait_queue, condition) \
|
#define qdf_wait_queue_interruptible(wait_queue, condition) \
|
||||||
__qdf_wait_queue_interruptible(wait_queue, condition)
|
__qdf_wait_queue_interruptible(wait_queue, condition)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_wait_queue_timeout() - wait for specified time on given condition
|
||||||
|
* @wait_queue: wait queue to wait on
|
||||||
|
* @condition: condition to wait on
|
||||||
|
* @timeout: timeout value in jiffies
|
||||||
|
*
|
||||||
|
* Return: 0 if condition becomes false after timeout
|
||||||
|
* 1 or remaining jiffies, if condition becomes true during timeout
|
||||||
|
*/
|
||||||
|
#define qdf_wait_queue_timeout(wait_queue, condition, timeout) \
|
||||||
|
__qdf_wait_queue_timeout(wait_queue, \
|
||||||
|
condition, timeout)
|
||||||
|
|
||||||
|
|
||||||
#define qdf_init_waitqueue_head(_q) __qdf_init_waitqueue_head(_q)
|
#define qdf_init_waitqueue_head(_q) __qdf_init_waitqueue_head(_q)
|
||||||
|
|
||||||
#define qdf_wake_up_interruptible(_q) __qdf_wake_up_interruptible(_q)
|
#define qdf_wake_up_interruptible(_q) __qdf_wake_up_interruptible(_q)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* qdf_wake_up() - wakes up sleeping waitqueue
|
||||||
|
* @wait_queue: wait queue, which needs wake up
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
#define qdf_wake_up(_q) __qdf_wake_up(_q)
|
||||||
|
|
||||||
#define qdf_wake_up_completion(_q) __qdf_wake_up_completion(_q)
|
#define qdf_wake_up_completion(_q) __qdf_wake_up_completion(_q)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||||
*
|
*
|
||||||
@@ -71,10 +71,19 @@ typedef wait_queue_head_t __qdf_wait_queue_head_t;
|
|||||||
#define __qdf_wait_queue_interruptible(wait_queue, condition) \
|
#define __qdf_wait_queue_interruptible(wait_queue, condition) \
|
||||||
wait_event_interruptible(wait_queue, condition)
|
wait_event_interruptible(wait_queue, condition)
|
||||||
|
|
||||||
|
#define __qdf_wait_queue_timeout( \
|
||||||
|
wait_queue, condition, timeout) \
|
||||||
|
wait_event_timeout(wait_queue, condition,\
|
||||||
|
timeout)
|
||||||
|
|
||||||
|
|
||||||
#define __qdf_init_waitqueue_head(_q) init_waitqueue_head(_q)
|
#define __qdf_init_waitqueue_head(_q) init_waitqueue_head(_q)
|
||||||
|
|
||||||
#define __qdf_wake_up_interruptible(_q) wake_up_interruptible(_q)
|
#define __qdf_wake_up_interruptible(_q) wake_up_interruptible(_q)
|
||||||
|
|
||||||
|
#define __qdf_wake_up(_q) wake_up(_q)
|
||||||
|
|
||||||
|
|
||||||
#define __qdf_wake_up_completion(_q) wake_up_completion(_q)
|
#define __qdf_wake_up_completion(_q) wake_up_completion(_q)
|
||||||
|
|
||||||
#define __qdf_unlikely(_expr) unlikely(_expr)
|
#define __qdf_unlikely(_expr) unlikely(_expr)
|
||||||
|
Reference in New Issue
Block a user