mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
qcacld-3.0: Add QDF threads API's
Replace CDF threads API's with QDF threads API's Change-Id: Ic20e6734f85b37ed11580ff3ed7e1a6de1356afb CRs-Fixed: 981188
This commit is contained in:
parent
42958bb929
commit
512c7d5fca
5 changed files with 3 additions and 193 deletions
|
|
@ -1,83 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
* above copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file was originally distributed by Qualcomm Atheros, Inc.
|
||||
* under proprietary terms before Copyright ownership was assigned
|
||||
* to the Linux Foundation.
|
||||
*/
|
||||
|
||||
#if !defined(__CDF_THREADS_H)
|
||||
#define __CDF_THREADS_H
|
||||
|
||||
/**
|
||||
* DOC: cdf_threads
|
||||
*
|
||||
* Connectivity driver framework (CDF) thread related APIs
|
||||
*
|
||||
*/
|
||||
|
||||
/* Include Files */
|
||||
#include <cdf_types.h>
|
||||
|
||||
/* Preprocessor definitions and constants */
|
||||
|
||||
/* Type declarations */
|
||||
|
||||
/* Function declarations and documenation */
|
||||
|
||||
/**
|
||||
* cdf_sleep() - sleep
|
||||
* @msInterval : Number of milliseconds to suspend the current thread.
|
||||
* A value of 0 may or may not cause the current thread to yield.
|
||||
*
|
||||
* This function suspends the execution of the current thread
|
||||
* until the specified time out interval elapses.
|
||||
*
|
||||
* Return: nothing
|
||||
*/
|
||||
void cdf_sleep(uint32_t msInterval);
|
||||
|
||||
/**
|
||||
* cdf_sleep_us() - sleep
|
||||
* @usInterval : Number of microseconds to suspend the current thread.
|
||||
* A value of 0 may or may not cause the current thread to yield.
|
||||
*
|
||||
* This function suspends the execution of the current thread
|
||||
* until the specified time out interval elapses.
|
||||
*
|
||||
* Return : nothing
|
||||
*/
|
||||
void cdf_sleep_us(uint32_t usInterval);
|
||||
|
||||
/**
|
||||
* cdf_busy_wait() - busy wait
|
||||
* @usInterval : Number of microseconds to busy wait.
|
||||
*
|
||||
* This function places the current thread in busy wait until the specified
|
||||
* time out interval elapses. If the interval is greater than 50us on WM, the
|
||||
* behaviour is undefined.
|
||||
*
|
||||
* Return : nothing
|
||||
*/
|
||||
void cdf_busy_wait(uint32_t usInterval);
|
||||
|
||||
#endif /* __CDF_THREADS_H */
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2014 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
* above copyright notice and this permission notice appear in all
|
||||
* copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file was originally distributed by Qualcomm Atheros, Inc.
|
||||
* under proprietary terms before Copyright ownership was assigned
|
||||
* to the Linux Foundation.
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: cdf_threads
|
||||
*
|
||||
* Connectivity driver framework (CDF) thread APIs
|
||||
*
|
||||
*/
|
||||
|
||||
/* Include Files */
|
||||
#include <cdf_threads.h>
|
||||
#include <cdf_trace.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
/* Preprocessor definitions and constants */
|
||||
|
||||
/* Type declarations */
|
||||
|
||||
/* Function declarations and documenation */
|
||||
|
||||
/**
|
||||
* cdf_sleep() - sleep
|
||||
* @msInterval : Number of milliseconds to suspend the current thread.
|
||||
* A value of 0 may or may not cause the current thread to yield.
|
||||
*
|
||||
* This function suspends the execution of the current thread
|
||||
* until the specified time out interval elapses.
|
||||
*
|
||||
* Return: nothing
|
||||
*/
|
||||
void cdf_sleep(uint32_t msInterval)
|
||||
{
|
||||
if (in_interrupt()) {
|
||||
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s cannot be called from interrupt context!!!",
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
msleep_interruptible(msInterval);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdf_sleep_us() - sleep
|
||||
* @usInterval : Number of microseconds to suspend the current thread.
|
||||
* A value of 0 may or may not cause the current thread to yield.
|
||||
*
|
||||
* This function suspends the execution of the current thread
|
||||
* until the specified time out interval elapses.
|
||||
*
|
||||
* Return : nothing
|
||||
*/
|
||||
void cdf_sleep_us(uint32_t usInterval)
|
||||
{
|
||||
unsigned long timeout = usecs_to_jiffies(usInterval) + 1;
|
||||
if (in_interrupt()) {
|
||||
CDF_TRACE(CDF_MODULE_ID_CDF, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s cannot be called from interrupt context!!!",
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
|
||||
while (timeout && !signal_pending(current))
|
||||
timeout = schedule_timeout_interruptible(timeout);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdf_busy_wait() - busy wait
|
||||
* @usInterval : Number of microseconds to busy wait.
|
||||
*
|
||||
* This function places the current thread in busy wait until the specified
|
||||
* time out interval elapses. If the interval is greater than 50us on WM, the
|
||||
* behaviour is undefined.
|
||||
*
|
||||
* Return : nothing
|
||||
*/
|
||||
void cdf_busy_wait(uint32_t usInterval)
|
||||
{
|
||||
udelay(usInterval);
|
||||
}
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
#include <cds_mq.h>
|
||||
#include <cds_packet.h>
|
||||
#include <cds_sched.h>
|
||||
#include <cdf_threads.h>
|
||||
#include <qdf_threads.h>
|
||||
#include <cdf_mc_timer.h>
|
||||
#include <cds_pack_align.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
#include <cds_mq.h>
|
||||
#include <cds_packet.h>
|
||||
#include <cds_sched.h>
|
||||
#include <cdf_threads.h>
|
||||
#include <qdf_threads.h>
|
||||
#include <cdf_mc_timer.h>
|
||||
#include <cds_pack_align.h>
|
||||
#include <crypto/aes.h>
|
||||
|
|
|
|||
|
|
@ -1901,7 +1901,7 @@ QDF_STATUS ol_txrx_wait_for_pending_tx(int timeout)
|
|||
}
|
||||
|
||||
while (ol_txrx_get_tx_pending(txrx_pdev)) {
|
||||
cdf_sleep(OL_ATH_TX_DRAIN_WAIT_DELAY);
|
||||
qdf_sleep(OL_ATH_TX_DRAIN_WAIT_DELAY);
|
||||
if (timeout <= 0) {
|
||||
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
|
||||
"%s: tx frames are pending", __func__);
|
||||
|
|
|
|||
Loading…
Reference in a new issue