diff options
| author | Anurag Chouhan <achouhan@codeaurora.org> | 2016-02-22 18:42:15 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-03-24 11:58:08 -0700 |
| commit | 210db076445d76b4ea3ab959e861159c3dc26fe3 (patch) | |
| tree | f76db58334f48e91900892986ba2d802dc69e47d /core | |
| parent | 2ed1fced922b3d372073149b3d2d7ef56d77f5c3 (diff) | |
qcacld-3.0: Add QDF MC timer API's
Replace CDF MC timer API's with QDF MC timer API's
Change-Id: If18069e9cb8dbd24c5cdc8bd8def6932f55c0168
CRs-Fixed: 981188
Diffstat (limited to 'core')
65 files changed, 411 insertions, 1523 deletions
diff --git a/core/cdf/inc/cdf_mc_timer.h b/core/cdf/inc/cdf_mc_timer.h deleted file mode 100644 index 7f7744304902..000000000000 --- a/core/cdf/inc/cdf_mc_timer.h +++ /dev/null @@ -1,253 +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_MC_TIMER_H) -#define __CDF_MC_TIMER_H - -/** - * DOC: cdf_mc_timer - * - * Connectivity driver framework timer APIs serialized to MC thread - */ - -/* Include Files */ -#include <qdf_types.h> -#include <qdf_status.h> -#include <qdf_lock.h> -#include <i_cdf_mc_timer.h> - -#ifdef TIMER_MANAGER -#include <qdf_list.h> -#endif - -/* Preprocessor definitions and constants */ -#define CDF_TIMER_STATE_COOKIE (0x12) -#define CDF_MC_TIMER_TO_MS_UNIT (1000) -#define CDF_MC_TIMER_TO_SEC_UNIT (1000000) - -/* Type declarations */ -/* cdf Timer callback function prototype (well, actually a prototype for - a pointer to this callback function) */ -typedef void (*cdf_mc_timer_callback_t)(void *userData); - -typedef enum { - CDF_TIMER_STATE_UNUSED = CDF_TIMER_STATE_COOKIE, - CDF_TIMER_STATE_STOPPED, - CDF_TIMER_STATE_STARTING, - CDF_TIMER_STATE_RUNNING, -} CDF_TIMER_STATE; - -#ifdef TIMER_MANAGER -struct cdf_mc_timer_s; -typedef struct cdf_mc_timer_node_s { - qdf_list_node_t pNode; - char *fileName; - unsigned int lineNum; - struct cdf_mc_timer_s *cdf_timer; -} cdf_mc_timer_node_t; -#endif - -typedef struct cdf_mc_timer_s { -#ifdef TIMER_MANAGER - cdf_mc_timer_node_t *ptimerNode; -#endif - - cdf_mc_timer_platform_t platformInfo; - cdf_mc_timer_callback_t callback; - void *userData; - qdf_mutex_t lock; - QDF_TIMER_TYPE type; - CDF_TIMER_STATE state; -} cdf_mc_timer_t; - -/* Function declarations and documenation */ -#ifdef TIMER_MANAGER -void cdf_mc_timer_manager_init(void); -void cdf_mc_timer_exit(void); -#else -/** - * cdf_mc_timer_manager_init() - initialize CDF debug timer manager - * - * This API initializes CDF timer debug functionality. - * - * Return: none - */ -static inline void cdf_mc_timer_manager_init(void) -{ -} - -/** - * cdf_mc_timer_exit() - exit CDF timer debug functionality - * - * This API exists CDF timer debug functionality - * - * Return: none - */ -static inline void cdf_mc_timer_exit(void) -{ -} -#endif -/** - * cdf_mc_timer_get_current_state() - get the current state of the timer - * @pTimer: Pointer to timer object - * - * Return: - * CDF_TIMER_STATE - cdf timer state - */ - -CDF_TIMER_STATE cdf_mc_timer_get_current_state(cdf_mc_timer_t *pTimer); - -/** - * cdf_mc_timer_init() - initialize a CDF timer - * @pTimer: Pointer to timer object - * @timerType: Type of timer - * @callback: Callback to be called after timer expiry - * @serData: User data which will be passed to callback function - * - * This API initializes a CDF Timer object. - * - * cdf_mc_timer_init() initializes a CDF Timer object. A timer must be - * initialized by calling cdf_mc_timer_initialize() before it may be used in - * any other timer functions. - * - * Attempting to initialize timer that is already initialized results in - * a failure. A destroyed timer object can be re-initialized with a call to - * cdf_mc_timer_init(). The results of otherwise referencing the object - * after it has been destroyed are undefined. - * - * Calls to CDF timer functions to manipulate the timer such - * as cdf_mc_timer_set() will fail if the timer is not initialized or has - * been destroyed. Therefore, don't use the timer after it has been - * destroyed until it has been re-initialized. - * - * All callback will be executed within the CDS main thread unless it is - * initialized from the Tx thread flow, in which case it will be executed - * within the tx thread flow. - * - * Return: - * QDF_STATUS_SUCCESS - Timer is initialized successfully - * CDF failure status - Timer initialization failed - */ -#ifdef TIMER_MANAGER -#define cdf_mc_timer_init(timer, timerType, callback, userdata) \ - cdf_mc_timer_init_debug(timer, timerType, callback, userdata, \ - __FILE__, __LINE__) - -QDF_STATUS cdf_mc_timer_init_debug(cdf_mc_timer_t *timer, - QDF_TIMER_TYPE timerType, - cdf_mc_timer_callback_t callback, - void *userData, char *fileName, - uint32_t lineNum); -#else -QDF_STATUS cdf_mc_timer_init(cdf_mc_timer_t *timer, QDF_TIMER_TYPE timerType, - cdf_mc_timer_callback_t callback, - void *userData); -#endif - -/** - * cdf_mc_timer_destroy() - destroy CDF timer - * @timer: Pointer to timer object - * - * cdf_mc_timer_destroy() function shall destroy the timer object. - * After a successful return from \a cdf_mc_timer_destroy() the timer - * object becomes, in effect, uninitialized. - * - * A destroyed timer object can be re-initialized by calling - * cdf_mc_timer_init(). The results of otherwise referencing the object - * after it has been destroyed are undefined. - * - * Calls to CDF timer functions to manipulate the timer, such - * as cdf_mc_timer_set() will fail if the lock is destroyed. Therefore, - * don't use the timer after it has been destroyed until it has - * been re-initialized. - * - * Return: - * QDF_STATUS_SUCCESS - Timer is initialized successfully - * CDF failure status - Timer initialization failed - */ -QDF_STATUS cdf_mc_timer_destroy(cdf_mc_timer_t *timer); - -/** - * cdf_mc_timer_start() - start a CDF Timer object - * @timer: Pointer to timer object - * @expirationTime: Time to expire - * - * cdf_mc_timer_start() function starts a timer to expire after the - * specified interval, thus running the timer callback function when - * the interval expires. - * - * A timer only runs once (a one-shot timer). To re-start the - * timer, cdf_mc_timer_start() has to be called after the timer runs - * or has been cancelled. - * - * Return: - * QDF_STATUS_SUCCESS - Timer is initialized successfully - * CDF failure status - Timer initialization failed - */ -QDF_STATUS cdf_mc_timer_start(cdf_mc_timer_t *timer, uint32_t expirationTime); - -/** - * cdf_mc_timer_stop() - stop a CDF Timer - * @timer: Pointer to timer object - * cdf_mc_timer_stop() function stops a timer that has been started but - * has not expired, essentially cancelling the 'start' request. - * - * After a timer is stopped, it goes back to the state it was in after it - * was created and can be started again via a call to cdf_mc_timer_start(). - * - * Return: - * QDF_STATUS_SUCCESS - Timer is initialized successfully - * CDF failure status - Timer initialization failed - */ -QDF_STATUS cdf_mc_timer_stop(cdf_mc_timer_t *timer); - -/** - * cdf_mc_timer_get_system_ticks() - get the system time in 10ms ticks - - * cdf_mc_timer_get_system_ticks() function returns the current number - * of timer ticks in 10msec intervals. This function is suitable timestamping - * and calculating time intervals by calculating the difference between two - * timestamps. - * - * Return: - * The current system tick count (in 10msec intervals). This - * function cannot fail. - */ -unsigned long cdf_mc_timer_get_system_ticks(void); - -/** - * cdf_mc_timer_get_system_time() - Get the system time in milliseconds - * - * cdf_mc_timer_get_system_time() function returns the number of milliseconds - * that have elapsed since the system was started - * - * Return: - * The current system time in milliseconds - */ -unsigned long cdf_mc_timer_get_system_time(void); - -#endif /* #if !defined __CDF_MC_TIMER_H */ diff --git a/core/cdf/src/cdf_mc_timer.c b/core/cdf/src/cdf_mc_timer.c deleted file mode 100644 index 97f9efeabd25..000000000000 --- a/core/cdf/src/cdf_mc_timer.c +++ /dev/null @@ -1,797 +0,0 @@ -/* - * Copyright (c) 2014-2016 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_mc_timer - * - * Connectivity driver framework timer APIs serialized to MC thread - */ - -/* Include Files */ -#include <cdf_mc_timer.h> -#include <qdf_lock.h> -#include <cds_api.h> -#include "wlan_qct_sys.h" -#include "cds_sched.h" - -/* Preprocessor definitions and constants */ - -#define LINUX_TIMER_COOKIE 0x12341234 -#define LINUX_INVALID_TIMER_COOKIE 0xfeedface -#define TMR_INVALID_ID (0) - -/* Type declarations */ - -/* Static Variable Definitions */ -static unsigned int persistent_timer_count; -static qdf_mutex_t persistent_timer_count_lock; - -/* Function declarations and documenation */ - -/** - * try_allowing_sleep() - clean up timer states after it has been deactivated - * @type: Timer type - * - * Clean up timer states after it has been deactivated check and try to allow - * sleep after a timer has been stopped or expired. - * - * Return: none - */ -static void try_allowing_sleep(QDF_TIMER_TYPE type) -{ - if (QDF_TIMER_TYPE_WAKE_APPS == type) { - /* qdf_mutex_acquire(&persistent_timer_count_lock); */ - persistent_timer_count--; - if (0 == persistent_timer_count) { - /* since the number of persistent timers has - decreased from 1 to 0, the timer should allow - sleep sleep_assert_okts( sleepClientHandle ); */ - } - /* qdf_mutex_release(&persistent_timer_count_lock); */ - } -} - -/** - * cdf_linux_timer_callback() - internal cdf entry point which is - * called when the timer interval expires - * @data: pointer to the timer control block which describes the - * timer that expired - * - * This function in turn calls the CDF client callback and changes the - * state of the timer from running (ACTIVE) to expired (INIT). - * - * Note: function signature is defined by the Linux kernel. The fact - * that the argument is "unsigned long" instead of "void *" is - * unfortunately imposed upon us. But we can safely pass a pointer via - * this parameter for LP32 and LP64 architectures. - * - * Return: nothing - */ - -static void cdf_linux_timer_callback(unsigned long data) -{ - cdf_mc_timer_t *timer = (cdf_mc_timer_t *) data; - cds_msg_t msg; - QDF_STATUS vStatus; - unsigned long flags; - - cdf_mc_timer_callback_t callback = NULL; - void *userData = NULL; - int threadId; - QDF_TIMER_TYPE type = QDF_TIMER_TYPE_SW; - - CDF_ASSERT(timer); - - if (timer == NULL) { - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s Null pointer passed in!", __func__); - return; - } - - threadId = timer->platformInfo.threadID; - spin_lock_irqsave(&timer->platformInfo.spinlock, flags); - - switch (timer->state) { - case CDF_TIMER_STATE_STARTING: - /* we are in this state because someone just started the timer, - * MC timer got started and expired, but the time content have - * not been updated this is a rare race condition! - */ - timer->state = CDF_TIMER_STATE_STOPPED; - vStatus = QDF_STATUS_E_ALREADY; - break; - - case CDF_TIMER_STATE_STOPPED: - vStatus = QDF_STATUS_E_ALREADY; - break; - - case CDF_TIMER_STATE_UNUSED: - vStatus = QDF_STATUS_E_EXISTS; - break; - - case CDF_TIMER_STATE_RUNNING: - /* need to go to stop state here because the call-back function - * may restart timer (to emulate periodic timer) - */ - timer->state = CDF_TIMER_STATE_STOPPED; - /* copy the relevant timer information to local variables; - * once we exist from this critical section, the timer content - * may be modified by other tasks - */ - callback = timer->callback; - userData = timer->userData; - threadId = timer->platformInfo.threadID; - type = timer->type; - vStatus = QDF_STATUS_SUCCESS; - break; - - default: - CDF_ASSERT(0); - vStatus = QDF_STATUS_E_FAULT; - break; - } - - spin_unlock_irqrestore(&timer->platformInfo.spinlock, flags); - - if (QDF_STATUS_SUCCESS != vStatus) { - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "TIMER callback called in a wrong state=%d", - timer->state); - return; - } - - try_allowing_sleep(type); - - if (callback == NULL) { - CDF_ASSERT(0); - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: No TIMER callback, Could not enqueue timer to any queue", - __func__); - return; - } - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_INFO, - "TIMER callback: running on MC thread"); - - /* serialize to the MC thread */ - sys_build_message_header(SYS_MSG_ID_MC_TIMER, &msg); - msg.callback = callback; - msg.bodyptr = userData; - msg.bodyval = 0; - - if (cds_mq_post_message(CDS_MQ_ID_SYS, &msg) == QDF_STATUS_SUCCESS) - return; - - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: Could not enqueue timer to any queue", __func__); - CDF_ASSERT(0); -} - -/** - * cdf_mc_timer_get_current_state() - get the current state of the timer - * @pTimer: Pointer to timer object - * - * Return: - * CDF_TIMER_STATE - cdf timer state - */ -CDF_TIMER_STATE cdf_mc_timer_get_current_state(cdf_mc_timer_t *pTimer) -{ - if (NULL == pTimer) { - CDF_ASSERT(0); - return CDF_TIMER_STATE_UNUSED; - } - - switch (pTimer->state) { - case CDF_TIMER_STATE_STOPPED: - case CDF_TIMER_STATE_STARTING: - case CDF_TIMER_STATE_RUNNING: - case CDF_TIMER_STATE_UNUSED: - return pTimer->state; - default: - CDF_ASSERT(0); - return CDF_TIMER_STATE_UNUSED; - } -} - -/** - * cdf_timer_module_init() - initializes a CDF timer module. - * - * This API initializes the CDF timer module. This needs to be called - * exactly once prior to using any CDF timers. - * - * Return: none - */ -void cdf_timer_module_init(void) -{ - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_INFO, - "Initializing the CDF timer module"); - qdf_mutex_create(&persistent_timer_count_lock); -} - -#ifdef TIMER_MANAGER - -qdf_list_t cdf_timer_list; -qdf_spinlock_t cdf_timer_list_lock; - -static void cdf_timer_clean(void); - -/** - * cdf_mc_timer_manager_init() - initialize CDF debug timer manager - * - * This API initializes CDF timer debug functionality. - * - * Return: none - */ -void cdf_mc_timer_manager_init(void) -{ - qdf_list_create(&cdf_timer_list, 1000); - qdf_spinlock_create(&cdf_timer_list_lock); - return; -} - -/** - * cdf_timer_clean() - clean up CDF timer debug functionality - * - * This API cleans up CDF timer debug functionality and prints which CDF timers - * are leaked. This is called during driver unload. - * - * Return: none - */ -static void cdf_timer_clean(void) -{ - uint32_t listSize; - - listSize = qdf_list_size(&cdf_timer_list); - - if (listSize) { - qdf_list_node_t *pNode; - QDF_STATUS qdf_status; - - cdf_mc_timer_node_t *ptimerNode; - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: List is not Empty. listSize %d ", - __func__, (int)listSize); - - do { - qdf_spin_lock_irqsave(&cdf_timer_list_lock); - qdf_status = - qdf_list_remove_front(&cdf_timer_list, &pNode); - qdf_spin_unlock_irqrestore(&cdf_timer_list_lock); - if (QDF_STATUS_SUCCESS == qdf_status) { - ptimerNode = (cdf_mc_timer_node_t *) pNode; - CDF_TRACE(QDF_MODULE_ID_QDF, - CDF_TRACE_LEVEL_FATAL, - "Timer Leak@ File %s, @Line %d", - ptimerNode->fileName, - (int)ptimerNode->lineNum); - cdf_mem_free(ptimerNode); - } - } while (qdf_status == QDF_STATUS_SUCCESS); - } -} - -/** - * cdf_mc_timer_exit() - exit CDF timer debug functionality - * - * This API exists CDF timer debug functionality - * - * Return: none - */ -void cdf_mc_timer_exit(void) -{ - cdf_timer_clean(); - qdf_list_destroy(&cdf_timer_list); -} -#endif - -/** - * cdf_mc_timer_init() - initialize a CDF timer - * @pTimer: Pointer to timer object - * @timerType: Type of timer - * @callback: Callback to be called after timer expiry - * @serData: User data which will be passed to callback function - * - * This API initializes a CDF Timer object. - * - * cdf_mc_timer_init() initializes a CDF Timer object. A timer must be - * initialized by calling cdf_mc_timer_initialize() before it may be used in - * any other timer functions. - * - * Attempting to initialize timer that is already initialized results in - * a failure. A destroyed timer object can be re-initialized with a call to - * cdf_mc_timer_init(). The results of otherwise referencing the object - * after it has been destroyed are undefined. - * - * Calls to CDF timer functions to manipulate the timer such - * as cdf_mc_timer_set() will fail if the timer is not initialized or has - * been destroyed. Therefore, don't use the timer after it has been - * destroyed until it has been re-initialized. - * - * All callback will be executed within the CDS main thread unless it is - * initialized from the Tx thread flow, in which case it will be executed - * within the tx thread flow. - * - * Return: - * QDF_STATUS_SUCCESS - Timer is initialized successfully - * CDF failure status - Timer initialization failed - */ -#ifdef TIMER_MANAGER -QDF_STATUS cdf_mc_timer_init_debug(cdf_mc_timer_t *timer, - QDF_TIMER_TYPE timerType, - cdf_mc_timer_callback_t callback, - void *userData, char *fileName, - uint32_t lineNum) -{ - QDF_STATUS qdf_status; - - /* check for invalid pointer */ - if ((timer == NULL) || (callback == NULL)) { - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: Null params being passed", __func__); - CDF_ASSERT(0); - return QDF_STATUS_E_FAULT; - } - - timer->ptimerNode = cdf_mem_malloc(sizeof(cdf_mc_timer_node_t)); - - if (timer->ptimerNode == NULL) { - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: Not able to allocate memory for timeNode", - __func__); - CDF_ASSERT(0); - return QDF_STATUS_E_NOMEM; - } - - cdf_mem_set(timer->ptimerNode, sizeof(cdf_mc_timer_node_t), 0); - - timer->ptimerNode->fileName = fileName; - timer->ptimerNode->lineNum = lineNum; - timer->ptimerNode->cdf_timer = timer; - - qdf_spin_lock_irqsave(&cdf_timer_list_lock); - qdf_status = qdf_list_insert_front(&cdf_timer_list, - &timer->ptimerNode->pNode); - qdf_spin_unlock_irqrestore(&cdf_timer_list_lock); - if (QDF_STATUS_SUCCESS != qdf_status) { - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: Unable to insert node into List qdf_status %d", - __func__, qdf_status); - } - - /* set the various members of the timer structure - * with arguments passed or with default values - */ - spin_lock_init(&timer->platformInfo.spinlock); - if (QDF_TIMER_TYPE_SW == timerType) - init_timer_deferrable(&(timer->platformInfo.Timer)); - else - init_timer(&(timer->platformInfo.Timer)); - timer->platformInfo.Timer.function = cdf_linux_timer_callback; - timer->platformInfo.Timer.data = (unsigned long)timer; - timer->callback = callback; - timer->userData = userData; - timer->type = timerType; - timer->platformInfo.cookie = LINUX_TIMER_COOKIE; - timer->platformInfo.threadID = 0; - timer->state = CDF_TIMER_STATE_STOPPED; - - return QDF_STATUS_SUCCESS; -} -#else -QDF_STATUS cdf_mc_timer_init(cdf_mc_timer_t *timer, QDF_TIMER_TYPE timerType, - cdf_mc_timer_callback_t callback, - void *userData) -{ - /* check for invalid pointer */ - if ((timer == NULL) || (callback == NULL)) { - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: Null params being passed", __func__); - CDF_ASSERT(0); - return QDF_STATUS_E_FAULT; - } - - /* set the various members of the timer structure - * with arguments passed or with default values - */ - spin_lock_init(&timer->platformInfo.spinlock); - if (QDF_TIMER_TYPE_SW == timerType) - init_timer_deferrable(&(timer->platformInfo.Timer)); - else - init_timer(&(timer->platformInfo.Timer)); - timer->platformInfo.Timer.function = cdf_linux_timer_callback; - timer->platformInfo.Timer.data = (unsigned long)timer; - timer->callback = callback; - timer->userData = userData; - timer->type = timerType; - timer->platformInfo.cookie = LINUX_TIMER_COOKIE; - timer->platformInfo.threadID = 0; - timer->state = CDF_TIMER_STATE_STOPPED; - - return QDF_STATUS_SUCCESS; -} -#endif - -/** - * cdf_mc_timer_destroy() - destroy CDF timer - * @timer: Pointer to timer object - * - * cdf_mc_timer_destroy() function shall destroy the timer object. - * After a successful return from \a cdf_mc_timer_destroy() the timer - * object becomes, in effect, uninitialized. - * - * A destroyed timer object can be re-initialized by calling - * cdf_mc_timer_init(). The results of otherwise referencing the object - * after it has been destroyed are undefined. - * - * Calls to CDF timer functions to manipulate the timer, such - * as cdf_mc_timer_set() will fail if the lock is destroyed. Therefore, - * don't use the timer after it has been destroyed until it has - * been re-initialized. - * - * Return: - * QDF_STATUS_SUCCESS - Timer is initialized successfully - * CDF failure status - Timer initialization failed - */ -#ifdef TIMER_MANAGER -QDF_STATUS cdf_mc_timer_destroy(cdf_mc_timer_t *timer) -{ - QDF_STATUS status = QDF_STATUS_SUCCESS; - unsigned long flags; - - /* check for invalid pointer */ - if (NULL == timer) { - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: Null timer pointer being passed", __func__); - CDF_ASSERT(0); - return QDF_STATUS_E_FAULT; - } - - /* Check if timer refers to an uninitialized object */ - if (LINUX_TIMER_COOKIE != timer->platformInfo.cookie) { - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: Cannot destroy uninitialized timer", __func__); - CDF_ASSERT(0); - return QDF_STATUS_E_INVAL; - } - - qdf_spin_lock_irqsave(&cdf_timer_list_lock); - status = qdf_list_remove_node(&cdf_timer_list, - &timer->ptimerNode->pNode); - qdf_spin_unlock_irqrestore(&cdf_timer_list_lock); - if (status != QDF_STATUS_SUCCESS) { - CDF_ASSERT(0); - return QDF_STATUS_E_INVAL; - } - cdf_mem_free(timer->ptimerNode); - - spin_lock_irqsave(&timer->platformInfo.spinlock, flags); - - switch (timer->state) { - - case CDF_TIMER_STATE_STARTING: - status = QDF_STATUS_E_BUSY; - break; - - case CDF_TIMER_STATE_RUNNING: - /* Stop the timer first */ - del_timer(&(timer->platformInfo.Timer)); - status = QDF_STATUS_SUCCESS; - break; - case CDF_TIMER_STATE_STOPPED: - status = QDF_STATUS_SUCCESS; - break; - - case CDF_TIMER_STATE_UNUSED: - status = QDF_STATUS_E_ALREADY; - break; - - default: - status = QDF_STATUS_E_FAULT; - break; - } - - if (QDF_STATUS_SUCCESS == status) { - timer->platformInfo.cookie = LINUX_INVALID_TIMER_COOKIE; - timer->state = CDF_TIMER_STATE_UNUSED; - spin_unlock_irqrestore(&timer->platformInfo.spinlock, flags); - return status; - } - - spin_unlock_irqrestore(&timer->platformInfo.spinlock, flags); - - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: Cannot destroy timer in state = %d", __func__, - timer->state); - CDF_ASSERT(0); - - return status; -} - -#else - -/** - * cdf_mc_timer_destroy() - destroy CDF timer - * @timer: Pointer to timer object - * - * cdf_mc_timer_destroy() function shall destroy the timer object. - * After a successful return from \a cdf_mc_timer_destroy() the timer - * object becomes, in effect, uninitialized. - * - * A destroyed timer object can be re-initialized by calling - * cdf_mc_timer_init(). The results of otherwise referencing the object - * after it has been destroyed are undefined. - * - * Calls to CDF timer functions to manipulate the timer, such - * as cdf_mc_timer_set() will fail if the lock is destroyed. Therefore, - * don't use the timer after it has been destroyed until it has - * been re-initialized. - * - * Return: - * QDF_STATUS_SUCCESS - Timer is initialized successfully - * CDF failure status - Timer initialization failed - */ -QDF_STATUS cdf_mc_timer_destroy(cdf_mc_timer_t *timer) -{ - QDF_STATUS vStatus = QDF_STATUS_SUCCESS; - unsigned long flags; - - /* check for invalid pointer */ - if (NULL == timer) { - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: Null timer pointer being passed", __func__); - CDF_ASSERT(0); - return QDF_STATUS_E_FAULT; - } - - /* check if timer refers to an uninitialized object */ - if (LINUX_TIMER_COOKIE != timer->platformInfo.cookie) { - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: Cannot destroy uninitialized timer", __func__); - CDF_ASSERT(0); - return QDF_STATUS_E_INVAL; - } - spin_lock_irqsave(&timer->platformInfo.spinlock, flags); - - switch (timer->state) { - - case CDF_TIMER_STATE_STARTING: - vStatus = QDF_STATUS_E_BUSY; - break; - - case CDF_TIMER_STATE_RUNNING: - /* Stop the timer first */ - del_timer(&(timer->platformInfo.Timer)); - vStatus = QDF_STATUS_SUCCESS; - break; - - case CDF_TIMER_STATE_STOPPED: - vStatus = QDF_STATUS_SUCCESS; - break; - - case CDF_TIMER_STATE_UNUSED: - vStatus = QDF_STATUS_E_ALREADY; - break; - - default: - vStatus = QDF_STATUS_E_FAULT; - break; - } - - if (QDF_STATUS_SUCCESS == vStatus) { - timer->platformInfo.cookie = LINUX_INVALID_TIMER_COOKIE; - timer->state = CDF_TIMER_STATE_UNUSED; - spin_unlock_irqrestore(&timer->platformInfo.spinlock, flags); - return vStatus; - } - - spin_unlock_irqrestore(&timer->platformInfo.spinlock, flags); - - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: Cannot destroy timer in state = %d", __func__, - timer->state); - CDF_ASSERT(0); - - return vStatus; -} -#endif - -/** - * cdf_mc_timer_start() - start a CDF Timer object - * @timer: Pointer to timer object - * @expirationTime: Time to expire - * - * cdf_mc_timer_start() function starts a timer to expire after the - * specified interval, thus running the timer callback function when - * the interval expires. - * - * A timer only runs once (a one-shot timer). To re-start the - * timer, cdf_mc_timer_start() has to be called after the timer runs - * or has been cancelled. - * - * Return: - * QDF_STATUS_SUCCESS - Timer is initialized successfully - * CDF failure status - Timer initialization failed - */ -QDF_STATUS cdf_mc_timer_start(cdf_mc_timer_t *timer, uint32_t expirationTime) -{ - unsigned long flags; - - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_INFO_HIGH, - "Timer Addr inside cds_enable : 0x%p ", timer); - - /* check for invalid pointer */ - if (NULL == timer) { - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s Null timer pointer being passed", __func__); - CDF_ASSERT(0); - return QDF_STATUS_E_INVAL; - } - - /* check if timer refers to an uninitialized object */ - if (LINUX_TIMER_COOKIE != timer->platformInfo.cookie) { - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: Cannot start uninitialized timer", __func__); - CDF_ASSERT(0); - - return QDF_STATUS_E_INVAL; - } - - /* check if timer has expiration time less than 10 ms */ - if (expirationTime < 10) { - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: Cannot start a timer with expiration less than 10 ms", - __func__); - CDF_ASSERT(0); - return QDF_STATUS_E_INVAL; - } - - /* make sure the remainer of the logic isn't interrupted */ - spin_lock_irqsave(&timer->platformInfo.spinlock, flags); - - /* ensure if the timer can be started */ - if (CDF_TIMER_STATE_STOPPED != timer->state) { - spin_unlock_irqrestore(&timer->platformInfo.spinlock, flags); - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_INFO_HIGH, - "%s: Cannot start timer in state = %d ", __func__, - timer->state); - return QDF_STATUS_E_ALREADY; - } - - /* start the timer */ - mod_timer(&(timer->platformInfo.Timer), - jiffies + msecs_to_jiffies(expirationTime)); - - timer->state = CDF_TIMER_STATE_RUNNING; - - /* get the thread ID on which the timer is being started */ - timer->platformInfo.threadID = current->pid; - - if (QDF_TIMER_TYPE_WAKE_APPS == timer->type) { - persistent_timer_count++; - if (1 == persistent_timer_count) { - /* since we now have one persistent timer, - * we need to disallow sleep - * sleep_negate_okts(sleepClientHandle); - */ - } - } - - spin_unlock_irqrestore(&timer->platformInfo.spinlock, flags); - - return QDF_STATUS_SUCCESS; -} - -/** - * cdf_mc_timer_stop() - stop a CDF Timer - * @timer: Pointer to timer object - * cdf_mc_timer_stop() function stops a timer that has been started but - * has not expired, essentially cancelling the 'start' request. - * - * After a timer is stopped, it goes back to the state it was in after it - * was created and can be started again via a call to cdf_mc_timer_start(). - * - * Return: - * QDF_STATUS_SUCCESS - Timer is initialized successfully - * CDF failure status - Timer initialization failed - */ -QDF_STATUS cdf_mc_timer_stop(cdf_mc_timer_t *timer) -{ - unsigned long flags; - - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_INFO_HIGH, - "%s: Timer Addr inside cds_disable : 0x%p", __func__, timer); - - /* check for invalid pointer */ - if (NULL == timer) { - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s Null timer pointer being passed", __func__); - CDF_ASSERT(0); - return QDF_STATUS_E_INVAL; - } - - /* check if timer refers to an uninitialized object */ - if (LINUX_TIMER_COOKIE != timer->platformInfo.cookie) { - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, - "%s: Cannot stop uninitialized timer", __func__); - CDF_ASSERT(0); - - return QDF_STATUS_E_INVAL; - } - - /* ensure the timer state is correct */ - spin_lock_irqsave(&timer->platformInfo.spinlock, flags); - - if (CDF_TIMER_STATE_RUNNING != timer->state) { - spin_unlock_irqrestore(&timer->platformInfo.spinlock, flags); - CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_INFO_HIGH, - "%s: Cannot stop timer in state = %d", - __func__, timer->state); - return QDF_STATUS_SUCCESS; - } - - timer->state = CDF_TIMER_STATE_STOPPED; - - del_timer(&(timer->platformInfo.Timer)); - - spin_unlock_irqrestore(&timer->platformInfo.spinlock, flags); - - try_allowing_sleep(timer->type); - - return QDF_STATUS_SUCCESS; -} - -/** - * cdf_mc_timer_get_system_ticks() - get the system time in 10ms ticks - - * cdf_mc_timer_get_system_ticks() function returns the current number - * of timer ticks in 10msec intervals. This function is suitable timestamping - * and calculating time intervals by calculating the difference between two - * timestamps. - * - * Return: - * The current system tick count (in 10msec intervals). This - * function cannot fail. - */ -unsigned long cdf_mc_timer_get_system_ticks(void) -{ - return jiffies_to_msecs(jiffies) / 10; -} - -/** - * cdf_mc_timer_get_system_time() - Get the system time in milliseconds - * - * cdf_mc_timer_get_system_time() function returns the number of milliseconds - * that have elapsed since the system was started - * - * Return: - * The current system time in milliseconds - */ -unsigned long cdf_mc_timer_get_system_time(void) -{ - struct timeval tv; - do_gettimeofday(&tv); - return tv.tv_sec * 1000 + tv.tv_usec / 1000; -} diff --git a/core/cdf/src/cdf_memory.c b/core/cdf/src/cdf_memory.c index 746f7913841a..0c4de4378690 100644 --- a/core/cdf/src/cdf_memory.c +++ b/core/cdf/src/cdf_memory.c @@ -36,7 +36,7 @@ #include "cdf_nbuf.h" #include "cdf_trace.h" #include "qdf_lock.h" -#include "cdf_mc_timer.h" +#include "qdf_mc_timer.h" #if defined(CONFIG_CNSS) #include <net/cnss.h> @@ -273,18 +273,18 @@ void *cdf_mem_malloc_debug(size_t size, char *fileName, uint32_t lineNum) flags = GFP_ATOMIC; new_size = size + sizeof(struct s_cdf_mem_struct) + 8; - time_before_kzalloc = cdf_mc_timer_get_system_time(); + time_before_kzalloc = qdf_mc_timer_get_system_time(); memStruct = (struct s_cdf_mem_struct *)kzalloc(new_size, flags); /** * If time taken by kmalloc is greater than * CDF_GET_MEMORY_TIME_THRESHOLD msec */ - if (cdf_mc_timer_get_system_time() - time_before_kzalloc >= + if (qdf_mc_timer_get_system_time() - time_before_kzalloc >= CDF_GET_MEMORY_TIME_THRESHOLD) CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, "%s: kzalloc took %lu msec for size %zu called from %pS at line %d", __func__, - cdf_mc_timer_get_system_time() - time_before_kzalloc, + qdf_mc_timer_get_system_time() - time_before_kzalloc, size, (void *)_RET_IP_, lineNum); if (memStruct != NULL) { @@ -415,18 +415,18 @@ void *cdf_mem_malloc(size_t size) if (in_interrupt() || irqs_disabled() || in_atomic()) flags = GFP_ATOMIC; - time_before_kzalloc = cdf_mc_timer_get_system_time(); + time_before_kzalloc = qdf_mc_timer_get_system_time(); memPtr = kzalloc(size, flags); /** * If time taken by kmalloc is greater than * CDF_GET_MEMORY_TIME_THRESHOLD msec */ - if (cdf_mc_timer_get_system_time() - time_before_kzalloc >= + if (qdf_mc_timer_get_system_time() - time_before_kzalloc >= CDF_GET_MEMORY_TIME_THRESHOLD) CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, "%s: kzalloc took %lu msec for size %zu called from %pS", __func__, - cdf_mc_timer_get_system_time() - time_before_kzalloc, + qdf_mc_timer_get_system_time() - time_before_kzalloc, size, (void *)_RET_IP_); return memPtr; } diff --git a/core/cdf/src/i_cdf_mc_timer.h b/core/cdf/src/i_cdf_mc_timer.h deleted file mode 100644 index 91e94ab4230a..000000000000 --- a/core/cdf/src/i_cdf_mc_timer.h +++ /dev/null @@ -1,61 +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(__I_CDF_MC_TIMER_H) -#define __I_CDF_MC_TIMER_H - -/** - * DOC: i_cdf_mc_timer.h - * - * Linux-specific definitions for CDF timers serialized to MC thread - */ - -/* Include Files */ -#include <cdf_mc_timer.h> -#include <qdf_types.h> -#include <linux/timer.h> -#include <linux/time.h> -#include <linux/jiffies.h> - -/* Preprocessor definitions and constants */ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ -/* Type declarations */ - -typedef struct cdf_mc_timer_platform_s { - struct timer_list Timer; - int threadID; - uint32_t cookie; - spinlock_t spinlock; -} cdf_mc_timer_platform_t; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ -#endif /* __I_CDF_MC_TIMER_H */ diff --git a/core/cds/inc/cds_api.h b/core/cds/inc/cds_api.h index d6c4afdb82cc..92773f5a88b8 100644 --- a/core/cds/inc/cds_api.h +++ b/core/cds/inc/cds_api.h @@ -46,7 +46,7 @@ #include <cds_packet.h> #include <cds_sched.h> #include <qdf_threads.h> -#include <cdf_mc_timer.h> +#include <qdf_mc_timer.h> #include <cds_pack_align.h> /* Amount of time to wait for WMA to perform an asynchronous activity. diff --git a/core/cds/inc/cds_crypto.h b/core/cds/inc/cds_crypto.h index 4b506c9a1b19..4827a49a5903 100644 --- a/core/cds/inc/cds_crypto.h +++ b/core/cds/inc/cds_crypto.h @@ -46,7 +46,7 @@ #include <cds_packet.h> #include <cds_sched.h> #include <qdf_threads.h> -#include <cdf_mc_timer.h> +#include <qdf_mc_timer.h> #include <cds_pack_align.h> #include <crypto/aes.h> #include <crypto/hash.h> diff --git a/core/cds/inc/cds_sched.h b/core/cds/inc/cds_sched.h index 0f5e2f7f9eee..d0c6bbfb6e3f 100644 --- a/core/cds/inc/cds_sched.h +++ b/core/cds/inc/cds_sched.h @@ -433,7 +433,7 @@ QDF_STATUS cds_sched_init_mqs(p_cds_sched_context pSchedContext); void cds_sched_deinit_mqs(p_cds_sched_context pSchedContext); void cds_sched_flush_mc_mqs(p_cds_sched_context pSchedContext); -void cdf_timer_module_init(void); +void qdf_timer_module_init(void); void cds_ssr_protect_init(void); void cds_ssr_protect(const char *caller_func); void cds_ssr_unprotect(const char *caller_func); diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index f52ec524e346..3f2c4890456f 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -89,7 +89,7 @@ void cds_sys_probe_thread_cback(void *pUserData); */ v_CONTEXT_t cds_init(void) { - cdf_mc_timer_manager_init(); + qdf_mc_timer_manager_init(); cdf_mem_init(); gp_cds_context = &g_cds_context; @@ -124,7 +124,7 @@ void cds_deinit(void) cdf_mem_zero(&g_cds_context, sizeof(g_cds_context)); - cdf_mc_timer_exit(); + qdf_mc_timer_manager_exit(); cdf_mem_exit(); return; @@ -188,7 +188,7 @@ QDF_STATUS cds_open(void) } /* Initialize the timer module */ - cdf_timer_module_init(); + qdf_timer_module_init(); /* Initialize bug reporting structure */ cds_init_log_completion(); @@ -1453,9 +1453,9 @@ QDF_STATUS cds_shutdown(v_CONTEXT_t cds_context) * destroyed after stop */ if (pmac->sap.SapDfsInfo.is_dfs_cac_timer_running) { - cdf_mc_timer_stop(&pmac->sap.SapDfsInfo.sap_dfs_cac_timer); + qdf_mc_timer_stop(&pmac->sap.SapDfsInfo.sap_dfs_cac_timer); pmac->sap.SapDfsInfo.is_dfs_cac_timer_running = 0; - cdf_mc_timer_destroy(&pmac->sap.SapDfsInfo.sap_dfs_cac_timer); + qdf_mc_timer_destroy(&pmac->sap.SapDfsInfo.sap_dfs_cac_timer); } qdf_status = mac_close(((p_cds_contextType) cds_context)->pMACContext); diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index f6ddb6310126..b8fbd6b3ed27 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -3721,8 +3721,8 @@ void cds_decr_session_set_pcl(enum tQDF_ADAPTER_MODE mode, /* do we need to change the HW mode */ if (cds_need_opportunistic_upgrade()) { /* let's start the timer */ - cdf_mc_timer_stop(&hdd_ctx->dbs_opportunistic_timer); - qdf_status = cdf_mc_timer_start( + qdf_mc_timer_stop(&hdd_ctx->dbs_opportunistic_timer); + qdf_status = qdf_mc_timer_start( &hdd_ctx->dbs_opportunistic_timer, DBS_OPPORTUNISTIC_TIME * 1000); @@ -3888,7 +3888,7 @@ QDF_STATUS cds_init_policy_mgr(void) sme_register_hw_mode_trans_cb(hdd_ctx->hHal, cds_hw_mode_transition_cb); - status = cdf_mc_timer_init(&hdd_ctx->dbs_opportunistic_timer, + status = qdf_mc_timer_init(&hdd_ctx->dbs_opportunistic_timer, QDF_TIMER_TYPE_SW, cds_dbs_opportunistic_timer_handler, (void *)hdd_ctx); diff --git a/core/cds/src/cds_packet.c b/core/cds/src/cds_packet.c index 5c7f400c8cae..c95cc3b83370 100644 --- a/core/cds/src/cds_packet.c +++ b/core/cds/src/cds_packet.c @@ -40,7 +40,7 @@ ------------------------------------------------------------------------*/ #include <cds_packet.h> #include <i_cds_packet.h> -#include <cdf_mc_timer.h> +#include <qdf_mc_timer.h> #include <cdf_trace.h> #include <wlan_hdd_main.h> #include "cdf_nbuf.h" @@ -196,7 +196,7 @@ void cds_pkt_trace_buf_update(char *event_string) qdf_spinlock_acquire(&trace_buffer_lock); slot = trace_buffer_order % CDS_PKT_TRAC_MAX_TRACE_BUF; trace_buffer[slot].order = trace_buffer_order; - trace_buffer[slot].event_time = cdf_mc_timer_get_system_time(); + trace_buffer[slot].event_time = qdf_mc_timer_get_system_time(); cdf_mem_zero(trace_buffer[slot].event_string, sizeof(trace_buffer[slot].event_string)); cdf_mem_copy(trace_buffer[slot].event_string, @@ -220,7 +220,7 @@ void cds_pkt_trace_buf_dump(void) qdf_spinlock_acquire(&trace_buffer_lock); CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, "PACKET TRACE DUMP START Current Timestamp %u", - (unsigned int)cdf_mc_timer_get_system_time()); + (unsigned int)qdf_mc_timer_get_system_time()); CDF_TRACE(QDF_MODULE_ID_QDF, CDF_TRACE_LEVEL_ERROR, "ORDER : TIME : EVT"); if (CDS_PKT_TRAC_MAX_TRACE_BUF > trace_buffer_order) { diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 2307ae40fd10..cf4a76ce355f 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -570,7 +570,7 @@ typedef struct hdd_remain_on_chan_ctx { unsigned int duration; u64 cookie; rem_on_channel_request_type_t rem_on_chan_request; - cdf_mc_timer_t hdd_remain_on_chan_timer; + qdf_mc_timer_t hdd_remain_on_chan_timer; action_pkt_buffer_t action_pkt_buff; bool hdd_remain_on_chan_cancel_in_progress; uint32_t scan_id; @@ -734,7 +734,7 @@ struct hdd_ap_ctx_s { bool apDisableIntraBssFwd; - cdf_mc_timer_t hdd_ap_inactivity_timer; + qdf_mc_timer_t hdd_ap_inactivity_timer; uint8_t operatingChannel; @@ -978,7 +978,7 @@ struct hdd_adapter_s { bool is_roc_inprogress; #ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL - cdf_mc_timer_t tx_flow_control_timer; + qdf_mc_timer_t tx_flow_control_timer; bool tx_flow_timer_initialized; unsigned int tx_flow_low_watermark; unsigned int tx_flow_high_watermark_offset; @@ -1213,7 +1213,7 @@ struct hdd_context_s { #ifdef MSM_PLATFORM /* DDR bus bandwidth compute timer */ - cdf_mc_timer_t bus_bw_timer; + qdf_mc_timer_t bus_bw_timer; int cur_vote_level; spinlock_t bus_bw_lock; int cur_rx_level; @@ -1270,7 +1270,7 @@ struct hdd_context_s { #endif fw_log_info fw_log_settings; #ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE - cdf_mc_timer_t skip_acs_scan_timer; + qdf_mc_timer_t skip_acs_scan_timer; uint8_t skip_acs_scan_status; #endif @@ -1312,12 +1312,12 @@ struct hdd_context_s { #ifdef WLAN_FEATURE_MEMDUMP uint8_t *fw_dump_loc; uint32_t dump_loc_paddr; - cdf_mc_timer_t memdump_cleanup_timer; + qdf_mc_timer_t memdump_cleanup_timer; struct mutex memdump_lock; bool memdump_in_progress; #endif /* WLAN_FEATURE_MEMDUMP */ - cdf_mc_timer_t dbs_opportunistic_timer; + qdf_mc_timer_t dbs_opportunistic_timer; bool connection_in_progress; qdf_spinlock_t connection_status_lock; diff --git a/core/hdd/inc/wlan_hdd_tdls.h b/core/hdd/inc/wlan_hdd_tdls.h index 5e149a879e5a..03c7ff1c3db0 100644 --- a/core/hdd/inc/wlan_hdd_tdls.h +++ b/core/hdd/inc/wlan_hdd_tdls.h @@ -280,7 +280,7 @@ struct _hddTdlsPeer_t; typedef struct { struct list_head peer_list[TDLS_PEER_LIST_SIZE]; hdd_adapter_t *pAdapter; - cdf_mc_timer_t peerDiscoveryTimeoutTimer; + qdf_mc_timer_t peerDiscoveryTimeoutTimer; tdls_config_params_t threshold_config; int32_t discovery_peer_cnt; uint32_t discovery_sent_cnt; @@ -491,7 +491,7 @@ int wlan_hdd_tdls_scan_callback(hdd_adapter_t *pAdapter, struct wiphy *wiphy, void wlan_hdd_tdls_scan_done_callback(hdd_adapter_t *pAdapter); void wlan_hdd_tdls_timer_restart(hdd_adapter_t *pAdapter, - cdf_mc_timer_t *timer, + qdf_mc_timer_t *timer, uint32_t expirationTime); void wlan_hdd_tdls_indicate_teardown(hdd_adapter_t *pAdapter, hddTdlsPeer_t *curr_peer, diff --git a/core/hdd/inc/wlan_hdd_tx_rx.h b/core/hdd/inc/wlan_hdd_tx_rx.h index b12c198b96ce..881a78849f4c 100644 --- a/core/hdd/inc/wlan_hdd_tx_rx.h +++ b/core/hdd/inc/wlan_hdd_tx_rx.h @@ -73,7 +73,7 @@ QDF_STATUS hdd_ibss_get_sta_id(hdd_station_ctx_t *pHddStaCtx, void hdd_tx_resume_cb(void *adapter_context, bool tx_resume); void hdd_tx_resume_timer_expired_handler(void *adapter_context); void hdd_register_tx_flow_control(hdd_adapter_t *adapter, - cdf_mc_timer_callback_t timer_callback, + qdf_mc_timer_callback_t timer_callback, ol_txrx_tx_flow_control_fp flowControl); void hdd_deregister_tx_flow_control(hdd_adapter_t *adapter); void hdd_get_tx_resource(hdd_adapter_t *adapter, @@ -89,7 +89,7 @@ static inline void hdd_tx_resume_timer_expired_handler(void *adapter_context) return; } static inline void hdd_register_tx_flow_control(hdd_adapter_t *adapter, - cdf_mc_timer_callback_t timer_callback, + qdf_mc_timer_callback_t timer_callback, ol_txrx_tx_flow_control_fp flowControl) { return; diff --git a/core/hdd/inc/wlan_hdd_wmm.h b/core/hdd/inc/wlan_hdd_wmm.h index b2171653210c..3194d10bb8ac 100644 --- a/core/hdd/inc/wlan_hdd_wmm.h +++ b/core/hdd/inc/wlan_hdd_wmm.h @@ -178,7 +178,7 @@ typedef struct hdd_wmm_ac_status { #ifdef FEATURE_WLAN_ESE uint32_t wmmInactivityTime; uint32_t wmmPrevTrafficCnt; - cdf_mc_timer_t wmmInactivityTimer; + qdf_mc_timer_t wmmInactivityTimer; #endif } hdd_wmm_ac_status_t; diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 80cd4b532a44..960c073fa85f 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -7357,7 +7357,7 @@ wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter, qie_age->oui_3 = QCOM_OUI3; qie_age->type = QCOM_VENDOR_IE_AGE_TYPE; qie_age->age = - cdf_mc_timer_get_system_ticks() - bss_desc->nReceivedTime; + qdf_mc_timer_get_system_ticks() - bss_desc->nReceivedTime; qie_age->tsf_delta = bss_desc->tsf_delta; #endif diff --git a/core/hdd/src/wlan_hdd_green_ap.c b/core/hdd/src/wlan_hdd_green_ap.c index 57dc2c995850..7149bb468de1 100644 --- a/core/hdd/src/wlan_hdd_green_ap.c +++ b/core/hdd/src/wlan_hdd_green_ap.c @@ -91,7 +91,7 @@ struct hdd_green_ap_ctx { enum hdd_green_ap_ps_state ps_state; enum hdd_green_ap_event ps_event; - cdf_mc_timer_t ps_timer; + qdf_mc_timer_t ps_timer; bool egap_support; }; @@ -212,7 +212,7 @@ static void hdd_wlan_green_ap_mc(struct hdd_context_s *hdd_ctx, hdd_wlan_green_ap_update(hdd_ctx, GREEN_AP_PS_WAIT_STATE, GREEN_AP_PS_WAIT_EVENT); - cdf_mc_timer_start(&green_ap->ps_timer, + qdf_mc_timer_start(&green_ap->ps_timer, green_ap->ps_delay_time); } break; @@ -229,7 +229,7 @@ static void hdd_wlan_green_ap_mc(struct hdd_context_s *hdd_ctx, hdd_wlan_green_ap_update(hdd_ctx, 0, GREEN_AP_PS_WAIT_EVENT); - cdf_mc_timer_start(&green_ap->ps_timer, + qdf_mc_timer_start(&green_ap->ps_timer, green_ap->ps_on_time); } } else { @@ -261,7 +261,7 @@ static void hdd_wlan_green_ap_mc(struct hdd_context_s *hdd_ctx, goto done; } - cdf_mc_timer_start(&green_ap->ps_timer, + qdf_mc_timer_start(&green_ap->ps_timer, green_ap->ps_delay_time); } break; @@ -325,7 +325,7 @@ static QDF_STATUS hdd_wlan_green_ap_attach(struct hdd_context_s *hdd_ctx) green_ap->ps_on_time = GREEN_AP_PS_ON_TIME; green_ap->ps_delay_time = GREEN_AP_PS_DELAY_TIME; - cdf_mc_timer_init(&green_ap->ps_timer, + qdf_mc_timer_init(&green_ap->ps_timer, QDF_TIMER_TYPE_SW, hdd_wlan_green_ap_timer_fn, hdd_ctx); @@ -356,12 +356,12 @@ static QDF_STATUS hdd_wlan_green_ap_deattach(struct hdd_context_s *hdd_ctx) } /* check if the timer status is destroyed */ - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state(&green_ap->ps_timer)) - cdf_mc_timer_stop(&green_ap->ps_timer); + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state(&green_ap->ps_timer)) + qdf_mc_timer_stop(&green_ap->ps_timer); /* Destroy the Green AP timer */ - if (!QDF_IS_STATUS_SUCCESS(cdf_mc_timer_destroy(&green_ap->ps_timer))) + if (!QDF_IS_STATUS_SUCCESS(qdf_mc_timer_destroy(&green_ap->ps_timer))) hdd_notice("Cannot deallocate Green-AP's timer"); /* release memory */ diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 0da6f0d4d275..eae9e175a609 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -484,7 +484,7 @@ void hdd_hostapd_inactivity_timer_cb(void *usrDataForCallback) pHostapdAdapter = netdev_priv(dev); pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter); qdf_status = - cdf_mc_timer_start(&pHddApCtx->hdd_ap_inactivity_timer, + qdf_mc_timer_start(&pHddApCtx->hdd_ap_inactivity_timer, (WLAN_HDD_GET_CTX(pHostapdAdapter))-> config->nAPAutoShutOff * 1000); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { @@ -978,7 +978,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, nAPAutoShutOff) { /* AP Inactivity timer init and start */ qdf_status = - cdf_mc_timer_init(&pHddApCtx-> + qdf_mc_timer_init(&pHddApCtx-> hdd_ap_inactivity_timer, QDF_TIMER_TYPE_SW, hdd_hostapd_inactivity_timer_cb, @@ -988,7 +988,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, FL("Failed to init inactivity timer")); qdf_status = - cdf_mc_timer_start(&pHddApCtx-> + qdf_mc_timer_start(&pHddApCtx-> hdd_ap_inactivity_timer, (WLAN_HDD_GET_CTX (pHostapdAdapter))->config-> @@ -1374,9 +1374,9 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, pHddApCtx->bApActive = true; /* Stop AP inactivity timer */ if (pHddApCtx->hdd_ap_inactivity_timer.state == - CDF_TIMER_STATE_RUNNING) { + QDF_TIMER_STATE_RUNNING) { qdf_status = - cdf_mc_timer_stop(&pHddApCtx-> + qdf_mc_timer_stop(&pHddApCtx-> hdd_ap_inactivity_timer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { hddLog(LOGE, @@ -1504,9 +1504,9 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, nAPAutoShutOff)) { if (pHddApCtx->bApActive == false) { if (pHddApCtx->hdd_ap_inactivity_timer.state == - CDF_TIMER_STATE_STOPPED) { + QDF_TIMER_STATE_STOPPED) { qdf_status = - cdf_mc_timer_start(&pHddApCtx-> + qdf_mc_timer_start(&pHddApCtx-> hdd_ap_inactivity_timer, (WLAN_HDD_GET_CTX (pHostapdAdapter))-> @@ -1518,10 +1518,10 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, FL("Failed to init AP inactivity timer")); } else CDF_ASSERT - (cdf_mc_timer_get_current_state + (qdf_mc_timer_get_current_state (&pHddApCtx-> hdd_ap_inactivity_timer) == - CDF_TIMER_STATE_STOPPED); + QDF_TIMER_STATE_STOPPED); } } #ifdef FEATURE_WLAN_AUTO_SHUTDOWN @@ -1715,8 +1715,8 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, pHddCtx->skip_acs_scan_status = eSAP_SKIP_ACS_SCAN; hddLog(LOG1, FL("Reusing Last ACS scan result for %d sec"), ACS_SCAN_EXPIRY_TIMEOUT_S); - cdf_mc_timer_stop(&pHddCtx->skip_acs_scan_timer); - qdf_status = cdf_mc_timer_start(&pHddCtx->skip_acs_scan_timer, + qdf_mc_timer_stop(&pHddCtx->skip_acs_scan_timer); + qdf_status = qdf_mc_timer_start(&pHddCtx->skip_acs_scan_timer, ACS_SCAN_EXPIRY_TIMEOUT_S * 1000); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) @@ -1826,10 +1826,10 @@ stopbss: if (0 != (WLAN_HDD_GET_CTX(pHostapdAdapter))->config-> nAPAutoShutOff) { - if (CDF_TIMER_STATE_RUNNING == + if (QDF_TIMER_STATE_RUNNING == pHddApCtx->hdd_ap_inactivity_timer.state) { qdf_status = - cdf_mc_timer_stop(&pHddApCtx-> + qdf_mc_timer_stop(&pHddApCtx-> hdd_ap_inactivity_timer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { hddLog(LOGE, @@ -1838,7 +1838,7 @@ stopbss: } qdf_status = - cdf_mc_timer_destroy(&pHddApCtx-> + qdf_mc_timer_destroy(&pHddApCtx-> hdd_ap_inactivity_timer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) hddLog(LOGE, FL("Failed to Destroy AP inactivity timer")); diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 963ffd3398d0..8f228d128386 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -435,10 +435,10 @@ struct hdd_ipa_priv { uint64_t ipa_rx_net_send_count; uint64_t ipa_rx_internel_drop_count; uint64_t ipa_rx_destructor_count; - cdf_mc_timer_t rt_debug_timer; + qdf_mc_timer_t rt_debug_timer; struct uc_rt_debug_info rt_bug_buffer[HDD_IPA_UC_RT_DEBUG_BUF_COUNT]; unsigned int rt_buf_fill_index; - cdf_mc_timer_t rt_debug_fill_timer; + qdf_mc_timer_t rt_debug_fill_timer; qdf_mutex_t rt_debug_lock; qdf_mutex_t ipa_lock; @@ -728,7 +728,7 @@ static void hdd_ipa_uc_rt_debug_host_fill(void *ctext) dump_info = &hdd_ipa->rt_bug_buffer[ hdd_ipa->rt_buf_fill_index % HDD_IPA_UC_RT_DEBUG_BUF_COUNT]; - dump_info->time = cdf_mc_timer_get_system_time(); + dump_info->time = qdf_mc_timer_get_system_time(); dump_info->ipa_excep_count = hdd_ipa->stats.num_rx_excep; dump_info->rx_drop_count = hdd_ipa->ipa_rx_internel_drop_count; dump_info->net_sent_count = hdd_ipa->ipa_rx_net_send_count; @@ -739,7 +739,7 @@ static void hdd_ipa_uc_rt_debug_host_fill(void *ctext) hdd_ipa->rt_buf_fill_index++; qdf_mutex_release(&hdd_ipa->rt_debug_lock); - cdf_mc_timer_start(&hdd_ipa->rt_debug_fill_timer, + qdf_mc_timer_start(&hdd_ipa->rt_debug_fill_timer, HDD_IPA_UC_RT_DEBUG_FILL_INTERVAL); } @@ -833,7 +833,7 @@ static void hdd_ipa_uc_rt_debug_handler(void *ctext) kfree(dummy_ptr); } - cdf_mc_timer_start(&hdd_ipa->rt_debug_timer, + qdf_mc_timer_start(&hdd_ipa->rt_debug_timer, HDD_IPA_UC_RT_DEBUG_PERIOD); } @@ -869,11 +869,11 @@ static void hdd_ipa_uc_rt_debug_deinit(hdd_context_t *hdd_ctx) { struct hdd_ipa_priv *hdd_ipa = (struct hdd_ipa_priv *)hdd_ctx->hdd_ipa; - if (CDF_TIMER_STATE_STOPPED != - cdf_mc_timer_get_current_state(&hdd_ipa->rt_debug_fill_timer)) { - cdf_mc_timer_stop(&hdd_ipa->rt_debug_fill_timer); + if (QDF_TIMER_STATE_STOPPED != + qdf_mc_timer_get_current_state(&hdd_ipa->rt_debug_fill_timer)) { + qdf_mc_timer_stop(&hdd_ipa->rt_debug_fill_timer); } - cdf_mc_timer_destroy(&hdd_ipa->rt_debug_fill_timer); + qdf_mc_timer_destroy(&hdd_ipa->rt_debug_fill_timer); qdf_mutex_destroy(&hdd_ipa->rt_debug_lock); if (!hdd_ipa_is_rt_debugging_enabled(hdd_ctx)) { @@ -882,11 +882,11 @@ static void hdd_ipa_uc_rt_debug_deinit(hdd_context_t *hdd_ctx) return; } - if (CDF_TIMER_STATE_STOPPED != - cdf_mc_timer_get_current_state(&hdd_ipa->rt_debug_timer)) { - cdf_mc_timer_stop(&hdd_ipa->rt_debug_timer); + if (QDF_TIMER_STATE_STOPPED != + qdf_mc_timer_get_current_state(&hdd_ipa->rt_debug_timer)) { + qdf_mc_timer_stop(&hdd_ipa->rt_debug_timer); } - cdf_mc_timer_destroy(&hdd_ipa->rt_debug_timer); + qdf_mc_timer_destroy(&hdd_ipa->rt_debug_timer); } /** @@ -902,7 +902,7 @@ static void hdd_ipa_uc_rt_debug_init(hdd_context_t *hdd_ctx) struct hdd_ipa_priv *hdd_ipa = (struct hdd_ipa_priv *)hdd_ctx->hdd_ipa; qdf_mutex_create(&hdd_ipa->rt_debug_lock); - cdf_mc_timer_init(&hdd_ipa->rt_debug_fill_timer, QDF_TIMER_TYPE_SW, + qdf_mc_timer_init(&hdd_ipa->rt_debug_fill_timer, QDF_TIMER_TYPE_SW, hdd_ipa_uc_rt_debug_host_fill, (void *)hdd_ctx); hdd_ipa->rt_buf_fill_index = 0; cdf_mem_zero(hdd_ipa->rt_bug_buffer, @@ -914,7 +914,7 @@ static void hdd_ipa_uc_rt_debug_init(hdd_context_t *hdd_ctx) hdd_ipa->ipa_rx_internel_drop_count = 0; hdd_ipa->ipa_rx_destructor_count = 0; - cdf_mc_timer_start(&hdd_ipa->rt_debug_fill_timer, + qdf_mc_timer_start(&hdd_ipa->rt_debug_fill_timer, HDD_IPA_UC_RT_DEBUG_FILL_INTERVAL); /* Reatime debug enable on feature enable */ @@ -923,9 +923,9 @@ static void hdd_ipa_uc_rt_debug_init(hdd_context_t *hdd_ctx) "%s: IPA RT debug is not enabled", __func__); return; } - cdf_mc_timer_init(&hdd_ipa->rt_debug_timer, QDF_TIMER_TYPE_SW, + qdf_mc_timer_init(&hdd_ipa->rt_debug_timer, QDF_TIMER_TYPE_SW, hdd_ipa_uc_rt_debug_handler, (void *)hdd_ctx); - cdf_mc_timer_start(&hdd_ipa->rt_debug_timer, + qdf_mc_timer_start(&hdd_ipa->rt_debug_timer, HDD_IPA_UC_RT_DEBUG_PERIOD); } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 1a484a471c0a..965ef7b036a7 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -3699,38 +3699,38 @@ void hdd_wlan_exit(hdd_context_t *hdd_ctx) hdd_abort_mac_scan_all_adapters(hdd_ctx); #ifdef MSM_PLATFORM - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state(&hdd_ctx->bus_bw_timer)) { - cdf_mc_timer_stop(&hdd_ctx->bus_bw_timer); + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state(&hdd_ctx->bus_bw_timer)) { + qdf_mc_timer_stop(&hdd_ctx->bus_bw_timer); } if (!QDF_IS_STATUS_SUCCESS - (cdf_mc_timer_destroy(&hdd_ctx->bus_bw_timer))) { + (qdf_mc_timer_destroy(&hdd_ctx->bus_bw_timer))) { hddLog(CDF_TRACE_LEVEL_ERROR, FL("Cannot deallocate Bus bandwidth timer")); } #endif #ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state(&hdd_ctx->skip_acs_scan_timer)) { - cdf_mc_timer_stop(&hdd_ctx->skip_acs_scan_timer); + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state(&hdd_ctx->skip_acs_scan_timer)) { + qdf_mc_timer_stop(&hdd_ctx->skip_acs_scan_timer); } if (!QDF_IS_STATUS_SUCCESS - (cdf_mc_timer_destroy(&hdd_ctx->skip_acs_scan_timer))) { + (qdf_mc_timer_destroy(&hdd_ctx->skip_acs_scan_timer))) { hddLog(CDF_TRACE_LEVEL_ERROR, FL("Cannot deallocate ACS Skip timer")); } #endif - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state( + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state( &hdd_ctx->dbs_opportunistic_timer)) { - cdf_mc_timer_stop(&hdd_ctx->dbs_opportunistic_timer); + qdf_mc_timer_stop(&hdd_ctx->dbs_opportunistic_timer); } if (!QDF_IS_STATUS_SUCCESS - (cdf_mc_timer_destroy( + (qdf_mc_timer_destroy( &hdd_ctx->dbs_opportunistic_timer))) { hdd_err("Cannot deallocate dbs opportunistic timer"); } @@ -4339,7 +4339,7 @@ static void hdd_bus_bw_compute_cbk(void *priv) hdd_ipa_set_perf_level(hdd_ctx, tx_packets, rx_packets); hdd_ipa_uc_stat_request(adapter, 2); - cdf_mc_timer_start(&hdd_ctx->bus_bw_timer, + qdf_mc_timer_start(&hdd_ctx->bus_bw_timer, hdd_ctx->config->busBandwidthComputeInterval); } #endif @@ -5693,7 +5693,7 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc) #endif #ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE - status = cdf_mc_timer_init(&hdd_ctx->skip_acs_scan_timer, + status = qdf_mc_timer_init(&hdd_ctx->skip_acs_scan_timer, QDF_TIMER_TYPE_SW, hdd_skip_acs_scan_timer_handler, (void *)hdd_ctx); @@ -5726,7 +5726,7 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc) #ifdef MSM_PLATFORM spin_lock_init(&hdd_ctx->bus_bw_lock); - cdf_mc_timer_init(&hdd_ctx->bus_bw_timer, + qdf_mc_timer_init(&hdd_ctx->bus_bw_timer, QDF_TIMER_TYPE_SW, hdd_bus_bw_compute_cbk, (void *)hdd_ctx); #endif @@ -6422,11 +6422,11 @@ void hdd_start_bus_bw_compute_timer(hdd_adapter_t *adapter) { hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter); - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state(&hdd_ctx->bus_bw_timer)) + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state(&hdd_ctx->bus_bw_timer)) return; - cdf_mc_timer_start(&hdd_ctx->bus_bw_timer, + qdf_mc_timer_start(&hdd_ctx->bus_bw_timer, hdd_ctx->config->busBandwidthComputeInterval); } @@ -6437,8 +6437,8 @@ void hdd_stop_bus_bw_compute_timer(hdd_adapter_t *adapter) bool can_stop = true; hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter); - if (CDF_TIMER_STATE_RUNNING != - cdf_mc_timer_get_current_state(&hdd_ctx->bus_bw_timer)) { + if (QDF_TIMER_STATE_RUNNING != + qdf_mc_timer_get_current_state(&hdd_ctx->bus_bw_timer)) { /* trying to stop timer, when not running is not good */ hddLog(CDF_TRACE_LEVEL_ERROR, FL("bus band width compute timer is not running")); @@ -6475,7 +6475,7 @@ void hdd_stop_bus_bw_compute_timer(hdd_adapter_t *adapter) } if (can_stop == true) - cdf_mc_timer_stop(&hdd_ctx->bus_bw_timer); + qdf_mc_timer_stop(&hdd_ctx->bus_bw_timer); } #endif diff --git a/core/hdd/src/wlan_hdd_memdump.c b/core/hdd/src/wlan_hdd_memdump.c index 841efc28650b..4200f2360375 100644 --- a/core/hdd/src/wlan_hdd_memdump.c +++ b/core/hdd/src/wlan_hdd_memdump.c @@ -285,7 +285,7 @@ static int __wlan_hdd_cfg80211_get_fw_mem_dump(struct wiphy *wiphy, * User space will not be able to access the dump after this time. * New request should be issued to get the dump again. */ - cdf_mc_timer_start(&hdd_ctx->memdump_cleanup_timer, + qdf_mc_timer_start(&hdd_ctx->memdump_cleanup_timer, MEMDUMP_COMPLETION_TIME_MS); hdd_ctx->memdump_in_progress = true; @@ -304,10 +304,10 @@ static int __wlan_hdd_cfg80211_get_fw_mem_dump(struct wiphy *wiphy, hdd_ctx->fw_dump_loc = NULL; mutex_unlock(&hdd_ctx->memdump_lock); hdd_ctx->memdump_in_progress = false; - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state( + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state( &hdd_ctx->memdump_cleanup_timer)) { - cdf_mc_timer_stop(&hdd_ctx->memdump_cleanup_timer); + qdf_mc_timer_stop(&hdd_ctx->memdump_cleanup_timer); } return -EINVAL; } @@ -447,10 +447,10 @@ static ssize_t memdump_read(struct file *file, char __user *buf, FW_MEM_DUMP_SIZE, hdd_ctx->fw_dump_loc, paddr, dma_ctx); hdd_ctx->fw_dump_loc = NULL; hdd_ctx->memdump_in_progress = false; - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state( + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state( &hdd_ctx->memdump_cleanup_timer)) { - cdf_mc_timer_stop(&hdd_ctx->memdump_cleanup_timer); + qdf_mc_timer_stop(&hdd_ctx->memdump_cleanup_timer); } mutex_unlock(&hdd_ctx->memdump_lock); } @@ -568,7 +568,7 @@ int memdump_init(void) init_completion(&fw_dump_context.response_event); - qdf_status = cdf_mc_timer_init(&hdd_ctx->memdump_cleanup_timer, + qdf_status = qdf_mc_timer_init(&hdd_ctx->memdump_cleanup_timer, QDF_TIMER_TYPE_SW, memdump_cleanup_timer_cb, (void *)hdd_ctx); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { @@ -626,12 +626,12 @@ void memdump_deinit(void) } mutex_unlock(&hdd_ctx->memdump_lock); - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state(&hdd_ctx->memdump_cleanup_timer)) { - cdf_mc_timer_stop(&hdd_ctx->memdump_cleanup_timer); + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state(&hdd_ctx->memdump_cleanup_timer)) { + qdf_mc_timer_stop(&hdd_ctx->memdump_cleanup_timer); } - qdf_status = cdf_mc_timer_destroy(&hdd_ctx->memdump_cleanup_timer); + qdf_status = qdf_mc_timer_destroy(&hdd_ctx->memdump_cleanup_timer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) hddLog(LOGE, FL("Failed to deallocate timer")); } diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c index 05aaf1c2e700..6751a5170f70 100644 --- a/core/hdd/src/wlan_hdd_p2p.c +++ b/core/hdd/src/wlan_hdd_p2p.c @@ -185,8 +185,8 @@ QDF_STATUS wlan_hdd_remain_on_channel_callback(tHalHandle hHal, void *pCtx, } hddLog(LOG1, "Received remain on channel rsp"); - cdf_mc_timer_stop(&pRemainChanCtx->hdd_remain_on_chan_timer); - cdf_mc_timer_destroy(&pRemainChanCtx->hdd_remain_on_chan_timer); + qdf_mc_timer_stop(&pRemainChanCtx->hdd_remain_on_chan_timer); + qdf_mc_timer_destroy(&pRemainChanCtx->hdd_remain_on_chan_timer); cfgState->remain_on_chan_ctx = NULL; /* @@ -217,7 +217,7 @@ QDF_STATUS wlan_hdd_remain_on_channel_callback(tHalHandle hHal, void *pCtx, cookie, &pRemainChanCtx->chan, GFP_KERNEL); - pAdapter->last_roc_ts = cdf_mc_timer_get_system_time(); + pAdapter->last_roc_ts = qdf_mc_timer_get_system_time(); } /* Schedule any pending RoC: Any new roc request during this time @@ -281,9 +281,9 @@ void wlan_hdd_cancel_existing_remain_on_channel(hdd_adapter_t *pAdapter) if (cfgState->remain_on_chan_ctx != NULL) { hddLog(LOGE, "Cancel Existing Remain on Channel"); - if (CDF_TIMER_STATE_RUNNING == cdf_mc_timer_get_current_state( + if (QDF_TIMER_STATE_RUNNING == qdf_mc_timer_get_current_state( &cfgState->remain_on_chan_ctx->hdd_remain_on_chan_timer)) - cdf_mc_timer_stop(&cfgState->remain_on_chan_ctx-> + qdf_mc_timer_stop(&cfgState->remain_on_chan_ctx-> hdd_remain_on_chan_timer); pRemainChanCtx = cfgState->remain_on_chan_ctx; @@ -446,8 +446,8 @@ wait: roc_ctx = cfg_state->remain_on_chan_ctx; if (roc_ctx != NULL) { cfg_state->remain_on_chan_ctx = NULL; - cdf_mc_timer_stop(&roc_ctx->hdd_remain_on_chan_timer); - cdf_mc_timer_destroy( + qdf_mc_timer_stop(&roc_ctx->hdd_remain_on_chan_timer); + qdf_mc_timer_destroy( &roc_ctx->hdd_remain_on_chan_timer); if (roc_ctx->action_pkt_buff.frame_ptr != NULL && roc_ctx->action_pkt_buff.frame_length != 0) { @@ -566,7 +566,7 @@ static int wlan_hdd_execute_remain_on_channel(hdd_adapter_t *pAdapter, /* Initialize Remain on chan timer */ qdf_status = - cdf_mc_timer_init(&pRemainChanCtx->hdd_remain_on_chan_timer, + qdf_mc_timer_init(&pRemainChanCtx->hdd_remain_on_chan_timer, QDF_TIMER_TYPE_SW, wlan_hdd_remain_on_chan_timeout, pAdapter); if (qdf_status != QDF_STATUS_SUCCESS) { @@ -622,7 +622,7 @@ static int wlan_hdd_execute_remain_on_channel(hdd_adapter_t *pAdapter, cfgState->remain_on_chan_ctx = NULL; pAdapter->is_roc_inprogress = false; mutex_unlock(&cfgState->remain_on_chan_ctx_lock); - cdf_mc_timer_destroy( + qdf_mc_timer_destroy( &pRemainChanCtx->hdd_remain_on_chan_timer); cdf_mem_free(pRemainChanCtx); hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_ROC); @@ -658,7 +658,7 @@ static int wlan_hdd_execute_remain_on_channel(hdd_adapter_t *pAdapter, cfgState->remain_on_chan_ctx = NULL; pAdapter->is_roc_inprogress = false; mutex_unlock(&cfgState->remain_on_chan_ctx_lock); - cdf_mc_timer_destroy( + qdf_mc_timer_destroy( &pRemainChanCtx->hdd_remain_on_chan_timer); cdf_mem_free(pRemainChanCtx); hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_ROC); @@ -875,7 +875,7 @@ static int wlan_hdd_request_remain_on_channel(struct wiphy *wiphy, hdd_conn_is_connected( WLAN_HDD_GET_STATION_CTX_PTR(sta_adapter))) { if (pAdapter->last_roc_ts != 0 && - ((cdf_mc_timer_get_system_time() - + ((qdf_mc_timer_get_system_time() - pAdapter->last_roc_ts) < pHddCtx->config->p2p_listen_defer_interval)) { if (pRemainChanCtx->duration > HDD_P2P_MAX_ROC_DURATION) @@ -996,7 +996,7 @@ void hdd_remain_chan_ready_handler(hdd_adapter_t *pAdapter, cfgState = WLAN_HDD_GET_CFG_STATE_PTR(pAdapter); hddLog(LOG1, "Ready on chan ind %d", scan_id); - pAdapter->start_roc_ts = cdf_mc_timer_get_system_time(); + pAdapter->start_roc_ts = qdf_mc_timer_get_system_time(); mutex_lock(&cfgState->remain_on_chan_ctx_lock); pRemainChanCtx = cfgState->remain_on_chan_ctx; if (pRemainChanCtx != NULL) { @@ -1005,15 +1005,15 @@ void hdd_remain_chan_ready_handler(hdd_adapter_t *pAdapter, pAdapter->sessionId, pRemainChanCtx->duration)); /* start timer for actual duration */ - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state( + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state( &pRemainChanCtx->hdd_remain_on_chan_timer)) { hddLog(LOGE, "Timer Started before ready event!!!"); - cdf_mc_timer_stop(&pRemainChanCtx-> + qdf_mc_timer_stop(&pRemainChanCtx-> hdd_remain_on_chan_timer); } status = - cdf_mc_timer_start(&pRemainChanCtx-> + qdf_mc_timer_start(&pRemainChanCtx-> hdd_remain_on_chan_timer, (pRemainChanCtx->duration + COMPLETE_EVENT_PROPOGATE_TIME)); @@ -1134,7 +1134,7 @@ int __wlan_hdd_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy, } if (NULL != cfgState->remain_on_chan_ctx) { - cdf_mc_timer_stop(&cfgState->remain_on_chan_ctx-> + qdf_mc_timer_stop(&cfgState->remain_on_chan_ctx-> hdd_remain_on_chan_timer); if (true == pRemainChanCtx->hdd_remain_on_chan_cancel_in_progress) { @@ -1317,7 +1317,7 @@ int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, mutex_lock(&cfgState->remain_on_chan_ctx_lock); if (cfgState->remain_on_chan_ctx) { - uint32_t current_time = cdf_mc_timer_get_system_time(); + uint32_t current_time = qdf_mc_timer_get_system_time(); int remaining_roc_time = ((int) cfgState->remain_on_chan_ctx->duration - (current_time - pAdapter->start_roc_ts)); @@ -1418,15 +1418,15 @@ int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, [WLAN_HDD_PUBLIC_ACTION_FRAME_BODY_OFFSET]) && cfgState->remain_on_chan_ctx && cfgState->current_freq == chan->center_freq) { - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state(&cfgState-> + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state(&cfgState-> remain_on_chan_ctx-> hdd_remain_on_chan_timer)) { - cdf_mc_timer_stop(&cfgState-> + qdf_mc_timer_stop(&cfgState-> remain_on_chan_ctx-> hdd_remain_on_chan_timer); status = - cdf_mc_timer_start(&cfgState-> + qdf_mc_timer_start(&cfgState-> remain_on_chan_ctx-> hdd_remain_on_chan_timer, wait); @@ -2260,12 +2260,12 @@ void __hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter, if (completion_done (&pAdapter-> rem_on_chan_ready_event)) { - if (CDF_TIMER_STATE_RUNNING == cdf_mc_timer_get_current_state(&pRemainChanCtx->hdd_remain_on_chan_timer)) { - cdf_mc_timer_stop + if (QDF_TIMER_STATE_RUNNING == qdf_mc_timer_get_current_state(&pRemainChanCtx->hdd_remain_on_chan_timer)) { + qdf_mc_timer_stop (&pRemainChanCtx-> hdd_remain_on_chan_timer); status = - cdf_mc_timer_start + qdf_mc_timer_start (&pRemainChanCtx-> hdd_remain_on_chan_timer, extend_time); diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index cf5dee07d2b4..20c3853d9236 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -489,7 +489,7 @@ static int hdd_indicate_scan_result(hdd_scan_info_t *scanInfo, event.cmd = IWEVCUSTOM; p = custom; p += scnprintf(p, MAX_CUSTOM_LEN, " Age: %lu", - cdf_mc_timer_get_system_ticks() - + qdf_mc_timer_get_system_ticks() - descriptor->nReceivedTime); event.u.data.length = p - custom; current_event = iwe_stream_add_point(scanInfo->info, current_event, end, @@ -828,7 +828,7 @@ static int __iw_set_scan(struct net_device *dev, struct iw_request_info *info, scanRequest.uIEFieldLen = pAdapter->scan_info.scanAddIE.length; scanRequest.pIEField = pAdapter->scan_info.scanAddIE.addIEdata; } - scanRequest.timestamp = cdf_mc_timer_get_system_ticks(); + scanRequest.timestamp = qdf_mc_timer_get_system_ticks(); status = sme_scan_request((WLAN_HDD_GET_CTX(pAdapter))->hHal, pAdapter->sessionId, &scanRequest, &hdd_scan_request_callback, dev); @@ -1349,7 +1349,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, cdf_mem_zero(&scan_req, sizeof(scan_req)); hddLog(LOG1, "scan request for ssid = %d", request->n_ssids); - scan_req.timestamp = cdf_mc_timer_get_system_ticks(); + scan_req.timestamp = qdf_mc_timer_get_system_ticks(); /* Even though supplicant doesn't provide any SSIDs, n_ssids is * set to 1. Because of this, driver is assuming that this is not diff --git a/core/hdd/src/wlan_hdd_softap_tx_rx.c b/core/hdd/src/wlan_hdd_softap_tx_rx.c index 32eed9c5f51e..56134c54e2a8 100644 --- a/core/hdd/src/wlan_hdd_softap_tx_rx.c +++ b/core/hdd/src/wlan_hdd_softap_tx_rx.c @@ -137,10 +137,10 @@ void hdd_softap_tx_resume_cb(void *adapter_context, bool tx_resume) /* Resume TX */ if (true == tx_resume) { - if (CDF_TIMER_STATE_STOPPED != - cdf_mc_timer_get_current_state(&pAdapter-> + if (QDF_TIMER_STATE_STOPPED != + qdf_mc_timer_get_current_state(&pAdapter-> tx_flow_control_timer)) { - cdf_mc_timer_stop(&pAdapter->tx_flow_control_timer); + qdf_mc_timer_stop(&pAdapter->tx_flow_control_timer); } hddLog(LOG1, FL("Enabling queues")); diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index 375e547ed54e..8509892cc967 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/core/hdd/src/wlan_hdd_tdls.c @@ -463,7 +463,7 @@ static void dump_tdls_state_param_setting(tdlsInfo_t *info) */ static void wlan_hdd_tdls_monitor_timers_stop(tdlsCtx_t *hdd_tdls_ctx) { - cdf_mc_timer_stop(&hdd_tdls_ctx->peerDiscoveryTimeoutTimer); + qdf_mc_timer_stop(&hdd_tdls_ctx->peerDiscoveryTimeoutTimer); } /** @@ -583,7 +583,7 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) /* initialize TDLS pAdater context */ cdf_mem_zero(pHddTdlsCtx, sizeof(tdlsCtx_t)); - cdf_mc_timer_init(&pHddTdlsCtx->peerDiscoveryTimeoutTimer, + qdf_mc_timer_init(&pHddTdlsCtx->peerDiscoveryTimeoutTimer, QDF_TIMER_TYPE_SW, wlan_hdd_tdls_discovery_timeout_peer_cb, pHddTdlsCtx); @@ -681,7 +681,7 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) if (NULL == tInfo) { hddLog(CDF_TRACE_LEVEL_ERROR, FL("cdf_mem_alloc failed for tInfo")); - cdf_mc_timer_destroy(&pHddTdlsCtx->peerDiscoveryTimeoutTimer); + qdf_mc_timer_destroy(&pHddTdlsCtx->peerDiscoveryTimeoutTimer); cdf_mem_free(pHddTdlsCtx); return -ENOMEM; } @@ -725,7 +725,7 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) cdf_ret_status = sme_update_fw_tdls_state(pHddCtx->hHal, tInfo, true); if (QDF_STATUS_SUCCESS != cdf_ret_status) { cdf_mem_free(tInfo); - cdf_mc_timer_destroy(&pHddTdlsCtx->peerDiscoveryTimeoutTimer); + qdf_mc_timer_destroy(&pHddTdlsCtx->peerDiscoveryTimeoutTimer); cdf_mem_free(pHddTdlsCtx); return -EINVAL; } @@ -854,8 +854,8 @@ done: */ static void wlan_hdd_tdls_monitor_timers_destroy(tdlsCtx_t *pHddTdlsCtx) { - cdf_mc_timer_stop(&pHddTdlsCtx->peerDiscoveryTimeoutTimer); - cdf_mc_timer_destroy(&pHddTdlsCtx->peerDiscoveryTimeoutTimer); + qdf_mc_timer_stop(&pHddTdlsCtx->peerDiscoveryTimeoutTimer); + qdf_mc_timer_destroy(&pHddTdlsCtx->peerDiscoveryTimeoutTimer); } /** @@ -1120,7 +1120,7 @@ int wlan_hdd_tdls_recv_discovery_resp(hdd_adapter_t *pAdapter, mutex_unlock(&pHddCtx->tdls_lock); if (0 == pHddTdlsCtx->discovery_sent_cnt) { - cdf_mc_timer_stop(&pHddTdlsCtx->peerDiscoveryTimeoutTimer); + qdf_mc_timer_stop(&pHddTdlsCtx->peerDiscoveryTimeoutTimer); } hddLog(LOG1, @@ -2836,7 +2836,7 @@ void wlan_hdd_tdls_scan_done_callback(hdd_adapter_t *pAdapter) * Return: Void */ void wlan_hdd_tdls_timer_restart(hdd_adapter_t *pAdapter, - cdf_mc_timer_t *timer, + qdf_mc_timer_t *timer, uint32_t expirationTime) { hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter); @@ -2848,8 +2848,8 @@ void wlan_hdd_tdls_timer_restart(hdd_adapter_t *pAdapter, } if (hdd_conn_is_connected(pHddStaCtx)) { - cdf_mc_timer_stop(timer); - cdf_mc_timer_start(timer, expirationTime); + qdf_mc_timer_stop(timer); + qdf_mc_timer_start(timer, expirationTime); } } diff --git a/core/hdd/src/wlan_hdd_tx_rx.c b/core/hdd/src/wlan_hdd_tx_rx.c index 209947de7612..2d67457cd3e1 100644 --- a/core/hdd/src/wlan_hdd_tx_rx.c +++ b/core/hdd/src/wlan_hdd_tx_rx.c @@ -127,10 +127,10 @@ void hdd_tx_resume_cb(void *adapter_context, bool tx_resume) /* Resume TX */ if (true == tx_resume) { - if (CDF_TIMER_STATE_STOPPED != - cdf_mc_timer_get_current_state(&pAdapter-> + if (QDF_TIMER_STATE_STOPPED != + qdf_mc_timer_get_current_state(&pAdapter-> tx_flow_control_timer)) { - cdf_mc_timer_stop(&pAdapter->tx_flow_control_timer); + qdf_mc_timer_stop(&pAdapter->tx_flow_control_timer); } if (qdf_unlikely(hdd_sta_ctx->hdd_ReassocScenario)) { hddLog(LOGW, @@ -154,11 +154,11 @@ void hdd_tx_resume_cb(void *adapter_context, bool tx_resume) * Return: none */ void hdd_register_tx_flow_control(hdd_adapter_t *adapter, - cdf_mc_timer_callback_t timer_callback, + qdf_mc_timer_callback_t timer_callback, ol_txrx_tx_flow_control_fp flow_control_fp) { if (adapter->tx_flow_timer_initialized == false) { - cdf_mc_timer_init(&adapter->tx_flow_control_timer, + qdf_mc_timer_init(&adapter->tx_flow_control_timer, QDF_TIMER_TYPE_SW, timer_callback, adapter); @@ -180,8 +180,8 @@ void hdd_deregister_tx_flow_control(hdd_adapter_t *adapter) { ol_txrx_deregister_tx_flow_control_cb(adapter->sessionId); if (adapter->tx_flow_timer_initialized == true) { - cdf_mc_timer_stop(&adapter->tx_flow_control_timer); - cdf_mc_timer_destroy(&adapter->tx_flow_control_timer); + qdf_mc_timer_stop(&adapter->tx_flow_control_timer); + qdf_mc_timer_destroy(&adapter->tx_flow_control_timer); adapter->tx_flow_timer_initialized = false; } } @@ -207,10 +207,10 @@ void hdd_get_tx_resource(hdd_adapter_t *adapter, wlan_hdd_netif_queue_control(adapter, WLAN_STOP_ALL_NETIF_QUEUE, WLAN_DATA_FLOW_CONTROL); if ((adapter->tx_flow_timer_initialized == true) && - (CDF_TIMER_STATE_STOPPED == - cdf_mc_timer_get_current_state(&adapter-> + (QDF_TIMER_STATE_STOPPED == + qdf_mc_timer_get_current_state(&adapter-> tx_flow_control_timer))) { - cdf_mc_timer_start(&adapter->tx_flow_control_timer, + qdf_mc_timer_start(&adapter->tx_flow_control_timer, timer_value); adapter->hdd_stats.hddTxRxStats.txflow_timer_cnt++; adapter->hdd_stats.hddTxRxStats.txflow_pause_cnt++; diff --git a/core/hdd/src/wlan_hdd_wmm.c b/core/hdd/src/wlan_hdd_wmm.c index e8298e5a69a4..b09c0244261e 100644 --- a/core/hdd/src/wlan_hdd_wmm.c +++ b/core/hdd/src/wlan_hdd_wmm.c @@ -403,10 +403,10 @@ static void hdd_wmm_inactivity_timer_cb(void *user_data) acType, status); } else { pAc->wmmPrevTrafficCnt = currentTrafficCnt; - if (pAc->wmmInactivityTimer.state == CDF_TIMER_STATE_STOPPED) { + if (pAc->wmmInactivityTimer.state == QDF_TIMER_STATE_STOPPED) { /* Restart the timer */ qdf_status = - cdf_mc_timer_start(&pAc->wmmInactivityTimer, + qdf_mc_timer_start(&pAc->wmmInactivityTimer, pAc->wmmInactivityTime); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { CDF_TRACE(QDF_MODULE_ID_HDD, @@ -417,9 +417,9 @@ static void hdd_wmm_inactivity_timer_cb(void *user_data) acType); } } else { - CDF_ASSERT(cdf_mc_timer_get_current_state + CDF_ASSERT(qdf_mc_timer_get_current_state (&pAc->wmmInactivityTimer) == - CDF_TIMER_STATE_STOPPED); + QDF_TIMER_STATE_STOPPED); } } @@ -451,7 +451,7 @@ hdd_wmm_enable_inactivity_timer(hdd_wmm_qos_context_t *pQosContext, pAdapter = pQosContext->pAdapter; pAc = &pAdapter->hddWmmStatus.wmmAcStatus[acType]; - qdf_status = cdf_mc_timer_init(&pAc->wmmInactivityTimer, + qdf_status = qdf_mc_timer_init(&pAc->wmmInactivityTimer, QDF_TIMER_TYPE_SW, hdd_wmm_inactivity_timer_cb, pQosContext); @@ -462,13 +462,13 @@ hdd_wmm_enable_inactivity_timer(hdd_wmm_qos_context_t *pQosContext, return qdf_status; } /* Start the inactivity timer */ - qdf_status = cdf_mc_timer_start(&pAc->wmmInactivityTimer, + qdf_status = qdf_mc_timer_start(&pAc->wmmInactivityTimer, inactivityTime); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { CDF_TRACE(QDF_MODULE_ID_HDD, CDF_TRACE_LEVEL_ERROR, FL("Starting inactivity timer failed on AC %d"), acType); - qdf_status = cdf_mc_timer_destroy(&pAc->wmmInactivityTimer); + qdf_status = qdf_mc_timer_destroy(&pAc->wmmInactivityTimer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { hdd_err("Failed to destroy inactivity timer"); } @@ -508,12 +508,12 @@ hdd_wmm_disable_inactivity_timer(hdd_wmm_qos_context_t *pQosContext) if (pQosContext->is_inactivity_timer_running == true) { pQosContext->is_inactivity_timer_running = false; - qdf_status = cdf_mc_timer_stop(&pAc->wmmInactivityTimer); + qdf_status = qdf_mc_timer_stop(&pAc->wmmInactivityTimer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { hdd_err("Failed to stop inactivity timer"); return qdf_status; } - qdf_status = cdf_mc_timer_destroy(&pAc->wmmInactivityTimer); + qdf_status = qdf_mc_timer_destroy(&pAc->wmmInactivityTimer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) hdd_err("Failed to destroy inactivity timer:Timer started"); } diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h index ba0332f93b4f..c7013e18425e 100644 --- a/core/mac/src/pe/include/lim_session.h +++ b/core/mac/src/pe/include/lim_session.h @@ -453,12 +453,12 @@ typedef struct sPESession /* Added to Support BT-AMP */ #endif bool isNonRoamReassoc; #ifdef WLAN_FEATURE_11W - cdf_mc_timer_t pmfComebackTimer; + qdf_mc_timer_t pmfComebackTimer; tComebackTimerInfo pmfComebackTimerInfo; #endif /* WLAN_FEATURE_11W */ uint8_t is_key_installed; /* timer for reseting protection fileds at regular intervals */ - cdf_mc_timer_t protection_fields_reset_timer; + qdf_mc_timer_t protection_fields_reset_timer; void *mac_ctx; /* * variable to store state of various protection struct like diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index f9e8f8440af9..e62c655ae3ff 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -1180,11 +1180,11 @@ bool lim_is_assoc_req_for_drop(tpAniSirGlobal mac, uint8_t *rx_pkt_info) return true; if (sta_ds->last_assoc_received_time && - ((cdf_mc_timer_get_system_ticks() - + ((qdf_mc_timer_get_system_ticks() - sta_ds->last_assoc_received_time) < 1000)) return true; - sta_ds->last_assoc_received_time = cdf_mc_timer_get_system_ticks(); + sta_ds->last_assoc_received_time = qdf_mc_timer_get_system_ticks(); return false; } #endif @@ -1237,12 +1237,12 @@ bool lim_is_deauth_diassoc_for_drop(tpAniSirGlobal mac, uint8_t *rx_pkt_info) * AP. So process all deauth/diassoc frames with * a time difference of 1 sec. */ - if ((cdf_mc_timer_get_system_ticks() - + if ((qdf_mc_timer_get_system_ticks() - sta_ds->last_unprot_deauth_disassoc) < 1000) return true; sta_ds->last_unprot_deauth_disassoc = - cdf_mc_timer_get_system_ticks(); + qdf_mc_timer_get_system_ticks(); } else { /* PMF enabed, Management frames are protected */ if (sta_ds->proct_deauh_disassoc_cnt) @@ -1962,7 +1962,7 @@ QDF_STATUS lim_roam_fill_bss_descr(tpAniSirGlobal pMac, (uint8_t *) mac_hdr->bssId, sizeof(tSirMacAddr)); bss_desc_ptr->nReceivedTime = - (uint32_t)cdf_mc_timer_get_system_ticks(); + (uint32_t)qdf_mc_timer_get_system_ticks(); if (parsed_frm_ptr->mdiePresent) { bss_desc_ptr->mdiePresent = parsed_frm_ptr->mdiePresent; cdf_mem_copy((uint8_t *)bss_desc_ptr->mdie, diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 074ba2f353ff..3326796d98eb 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -911,7 +911,7 @@ lim_reject_association(tpAniSirGlobal mac_ctx, tSirMacAddr peer_addr, auth_node->fTimerStarted = 0; auth_node->mlmState = eLIM_MLM_AUTHENTICATED_STATE; auth_node->authType = (tAniAuthType) auth_type; - auth_node->timestamp = cdf_mc_timer_get_system_ticks(); + auth_node->timestamp = qdf_mc_timer_get_system_ticks(); lim_add_pre_auth_node(mac_ctx, auth_node); } } diff --git a/core/mac/src/pe/lim/lim_p2p.c b/core/mac/src/pe/lim/lim_p2p.c index 443f932ad38c..1c8b8c73d815 100644 --- a/core/mac/src/pe/lim/lim_p2p.c +++ b/core/mac/src/pe/lim/lim_p2p.c @@ -181,7 +181,7 @@ void lim_convert_active_channel_to_passive_channel(tpAniSirGlobal pMac) uint32_t lastTime = 0; uint32_t timeDiff; uint8_t i; - currentTime = cdf_mc_timer_get_system_time(); + currentTime = qdf_mc_timer_get_system_time(); for (i = 1; i < SIR_MAX_24G_5G_CHANNEL_RANGE; i++) { if ((pMac->lim.dfschannelList.timeStamp[i]) != 0) { lastTime = pMac->lim.dfschannelList.timeStamp[i]; diff --git a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c index 19b3889f60b8..876233f83d1f 100644 --- a/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c +++ b/core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c @@ -893,7 +893,7 @@ lim_process_assoc_rsp_frame(tpAniSirGlobal mac_ctx, " recvd.Starting timer to wait timeout=%d."), timeout_value); if (QDF_STATUS_SUCCESS != - cdf_mc_timer_start( + qdf_mc_timer_start( &session_entry->pmfComebackTimer, timeout_value)) { lim_log(mac_ctx, LOGE, diff --git a/core/mac/src/pe/lim/lim_process_auth_frame.c b/core/mac/src/pe/lim/lim_process_auth_frame.c index fadc5edd82e1..803d0e676ef8 100644 --- a/core/mac/src/pe/lim/lim_process_auth_frame.c +++ b/core/mac/src/pe/lim/lim_process_auth_frame.c @@ -164,7 +164,7 @@ static void lim_process_auth_shared_system_algo(tpAniSirGlobal mac_ctx, auth_node->fTimerStarted = 0; auth_node->seq_num = ((mac_hdr->seqControl.seqNumHi << 4) | (mac_hdr->seqControl.seqNumLo)); - auth_node->timestamp = cdf_mc_timer_get_system_ticks(); + auth_node->timestamp = qdf_mc_timer_get_system_ticks(); lim_add_pre_auth_node(mac_ctx, auth_node); lim_log(mac_ctx, LOG1, FL("Alloc new data: %p id %d peer "), @@ -253,7 +253,7 @@ static void lim_process_auth_open_system_algo(tpAniSirGlobal mac_ctx, auth_node->fTimerStarted = 0; auth_node->seq_num = ((mac_hdr->seqControl.seqNumHi << 4) | (mac_hdr->seqControl.seqNumLo)); - auth_node->timestamp = cdf_mc_timer_get_system_ticks(); + auth_node->timestamp = qdf_mc_timer_get_system_ticks(); lim_add_pre_auth_node(mac_ctx, auth_node); /* * Send Authenticaton frame with Success @@ -641,7 +641,7 @@ static void lim_process_auth_frame_type2(tpAniSirGlobal mac_ctx, auth_node->seq_num = ((mac_hdr->seqControl.seqNumHi << 4) | (mac_hdr->seqControl.seqNumLo)); - auth_node->timestamp = cdf_mc_timer_get_system_ticks(); + auth_node->timestamp = qdf_mc_timer_get_system_ticks(); lim_add_pre_auth_node(mac_ctx, auth_node); lim_restore_from_auth_state(mac_ctx, eSIR_SME_SUCCESS, rx_auth_frm_body->authStatusCode, pe_session); @@ -1003,7 +1003,7 @@ static void lim_process_auth_frame_type4(tpAniSirGlobal mac_ctx, auth_node->authType = mac_ctx->lim.gpLimMlmAuthReq->authType; auth_node->seq_num = ((mac_hdr->seqControl.seqNumHi << 4) | (mac_hdr->seqControl.seqNumLo)); - auth_node->timestamp = cdf_mc_timer_get_system_ticks(); + auth_node->timestamp = qdf_mc_timer_get_system_ticks(); lim_add_pre_auth_node(mac_ctx, auth_node); lim_restore_from_auth_state(mac_ctx, eSIR_SME_SUCCESS, rx_auth_frm_body->authStatusCode, pe_session); diff --git a/core/mac/src/pe/lim/lim_process_message_queue.c b/core/mac/src/pe/lim/lim_process_message_queue.c index 7b16ae7f9ac2..b3e17baa129c 100644 --- a/core/mac/src/pe/lim/lim_process_message_queue.c +++ b/core/mac/src/pe/lim/lim_process_message_queue.c @@ -360,7 +360,7 @@ __lim_pno_match_fwd_bcn_probepsp(tpAniSirGlobal pmac, uint8_t *rx_pkt_info, result->num_results = num_results; for (i = 0; i < result->num_results; i++) { - result->ap[i].ts = cdf_mc_timer_get_system_time(); + result->ap[i].ts = qdf_mc_timer_get_system_time(); result->ap[i].beaconPeriod = frame->beaconInterval; result->ap[i].capability = lim_get_u16((uint8_t *) &frame->capabilityInfo); @@ -411,7 +411,7 @@ __lim_ext_scan_forward_bcn_probe_rsp(tpAniSirGlobal pmac, uint8_t *rx_pkt_info, result->requestId = 0; result->moreData = 0; - result->ap.ts = cdf_mc_timer_get_system_time(); + result->ap.ts = qdf_mc_timer_get_system_time(); result->ap.beaconPeriod = frame->beaconInterval; result->ap.capability = lim_get_u16((uint8_t *) &frame->capabilityInfo); diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c index 8b11676d0a93..8b1e0d2e2b13 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c @@ -316,7 +316,7 @@ void lim_set_dfs_channel_list(tpAniSirGlobal mac_ctx, uint8_t chan_num, pass_to_active); } dfs_ch_list->timeStamp[chan_num] = - cdf_mc_timer_get_system_time(); + qdf_mc_timer_get_system_time(); } else { lim_log(mac_ctx, LOG1, FL("Channel %d is Active"), chan_num); return; @@ -2423,8 +2423,8 @@ static void lim_process_periodic_probe_req_timer(tpAniSirGlobal mac_ctx) TX_TIMER *probe_req_timer = &mac_ctx->lim.limTimers.gLimPeriodicProbeReqTimer; - if (cdf_mc_timer_get_current_state(&probe_req_timer->cdf_timer) - != CDF_TIMER_STATE_STOPPED) { + if (qdf_mc_timer_get_current_state(&probe_req_timer->cdf_timer) + != QDF_TIMER_STATE_STOPPED) { lim_log(mac_ctx, LOG1, FL("Invalid state of timer")); return; } diff --git a/core/mac/src/pe/lim/lim_process_probe_req_frame.c b/core/mac/src/pe/lim/lim_process_probe_req_frame.c index b270237434a0..0a75bd445916 100644 --- a/core/mac/src/pe/lim/lim_process_probe_req_frame.c +++ b/core/mac/src/pe/lim/lim_process_probe_req_frame.c @@ -79,7 +79,7 @@ void lim_get_wpspbc_sessions(tpAniSirGlobal mac_ctx, struct qdf_mac_addr addr, tSirWPSPBCSession *pbc; uint32_t cur_time; - cur_time = (uint32_t) (cdf_mc_timer_get_system_ticks() / + cur_time = (uint32_t) (qdf_mc_timer_get_system_ticks() / QDF_TICKS_PER_SECOND); qdf_zero_macaddr(&addr); cdf_mem_set((uint8_t *) uuid_e, SIR_WPS_UUID_LEN, 0); @@ -204,7 +204,7 @@ static void lim_update_pbc_session_entry(tpAniSirGlobal pMac, uint32_t curTime; curTime = - (uint32_t) (cdf_mc_timer_get_system_ticks() / + (uint32_t) (qdf_mc_timer_get_system_ticks() / QDF_TICKS_PER_SECOND); PELOG4(lim_log diff --git a/core/mac/src/pe/lim/lim_scan_result_utils.c b/core/mac/src/pe/lim/lim_scan_result_utils.c index 623a900719ab..283649fc3be8 100644 --- a/core/mac/src/pe/lim/lim_scan_result_utils.c +++ b/core/mac/src/pe/lim/lim_scan_result_utils.c @@ -127,7 +127,7 @@ lim_collect_bss_description(tpAniSirGlobal pMac, (uint8_t *) pHdr->bssId, sizeof(tSirMacAddr)); /* Copy Timestamp, Beacon Interval and Capability Info */ - pBssDescr->scanSysTimeMsec = cdf_mc_timer_get_system_time(); + pBssDescr->scanSysTimeMsec = qdf_mc_timer_get_system_time(); pBssDescr->timeStamp[0] = pBPR->timeStamp[0]; pBssDescr->timeStamp[1] = pBPR->timeStamp[1]; @@ -189,7 +189,7 @@ lim_collect_bss_description(tpAniSirGlobal pMac, MAC_ADDR_ARRAY(pHdr->bssId), pBssDescr->rssi, pBssDescr->rssi_raw); - pBssDescr->nReceivedTime = (uint32_t) cdf_mc_timer_get_system_ticks(); + pBssDescr->nReceivedTime = (uint32_t) qdf_mc_timer_get_system_ticks(); pBssDescr->tsf_delta = WMA_GET_RX_TSF_DELTA(pRxPacketInfo); lim_log(pMac, LOG1, FL("BSSID: "MAC_ADDRESS_STR " tsf_delta = %u"), diff --git a/core/mac/src/pe/lim/lim_security_utils.c b/core/mac/src/pe/lim/lim_security_utils.c index aa1f8ff87f67..1da781411b8f 100644 --- a/core/mac/src/pe/lim/lim_security_utils.c +++ b/core/mac/src/pe/lim/lim_security_utils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -273,9 +273,9 @@ lim_delete_open_auth_pre_auth_node(tpAniSirGlobal mac_ctx) while (temp_node != NULL) { if (temp_node->mlmState == eLIM_MLM_AUTHENTICATED_STATE && temp_node->authType == eSIR_OPEN_SYSTEM && - (cdf_mc_timer_get_system_ticks() > + (qdf_mc_timer_get_system_ticks() > (LIM_OPENAUTH_TIMEOUT + temp_node->timestamp) || - cdf_mc_timer_get_system_ticks() < temp_node->timestamp)) { + qdf_mc_timer_get_system_ticks() < temp_node->timestamp)) { /* Found node to be deleted */ auth_node_freed = true; found_node = temp_node; diff --git a/core/mac/src/pe/lim/lim_session.c b/core/mac/src/pe/lim/lim_session.c index 810565200d3d..02e5b20b445f 100644 --- a/core/mac/src/pe/lim/lim_session.c +++ b/core/mac/src/pe/lim/lim_session.c @@ -213,7 +213,7 @@ void pe_reset_protection_callback(void *ptr) } pe_session_entry->old_protection_state = current_protection_state; - if (cdf_mc_timer_start(&pe_session_entry-> + if (qdf_mc_timer_start(&pe_session_entry-> protection_fields_reset_timer, SCH_PROTECTION_RESET_TIME) != QDF_STATUS_SUCCESS) { @@ -366,12 +366,12 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId, if (eSIR_INFRA_AP_MODE == bssType) { session_ptr->old_protection_state = 0; session_ptr->mac_ctx = (void *)pMac; - status = cdf_mc_timer_init( + status = qdf_mc_timer_init( &session_ptr->protection_fields_reset_timer, QDF_TIMER_TYPE_SW, pe_reset_protection_callback, (void *)&pMac->lim.gpSession[i]); if (status == QDF_STATUS_SUCCESS) { - status = cdf_mc_timer_start( + status = qdf_mc_timer_start( &session_ptr->protection_fields_reset_timer, SCH_PROTECTION_RESET_TIME); } @@ -382,7 +382,7 @@ pe_create_session(tpAniSirGlobal pMac, uint8_t *bssid, uint8_t *sessionId, session_ptr->pmfComebackTimerInfo.pMac = pMac; session_ptr->pmfComebackTimerInfo.sessionID = *sessionId; - status = cdf_mc_timer_init(&session_ptr->pmfComebackTimer, + status = qdf_mc_timer_init(&session_ptr->pmfComebackTimer, QDF_TIMER_TYPE_SW, lim_pmf_comeback_timer_callback, (void *)&session_ptr->pmfComebackTimerInfo); if (!QDF_IS_STATUS_SUCCESS(status)) @@ -550,8 +550,8 @@ void pe_delete_session(tpAniSirGlobal mac_ctx, tpPESession session) } if (LIM_IS_AP_ROLE(session)) { - cdf_mc_timer_stop(&session->protection_fields_reset_timer); - cdf_mc_timer_destroy(&session->protection_fields_reset_timer); + qdf_mc_timer_stop(&session->protection_fields_reset_timer); + qdf_mc_timer_destroy(&session->protection_fields_reset_timer); } #if defined (WLAN_FEATURE_VOWIFI_11R) @@ -676,10 +676,10 @@ void pe_delete_session(tpAniSirGlobal mac_ctx, tpPESession session) session->addIeParams.probeRespBCNDataLen = 0; } #ifdef WLAN_FEATURE_11W - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state(&session->pmfComebackTimer)) - cdf_mc_timer_stop(&session->pmfComebackTimer); - cdf_mc_timer_destroy(&session->pmfComebackTimer); + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state(&session->pmfComebackTimer)) + qdf_mc_timer_stop(&session->pmfComebackTimer); + qdf_mc_timer_destroy(&session->pmfComebackTimer); #endif session->valid = false; diff --git a/core/mac/src/sys/common/src/wlan_qct_sys.c b/core/mac/src/sys/common/src/wlan_qct_sys.c index d1eaad913d10..dc42b0fda026 100644 --- a/core/mac/src/sys/common/src/wlan_qct_sys.c +++ b/core/mac/src/sys/common/src/wlan_qct_sys.c @@ -133,7 +133,7 @@ QDF_STATUS sys_stop(v_CONTEXT_t p_cds_context) QDF_STATUS sys_mc_process_msg(v_CONTEXT_t p_cds_context, cds_msg_t *pMsg) { QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; - cdf_mc_timer_callback_t timerCB; + qdf_mc_timer_callback_t timerCB; tpAniSirGlobal mac_ctx; void *hHal; diff --git a/core/mac/src/sys/legacy/src/platform/inc/sys_wrapper.h b/core/mac/src/sys/legacy/src/platform/inc/sys_wrapper.h index 03debc17b1b7..e6d71ea196c4 100644 --- a/core/mac/src/sys/legacy/src/platform/inc/sys_wrapper.h +++ b/core/mac/src/sys/legacy/src/platform/inc/sys_wrapper.h @@ -47,7 +47,7 @@ extern "C" { #include "sir_types.h" #include "sir_params.h" #include "sys_def.h" -#include "cdf_mc_timer.h" +#include "qdf_mc_timer.h" #include "qdf_types.h" #include "cdf_trace.h" #include "cdf_memory.h" @@ -110,7 +110,7 @@ typedef struct TX_TIMER_STRUCT { uint32_t expireInput; uint64_t initScheduleTimeInMsecs; uint64_t rescheduleTimeInMsecs; - cdf_mc_timer_t cdf_timer; + qdf_mc_timer_t cdf_timer; /* Pointer to the MAC global structure, which stores the context for the NIC, */ /* for which this timer is supposed to operate. */ diff --git a/core/mac/src/sys/legacy/src/platform/src/sys_wrapper.c b/core/mac/src/sys/legacy/src/platform/src/sys_wrapper.c index a965a63b0b87..f924d7ccb61e 100644 --- a/core/mac/src/sys/legacy/src/platform/src/sys_wrapper.c +++ b/core/mac/src/sys/legacy/src/platform/src/sys_wrapper.c @@ -89,7 +89,7 @@ */ uint64_t tx_time_get(void) { - return cdf_mc_timer_get_system_ticks(); + return qdf_mc_timer_get_system_ticks(); } /* * tx_time_get() */ @@ -138,7 +138,7 @@ uint32_t tx_timer_activate(TX_TIMER *timer_ptr) CDF_TRACE(QDF_MODULE_ID_SYS, CDF_TRACE_LEVEL_INFO, "Timer %s being activated\n", TIMER_NAME); - status = cdf_mc_timer_start(&timer_ptr->cdf_timer, + status = qdf_mc_timer_start(&timer_ptr->cdf_timer, timer_ptr->initScheduleTimeInMsecs); if (QDF_STATUS_SUCCESS == status) { @@ -180,12 +180,11 @@ uint32_t tx_timer_change(TX_TIMER *timer_ptr, /* Put a check for the free builds */ if (TX_AIRGO_TMR_SIGNATURE != timer_ptr->tmrSignature) { CDF_ASSERT(timer_ptr->tmrSignature == 0); - return TX_TIMER_ERROR; } /* changes cannot be applied until timer stops running */ - if (CDF_TIMER_STATE_STOPPED == - cdf_mc_timer_get_current_state(&timer_ptr->cdf_timer)) { + if (QDF_TIMER_STATE_STOPPED == + qdf_mc_timer_get_current_state(&timer_ptr->cdf_timer)) { timer_ptr->initScheduleTimeInMsecs = TX_MSECS_IN_1_TICK * initScheduleTimeInTicks; timer_ptr->rescheduleTimeInMsecs = @@ -223,8 +222,8 @@ uint32_t tx_timer_change_context(TX_TIMER *timer_ptr, return TX_TIMER_ERROR; } /* changes cannot be applied until timer stops running */ - if (CDF_TIMER_STATE_STOPPED == - cdf_mc_timer_get_current_state(&timer_ptr->cdf_timer)) { + if (QDF_TIMER_STATE_STOPPED == + qdf_mc_timer_get_current_state(&timer_ptr->cdf_timer)) { timer_ptr->expireInput = expiration_input; return TX_SUCCESS; } else { @@ -272,7 +271,7 @@ static void tx_main_timer_func(void *functionContext) /* check if this needs to be rescheduled */ if (0 != timer_ptr->rescheduleTimeInMsecs) { QDF_STATUS status; - status = cdf_mc_timer_start(&timer_ptr->cdf_timer, + status = qdf_mc_timer_start(&timer_ptr->cdf_timer, timer_ptr->rescheduleTimeInMsecs); timer_ptr->rescheduleTimeInMsecs = 0; @@ -335,7 +334,7 @@ uint32_t tx_timer_create_intern_debug(void *pMacGlobal, #endif /* Store the timer name, for Debug build only */ status = - cdf_mc_timer_init_debug(&timer_ptr->cdf_timer, QDF_TIMER_TYPE_SW, + qdf_mc_timer_init_debug(&timer_ptr->cdf_timer, QDF_TIMER_TYPE_SW, tx_main_timer_func, (void *) timer_ptr, fileName, lineNum); if (QDF_STATUS_SUCCESS != status) { @@ -394,7 +393,7 @@ uint32_t tx_timer_create_intern(void *pMacGlobal, TX_TIMER *timer_ptr, strlcpy(timer_ptr->timerName, name_ptr, sizeof(timer_ptr->timerName)); #endif /* Store the timer name, for Debug build only */ - status = cdf_mc_timer_init(&timer_ptr->cdf_timer, QDF_TIMER_TYPE_SW, + status = qdf_mc_timer_init(&timer_ptr->cdf_timer, QDF_TIMER_TYPE_SW, tx_main_timer_func, (void *) timer_ptr); if (QDF_STATUS_SUCCESS != status) { CDF_TRACE(QDF_MODULE_ID_SYS, CDF_TRACE_LEVEL_ERROR, @@ -443,7 +442,7 @@ uint32_t tx_timer_deactivate(TX_TIMER *timer_ptr) return TX_TIMER_ERROR; } /* if the timer is not running then we do not need to do anything here */ - vStatus = cdf_mc_timer_stop(&timer_ptr->cdf_timer); + vStatus = qdf_mc_timer_stop(&timer_ptr->cdf_timer); if (QDF_STATUS_SUCCESS != vStatus) { CDF_TRACE(QDF_MODULE_ID_SYS, CDF_TRACE_LEVEL_INFO_HIGH, "Unable to stop timer %s; status =%d\n", @@ -464,7 +463,7 @@ uint32_t tx_timer_delete(TX_TIMER *timer_ptr) return TX_TIMER_ERROR; } - cdf_mc_timer_destroy(&timer_ptr->cdf_timer); + qdf_mc_timer_destroy(&timer_ptr->cdf_timer); return TX_SUCCESS; } /*** tx_timer_delete() ***/ @@ -493,8 +492,8 @@ bool tx_timer_running(TX_TIMER *timer_ptr) if (TX_AIRGO_TMR_SIGNATURE != timer_ptr->tmrSignature) return false; - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state(&timer_ptr->cdf_timer)) { + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state(&timer_ptr->cdf_timer)) { return true; } return false; diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index 9fa88e5d0c32..c206ed5ebc06 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -597,7 +597,7 @@ typedef struct sSapDfsNolInfo { } tSapDfsNolInfo; typedef struct sSapDfsInfo { - cdf_mc_timer_t sap_dfs_cac_timer; + qdf_mc_timer_t sap_dfs_cac_timer; uint8_t sap_radar_found_status; /* * New channel to move to when a Radar is diff --git a/core/sap/src/sap_api_link_cntl.c b/core/sap/src/sap_api_link_cntl.c index 1273a6bd4dd8..dadbaec9c363 100644 --- a/core/sap/src/sap_api_link_cntl.c +++ b/core/sap/src/sap_api_link_cntl.c @@ -667,8 +667,8 @@ wlansap_roam_process_dfs_radar_found(tpAniSirGlobal mac_ctx, * and destroy the CAC timer and post a * eSAP_DFS_CHANNEL_CAC_RADAR_FOUND to sapFsm. */ - cdf_mc_timer_stop(&mac_ctx->sap.SapDfsInfo.sap_dfs_cac_timer); - cdf_mc_timer_destroy(&mac_ctx->sap.SapDfsInfo.sap_dfs_cac_timer); + qdf_mc_timer_stop(&mac_ctx->sap.SapDfsInfo.sap_dfs_cac_timer); + qdf_mc_timer_destroy(&mac_ctx->sap.SapDfsInfo.sap_dfs_cac_timer); /* * User space is already indicated the CAC start and if diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index fea29a4f7a6d..20bcc6ad14af 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -1566,15 +1566,15 @@ static uint8_t sap_random_channel_sel(ptSapContext sapContext) /* Give preference to non-DFS channel */ if (!pMac->f_prefer_non_dfs_on_radar) { - i = (random_byte + cdf_mc_timer_get_system_ticks()) % + i = (random_byte + qdf_mc_timer_get_system_ticks()) % available_ch_cnt; target_channel = availableChannels[i]; } else if (avail_non_dfs_chan_count) { - i = (random_byte + cdf_mc_timer_get_system_ticks()) % + i = (random_byte + qdf_mc_timer_get_system_ticks()) % avail_non_dfs_chan_count; target_channel = avail_non_dfs_chan_list[i]; } else { - i = (random_byte + cdf_mc_timer_get_system_ticks()) % + i = (random_byte + qdf_mc_timer_get_system_ticks()) % avail_dfs_chan_count; target_channel = avail_dfs_chan_list[i]; } @@ -2858,10 +2858,10 @@ QDF_STATUS sap_close_session(tHalHandle hHal, * as per design CAC timer should be destroyed after stop */ if (pMac->sap.SapDfsInfo.is_dfs_cac_timer_running) { - cdf_mc_timer_stop(&pMac->sap.SapDfsInfo. + qdf_mc_timer_stop(&pMac->sap.SapDfsInfo. sap_dfs_cac_timer); pMac->sap.SapDfsInfo.is_dfs_cac_timer_running = 0; - cdf_mc_timer_destroy( + qdf_mc_timer_destroy( &pMac->sap.SapDfsInfo.sap_dfs_cac_timer); } pMac->sap.SapDfsInfo.cac_state = eSAP_DFS_DO_NOT_SKIP_CAC; @@ -4435,7 +4435,7 @@ void sap_dfs_cac_timer_callback(void *data) /* Check to ensure that SAP is in DFS WAIT state */ if (sapContext->sapsMachine == eSAP_DFS_CAC_WAIT) { - cdf_mc_timer_destroy(&pMac->sap.SapDfsInfo.sap_dfs_cac_timer); + qdf_mc_timer_destroy(&pMac->sap.SapDfsInfo.sap_dfs_cac_timer); pMac->sap.SapDfsInfo.is_dfs_cac_timer_running = false; /* @@ -4473,13 +4473,13 @@ static int sap_stop_dfs_cac_timer(ptSapContext sapContext) } pMac = PMAC_STRUCT(hHal); - if (CDF_TIMER_STATE_RUNNING != - cdf_mc_timer_get_current_state(&pMac->sap.SapDfsInfo. + if (QDF_TIMER_STATE_RUNNING != + qdf_mc_timer_get_current_state(&pMac->sap.SapDfsInfo. sap_dfs_cac_timer)) { return 0; } - cdf_mc_timer_stop(&pMac->sap.SapDfsInfo.sap_dfs_cac_timer); + qdf_mc_timer_stop(&pMac->sap.SapDfsInfo.sap_dfs_cac_timer); pMac->sap.SapDfsInfo.is_dfs_cac_timer_running = 0; return 0; @@ -4549,13 +4549,13 @@ int sap_start_dfs_cac_timer(ptSapContext sapContext) "sapdfs: SAP_DFS_CHANNEL_CAC_START on CH - %d, CAC TIMEOUT - %d sec", sapContext->channel, cacTimeOut / 1000); - cdf_mc_timer_init(&pMac->sap.SapDfsInfo.sap_dfs_cac_timer, + qdf_mc_timer_init(&pMac->sap.SapDfsInfo.sap_dfs_cac_timer, QDF_TIMER_TYPE_SW, sap_dfs_cac_timer_callback, (void *) hHal); /*Start the CAC timer */ status = - cdf_mc_timer_start(&pMac->sap.SapDfsInfo.sap_dfs_cac_timer, + qdf_mc_timer_start(&pMac->sap.SapDfsInfo.sap_dfs_cac_timer, cacTimeOut); if (status == QDF_STATUS_SUCCESS) { pMac->sap.SapDfsInfo.is_dfs_cac_timer_running = true; diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h index a36b513e3906..fb6107f83a8b 100644 --- a/core/sme/inc/csr_internal.h +++ b/core/sme/inc/csr_internal.h @@ -36,7 +36,7 @@ #include "qdf_status.h" #include "qdf_lock.h" -#include "cdf_mc_timer.h" +#include "qdf_mc_timer.h" #include "csr_support.h" #include "cds_reg_service.h" @@ -374,7 +374,7 @@ typedef struct tagScanCmd { } u; /* This flag will be set while aborting the scan due to band change */ bool abortScanDueToBandChange; - cdf_mc_timer_t csr_scan_timer; + qdf_mc_timer_t csr_scan_timer; } tScanCmd; typedef struct tagRoamCmd { @@ -677,10 +677,10 @@ typedef struct tagCsrScanStruct { bool fScanEnable; bool fFullScanIssued; #ifdef WLAN_AP_STA_CONCURRENCY - cdf_mc_timer_t hTimerStaApConcTimer; + qdf_mc_timer_t hTimerStaApConcTimer; #endif - cdf_mc_timer_t hTimerIdleScan; - cdf_mc_timer_t hTimerResultCfgAging; + qdf_mc_timer_t hTimerIdleScan; + qdf_mc_timer_t hTimerResultCfgAging; /* * changes on every scan, it is used as a flag for whether 11d info is * found on every scan @@ -791,7 +791,7 @@ typedef struct tagCsrPeStatsReqInfo { uint32_t statsMask; uint32_t periodicity; bool rspPending; - cdf_mc_timer_t hPeStatsTimer; + qdf_mc_timer_t hPeStatsTimer; bool timerRunning; uint8_t staId; uint8_t numClient; @@ -811,7 +811,7 @@ typedef struct tagCsrStatsClientReqInfo { uint32_t statsMask; tCsrPeStatsReqInfo *pPeStaEntry; uint8_t staId; - cdf_mc_timer_t timer; + qdf_mc_timer_t timer; bool timerExpired; tpAniSirGlobal pMac; /* TODO: Confirm this change BTAMP */ uint8_t sessionId; @@ -820,7 +820,7 @@ typedef struct tagCsrStatsClientReqInfo { typedef struct tagCsrTlStatsReqInfo { uint32_t periodicity; bool timerRunning; - cdf_mc_timer_t hTlStatsTimer; + qdf_mc_timer_t hTlStatsTimer; uint8_t numClient; } tCsrTlStatsReqInfo; @@ -925,7 +925,7 @@ typedef struct tagCsrRoamSession { tCsrTimerInfo roamingTimerInfo; eCsrRoamingReason roamingReason; bool fCancelRoaming; - cdf_mc_timer_t hTimerRoaming; + qdf_mc_timer_t hTimerRoaming; /* the roamResult that is used when the roaming timer fires */ eCsrRoamResult roamResult; /* This is the reason code for join(assoc) failure */ @@ -990,7 +990,7 @@ typedef struct tagCsrRoamStruct { tSirMacChanNum validChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN]; uint32_t numValidChannels; /* total number of channels in CFG */ int32_t sPendingCommands; - cdf_mc_timer_t hTimerWaitForKey; /* support timeout for WaitForKey */ + qdf_mc_timer_t hTimerWaitForKey; /* support timeout for WaitForKey */ tCsrSummaryStatsInfo summaryStatsInfo; tCsrGlobalClassAStatsInfo classAStatsInfo; tCsrGlobalClassBStatsInfo classBStatsInfo; diff --git a/core/sme/inc/csr_link_list.h b/core/sme/inc/csr_link_list.h index 6b0b2f2be4f3..1944aceea2b5 100644 --- a/core/sme/inc/csr_link_list.h +++ b/core/sme/inc/csr_link_list.h @@ -35,7 +35,7 @@ #define CSR_LINK_LIST_H__ #include "qdf_lock.h" -#include "cdf_mc_timer.h" +#include "qdf_mc_timer.h" #include "cds_api.h" #include "sir_types.h" @@ -61,7 +61,7 @@ typedef struct tagDblLinkList { tListFlag Flag; /*command debugging */ uint32_t cmdTimeoutDuration; /* command timeout duration */ - cdf_mc_timer_t *cmdTimeoutTimer; /*command timeout Timer */ + qdf_mc_timer_t *cmdTimeoutTimer; /*command timeout Timer */ } tDblLinkList; /* diff --git a/core/sme/inc/p2p_api.h b/core/sme/inc/p2p_api.h index 8ac385cd7491..971496f8632e 100644 --- a/core/sme/inc/p2p_api.h +++ b/core/sme/inc/p2p_api.h @@ -38,7 +38,7 @@ #define __P2P_API_H__ #include "qdf_types.h" -#include "cdf_mc_timer.h" +#include "qdf_mc_timer.h" #include "qdf_lock.h" typedef struct sP2pPsConfig { diff --git a/core/sme/inc/sme_ft_api.h b/core/sme/inc/sme_ft_api.h index ba2a1a983863..57fb60655bb7 100644 --- a/core/sme/inc/sme_ft_api.h +++ b/core/sme/inc/sme_ft_api.h @@ -71,7 +71,7 @@ typedef struct sFTSMEContext { bool setFTPreAuthState; bool setFTPTKState; /* Time to trigger reassoc once pre-auth is successful */ - cdf_mc_timer_t preAuthReassocIntvlTimer; + qdf_mc_timer_t preAuthReassocIntvlTimer; bool addMDIE; #ifdef WLAN_FEATURE_ROAM_OFFLOAD uint32_t r0kh_id_len; diff --git a/core/sme/inc/sme_power_save.h b/core/sme/inc/sme_power_save.h index 54e9f16f3ff1..b4fbdb221f60 100644 --- a/core/sme/inc/sme_power_save.h +++ b/core/sme/inc/sme_power_save.h @@ -111,7 +111,7 @@ struct ps_params { * Power Save Offload module will * try to enable sta mode ps */ - cdf_mc_timer_t auto_ps_enable_timer; + qdf_mc_timer_t auto_ps_enable_timer; }; diff --git a/core/sme/inc/sme_rrm_internal.h b/core/sme/inc/sme_rrm_internal.h index fcb52ee721dd..77ea6355de19 100644 --- a/core/sme/inc/sme_rrm_internal.h +++ b/core/sme/inc/sme_rrm_internal.h @@ -65,7 +65,7 @@ typedef struct sRrmNeighborRspCallbackInfo { typedef struct sRrmNeighborRequestControlInfo { /* To check whether a neighbor req is already sent & response pending */ bool isNeighborRspPending; - cdf_mc_timer_t neighborRspWaitTimer; + qdf_mc_timer_t neighborRspWaitTimer; tRrmNeighborRspCallbackInfo neighborRspCallbackInfo; } tRrmNeighborRequestControlInfo, *tpRrmNeighborRequestControlInfo; @@ -84,7 +84,7 @@ typedef struct sRrmSMEContext { uint16_t duration[SIR_ESE_MAX_MEAS_IE_REQS]; uint8_t measMode[SIR_ESE_MAX_MEAS_IE_REQS]; struct rrm_config_param rrmConfig; - cdf_mc_timer_t IterMeasTimer; + qdf_mc_timer_t IterMeasTimer; tDblLinkList neighborReportCache; tRrmNeighborRequestControlInfo neighborReqControlInfo; diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index d1f0c5324d11..58968fc14adf 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -309,7 +309,7 @@ static QDF_STATUS init_sme_cmd_list(tpAniSirGlobal pMac) tSmeCmd *pCmd; uint32_t cmd_idx; QDF_STATUS qdf_status; - cdf_mc_timer_t *cmdTimeoutTimer = NULL; + qdf_mc_timer_t *cmdTimeoutTimer = NULL; uint32_t sme_cmd_ptr_ary_sz; pMac->sme.totalSmeCmd = SME_TOTAL_COMMAND; @@ -369,11 +369,11 @@ static QDF_STATUS init_sme_cmd_list(tpAniSirGlobal pMac) /* This timer is only to debug the active list command timeout */ cmdTimeoutTimer = - (cdf_mc_timer_t *) cdf_mem_malloc(sizeof(cdf_mc_timer_t)); + (qdf_mc_timer_t *) cdf_mem_malloc(sizeof(qdf_mc_timer_t)); if (cmdTimeoutTimer) { pMac->sme.smeCmdActiveList.cmdTimeoutTimer = cmdTimeoutTimer; qdf_status = - cdf_mc_timer_init(pMac->sme.smeCmdActiveList. + qdf_mc_timer_init(pMac->sme.smeCmdActiveList. cmdTimeoutTimer, QDF_TIMER_TYPE_SW, active_list_cmd_timeout_handle, (void *)pMac); @@ -473,7 +473,7 @@ static QDF_STATUS free_sme_cmd_list(tpAniSirGlobal pMac) csr_ll_close(&pMac->sme.smeCmdFreeList); /*destroy active list command time out timer */ - cdf_mc_timer_destroy(pMac->sme.smeCmdActiveList.cmdTimeoutTimer); + qdf_mc_timer_destroy(pMac->sme.smeCmdActiveList.cmdTimeoutTimer); cdf_mem_free(pMac->sme.smeCmdActiveList.cmdTimeoutTimer); pMac->sme.smeCmdActiveList.cmdTimeoutTimer = NULL; @@ -768,7 +768,7 @@ bool sme_process_scan_queue(tpAniSirGlobal pMac) switch (pCommand->command) { case eSmeCommandScan: sms_log(pMac, LOG1, FL("Processing scan offload cmd.")); - cdf_mc_timer_start(&pCommand->u.scanCmd.csr_scan_timer, + qdf_mc_timer_start(&pCommand->u.scanCmd.csr_scan_timer, CSR_ACTIVE_SCAN_LIST_CMD_TIMEOUT); csr_process_scan_command(pMac, pCommand); break; diff --git a/core/sme/src/common/sme_ft_api.c b/core/sme/src/common/sme_ft_api.c index 8c752f6830ad..c533602fef2b 100644 --- a/core/sme/src/common/sme_ft_api.c +++ b/core/sme/src/common/sme_ft_api.c @@ -53,7 +53,7 @@ void sme_ft_open(tHalHandle hHal, uint32_t sessionId) pSession->ftSmeContext.pUsrCtx->sessionId = sessionId; status = - cdf_mc_timer_init(&pSession->ftSmeContext. + qdf_mc_timer_init(&pSession->ftSmeContext. preAuthReassocIntvlTimer, QDF_TIMER_TYPE_SW, sme_preauth_reassoc_intvl_timer_callback, @@ -84,15 +84,15 @@ void sme_ft_close(tHalHandle hHal, uint32_t sessionId) pSession = CSR_GET_SESSION(pMac, sessionId); if (NULL != pSession) { /* check if the timer is running */ - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state(&pSession->ftSmeContext. + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state(&pSession->ftSmeContext. preAuthReassocIntvlTimer)) { - cdf_mc_timer_stop(&pSession->ftSmeContext. + qdf_mc_timer_stop(&pSession->ftSmeContext. preAuthReassocIntvlTimer); } if (QDF_STATUS_SUCCESS != - cdf_mc_timer_destroy(&pSession->ftSmeContext. + qdf_mc_timer_destroy(&pSession->ftSmeContext. preAuthReassocIntvlTimer)) { sms_log(pMac, LOGE, FL("preAuthReAssocTimer destroy failed")); diff --git a/core/sme/src/common/sme_power_save.c b/core/sme/src/common/sme_power_save.c index 6ab06edc32e7..8c382fb3e906 100644 --- a/core/sme/src/common/sme_power_save.c +++ b/core/sme/src/common/sme_power_save.c @@ -1105,7 +1105,7 @@ QDF_STATUS sme_ps_enable_auto_ps_timer(tHalHandle hal_ctx, sms_log(mac_ctx, LOGE, FL("Start auto_ps_timer for %d is_reassoc:%d "), timer_value, is_reassoc); - qdf_status = cdf_mc_timer_start(&ps_param->auto_ps_enable_timer, + qdf_status = qdf_mc_timer_start(&ps_param->auto_ps_enable_timer, timer_value); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { if (QDF_STATUS_E_ALREADY == qdf_status) { @@ -1130,13 +1130,13 @@ QDF_STATUS sme_ps_disable_auto_ps_timer(tHalHandle hal_ctx, /* * Stop the auto ps entry timer if runnin */ - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state( + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state( &ps_param->auto_ps_enable_timer)) { sms_log(mac_ctx, LOGE, FL("Stop auto_ps_enable_timer Timer for session ID:%d "), session_id); - cdf_mc_timer_stop(&ps_param->auto_ps_enable_timer); + qdf_mc_timer_stop(&ps_param->auto_ps_enable_timer); } return QDF_STATUS_SUCCESS; } @@ -1171,7 +1171,7 @@ QDF_STATUS sme_ps_open_per_session(tHalHandle hal_ctx, uint32_t session_id) sms_log(mac_ctx, LOG1, FL("Enter")); /* Allocate a timer to enable ps automatically */ - if (!QDF_IS_STATUS_SUCCESS(cdf_mc_timer_init( + if (!QDF_IS_STATUS_SUCCESS(qdf_mc_timer_init( &ps_param->auto_ps_enable_timer, QDF_TIMER_TYPE_SW, sme_auto_ps_entry_timer_expired, @@ -1197,7 +1197,7 @@ void sme_auto_ps_entry_timer_expired(void *data) SME_PS_ENABLE); } else { status = - cdf_mc_timer_start(&ps_params->auto_ps_enable_timer, + qdf_mc_timer_start(&ps_params->auto_ps_enable_timer, AUTO_PS_ENTRY_TIMER_DEFAULT_VALUE); if (!QDF_IS_STATUS_SUCCESS(status) && (QDF_STATUS_E_ALREADY != status)) { @@ -1230,13 +1230,13 @@ QDF_STATUS sme_ps_close_per_session(tHalHandle hal_ctx, uint32_t session_id) /* * Stop the auto ps entry timer if running */ - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state( + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state( &ps_param->auto_ps_enable_timer)) { - cdf_mc_timer_stop(&ps_param->auto_ps_enable_timer); + qdf_mc_timer_stop(&ps_param->auto_ps_enable_timer); } qdf_status = - cdf_mc_timer_destroy(&ps_param->auto_ps_enable_timer); + qdf_mc_timer_destroy(&ps_param->auto_ps_enable_timer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) sms_log(mac_ctx, LOGE, FL("Cannot deallocate suto PS timer")); return qdf_status; @@ -1252,8 +1252,8 @@ QDF_STATUS sme_is_auto_ps_timer_running(tHalHandle hal_ctx, /* * Check if the auto ps entry timer if running */ - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state( + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state( &ps_param->auto_ps_enable_timer)) { status = true; } diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index cea2f1280b2f..62e38897eb20 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -59,9 +59,9 @@ #define CSR_NUM_IBSS_START_CHANNELS_50 4 #define CSR_NUM_IBSS_START_CHANNELS_24 3 /* 5 seconds, for WPA, WPA2, CCKM */ -#define CSR_WAIT_FOR_KEY_TIMEOUT_PERIOD (15 * CDF_MC_TIMER_TO_SEC_UNIT) +#define CSR_WAIT_FOR_KEY_TIMEOUT_PERIOD (15 * QDF_MC_TIMER_TO_SEC_UNIT) /* 120 seconds, for WPS */ -#define CSR_WAIT_FOR_WPS_KEY_TIMEOUT_PERIOD (120 * CDF_MC_TIMER_TO_SEC_UNIT) +#define CSR_WAIT_FOR_WPS_KEY_TIMEOUT_PERIOD (120 * QDF_MC_TIMER_TO_SEC_UNIT) /*--------------------------------------------------------------------------- OBIWAN recommends [8 10]% : pick 9% @@ -918,7 +918,7 @@ QDF_STATUS csr_roam_open(tpAniSirGlobal pMac) pMac->roam.WaitForKeyTimerInfo.sessionId = CSR_SESSION_ID_INVALID; status = - cdf_mc_timer_init(&pMac->roam.hTimerWaitForKey, + qdf_mc_timer_init(&pMac->roam.hTimerWaitForKey, QDF_TIMER_TYPE_SW, csr_roam_wait_for_key_time_out_handler, &pMac->roam.WaitForKeyTimerInfo); @@ -929,7 +929,7 @@ QDF_STATUS csr_roam_open(tpAniSirGlobal pMac) break; } status = - cdf_mc_timer_init(&pMac->roam.tlStatsReqInfo.hTlStatsTimer, + qdf_mc_timer_init(&pMac->roam.tlStatsReqInfo.hTlStatsTimer, QDF_TIMER_TYPE_SW, csr_roam_tl_stats_timer_handler, pMac); if (!QDF_IS_STATUS_SUCCESS(status)) { @@ -948,10 +948,10 @@ QDF_STATUS csr_roam_close(tpAniSirGlobal pMac) for (sessionId = 0; sessionId < CSR_ROAM_SESSION_MAX; sessionId++) { csr_roam_close_session(pMac, sessionId, true, NULL, NULL); } - cdf_mc_timer_stop(&pMac->roam.hTimerWaitForKey); - cdf_mc_timer_destroy(&pMac->roam.hTimerWaitForKey); - cdf_mc_timer_stop(&pMac->roam.tlStatsReqInfo.hTlStatsTimer); - cdf_mc_timer_destroy(&pMac->roam.tlStatsReqInfo.hTlStatsTimer); + qdf_mc_timer_stop(&pMac->roam.hTimerWaitForKey); + qdf_mc_timer_destroy(&pMac->roam.hTimerWaitForKey); + qdf_mc_timer_stop(&pMac->roam.tlStatsReqInfo.hTlStatsTimer); + qdf_mc_timer_destroy(&pMac->roam.tlStatsReqInfo.hTlStatsTimer); return QDF_STATUS_SUCCESS; } @@ -1117,8 +1117,8 @@ void csr_release_command_roam(tpAniSirGlobal pMac, tSmeCmd *pCommand) void csr_release_command_scan(tpAniSirGlobal pMac, tSmeCmd *pCommand) { - cdf_mc_timer_stop(&pCommand->u.scanCmd.csr_scan_timer); - cdf_mc_timer_destroy(&pCommand->u.scanCmd.csr_scan_timer); + qdf_mc_timer_stop(&pCommand->u.scanCmd.csr_scan_timer); + qdf_mc_timer_destroy(&pCommand->u.scanCmd.csr_scan_timer); csr_reinit_scan_cmd(pMac, pCommand); csr_release_command(pMac, pCommand); } @@ -9895,7 +9895,7 @@ void csr_send_ese_adjacent_ap_rep_ind(tpAniSirGlobal pMac, tCsrRoamSession *pSes return; } - roamTS2 = cdf_mc_timer_get_system_time(); + roamTS2 = qdf_mc_timer_get_system_time(); roamInfo.tsmRoamDelay = roamTS2 - pSession->roamTS1; sms_log(pMac, LOG1, "Bssid(" MAC_ADDRESS_STR ") Roaming Delay(%u ms)", MAC_ADDR_ARRAY(pSession->connectedProfile.bssid.bytes), @@ -10991,7 +10991,7 @@ bool csr_roam_complete_roaming(tpAniSirGlobal pMac, uint32_t sessionId, uint32_t roamTime = (uint32_t) (pMac->roam.configParam.nRoamingTime * QDF_TICKS_PER_SECOND); - uint32_t curTime = (uint32_t) cdf_mc_timer_get_system_ticks(); + uint32_t curTime = (uint32_t) qdf_mc_timer_get_system_ticks(); tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId); if (!pSession) { sms_log(pMac, LOGE, FL(" session %d not found "), sessionId); @@ -11028,7 +11028,7 @@ bool csr_roam_complete_roaming(tpAniSirGlobal pMac, uint32_t sessionId, pSession->roamResult = roamResult; if (!QDF_IS_STATUS_SUCCESS (csr_roam_start_roaming_timer - (pMac, sessionId, CDF_MC_TIMER_TO_SEC_UNIT))) { + (pMac, sessionId, QDF_MC_TIMER_TO_SEC_UNIT))) { csr_call_roaming_completion_callback(pMac, pSession, NULL, 0, roamResult); pSession->roamingReason = eCsrNotRoaming; @@ -11107,15 +11107,15 @@ QDF_STATUS csr_roam_start_roaming_timer(tpAniSirGlobal pMac, uint32_t sessionId, sms_log(pMac, LOG1, " csrScanStartRoamingTimer"); pSession->roamingTimerInfo.sessionId = (uint8_t) sessionId; - status = cdf_mc_timer_start(&pSession->hTimerRoaming, - interval / CDF_MC_TIMER_TO_MS_UNIT); + status = qdf_mc_timer_start(&pSession->hTimerRoaming, + interval / QDF_MC_TIMER_TO_MS_UNIT); return status; } QDF_STATUS csr_roam_stop_roaming_timer(tpAniSirGlobal pMac, uint32_t sessionId) { - return cdf_mc_timer_stop + return qdf_mc_timer_stop (&pMac->roam.roamSession[sessionId].hTimerRoaming); } @@ -11197,8 +11197,8 @@ QDF_STATUS csr_roam_start_wait_for_key_timer(tpAniSirGlobal pMac, uint32_t inter cfg_set_int(pMac, WNI_CFG_HEART_BEAT_THRESHOLD, 0); } sms_log(pMac, LOG1, " csrScanStartWaitForKeyTimer"); - status = cdf_mc_timer_start(&pMac->roam.hTimerWaitForKey, - interval / CDF_MC_TIMER_TO_MS_UNIT); + status = qdf_mc_timer_start(&pMac->roam.hTimerWaitForKey, + interval / QDF_MC_TIMER_TO_MS_UNIT); return status; } @@ -11230,7 +11230,7 @@ QDF_STATUS csr_roam_stop_wait_for_key_timer(tpAniSirGlobal pMac) cfg_set_int(pMac, WNI_CFG_HEART_BEAT_THRESHOLD, pMac->roam.configParam.HeartbeatThresh24); } - return cdf_mc_timer_stop(&pMac->roam.hTimerWaitForKey); + return qdf_mc_timer_stop(&pMac->roam.hTimerWaitForKey); } void csr_roam_completion(tpAniSirGlobal pMac, uint32_t sessionId, @@ -11397,7 +11397,7 @@ QDF_STATUS csr_roam_lost_link(tpAniSirGlobal pMac, uint32_t sessionId, type) ? eCsrLostlinkRoamingDeauth : eCsrLostlinkRoamingDisassoc; pSession->roamingStartTime = - (uint32_t) cdf_mc_timer_get_system_ticks(); + (uint32_t) qdf_mc_timer_get_system_ticks(); csr_roam_call_callback(pMac, sessionId, pRoamInfo, 0, eCSR_ROAM_ROAMING_START, eCSR_ROAM_RESULT_LOSTLINK); @@ -14834,7 +14834,7 @@ QDF_STATUS csr_roam_open_session(tpAniSirGlobal pMac, sizeof(struct qdf_mac_addr)); *pbSessionId = (uint8_t) i; status = - cdf_mc_timer_init(&pSession->hTimerRoaming, + qdf_mc_timer_init(&pSession->hTimerRoaming, QDF_TIMER_TYPE_SW, csr_roam_roaming_timer_handler, &pSession->roamingTimerInfo); @@ -14854,7 +14854,7 @@ QDF_STATUS csr_roam_open_session(tpAniSirGlobal pMac, break; } #ifdef FEATURE_WLAN_BTAMP_UT_RF - status = cdf_mc_timer_init(&pSession->hTimerJoinRetry, + status = qdf_mc_timer_init(&pSession->hTimerJoinRetry, QDF_TIMER_TYPE_SW, csr_roam_join_retry_timer_handler, &pSession-> @@ -15050,9 +15050,9 @@ void csr_cleanup_session(tpAniSirGlobal pMac, uint32_t sessionId) csr_free_connect_bss_desc(pMac, sessionId); csr_roam_free_connect_profile(&pSession->connectedProfile); csr_roam_free_connected_info(pMac, &pSession->connectedInfo); - cdf_mc_timer_destroy(&pSession->hTimerRoaming); + qdf_mc_timer_destroy(&pSession->hTimerRoaming); #ifdef FEATURE_WLAN_BTAMP_UT_RF - cdf_mc_timer_destroy(&pSession->hTimerJoinRetry); + qdf_mc_timer_destroy(&pSession->hTimerJoinRetry); #endif purge_sme_session_cmd_list(pMac, sessionId, &pMac->sme.smeCmdPendingList); @@ -15275,7 +15275,7 @@ void csr_roam_tl_stats_timer_handler(void *pv) if (pMac->roam.tlStatsReqInfo.periodicity) { /* start timer */ status = - cdf_mc_timer_start(&pMac->roam.tlStatsReqInfo. + qdf_mc_timer_start(&pMac->roam.tlStatsReqInfo. hTlStatsTimer, pMac->roam.tlStatsReqInfo. periodicity); @@ -15303,7 +15303,7 @@ void csr_roam_pe_stats_timer_handler(void *pv) /* Destroy the timer */ qdf_status = - cdf_mc_timer_destroy(&pPeStatsReqListEntry->hPeStatsTimer); + qdf_mc_timer_destroy(&pPeStatsReqListEntry->hPeStatsTimer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { sms_log(pMac, LOGE, FL @@ -15332,8 +15332,8 @@ void csr_roam_pe_stats_timer_handler(void *pv) } /* send down a req */ if (pPeStatsReqListEntry->periodicity && - (CDF_TIMER_STATE_STOPPED == - cdf_mc_timer_get_current_state(&pPeStatsReqListEntry-> + (QDF_TIMER_STATE_STOPPED == + qdf_mc_timer_get_current_state(&pPeStatsReqListEntry-> hPeStatsTimer))) { if (pPeStatsReqListEntry->periodicity < pMac->roam.configParam. @@ -15344,7 +15344,7 @@ void csr_roam_pe_stats_timer_handler(void *pv) } /* start timer */ qdf_status = - cdf_mc_timer_start(&pPeStatsReqListEntry-> + qdf_mc_timer_start(&pPeStatsReqListEntry-> hPeStatsTimer, pPeStatsReqListEntry-> periodicity); @@ -15364,8 +15364,8 @@ void csr_roam_pe_stats_timer_handler(void *pv) void csr_roam_stats_client_timer_handler(void *pv) { tCsrStatsClientReqInfo *pStaEntry = (tCsrStatsClientReqInfo *) pv; - if (CDF_TIMER_STATE_STOPPED == - cdf_mc_timer_get_current_state(&pStaEntry->timer)) { + if (QDF_TIMER_STATE_STOPPED == + qdf_mc_timer_get_current_state(&pStaEntry->timer)) { CDF_TRACE(QDF_MODULE_ID_SME, CDF_TRACE_LEVEL_INFO, FL("roam stats client timer is stopped")); } @@ -15917,7 +15917,7 @@ csr_deregister_client_request(tpAniSirGlobal mac_ctx, mac_ctx->roam.tlStatsReqInfo.numClient--; if (!mac_ctx->roam.tlStatsReqInfo.numClient) { if (mac_ctx->roam.tlStatsReqInfo.timerRunning) { - status = cdf_mc_timer_stop( + status = qdf_mc_timer_stop( &mac_ctx->roam.tlStatsReqInfo.hTlStatsTimer); if (!QDF_IS_STATUS_SUCCESS(status)) { sms_log(mac_ctx, LOGE, @@ -15928,9 +15928,9 @@ csr_deregister_client_request(tpAniSirGlobal mac_ctx, mac_ctx->roam.tlStatsReqInfo.periodicity = 0; mac_ctx->roam.tlStatsReqInfo.timerRunning = false; } - cdf_mc_timer_stop(&ptr_sta_entry->timer); + qdf_mc_timer_stop(&ptr_sta_entry->timer); /* Destroy the cdf timer... */ - status = cdf_mc_timer_destroy(&ptr_sta_entry->timer); + status = qdf_mc_timer_destroy(&ptr_sta_entry->timer); if (!QDF_IS_STATUS_SUCCESS(status)) sms_log(mac_ctx, LOGE, FL("failed to destroy Client req timer")); @@ -15964,7 +15964,7 @@ csr_insert_stats_request_to_list(tpAniSirGlobal mac_ctx, /* Init & start timer if needed */ ptr_sta_entry->periodicity = periodicity; if (ptr_sta_entry->periodicity) { - status = cdf_mc_timer_init(&ptr_sta_entry->timer, + status = qdf_mc_timer_init(&ptr_sta_entry->timer, QDF_TIMER_TYPE_SW, csr_roam_stats_client_timer_handler, ptr_sta_entry); @@ -15973,7 +15973,7 @@ csr_insert_stats_request_to_list(tpAniSirGlobal mac_ctx, FL("cannot init StatsClient timer")); return QDF_STATUS_E_FAILURE; } - status = cdf_mc_timer_start(&ptr_sta_entry->timer, + status = qdf_mc_timer_start(&ptr_sta_entry->timer, ptr_sta_entry->periodicity); if (!QDF_IS_STATUS_SUCCESS(status)) { sms_log(mac_ctx, LOGE, @@ -16025,7 +16025,7 @@ csr_get_statistics_from_tl(tpAniSirGlobal mac_ctx, if (mac_ctx->roam.tlStatsReqInfo.periodicity) { /* start timer */ - status = cdf_mc_timer_start( + status = qdf_mc_timer_start( &mac_ctx->roam.tlStatsReqInfo.hTlStatsTimer, mac_ctx->roam.tlStatsReqInfo.periodicity); if (!QDF_IS_STATUS_SUCCESS(status)) { @@ -17198,7 +17198,7 @@ tCsrPeStatsReqInfo *csr_roam_check_pe_stats_req_list(tpAniSirGlobal pMac, if (!found) { qdf_status = - cdf_mc_timer_init(&pTempStaEntry-> + qdf_mc_timer_init(&pTempStaEntry-> hPeStatsTimer, QDF_TIMER_TYPE_SW, csr_roam_pe_stats_timer_handler, @@ -17215,7 +17215,7 @@ tCsrPeStatsReqInfo *csr_roam_check_pe_stats_req_list(tpAniSirGlobal pMac, "csr_roam_check_pe_stats_req_list:peStatsTimer period %d", pTempStaEntry->periodicity); qdf_status = - cdf_mc_timer_start(&pTempStaEntry->hPeStatsTimer, + qdf_mc_timer_start(&pTempStaEntry->hPeStatsTimer, pTempStaEntry->periodicity); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { sms_log(pMac, LOGE, @@ -17266,7 +17266,7 @@ void csr_roam_remove_entry_from_pe_stats_req_list(tpAniSirGlobal pMac, } sms_log(pMac, LOGW, FL("Match found")); if (pTempStaEntry->timerRunning) { - qdf_status = cdf_mc_timer_stop( + qdf_status = qdf_mc_timer_stop( &pTempStaEntry->hPeStatsTimer); /* * If we are not able to stop the timer here, just @@ -17277,7 +17277,7 @@ void csr_roam_remove_entry_from_pe_stats_req_list(tpAniSirGlobal pMac, /* the timer is successfully stopped */ pTempStaEntry->timerRunning = false; /* Destroy the timer */ - qdf_status = cdf_mc_timer_destroy( + qdf_status = qdf_mc_timer_destroy( &pTempStaEntry->hPeStatsTimer); } else { /* @@ -17438,7 +17438,7 @@ QDF_STATUS csr_roam_dereg_statistics_req(tpAniSirGlobal pMac) if (!pMac->roam.tlStatsReqInfo.numClient) { if (pMac->roam.tlStatsReqInfo.timerRunning) { status = - cdf_mc_timer_stop(&pMac->roam. + qdf_mc_timer_stop(&pMac->roam. tlStatsReqInfo. hTlStatsTimer); if (!QDF_IS_STATUS_SUCCESS(status)) { @@ -17456,10 +17456,10 @@ QDF_STATUS csr_roam_dereg_statistics_req(tpAniSirGlobal pMac) /* Initializing and starting timer only when periodicity is set. */ /* So Stop and Destroy timer only when periodicity is set. */ - cdf_mc_timer_stop(&pTempStaEntry->timer); + qdf_mc_timer_stop(&pTempStaEntry->timer); /* Destroy the cdf timer... */ qdf_status = - cdf_mc_timer_destroy(&pTempStaEntry->timer); + qdf_mc_timer_destroy(&pTempStaEntry->timer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { sms_log(pMac, LOGE, FL @@ -17734,7 +17734,7 @@ void csr_roam_ft_pre_auth_rsp_processor(tHalHandle hHal, /* Start the pre-auth reassoc interval timer with a period of 400ms. When this expires, * actual transition from the current to handoff AP is triggered */ status = - cdf_mc_timer_start(&pSession->ftSmeContext.preAuthReassocIntvlTimer, + qdf_mc_timer_start(&pSession->ftSmeContext.preAuthReassocIntvlTimer, 60); if (QDF_STATUS_SUCCESS != status) { sms_log(pMac, LOGE, @@ -17960,7 +17960,7 @@ QDF_STATUS csr_roam_read_tsf(tpAniSirGlobal pMac, uint8_t *pTimestamp, pBssDescription = handoffNode.pBssDescription; /* Get the time diff in milli seconds */ timer_diff = - cdf_mc_timer_get_system_time() - pBssDescription->scanSysTimeMsec; + qdf_mc_timer_get_system_time() - pBssDescription->scanSysTimeMsec; /* Convert msec to micro sec timer */ timer_diff = (uint32_t) (timer_diff * SYSTEM_TIME_MSEC_TO_USEC); timeStamp[0] = pBssDescription->timeStamp[0]; diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index 7baca987c797..b52a17ce1530 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -171,7 +171,7 @@ QDF_STATUS csr_scan_open(tpAniSirGlobal mac_ctx) mac_ctx->scan.fFullScanIssued = false; mac_ctx->scan.nBssLimit = CSR_MAX_BSS_SUPPORT; #ifdef WLAN_AP_STA_CONCURRENCY - status = cdf_mc_timer_init(&mac_ctx->scan.hTimerStaApConcTimer, + status = qdf_mc_timer_init(&mac_ctx->scan.hTimerStaApConcTimer, QDF_TIMER_TYPE_SW, csr_sta_ap_conc_timer_handler, mac_ctx); @@ -181,7 +181,7 @@ QDF_STATUS csr_scan_open(tpAniSirGlobal mac_ctx) return status; } #endif - status = cdf_mc_timer_init(&mac_ctx->scan.hTimerResultCfgAging, + status = qdf_mc_timer_init(&mac_ctx->scan.hTimerResultCfgAging, QDF_TIMER_TYPE_SW, csr_scan_result_cfg_aging_timer_handler, mac_ctx); @@ -209,9 +209,9 @@ QDF_STATUS csr_scan_close(tpAniSirGlobal pMac) csr_ll_close(&pMac->scan.channelPowerInfoList24); csr_ll_close(&pMac->scan.channelPowerInfoList5G); csr_scan_disable(pMac); - cdf_mc_timer_destroy(&pMac->scan.hTimerResultCfgAging); + qdf_mc_timer_destroy(&pMac->scan.hTimerResultCfgAging); #ifdef WLAN_AP_STA_CONCURRENCY - cdf_mc_timer_destroy(&pMac->scan.hTimerStaApConcTimer); + qdf_mc_timer_destroy(&pMac->scan.hTimerStaApConcTimer); #endif return QDF_STATUS_SUCCESS; } @@ -424,7 +424,7 @@ csr_issue_11d_scan(tpAniSirGlobal mac_ctx, tSmeCmd *scan_cmd, tmp_rq.BSSType = eCSR_BSS_TYPE_ANY; tmp_rq.scan_id = scan_11d_cmd->u.scanCmd.scanID; - status = cdf_mc_timer_init(&scan_cmd->u.scanCmd.csr_scan_timer, + status = qdf_mc_timer_init(&scan_cmd->u.scanCmd.csr_scan_timer, QDF_TIMER_TYPE_SW, csr_scan_active_list_timeout_handle, &scan_11d_cmd); @@ -610,7 +610,7 @@ QDF_STATUS csr_scan_request(tpAniSirGlobal pMac, uint16_t sessionId, pTempScanReq = &scan_cmd->u.scanCmd.u.scanRequest; pMac->scan.scanProfile.numOfChannels = pTempScanReq->ChannelInfo.numOfChannels; - status = cdf_mc_timer_init(&scan_cmd->u.scanCmd.csr_scan_timer, + status = qdf_mc_timer_init(&scan_cmd->u.scanCmd.csr_scan_timer, QDF_TIMER_TYPE_SW, csr_scan_active_list_timeout_handle, scan_cmd); sms_log(pMac, LOG1, @@ -807,7 +807,7 @@ csr_update_lost_link1_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, mac_ctx->roam.configParam.nActiveMinChnTime; cmd->u.scanCmd.u.scanRequest.scanType = eSIR_ACTIVE_SCAN; wma_get_scan_id(&cmd->u.scanCmd.scanID); - status = cdf_mc_timer_init(&cmd->u.scanCmd.csr_scan_timer, + status = qdf_mc_timer_init(&cmd->u.scanCmd.csr_scan_timer, QDF_TIMER_TYPE_SW, csr_scan_active_list_timeout_handle, &cmd); cmd->u.scanCmd.u.scanRequest.scan_id = @@ -978,7 +978,7 @@ csr_update_lost_link2_cmd(tpAniSirGlobal mac_ctx, tSmeCmd *cmd, cmd->u.scanCmd.scanID; if (!session->pCurRoamProfile) return QDF_STATUS_SUCCESS; - status = cdf_mc_timer_init(&cmd->u.scanCmd.csr_scan_timer, + status = qdf_mc_timer_init(&cmd->u.scanCmd.csr_scan_timer, QDF_TIMER_TYPE_SW, csr_scan_active_list_timeout_handle, &cmd); scan_fltr = cdf_mem_malloc(sizeof(tCsrScanResultFilter)); @@ -1113,7 +1113,7 @@ csr_scan_request_lost_link3(tpAniSirGlobal mac_ctx, uint32_t session_id) mac_ctx->roam.configParam.nActiveMinChnTime; cmd->u.scanCmd.u.scanRequest.scanType = eSIR_ACTIVE_SCAN; wma_get_scan_id(&cmd->u.scanCmd.scanID); - status = cdf_mc_timer_init(&cmd->u.scanCmd.csr_scan_timer, + status = qdf_mc_timer_init(&cmd->u.scanCmd.csr_scan_timer, QDF_TIMER_TYPE_SW, csr_scan_active_list_timeout_handle, &cmd); cmd->u.scanCmd.u.scanRequest.scan_id = @@ -2858,7 +2858,7 @@ csr_remove_from_tmp_list(tpAniSirGlobal mac_ctx, * hidden ssid from the profile i.e., forget the SSID * via GUI that SSID shouldn't see in the profile */ - unsigned long time_gap = cdf_mc_timer_get_system_time() - + unsigned long time_gap = qdf_mc_timer_get_system_time() - timer; if ((0 == bss_dscp->Result.ssId.length) && (time_gap <= HIDDEN_TIMER) @@ -2994,7 +2994,7 @@ tCsrScanResult *csr_scan_append_bss_description(tpAniSirGlobal pMac, * hidden ssid from the profile i.e., forget the SSID * via GUI that SSID shouldn't see in the profile */ - if ((cdf_mc_timer_get_system_time() - timer) <= + if ((qdf_mc_timer_get_system_time() - timer) <= HIDDEN_TIMER) { pCsrBssDescription->Result.ssId = tmpSsid; pCsrBssDescription->Result.timer = timer; @@ -4279,7 +4279,7 @@ tCsrScanResult *csr_scan_save_bss_description_to_interim_list(tpAniSirGlobal pMa } pCsrBssDescription->Result.ssId.length = len; pCsrBssDescription->Result.timer = - cdf_mc_timer_get_system_time(); + qdf_mc_timer_get_system_time(); cdf_mem_copy(pCsrBssDescription->Result.ssId.ssId, pIes->SSID.ssid, len); } @@ -4769,7 +4769,7 @@ bool csr_scan_age_out_bss(tpAniSirGlobal pMac, tCsrScanResult *pResult) MAC_ADDRESS_STR), pResult->AgingCount, MAC_ADDR_ARRAY(pResult->Result.BssDescriptor.bssId)); pResult->Result.BssDescriptor.nReceivedTime = - (uint32_t) cdf_mc_timer_get_system_ticks(); + (uint32_t) qdf_mc_timer_get_system_ticks(); return fRet; } sms_log(pMac, LOGW, @@ -5784,16 +5784,16 @@ QDF_STATUS csr_scan_start_result_cfg_aging_timer(tpAniSirGlobal pMac) if (pMac->scan.fScanEnable) { status = - cdf_mc_timer_start(&pMac->scan.hTimerResultCfgAging, + qdf_mc_timer_start(&pMac->scan.hTimerResultCfgAging, CSR_SCAN_RESULT_CFG_AGING_INTERVAL / - CDF_MC_TIMER_TO_MS_UNIT); + QDF_MC_TIMER_TO_MS_UNIT); } return status; } QDF_STATUS csr_scan_stop_result_cfg_aging_timer(tpAniSirGlobal pMac) { - return cdf_mc_timer_stop(&pMac->scan.hTimerResultCfgAging); + return qdf_mc_timer_stop(&pMac->scan.hTimerResultCfgAging); } /** @@ -5811,7 +5811,7 @@ static void csr_scan_result_cfg_aging_timer_handler(void *pv) tCsrScanResult *result; uint32_t ageout_time = mac_ctx->scan.scanResultCfgAgingTime * QDF_TICKS_PER_SECOND/10; - uint32_t cur_time = (uint32_t) cdf_mc_timer_get_system_ticks(); + uint32_t cur_time = (uint32_t) qdf_mc_timer_get_system_ticks(); uint8_t *bssId; csr_ll_lock(&mac_ctx->scan.scanResultList); @@ -5821,7 +5821,7 @@ static void csr_scan_result_cfg_aging_timer_handler(void *pv) LL_ACCESS_NOLOCK); result = GET_BASE_ADDR(entry, tCsrScanResult, Link); /* - * cdf_mc_timer_get_system_ticks() returns in 10ms interval. + * qdf_mc_timer_get_system_ticks() returns in 10ms interval. * so ageout time value also updated to 10ms interval value. */ if ((cur_time - result->Result.BssDescriptor.nReceivedTime) > @@ -5835,9 +5835,9 @@ static void csr_scan_result_cfg_aging_timer_handler(void *pv) entry = tmp_entry; } csr_ll_unlock(&mac_ctx->scan.scanResultList); - cdf_mc_timer_start(&mac_ctx->scan.hTimerResultCfgAging, + qdf_mc_timer_start(&mac_ctx->scan.hTimerResultCfgAging, CSR_SCAN_RESULT_CFG_AGING_INTERVAL / - CDF_MC_TIMER_TO_MS_UNIT); + QDF_MC_TIMER_TO_MS_UNIT); } bool csr_scan_remove_fresh_scan_command(tpAniSirGlobal pMac, uint8_t sessionId) @@ -6162,7 +6162,7 @@ QDF_STATUS csr_scan_for_ssid(tpAniSirGlobal mac_ctx, uint32_t session_id, wma_get_scan_id(&scan_cmd->u.scanCmd.scanID); cdf_mem_set(&scan_cmd->u.scanCmd.u.scanRequest, sizeof(tCsrScanRequest), 0); - status = cdf_mc_timer_init(&scan_cmd->u.scanCmd.csr_scan_timer, + status = qdf_mc_timer_init(&scan_cmd->u.scanCmd.csr_scan_timer, QDF_TIMER_TYPE_SW, csr_scan_active_list_timeout_handle, &scan_cmd); scan_req = &scan_cmd->u.scanCmd.u.scanRequest; @@ -6914,7 +6914,7 @@ QDF_STATUS csr_scan_save_preferred_network_found(tpAniSirGlobal pMac, pBssDescr->capabilityInfo = *((uint16_t *)&parsed_frm->capabilityInfo); cdf_mem_copy((uint8_t *) &pBssDescr->bssId, (uint8_t *) macHeader->bssId, sizeof(tSirMacAddr)); - pBssDescr->nReceivedTime = (uint32_t) cdf_mc_timer_get_system_ticks(); + pBssDescr->nReceivedTime = (uint32_t) qdf_mc_timer_get_system_ticks(); sms_log(pMac, LOG2, FL("Bssid= "MAC_ADDRESS_STR" chan= %d, rssi = %d"), MAC_ADDR_ARRAY(pBssDescr->bssId), pBssDescr->channelId, pBssDescr->rssi); diff --git a/core/sme/src/csr/csr_inside_api.h b/core/sme/src/csr/csr_inside_api.h index b3ba204237e2..44bf688cbbf1 100644 --- a/core/sme/src/csr/csr_inside_api.h +++ b/core/sme/src/csr/csr_inside_api.h @@ -68,11 +68,11 @@ /* This number minus 1 means the number of times a channel is scanned before a BSS is remvoed from */ /* cache scan result */ #define CSR_AGING_COUNT 3 -#define CSR_SCAN_GET_RESULT_INTERVAL (5 * CDF_MC_TIMER_TO_SEC_UNIT) /* 5 seconds */ -#define CSR_MIC_ERROR_TIMEOUT (60 * CDF_MC_TIMER_TO_SEC_UNIT) /* 60 seconds */ -#define CSR_TKIP_COUNTER_MEASURE_TIMEOUT (60 * CDF_MC_TIMER_TO_SEC_UNIT) /* 60 seconds */ +#define CSR_SCAN_GET_RESULT_INTERVAL (5 * QDF_MC_TIMER_TO_SEC_UNIT) /* 5 seconds */ +#define CSR_MIC_ERROR_TIMEOUT (60 * QDF_MC_TIMER_TO_SEC_UNIT) /* 60 seconds */ +#define CSR_TKIP_COUNTER_MEASURE_TIMEOUT (60 * QDF_MC_TIMER_TO_SEC_UNIT) /* 60 seconds */ -#define CSR_SCAN_RESULT_CFG_AGING_INTERVAL (CDF_MC_TIMER_TO_SEC_UNIT) /* 1 second */ +#define CSR_SCAN_RESULT_CFG_AGING_INTERVAL (QDF_MC_TIMER_TO_SEC_UNIT) /* 1 second */ /* the following defines are NOT used by palTimer */ #define CSR_SCAN_AGING_TIME_NOT_CONNECT_NO_PS 50 /* 50 seconds */ #define CSR_SCAN_AGING_TIME_NOT_CONNECT_W_PS 300 /* 300 seconds */ diff --git a/core/sme/src/csr/csr_link_list.c b/core/sme/src/csr/csr_link_list.c index ed9db8b13491..20b02f8685ab 100644 --- a/core/sme/src/csr/csr_link_list.c +++ b/core/sme/src/csr/csr_link_list.c @@ -36,7 +36,7 @@ #include "qdf_lock.h" #include "cdf_memory.h" #include "cdf_trace.h" -#include "cdf_mc_timer.h" +#include "qdf_mc_timer.h" static inline void csr_list_init(tListElem *pList) { @@ -302,7 +302,7 @@ void csr_ll_insert_head(tDblLinkList *pList, tListElem *pEntry, } if (pList->cmdTimeoutTimer && pList->cmdTimeoutDuration) { /* timer to detect pending command in activelist */ - cdf_mc_timer_start(pList->cmdTimeoutTimer, + qdf_mc_timer_start(pList->cmdTimeoutTimer, pList->cmdTimeoutDuration); } } @@ -497,7 +497,7 @@ bool csr_ll_remove_entry(tDblLinkList *pList, tListElem *pEntryToRemove, csr_ll_unlock(pList); } if (pList->cmdTimeoutTimer) { - cdf_mc_timer_stop(pList->cmdTimeoutTimer); + qdf_mc_timer_stop(pList->cmdTimeoutTimer); } } diff --git a/core/sme/src/csr/csr_neighbor_roam.c b/core/sme/src/csr/csr_neighbor_roam.c index 66d05dbf93ff..1fad09f45e4b 100644 --- a/core/sme/src/csr/csr_neighbor_roam.c +++ b/core/sme/src/csr/csr_neighbor_roam.c @@ -1537,7 +1537,7 @@ csr_neighbor_roam_process_scan_results(tpAniSirGlobal mac_ctx, } /* check the age of the AP */ - age_ticks = (uint32_t) cdf_mc_timer_get_system_ticks() - + age_ticks = (uint32_t) qdf_mc_timer_get_system_ticks() - descr->nReceivedTime; if (age_constraint == true && age_ticks > limit_ticks) { num_dropped++; @@ -2284,7 +2284,7 @@ QDF_STATUS csr_neighbor_roam_indicate_disconnect(tpAniSirGlobal pMac, pSession->prevOpChannel = pSession->connectedProfile.operationChannel; pSession->isPrevApInfoValid = true; - pSession->roamTS1 = cdf_mc_timer_get_system_time(); + pSession->roamTS1 = qdf_mc_timer_get_system_time(); } #endif } @@ -2330,7 +2330,7 @@ QDF_STATUS csr_neighbor_roam_indicate_disconnect(tpAniSirGlobal pMac, case eCSR_NEIGHBOR_ROAM_STATE_PREAUTH_DONE: /* Stop pre-auth to reassoc interval timer */ - cdf_mc_timer_stop(&pSession->ftSmeContext. + qdf_mc_timer_stop(&pSession->ftSmeContext. preAuthReassocIntvlTimer); case eCSR_NEIGHBOR_ROAM_STATE_PREAUTHENTICATING: CSR_NEIGHBOR_ROAM_STATE_TRANSITION( @@ -3134,7 +3134,7 @@ void csr_neighbor_roam_tranistion_preauth_done_to_disconnected(tpAniSirGlobal pM return; /* Stop timer */ - cdf_mc_timer_stop(&session->ftSmeContext.preAuthReassocIntvlTimer); + qdf_mc_timer_stop(&session->ftSmeContext.preAuthReassocIntvlTimer); /* Transition to init state */ CSR_NEIGHBOR_ROAM_STATE_TRANSITION(pMac, eCSR_NEIGHBOR_ROAM_STATE_INIT, diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c index a29ca9648970..b827c68cfe78 100644 --- a/core/sme/src/rrm/sme_rrm.c +++ b/core/sme/src/rrm/sme_rrm.c @@ -124,12 +124,12 @@ void rrm_indicate_neighbor_report_result(tpAniSirGlobal pMac, QDF_STATUS qdf_sta false; /* Stop the timer if it is already running. The timer should be running only in the SUCCESS case. */ - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state(&pMac->rrm.rrmSmeContext. + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state(&pMac->rrm.rrmSmeContext. neighborReqControlInfo. neighborRspWaitTimer)) { sms_log(pMac, LOG1, FL("No entry in neighbor report cache")); - cdf_mc_timer_stop(&pMac->rrm.rrmSmeContext. + qdf_mc_timer_stop(&pMac->rrm.rrmSmeContext. neighborReqControlInfo.neighborRspWaitTimer); } callback = @@ -608,14 +608,14 @@ static QDF_STATUS sme_rrm_scan_request_callback(tHalHandle halHandle, pSmeRrmContext->currentIndex++; /* Advance the current index. */ /* start the timer to issue next request. */ /* From timer tick get a random number within 10ms and max randmization interval. */ - time_tick = cdf_mc_timer_get_system_ticks(); + time_tick = qdf_mc_timer_get_system_ticks(); interval = time_tick % (pSmeRrmContext->randnIntvl - 10 + 1) + 10; #if defined WLAN_VOWIFI_DEBUG sms_log(pMac, LOGE, "Set timer for interval %d ", interval); #endif - cdf_mc_timer_start(&pSmeRrmContext->IterMeasTimer, interval); + qdf_mc_timer_start(&pSmeRrmContext->IterMeasTimer, interval); } else { /* Done with the measurement. Clean up all context and send a message to PE with measurement done flag set. */ @@ -718,7 +718,7 @@ QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx) sms_log(mac_ctx, LOG1, FL("Scan Type(%d) Max Dwell Time(%d)"), scan_req.scanType, scan_req.maxChnTime); - rrm_scan_timer = cdf_mc_timer_get_system_time(); + rrm_scan_timer = qdf_mc_timer_get_system_time(); #if defined WLAN_VOWIFI_DEBUG sms_log(mac_ctx, LOGE, FL("For Duration %d "), @@ -1002,7 +1002,7 @@ QDF_STATUS sme_rrm_neighbor_report_request(tpAniSirGlobal pMac, uint8_t sessionI true; /* Start neighbor response wait timer now */ - cdf_mc_timer_start(&pMac->rrm.rrmSmeContext.neighborReqControlInfo. + qdf_mc_timer_start(&pMac->rrm.rrmSmeContext.neighborReqControlInfo. neighborRspWaitTimer, callbackInfo->timeout); return QDF_STATUS_SUCCESS; @@ -1359,7 +1359,7 @@ QDF_STATUS rrm_open(tpAniSirGlobal pMac) pSmeRrmContext->rrmConfig.max_randn_interval = 50; /* ms */ - qdf_status = cdf_mc_timer_init(&pSmeRrmContext->IterMeasTimer, + qdf_status = qdf_mc_timer_init(&pSmeRrmContext->IterMeasTimer, QDF_TIMER_TYPE_SW, rrm_iter_meas_timer_handle, (void *)pMac); @@ -1372,7 +1372,7 @@ QDF_STATUS rrm_open(tpAniSirGlobal pMac) } qdf_status = - cdf_mc_timer_init(&pSmeRrmContext->neighborReqControlInfo. + qdf_mc_timer_init(&pSmeRrmContext->neighborReqControlInfo. neighborRspWaitTimer, QDF_TIMER_TYPE_SW, rrm_neighbor_rsp_timeout_handler, (void *)pMac); @@ -1414,16 +1414,16 @@ QDF_STATUS rrm_close(tpAniSirGlobal pMac) QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; tpRrmSMEContext pSmeRrmContext = &pMac->rrm.rrmSmeContext; - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state(&pSmeRrmContext->IterMeasTimer)) { - qdf_status = cdf_mc_timer_stop(&pSmeRrmContext->IterMeasTimer); + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state(&pSmeRrmContext->IterMeasTimer)) { + qdf_status = qdf_mc_timer_stop(&pSmeRrmContext->IterMeasTimer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { CDF_TRACE(QDF_MODULE_ID_SME, CDF_TRACE_LEVEL_ERROR, FL("Timer stop fail")); } } - qdf_status = cdf_mc_timer_destroy(&pSmeRrmContext->IterMeasTimer); + qdf_status = qdf_mc_timer_destroy(&pSmeRrmContext->IterMeasTimer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { CDF_TRACE(QDF_MODULE_ID_SME, CDF_TRACE_LEVEL_ERROR, @@ -1431,12 +1431,12 @@ QDF_STATUS rrm_close(tpAniSirGlobal pMac) } - if (CDF_TIMER_STATE_RUNNING == - cdf_mc_timer_get_current_state(&pSmeRrmContext-> + if (QDF_TIMER_STATE_RUNNING == + qdf_mc_timer_get_current_state(&pSmeRrmContext-> neighborReqControlInfo. neighborRspWaitTimer)) { qdf_status = - cdf_mc_timer_stop(&pSmeRrmContext->neighborReqControlInfo. + qdf_mc_timer_stop(&pSmeRrmContext->neighborReqControlInfo. neighborRspWaitTimer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { CDF_TRACE(QDF_MODULE_ID_SME, CDF_TRACE_LEVEL_FATAL, @@ -1445,7 +1445,7 @@ QDF_STATUS rrm_close(tpAniSirGlobal pMac) } qdf_status = - cdf_mc_timer_destroy(&pSmeRrmContext->neighborReqControlInfo. + qdf_mc_timer_destroy(&pSmeRrmContext->neighborReqControlInfo. neighborRspWaitTimer); if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { CDF_TRACE(QDF_MODULE_ID_SME, CDF_TRACE_LEVEL_FATAL, diff --git a/core/utils/epping/src/epping_main.c b/core/utils/epping/src/epping_main.c index 5bb56dcc5961..096c586408d8 100644 --- a/core/utils/epping/src/epping_main.c +++ b/core/utils/epping/src/epping_main.c @@ -206,7 +206,7 @@ int epping_enable(struct device *parent_dev) epping_get_dummy_mac_addr(adapter_macAddr); /* Initialize the timer module */ - cdf_timer_module_init(); + qdf_timer_module_init(); scn = cds_get_context(QDF_MODULE_ID_HIF); if (!scn) { diff --git a/core/utils/logging/src/wlan_logging_sock_svc.c b/core/utils/logging/src/wlan_logging_sock_svc.c index 0e3e1d3a003a..04e367499820 100644 --- a/core/utils/logging/src/wlan_logging_sock_svc.c +++ b/core/utils/logging/src/wlan_logging_sock_svc.c @@ -290,7 +290,7 @@ static int wlan_add_user_log_time_stamp(char *tbuf, size_t tbuf_sz, uint64_t ts) int tlen; uint32_t rem; - rem = do_div(ts, CDF_MC_TIMER_TO_SEC_UNIT); + rem = do_div(ts, QDF_MC_TIMER_TO_SEC_UNIT); tlen = scnprintf(tbuf, tbuf_sz, "[%s][%lu.%06lu] ", current->comm, (unsigned long) ts, (unsigned long)rem); return tlen; diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index c52c726fb3ca..b7bfb6c502ea 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -1274,7 +1274,7 @@ typedef struct { qdf_wake_lock_t wow_wake_lock; int wow_nack; qdf_atomic_t is_wow_bus_suspended; - cdf_mc_timer_t wma_scan_comp_timer; + qdf_mc_timer_t wma_scan_comp_timer; uint8_t dfs_phyerr_filter_offload; bool suitable_ap_hb_failure; ibss_power_save_params wma_ibss_power_save_params; @@ -1295,7 +1295,7 @@ typedef struct { uint32_t hw_bd_id; uint32_t hw_bd_info[HW_BD_INFO_SIZE]; uint32_t miracast_value; - cdf_mc_timer_t log_completion_timer; + qdf_mc_timer_t log_completion_timer; wma_mgmt_frame_rx_callback mgmt_rx; uint32_t num_dbs_hw_modes; struct dbs_hw_mode_info hw_mode; @@ -1342,7 +1342,7 @@ typedef struct { * context. So, processing ready event and extended ready event in * the serialized MC thread context with a timer. */ - cdf_mc_timer_t service_ready_ext_timer; + qdf_mc_timer_t service_ready_ext_timer; void (*csr_roam_synch_cb)(tpAniSirGlobal mac, roam_offload_synch_ind *roam_synch_data, tpSirBssDescription bss_desc_ptr, uint8_t reason); @@ -1457,7 +1457,7 @@ struct wma_tx_ack_work_ctx { * @type: type */ struct wma_target_req { - cdf_mc_timer_t event_timeout; + qdf_mc_timer_t event_timeout; qdf_list_node_t node; void *user_data; uint32_t msg_type; diff --git a/core/wma/src/wma_data.c b/core/wma/src/wma_data.c index ca0df47c172e..592c1554c9db 100644 --- a/core/wma/src/wma_data.c +++ b/core/wma/src/wma_data.c @@ -2603,7 +2603,7 @@ QDF_STATUS wma_tx_packet(void *wma_context, void *tx_frame, uint16_t frmLen, struct wma_decap_info_t decap_info; struct ieee80211_frame *wh = (struct ieee80211_frame *)cdf_nbuf_data(skb); - unsigned long curr_timestamp = cdf_mc_timer_get_system_ticks(); + unsigned long curr_timestamp = qdf_mc_timer_get_system_ticks(); if (pdev == NULL) { WMA_LOGE("%s: pdev pointer is not available", __func__); diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 749d357cca84..1da4dfb47e35 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -502,8 +502,8 @@ void wma_vdev_detach_callback(void *ctx) if (req_msg) { WMA_LOGD("%s: Found vdev request for vdev id %d", __func__, param->session_id); - cdf_mc_timer_stop(&req_msg->event_timeout); - cdf_mc_timer_destroy(&req_msg->event_timeout); + qdf_mc_timer_stop(&req_msg->event_timeout); + qdf_mc_timer_destroy(&req_msg->event_timeout); cdf_mem_free(req_msg); } } @@ -978,7 +978,7 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info, return -EINVAL; } - cdf_mc_timer_stop(&req_msg->event_timeout); + qdf_mc_timer_stop(&req_msg->event_timeout); #ifdef FEATURE_AP_MCC_CH_AVOIDANCE if (resp_event->status == QDF_STATUS_SUCCESS @@ -1043,7 +1043,7 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info, wma->interfaces[resp_event->vdev_id].vdev_up) wma_set_sap_keepalive(wma, resp_event->vdev_id); - cdf_mc_timer_destroy(&req_msg->event_timeout); + qdf_mc_timer_destroy(&req_msg->event_timeout); cdf_mem_free(req_msg); return 0; @@ -1714,11 +1714,11 @@ int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info, if (!pdev) { WMA_LOGE("%s: pdev is NULL", __func__); status = -EINVAL; - cdf_mc_timer_stop(&req_msg->event_timeout); + qdf_mc_timer_stop(&req_msg->event_timeout); goto free_req_msg; } - cdf_mc_timer_stop(&req_msg->event_timeout); + qdf_mc_timer_stop(&req_msg->event_timeout); if (req_msg->msg_type == WMA_DELETE_BSS_REQ) { tpDeleteBssParams params = (tpDeleteBssParams) req_msg->user_data; @@ -1813,7 +1813,7 @@ int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info, } } free_req_msg: - cdf_mc_timer_destroy(&req_msg->event_timeout); + qdf_mc_timer_destroy(&req_msg->event_timeout); cdf_mem_free(req_msg); return status; } @@ -2377,7 +2377,7 @@ int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info, return -EINVAL; } - cdf_mc_timer_stop(&req_msg->event_timeout); + qdf_mc_timer_stop(&req_msg->event_timeout); if (req_msg->msg_type == WMA_ADD_STA_REQ) { tpAddStaParams params = (tpAddStaParams)req_msg->user_data; @@ -2417,7 +2417,7 @@ int wma_peer_assoc_conf_handler(void *handle, uint8_t *cmd_param_info, } free_req_msg: - cdf_mc_timer_destroy(&req_msg->event_timeout); + qdf_mc_timer_destroy(&req_msg->event_timeout); cdf_mem_free(req_msg); return status; @@ -2465,8 +2465,8 @@ int wma_vdev_delete_handler(void *handle, uint8_t *cmd_param_info, qdf_runtime_pm_allow_suspend(wma->wmi_cmd_rsp_runtime_lock); /* Send response to upper layers */ wma_vdev_detach_callback(req_msg->user_data); - cdf_mc_timer_stop(&req_msg->event_timeout); - cdf_mc_timer_destroy(&req_msg->event_timeout); + qdf_mc_timer_stop(&req_msg->event_timeout); + qdf_mc_timer_destroy(&req_msg->event_timeout); cdf_mem_free(req_msg); return status; @@ -2517,8 +2517,8 @@ int wma_peer_delete_handler(void *handle, uint8_t *cmd_param_info, WIFI_POWER_EVENT_WAKELOCK_WMI_CMD_RSP); qdf_runtime_pm_allow_suspend(wma->wmi_cmd_rsp_runtime_lock); /* Cleanup timeout handler */ - cdf_mc_timer_stop(&req_msg->event_timeout); - cdf_mc_timer_destroy(&req_msg->event_timeout); + qdf_mc_timer_stop(&req_msg->event_timeout); + qdf_mc_timer_destroy(&req_msg->event_timeout); if (req_msg->type == WMA_DELETE_STA_RSP_START) { del_sta = req_msg->user_data; @@ -2595,7 +2595,7 @@ void wma_hold_req_timer(void *data) CDF_ASSERT(0); } free_tgt_req: - cdf_mc_timer_destroy(&tgt_req->event_timeout); + qdf_mc_timer_destroy(&tgt_req->event_timeout); cdf_mem_free(tgt_req); } @@ -2630,9 +2630,9 @@ struct wma_target_req *wma_fill_hold_req(tp_wma_handle wma, req->msg_type = msg_type; req->type = type; req->user_data = params; - cdf_mc_timer_init(&req->event_timeout, QDF_TIMER_TYPE_SW, + qdf_mc_timer_init(&req->event_timeout, QDF_TIMER_TYPE_SW, wma_hold_req_timer, req); - cdf_mc_timer_start(&req->event_timeout, timeout); + qdf_mc_timer_start(&req->event_timeout, timeout); qdf_spin_lock_bh(&wma->wma_hold_req_q_lock); status = qdf_list_insert_back(&wma->wma_hold_req_queue, &req->node); if (QDF_STATUS_SUCCESS != status) { @@ -2666,8 +2666,8 @@ void wma_remove_req(tp_wma_handle wma, uint8_t vdev_id, return; } - cdf_mc_timer_stop(&req_msg->event_timeout); - cdf_mc_timer_destroy(&req_msg->event_timeout); + qdf_mc_timer_stop(&req_msg->event_timeout); + qdf_mc_timer_destroy(&req_msg->event_timeout); cdf_mem_free(req_msg); } @@ -2706,7 +2706,7 @@ void wma_vdev_resp_timer(void *data) if (NULL == pdev) { WMA_LOGE("%s: Failed to get pdev", __func__); - cdf_mc_timer_stop(&tgt_req->event_timeout); + qdf_mc_timer_stop(&tgt_req->event_timeout); goto free_tgt_req; } @@ -2735,7 +2735,7 @@ void wma_vdev_resp_timer(void *data) if (tgt_req->vdev_id > wma->max_bssid) { WMA_LOGE("%s: Invalid vdev_id %d", __func__, tgt_req->vdev_id); - cdf_mc_timer_stop(&tgt_req->event_timeout); + qdf_mc_timer_stop(&tgt_req->event_timeout); goto free_tgt_req; } @@ -2743,7 +2743,7 @@ void wma_vdev_resp_timer(void *data) if (iface->handle == NULL) { WMA_LOGE("%s vdev id %d is already deleted", __func__, tgt_req->vdev_id); - cdf_mc_timer_stop(&tgt_req->event_timeout); + qdf_mc_timer_stop(&tgt_req->event_timeout); goto free_tgt_req; } if (wma_is_vdev_in_ibss_mode(wma, tgt_req->vdev_id)) @@ -2904,7 +2904,7 @@ error0: wma_ocb_set_config_resp(wma, QDF_STATUS_E_TIMEOUT); } free_tgt_req: - cdf_mc_timer_destroy(&tgt_req->event_timeout); + qdf_mc_timer_destroy(&tgt_req->event_timeout); cdf_mem_free(tgt_req); } @@ -2938,9 +2938,9 @@ struct wma_target_req *wma_fill_vdev_req(tp_wma_handle wma, req->msg_type = msg_type; req->type = type; req->user_data = params; - cdf_mc_timer_init(&req->event_timeout, QDF_TIMER_TYPE_SW, + qdf_mc_timer_init(&req->event_timeout, QDF_TIMER_TYPE_SW, wma_vdev_resp_timer, req); - cdf_mc_timer_start(&req->event_timeout, timeout); + qdf_mc_timer_start(&req->event_timeout, timeout); qdf_spin_lock_bh(&wma->vdev_respq_lock); status = qdf_list_insert_back(&wma->vdev_resp_queue, &req->node); if (QDF_STATUS_SUCCESS != status) { @@ -2972,8 +2972,8 @@ void wma_remove_vdev_req(tp_wma_handle wma, uint8_t vdev_id, if (!req_msg) return; - cdf_mc_timer_stop(&req_msg->event_timeout); - cdf_mc_timer_destroy(&req_msg->event_timeout); + qdf_mc_timer_stop(&req_msg->event_timeout); + qdf_mc_timer_destroy(&req_msg->event_timeout); cdf_mem_free(req_msg); } diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 5b6ad6917c87..66f3696fc1f3 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -1783,7 +1783,7 @@ QDF_STATUS wma_open(void *cds_context, goto err_event_init; } - qdf_status = cdf_mc_timer_init(&wma_handle->service_ready_ext_timer, + qdf_status = qdf_mc_timer_init(&wma_handle->service_ready_ext_timer, QDF_TIMER_TYPE_SW, wma_service_ready_ext_evt_timeout, wma_handle); @@ -2321,7 +2321,7 @@ static int wma_flush_complete_evt_handler(void *handle, } else if (!reason_code && cds_is_log_report_in_progress() == true) { /* Flush event in response to flush command */ WMA_LOGI("Received WMI flush event in response to flush CMD"); - status = cdf_mc_timer_stop(&wma->log_completion_timer); + status = qdf_mc_timer_stop(&wma->log_completion_timer); if (status != QDF_STATUS_SUCCESS) WMA_LOGE("Failed to stop the log completion timeout"); cds_logging_set_fw_flush_complete(); @@ -2765,7 +2765,7 @@ QDF_STATUS wma_start(void *cds_ctx) } /* Initialize log completion timeout */ - qdf_status = cdf_mc_timer_init(&wma_handle->log_completion_timer, + qdf_status = qdf_mc_timer_init(&wma_handle->log_completion_timer, QDF_TIMER_TYPE_SW, wma_log_completion_timeout, wma_handle); @@ -2870,7 +2870,7 @@ QDF_STATUS wma_stop(void *cds_ctx, uint8_t reason) } /* Destroy the timer for log completion */ - qdf_status = cdf_mc_timer_destroy(&wma_handle->log_completion_timer); + qdf_status = qdf_mc_timer_destroy(&wma_handle->log_completion_timer); if (qdf_status != QDF_STATUS_SUCCESS) { WMA_LOGE("Failed to destroy the log completion timer"); } @@ -2935,7 +2935,7 @@ static void wma_cleanup_hold_req(tp_wma_handle wma) req_msg->vdev_id, req_msg->type); return; } - cdf_mc_timer_destroy(&req_msg->event_timeout); + qdf_mc_timer_destroy(&req_msg->event_timeout); cdf_mem_free(req_msg); } qdf_spin_unlock_bh(&wma->wma_hold_req_q_lock); @@ -2970,7 +2970,7 @@ static void wma_cleanup_vdev_resp(tp_wma_handle wma) req_msg->vdev_id, req_msg->type); return; } - cdf_mc_timer_destroy(&req_msg->event_timeout); + qdf_mc_timer_destroy(&req_msg->event_timeout); cdf_mem_free(req_msg); } qdf_spin_unlock_bh(&wma->vdev_respq_lock); @@ -3150,7 +3150,7 @@ QDF_STATUS wma_close(void *cds_ctx) /* close the cdf events */ cdf_event_destroy(&wma_handle->wma_ready_event); - qdf_status = cdf_mc_timer_destroy(&wma_handle->service_ready_ext_timer); + qdf_status = qdf_mc_timer_destroy(&wma_handle->service_ready_ext_timer); if (!CDF_IS_STATUS_SUCCESS(qdf_status)) WMA_LOGP("%s: Failed to destroy service ready ext event timer", __func__); @@ -4048,7 +4048,7 @@ void wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info) /* The saved 'buf' will be freed after sending INIT command or * in other cases as required */ - ret = cdf_mc_timer_start(&wma_handle->service_ready_ext_timer, + ret = qdf_mc_timer_start(&wma_handle->service_ready_ext_timer, WMA_SERVICE_READY_EXT_TIMEOUT); if (!CDF_IS_STATUS_SUCCESS(ret)) WMA_LOGP("Failed to start the service ready ext timer"); @@ -4103,7 +4103,7 @@ void wma_rx_service_ready_ext_event(WMA_HANDLE handle, void *event) __func__, ev->default_conc_scan_config_bits, ev->default_fw_config_bits); - ret = cdf_mc_timer_stop(&wma_handle->service_ready_ext_timer); + ret = qdf_mc_timer_stop(&wma_handle->service_ready_ext_timer); if (!CDF_IS_STATUS_SUCCESS(ret)) { WMA_LOGP("Failed to stop the service ready ext timer"); return; @@ -4681,7 +4681,7 @@ void wma_send_flush_logs_to_fw(tp_wma_handle wma_handle) } WMA_LOGI("Sent WMI_DEBUG_MESG_FLUSH_CMDID to FW"); - status = cdf_mc_timer_start(&wma_handle->log_completion_timer, + status = qdf_mc_timer_start(&wma_handle->log_completion_timer, WMA_LOG_COMPLETION_TIMER); if (status != QDF_STATUS_SUCCESS) WMA_LOGE("Failed to start the log completion timer"); |
