qcacld-3.0: Add QDF timer API's

Replace CDF timer API's with QDF timer API's

Change-Id: I43aa23676ed893a7309135dec6a8b897b113f00e
CRs-Fixed: 981188
This commit is contained in:
Anurag Chouhan 2016-02-19 17:00:08 +05:30 • committed by Gerrit - the friendly Code Review server
commit 754fbd8d95
14 changed files with 54 additions and 323 deletions

View file

@ -1,118 +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.
*/
/**
* DOC: cdf_softirq_timer
* This file abstracts OS timers running in soft IRQ context.
*/
#ifndef _CDF_SOFTIRQ_TIMER_H
#define _CDF_SOFTIRQ_TIMER_H
#include <cdf_types.h>
#include <i_cdf_softirq_timer.h>
/* Platform timer object */
typedef __cdf_softirq_timer_t cdf_softirq_timer_t;
/**
* cdf_softirq_timer_init() - initialize a softirq timer
* @hdl: OS handle
* @timer: Timer object pointer
* @func: Timer function
* @arg: Arguement of timer function
* @type: deferrable or non deferrable timer type
*
* Timer type CDF_TIMER_TYPE_SW means its a deferrable sw timer which will
* not cause CPU wake upon expiry
* Timer type CDF_TIMER_TYPE_WAKE_APPS means its a non-deferrable timer which
* will cause CPU wake up on expiry
*
* Return: none
*/
static inline void
cdf_softirq_timer_init(cdf_handle_t hdl,
cdf_softirq_timer_t *timer,
cdf_softirq_timer_func_t func, void *arg,
CDF_TIMER_TYPE type)
{
__cdf_softirq_timer_init(hdl, timer, func, arg, type);
}
/**
* cdf_softirq_timer_start() - start a one-shot softirq timer
* @timer: Timer object pointer
* @msec: Expiration period in milliseconds
*
* Return: none
*/
static inline void
cdf_softirq_timer_start(cdf_softirq_timer_t *timer, int msec)
{
__cdf_softirq_timer_start(timer, msec);
}
/**
* cdf_softirq_timer_mod() - modify existing timer to new timeout value
* @timer: Timer object pointer
* @msec: Expiration period in milliseconds
*
* Return: none
*/
static inline void cdf_softirq_timer_mod(cdf_softirq_timer_t *timer, int msec)
{
__cdf_softirq_timer_mod(timer, msec);
}
/**
* cdf_softirq_timer_cancel() - cancel cdf softirq timer
* @timer: Timer object pointer
* @retval: Timer was cancelled and deactived
* @retval: Timer was cancelled but already got fired.
*
* The function will return after any running timer completes.
*
* Return: none
*/
static inline bool cdf_softirq_timer_cancel(cdf_softirq_timer_t *timer)
{
return __cdf_softirq_timer_cancel(timer);
}
/**
* cdf_softirq_timer_free() - free cdf softirq timer
* @timer: Timer object pointer
*
* The function will return after any running timer completes.
* Return: none
*/
static inline void cdf_softirq_timer_free(cdf_softirq_timer_t *timer)
{
__cdf_softirq_timer_free(timer);
}
#endif

View file

@ -32,7 +32,7 @@
#include <cdf_memory.h>
#include <cdf_lock.h>
#include <qdf_time.h>
#include <cdf_softirq_timer.h>
#include <qdf_timer.h>
#include <qdf_defer.h>
#include <cdf_nbuf.h>
#include <cds_if_upperproto.h>
@ -282,13 +282,13 @@ static INLINE unsigned char *os_malloc(osdev_t pNicDev,
(_arg) = (_type)(timer_arg)
#define OS_INIT_TIMER(_osdev, _timer, _fn, _ctx, type) \
cdf_softirq_timer_init(_osdev, _timer, _fn, _ctx, type)
qdf_timer_init(_osdev, _timer, _fn, _ctx, type)
#define OS_SET_TIMER(_timer, _ms) cdf_softirq_timer_mod(_timer, _ms)
#define OS_SET_TIMER(_timer, _ms) qdf_timer_mod(_timer, _ms)
#define OS_CANCEL_TIMER(_timer) cdf_softirq_timer_cancel(_timer)
#define OS_CANCEL_TIMER(_timer) qdf_timer_stop(_timer)
#define OS_FREE_TIMER(_timer) cdf_softirq_timer_cancel(_timer)
#define OS_FREE_TIMER(_timer) qdf_timer_stop(_timer)
/*
* These are required for network manager support

View file

@ -1,152 +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.
*/
#ifndef _I_CDF_SOFTIRQ_TIMER_H
#define _I_CDF_SOFTIRQ_TIMER_H
#include <linux/version.h>
#include <linux/delay.h>
#include <linux/timer.h>
#include <linux/jiffies.h>
#include <cdf_types.h>
/* timer data type */
typedef struct timer_list __cdf_softirq_timer_t;
/* ugly - but every other OS takes, sanely, a void */
typedef void (*cdf_dummy_timer_func_t)(unsigned long arg);
/**
* __cdf_softirq_timer_init() - initialize a softirq timer
* @hdl: OS handle
* @timer: Pointer to timer object
* @func: Function pointer
* @arg: Arguement
* @type: deferrable or non deferrable timer type
*
* Timer type CDF_TIMER_TYPE_SW means its a deferrable sw timer which will
* not cause CPU wake upon expiry
* Timer type CDF_TIMER_TYPE_WAKE_APPS means its a non-deferrable timer which
* will cause CPU wake up on expiry
*
* Return: none
*/
static inline QDF_STATUS
__cdf_softirq_timer_init(cdf_handle_t hdl,
struct timer_list *timer,
cdf_softirq_timer_func_t func, void *arg,
CDF_TIMER_TYPE type)
{
if (CDF_TIMER_TYPE_SW == type)
init_timer_deferrable(timer);
else
init_timer(timer);
timer->function = (cdf_dummy_timer_func_t) func;
timer->data = (unsigned long)arg;
return QDF_STATUS_SUCCESS;
}
/**
* __cdf_softirq_timer_start() - start a cdf softirq timer
* @timer: Pointer to timer object
* @delay: Delay in milli seconds
*
* Return: none
*/
static inline QDF_STATUS
__cdf_softirq_timer_start(struct timer_list *timer, uint32_t delay)
{
timer->expires = jiffies + msecs_to_jiffies(delay);
add_timer(timer);
return QDF_STATUS_SUCCESS;
}
/**
* __cdf_softirq_timer_mod() - modify a timer
* @timer: Pointer to timer object
* @delay: Delay in milli seconds
*
* Return: none
*/
static inline QDF_STATUS
__cdf_softirq_timer_mod(struct timer_list *timer, uint32_t delay)
{
mod_timer(timer, jiffies + msecs_to_jiffies(delay));
return QDF_STATUS_SUCCESS;
}
/**
* __cdf_softirq_timer_cancel() - cancel a timer
* @timer: Pointer to timer object
*
* Return: true if timer was cancelled and deactived,
* false if timer was cancelled but already got fired.
*/
static inline bool __cdf_softirq_timer_cancel(struct timer_list *timer)
{
if (likely(del_timer(timer)))
return 1;
else
return 0;
}
/**
* __cdf_softirq_timer_free() - free a cdf timer
* @timer: Pointer to timer object
*
* Return: true if timer was cancelled and deactived,
* false if timer was cancelled but already got fired.
*/
static inline void __cdf_softirq_timer_free(struct timer_list *timer)
{
del_timer_sync(timer);
}
/**
* __cdf_sostirq_timer_sync_cancel() - Synchronously canel a timer
* @timer: Pointer to timer object
*
* Synchronization Rules:
* 1. caller must make sure timer function will not use
* cdf_softirq_set_timer to add iteself again.
* 2. caller must not hold any lock that timer function
* is likely to hold as well.
* 3. It can't be called from interrupt context.
*
* Return: true if timer was cancelled and deactived,
* false if timer was cancelled but already got fired.
*/
static inline bool __cdf_sostirq_timer_sync_cancel(struct timer_list *timer)
{
return del_timer_sync(timer);
}
#endif /*_ADF_OS_TIMER_PVT_H*/

View file

@ -42,7 +42,7 @@
#include <cdf_memory.h> /* cdf_mem_malloc,free, etc. */
#include <cdf_types.h> /* cdf_print, bool */
#include <cdf_nbuf.h> /* cdf_nbuf_t, etc. */
#include <cdf_softirq_timer.h> /* cdf_softirq_timer_free */
#include <qdf_timer.h> /* qdf_timer_free */
#include <htt.h> /* HTT_HL_RX_DESC_SIZE */
#include <ol_cfg.h>
@ -237,7 +237,7 @@ void htt_rx_ring_fill_n(struct htt_pdev_t *pdev, int num)
cdf_nbuf_alloc(pdev->osdev, HTT_RX_BUF_SIZE,
0, 4, false);
if (!rx_netbuf) {
cdf_softirq_timer_cancel(&pdev->rx_ring.
qdf_timer_stop(&pdev->rx_ring.
refill_retry_timer);
/*
* Failed to fill it to the desired level -
@ -248,7 +248,7 @@ void htt_rx_ring_fill_n(struct htt_pdev_t *pdev, int num)
#ifdef DEBUG_DMA_DONE
pdev->rx_ring.dbg_refill_cnt++;
#endif
cdf_softirq_timer_start(
qdf_timer_start(
&pdev->rx_ring.refill_retry_timer,
HTT_RX_RING_REFILL_RETRY_TIME_MS);
goto fail;
@ -342,8 +342,8 @@ unsigned int htt_rx_in_order_ring_elems(struct htt_pdev_t *pdev)
void htt_rx_detach(struct htt_pdev_t *pdev)
{
cdf_softirq_timer_cancel(&pdev->rx_ring.refill_retry_timer);
cdf_softirq_timer_free(&pdev->rx_ring.refill_retry_timer);
qdf_timer_stop(&pdev->rx_ring.refill_retry_timer);
qdf_timer_free(&pdev->rx_ring.refill_retry_timer);
if (pdev->cfg.is_full_reorder_offload) {
cdf_os_mem_free_consistent(pdev->osdev,
@ -2208,7 +2208,7 @@ int htt_rx_attach(struct htt_pdev_t *pdev)
qdf_atomic_inc(&pdev->rx_ring.refill_ref_cnt);
/* Initialize the Rx refill retry timer */
cdf_softirq_timer_init(pdev->osdev,
qdf_timer_init(pdev->osdev,
&pdev->rx_ring.refill_retry_timer,
htt_rx_ring_refill_retry, (void *)pdev,
CDF_TIMER_TYPE_SW);

View file

@ -31,7 +31,7 @@
#include <osdep.h> /* uint16_t, dma_addr_t */
#include <cdf_types.h> /* cdf_device_t */
#include <cdf_lock.h> /* cdf_spinlock_t */
#include <cdf_softirq_timer.h> /* cdf_softirq_timer_t */
#include <qdf_timer.h> /* qdf_timer_t */
#include <qdf_atomic.h> /* qdf_atomic_inc */
#include <cdf_nbuf.h> /* cdf_nbuf_t */
#include <htc_api.h> /* HTC_PACKET */
@ -324,7 +324,7 @@ struct htt_pdev_t {
* refill_retry_timer - timer triggered when the ring is not
* refilled to the level expected
*/
cdf_softirq_timer_t refill_retry_timer;
qdf_timer_t refill_retry_timer;
/*
* refill_ref_cnt - ref cnt for Rx buffer replenishment - this

View file

@ -28,7 +28,7 @@
/*=== header file includes ===*/
/* generic utilities */
#include <cdf_nbuf.h> /* cdf_nbuf_t, etc. */
#include <cdf_softirq_timer.h>
#include <qdf_timer.h>
#include <qdf_time.h>
/* datapath internal interfaces */
@ -68,7 +68,7 @@ ol_rx_reorder_timeout_start(struct ol_tx_reorder_cat_timeout_t
list_elem = TAILQ_FIRST(&rx_reorder_timeout_ac->virtual_timer_list);
duration_ms = list_elem->timestamp_ms - time_now_ms;
cdf_softirq_timer_start(&rx_reorder_timeout_ac->timer, duration_ms);
qdf_timer_start(&rx_reorder_timeout_ac->timer, duration_ms);
}
static inline void
@ -178,7 +178,7 @@ void ol_rx_reorder_timeout_init(struct ol_txrx_pdev_t *pdev)
rx_reorder_timeout_ac =
&pdev->rx.reorder_timeout.access_cats[i];
/* init the per-AC timers */
cdf_softirq_timer_init(pdev->osdev,
qdf_timer_init(pdev->osdev,
&rx_reorder_timeout_ac->timer,
ol_rx_reorder_timeout,
rx_reorder_timeout_ac);
@ -211,8 +211,8 @@ void ol_rx_reorder_timeout_cleanup(struct ol_txrx_pdev_t *pdev)
struct ol_tx_reorder_cat_timeout_t *rx_reorder_timeout_ac;
rx_reorder_timeout_ac =
&pdev->rx.reorder_timeout.access_cats[i];
cdf_softirq_timer_cancel(&rx_reorder_timeout_ac->timer);
cdf_softirq_timer_free(&rx_reorder_timeout_ac->timer);
qdf_timer_stop(&rx_reorder_timeout_ac->timer);
qdf_timer_free(&rx_reorder_timeout_ac->timer);
}
}

View file

@ -806,8 +806,8 @@ static void ol_tx_vdev_ll_pause_queue_send_base(struct ol_txrx_vdev_t *vdev)
}
}
if (vdev->ll_pause.txq.depth) {
cdf_softirq_timer_cancel(&vdev->ll_pause.timer);
cdf_softirq_timer_start(&vdev->ll_pause.timer,
qdf_timer_stop(&vdev->ll_pause.timer);
qdf_timer_start(&vdev->ll_pause.timer,
OL_TX_VDEV_PAUSE_QUEUE_SEND_PERIOD_MS);
vdev->ll_pause.is_q_timer_on = true;
if (vdev->ll_pause.txq.depth >= vdev->ll_pause.max_q_depth)
@ -846,8 +846,8 @@ ol_tx_vdev_pause_queue_append(struct ol_txrx_vdev_t *vdev,
cdf_nbuf_set_next(vdev->ll_pause.txq.tail, NULL);
if (start_timer) {
cdf_softirq_timer_cancel(&vdev->ll_pause.timer);
cdf_softirq_timer_start(&vdev->ll_pause.timer,
qdf_timer_stop(&vdev->ll_pause.timer);
qdf_timer_start(&vdev->ll_pause.timer,
OL_TX_VDEV_PAUSE_QUEUE_SEND_PERIOD_MS);
vdev->ll_pause.is_q_timer_on = true;
}
@ -995,8 +995,8 @@ void ol_tx_pdev_ll_pause_queue_send_all(struct ol_txrx_pdev_t *pdev)
TAILQ_FOREACH(vdev, &pdev->vdev_list, vdev_list_elem) {
cdf_spin_lock_bh(&vdev->ll_pause.mutex);
if (vdev->ll_pause.txq.depth) {
cdf_softirq_timer_cancel(&pdev->tx_throttle.tx_timer);
cdf_softirq_timer_start(
qdf_timer_stop(&pdev->tx_throttle.tx_timer);
qdf_timer_start(
&pdev->tx_throttle.tx_timer,
OL_TX_VDEV_PAUSE_QUEUE_SEND_PERIOD_MS);
cdf_spin_unlock_bh(&vdev->ll_pause.mutex);

View file

@ -88,7 +88,7 @@ void ol_txrx_vdev_unpause(ol_txrx_vdev_handle vdev, uint32_t reason)
void ol_txrx_vdev_flush(ol_txrx_vdev_handle vdev)
{
cdf_spin_lock_bh(&vdev->ll_pause.mutex);
cdf_softirq_timer_cancel(&vdev->ll_pause.timer);
qdf_timer_stop(&vdev->ll_pause.timer);
vdev->ll_pause.is_q_timer_on = false;
while (vdev->ll_pause.txq.head) {
cdf_nbuf_t next =
@ -310,7 +310,7 @@ void ol_tx_pdev_throttle_phase_timer(void *context)
THROTTLE_LEVEL_0) {
TXRX_PRINT(TXRX_PRINT_LEVEL_WARN,
"start timer %d ms\n", ms);
cdf_softirq_timer_start(&pdev->tx_throttle.
qdf_timer_start(&pdev->tx_throttle.
phase_timer, ms);
}
} else {
@ -325,7 +325,7 @@ void ol_tx_pdev_throttle_phase_timer(void *context)
THROTTLE_LEVEL_0) {
TXRX_PRINT(TXRX_PRINT_LEVEL_WARN, "start timer %d ms\n",
ms);
cdf_softirq_timer_start(&pdev->tx_throttle.phase_timer,
qdf_timer_start(&pdev->tx_throttle.phase_timer,
ms);
}
}
@ -363,10 +363,10 @@ void ol_tx_throttle_set_level(struct ol_txrx_pdev_t *pdev, int level)
ms = pdev->tx_throttle.
throttle_time_ms[level][THROTTLE_PHASE_OFF];
cdf_softirq_timer_cancel(&pdev->tx_throttle.phase_timer);
qdf_timer_stop(&pdev->tx_throttle.phase_timer);
if (level != THROTTLE_LEVEL_0)
cdf_softirq_timer_start(&pdev->tx_throttle.phase_timer, ms);
qdf_timer_start(&pdev->tx_throttle.phase_timer, ms);
}
/* This table stores the duty cycle for each level.
@ -411,13 +411,13 @@ void ol_tx_throttle_init(struct ol_txrx_pdev_t *pdev)
ol_tx_throttle_init_period(pdev, throttle_period);
cdf_softirq_timer_init(pdev->osdev,
qdf_timer_init(pdev->osdev,
&pdev->tx_throttle.phase_timer,
ol_tx_pdev_throttle_phase_timer, pdev,
CDF_TIMER_TYPE_SW);
#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
cdf_softirq_timer_init(pdev->osdev,
qdf_timer_init(pdev->osdev,
&pdev->tx_throttle.tx_timer,
ol_tx_pdev_throttle_tx_timer, pdev,
CDF_TIMER_TYPE_SW);

View file

@ -979,11 +979,11 @@ void ol_txrx_pdev_detach(ol_txrx_pdev_handle pdev, int force)
OL_RX_REORDER_TIMEOUT_CLEANUP(pdev);
#ifdef QCA_SUPPORT_TX_THROTTLE
/* Thermal Mitigation */
cdf_softirq_timer_cancel(&pdev->tx_throttle.phase_timer);
cdf_softirq_timer_free(&pdev->tx_throttle.phase_timer);
qdf_timer_stop(&pdev->tx_throttle.phase_timer);
qdf_timer_free(&pdev->tx_throttle.phase_timer);
#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
cdf_softirq_timer_cancel(&pdev->tx_throttle.tx_timer);
cdf_softirq_timer_free(&pdev->tx_throttle.tx_timer);
qdf_timer_stop(&pdev->tx_throttle.tx_timer);
qdf_timer_free(&pdev->tx_throttle.tx_timer);
#endif
#endif
ol_tso_seg_list_deinit(pdev);
@ -1108,7 +1108,7 @@ ol_txrx_vdev_attach(ol_txrx_pdev_handle pdev,
vdev->ll_pause.paused_reason = 0;
vdev->ll_pause.txq.head = vdev->ll_pause.txq.tail = NULL;
vdev->ll_pause.txq.depth = 0;
cdf_softirq_timer_init(pdev->osdev,
qdf_timer_init(pdev->osdev,
&vdev->ll_pause.timer,
ol_tx_vdev_ll_pause_queue_send, vdev,
CDF_TIMER_TYPE_SW);
@ -1186,8 +1186,8 @@ ol_txrx_vdev_detach(ol_txrx_vdev_handle vdev,
TXRX_ASSERT2(vdev);
cdf_spin_lock_bh(&vdev->ll_pause.mutex);
cdf_softirq_timer_cancel(&vdev->ll_pause.timer);
cdf_softirq_timer_free(&vdev->ll_pause.timer);
qdf_timer_stop(&vdev->ll_pause.timer);
qdf_timer_free(&vdev->ll_pause.timer);
vdev->ll_pause.is_q_timer_on = false;
while (vdev->ll_pause.txq.head) {
cdf_nbuf_t next = cdf_nbuf_next(vdev->ll_pause.txq.head);

View file

@ -39,7 +39,7 @@
#include <htt.h> /* htt_sec_type, htt_pkt_type, etc. */
#include <qdf_atomic.h> /* qdf_atomic_t */
#include <wdi_event_api.h> /* wdi_event_subscribe */
#include <cdf_softirq_timer.h> /* cdf_softirq_timer_t */
#include <qdf_timer.h> /* qdf_timer_t */
#include <cdf_lock.h> /* cdf_spinlock */
#include <pktlog.h> /* ol_pktlog_dev_handle */
#include <ol_txrx_stats.h>
@ -202,7 +202,7 @@ struct ol_rx_reorder_timeout_list_elem_t {
struct ol_tx_reorder_cat_timeout_t {
TAILQ_HEAD(, ol_rx_reorder_timeout_list_elem_t) virtual_timer_list;
cdf_softirq_timer_t timer;
qdf_timer_t timer;
uint32_t duration_ms;
struct ol_txrx_pdev_t *pdev;
};
@ -729,9 +729,9 @@ struct ol_txrx_pdev_t {
cdf_spinlock_t mutex;
/* timer used to monitor the throttle "on" phase and
"off" phase */
cdf_softirq_timer_t phase_timer;
qdf_timer_t phase_timer;
/* timer used to send tx frames */
cdf_softirq_timer_t tx_timer;
qdf_timer_t tx_timer;
/* This is the time in ms of the throttling window, it will
* include an "on" phase and an "off" phase */
uint32_t throttle_period_ms;
@ -833,7 +833,7 @@ struct ol_txrx_vdev_t {
} txq;
uint32_t paused_reason;
cdf_spinlock_t mutex;
cdf_softirq_timer_t timer;
qdf_timer_t timer;
int max_q_depth;
bool is_q_paused;
bool is_q_timer_on;

View file

@ -54,7 +54,7 @@
#include <cdf_lock.h> /* cdf_spinlock */
#include <cds_queue.h> /* TAILQ */
#include <qdf_time.h>
#include <cdf_softirq_timer.h>
#include <qdf_timer.h>
#include <cdf_memory.h>
#include <osdep.h>
/*DFS Utility Include END*/

View file

@ -143,7 +143,7 @@ typedef struct epping_adapter_s {
/* for mboxping */
cdf_spinlock_t data_lock;
cdf_nbuf_queue_t nodrop_queue;
cdf_softirq_timer_t epping_timer;
qdf_timer_t epping_timer;
epping_tx_timer_state_t epping_timer_state;
bool registered;
bool started;

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@ -53,7 +53,7 @@
#define TX_RETRY_TIMEOUT_IN_MS 1
static bool enb_tx_dump = 0;
static bool enb_tx_dump;
void epping_tx_dup_pkt(epping_adapter_t *pAdapter,
HTC_ENDPOINT_ID eid, cdf_nbuf_t skb)
@ -204,7 +204,7 @@ void epping_tx_timer_expire(epping_adapter_t *pAdapter)
/* if nodrop queue is not empty, continue to arm timer */
if (pAdapter->epping_timer_state != EPPING_TX_TIMER_RUNNING) {
pAdapter->epping_timer_state = EPPING_TX_TIMER_RUNNING;
cdf_softirq_timer_mod(&pAdapter->epping_timer,
qdf_timer_mod(&pAdapter->epping_timer,
TX_RETRY_TIMEOUT_IN_MS);
}
cdf_spin_unlock_bh(&pAdapter->data_lock);
@ -291,7 +291,7 @@ tx_fail:
cdf_spin_lock_bh(&pAdapter->data_lock);
if (pAdapter->epping_timer_state != EPPING_TX_TIMER_RUNNING) {
pAdapter->epping_timer_state = EPPING_TX_TIMER_RUNNING;
cdf_softirq_timer_mod(&pAdapter->epping_timer,
qdf_timer_mod(&pAdapter->epping_timer,
TX_RETRY_TIMEOUT_IN_MS);
}
cdf_spin_unlock_bh(&pAdapter->data_lock);

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@ -267,7 +267,8 @@ static int epping_register_adapter(epping_adapter_t *pAdapter)
{
int ret = 0;
if ((ret = register_netdev(pAdapter->dev)) != 0) {
ret = register_netdev(pAdapter->dev);
if (ret != 0) {
EPPING_LOG(CDF_TRACE_LEVEL_FATAL,
"%s: unable to register device\n",
pAdapter->dev->name);
@ -308,7 +309,7 @@ void epping_destroy_adapter(epping_adapter_t *pAdapter)
epping_unregister_adapter(pAdapter);
cdf_spinlock_destroy(&pAdapter->data_lock);
cdf_softirq_timer_free(&pAdapter->epping_timer);
qdf_timer_free(&pAdapter->epping_timer);
pAdapter->epping_timer_state = EPPING_TX_TIMER_STOPPED;
while (cdf_nbuf_queue_len(&pAdapter->nodrop_queue)) {
@ -369,7 +370,7 @@ epping_adapter_t *epping_add_adapter(epping_context_t *pEpping_ctx,
cdf_spinlock_init(&pAdapter->data_lock);
cdf_nbuf_queue_init(&pAdapter->nodrop_queue);
pAdapter->epping_timer_state = EPPING_TX_TIMER_STOPPED;
cdf_softirq_timer_init(epping_get_cdf_ctx(), &pAdapter->epping_timer,
qdf_timer_init(epping_get_cdf_ctx(), &pAdapter->epping_timer,
epping_timer_expire, dev, CDF_TIMER_TYPE_SW);
dev->type = ARPHRD_IEEE80211;
dev->netdev_ops = &epping_drv_ops;