summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoddar, Siddarth <siddpodd@qti.qualcomm.com>2016-06-06 12:55:24 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-06-09 14:42:28 +0530
commit5da3ac63aca9eaaac4be1dbcab34823c11ee480d (patch)
treeccd3192f321618b2eb1f76bc32c02347b8758305
parent3be63be3d0c9c8ba32200f2c416d054d28e93a52 (diff)
qcacld-2.0: Add argument to ol_tx_queue_free for vdev or peer queues
Add additional argument in ol_tx_queue_free to indicate whether txq is vdev or peer queues to avoid extracting peer_id in case of vdev txq queue in ol_tx_queue_log_free function. Change-Id: Ic521c23b4001f15a382e9435413cdafca0c8b49f CRs-Fixed: 1023457
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_tx_queue.c24
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_tx_queue.h7
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_txrx.c6
3 files changed, 20 insertions, 17 deletions
diff --git a/CORE/CLD_TXRX/TXRX/ol_tx_queue.c b/CORE/CLD_TXRX/TXRX/ol_tx_queue.c
index 965380909287..23bc63c5782e 100644
--- a/CORE/CLD_TXRX/TXRX/ol_tx_queue.c
+++ b/CORE/CLD_TXRX/TXRX/ol_tx_queue.c
@@ -69,7 +69,7 @@ void
ol_tx_queue_log_free(
struct ol_txrx_pdev_t *pdev,
struct ol_tx_frms_queue_t *txq,
- int tid, int frms, int bytes);
+ int tid, int frms, int bytes, bool is_peer_txq);
#define OL_TX_QUEUE_LOG_ENQUEUE ol_tx_queue_log_enqueue
#define OL_TX_QUEUE_LOG_DEQUEUE ol_tx_queue_log_dequeue
#define OL_TX_QUEUE_LOG_FREE ol_tx_queue_log_free
@@ -78,7 +78,8 @@ ol_tx_queue_log_free(
#define OL_TX_QUEUE_LOG_ENQUEUE(pdev, msdu_info, frms, bytes) /* no-op */
#define OL_TX_QUEUE_LOG_DEQUEUE(pdev, txq, frms, bytes) /* no-op */
-#define OL_TX_QUEUE_LOG_FREE(pdev, txq, tid, frms, bytes) /* no-op */
+/* no-op */
+#define OL_TX_QUEUE_LOG_FREE(pdev, txq, tid, frms, bytes, is_peer_txq)
#endif /* TXRX_DEBUG_LEVEL > 5 */
@@ -118,11 +119,12 @@ ol_tx_queue_vdev_flush(struct ol_txrx_pdev_t *pdev, struct ol_txrx_vdev_t *vdev)
* into scheduler, so use same tid when we flush them
*/
if (i == OL_TX_VDEV_MCAST_BCAST)
- ol_tx_queue_free(pdev, txq, HTT_TX_EXT_TID_NON_QOS_MCAST_BCAST);
+ ol_tx_queue_free(pdev, txq, HTT_TX_EXT_TID_NON_QOS_MCAST_BCAST,
+ false);
else if (i == OL_TX_VDEV_DEFAULT_MGMT)
- ol_tx_queue_free(pdev, txq, HTT_TX_EXT_TID_MGMT);
+ ol_tx_queue_free(pdev, txq, HTT_TX_EXT_TID_MGMT, false);
else
- ol_tx_queue_free(pdev, txq, (i + OL_TX_NUM_TIDS));
+ ol_tx_queue_free(pdev, txq, (i + OL_TX_NUM_TIDS), false);
}
/* flush PEER TX queues */
do {
@@ -148,7 +150,7 @@ ol_tx_queue_vdev_flush(struct ol_txrx_pdev_t *pdev, struct ol_txrx_vdev_t *vdev)
for (j = 0; j < OL_TX_NUM_TIDS; j++) {
txq = &peers[i]->txqs[j];
if (txq->frms) {
- ol_tx_queue_free(pdev, txq, j);
+ ol_tx_queue_free(pdev, txq, j, true);
}
}
TXRX_PRINT(TXRX_PRINT_LEVEL_ERR,
@@ -330,7 +332,7 @@ void
ol_tx_queue_free(
struct ol_txrx_pdev_t *pdev,
struct ol_tx_frms_queue_t *txq,
- int tid)
+ int tid, bool is_peer_txq)
{
int frms = 0, bytes = 0;
struct ol_tx_desc_t *tx_desc;
@@ -353,9 +355,9 @@ ol_tx_queue_free(
txq->frms--;
tx_desc = TAILQ_NEXT(tx_desc, tx_desc_list_elem);
}
- OL_TX_QUEUE_LOG_FREE(pdev, txq, tid, frms, bytes);
+ OL_TX_QUEUE_LOG_FREE(pdev, txq, tid, frms, bytes, is_peer_txq);
txq->bytes -= bytes;
- OL_TX_QUEUE_LOG_FREE(pdev, txq, tid, frms, bytes);
+ OL_TX_QUEUE_LOG_FREE(pdev, txq, tid, frms, bytes, is_peer_txq);
txq->flag = ol_tx_queue_empty;
/* txq->head gets reset during the TAILQ_CONCAT call */
TAILQ_CONCAT(&tx_tmp_list, &txq->head, tx_desc_list_elem);
@@ -1738,7 +1740,7 @@ void
ol_tx_queue_log_free(
struct ol_txrx_pdev_t *pdev,
struct ol_tx_frms_queue_t *txq,
- int tid, int frms, int bytes)
+ int tid, int frms, int bytes, bool is_peer_txq)
{
u_int16_t peer_id;
struct ol_tx_log_queue_add_t *log_elem;
@@ -1750,7 +1752,7 @@ ol_tx_queue_log_free(
return;
}
- if (tid < OL_TX_NUM_TIDS) {
+ if ((tid < OL_TX_NUM_TIDS) && is_peer_txq) {
struct ol_txrx_peer_t *peer;
struct ol_tx_frms_queue_t *txq_base;
diff --git a/CORE/CLD_TXRX/TXRX/ol_tx_queue.h b/CORE/CLD_TXRX/TXRX/ol_tx_queue.h
index 4b6500403322..19d3001f0bc7 100644
--- a/CORE/CLD_TXRX/TXRX/ol_tx_queue.h
+++ b/CORE/CLD_TXRX/TXRX/ol_tx_queue.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -95,12 +95,13 @@ ol_tx_dequeue(
* @param pdev - the physical device object, which stores the txqs
* @param txq - which tx queue to free frames from
* @param tid - the extended TID that the queue belongs to
+ * @param is_peer_txq - peer queue or not
*/
void
ol_tx_queue_free(
struct ol_txrx_pdev_t *pdev,
struct ol_tx_frms_queue_t *txq,
- int tid);
+ int tid, bool is_peer_txq);
/**
* @brief - discard pending tx frames from the tx queue
@@ -124,7 +125,7 @@ ol_tx_queue_discard(
#define ol_tx_enqueue(pdev, txq, tx_desc, tx_msdu_info) /* no-op */
#define ol_tx_dequeue(pdev, ext_tid, txq, head, num_frames, credit, bytes) 0
-#define ol_tx_queue_free(pdev, txq, tid) /* no-op */
+#define ol_tx_queue_free(pdev, txq, tid, is_peer_txq) /* no-op */
#define ol_tx_queue_discard(pdev, flush, tx_descs) /* no-op */
#endif /* defined(CONFIG_HL_SUPPORT) */
diff --git a/CORE/CLD_TXRX/TXRX/ol_txrx.c b/CORE/CLD_TXRX/TXRX/ol_txrx.c
index f61d6ed5b87e..7add94714be6 100644
--- a/CORE/CLD_TXRX/TXRX/ol_txrx.c
+++ b/CORE/CLD_TXRX/TXRX/ol_txrx.c
@@ -1204,10 +1204,10 @@ ol_txrx_vdev_detach(
for (i = 0; i < OL_TX_VDEV_NUM_QUEUES; i++) {
txq = &vdev->txqs[i];
- ol_tx_queue_free(pdev, txq, (i + OL_TX_NUM_TIDS));
+ ol_tx_queue_free(pdev, txq, (i + OL_TX_NUM_TIDS), false);
}
}
- #endif /* defined(CONFIG_HL_SUPPORT) */
+#endif /* defined(CONFIG_HL_SUPPORT) */
adf_os_spin_lock_bh(&vdev->ll_pause.mutex);
adf_os_timer_cancel(&vdev->ll_pause.timer);
@@ -1772,7 +1772,7 @@ ol_txrx_peer_unref_delete(ol_txrx_peer_handle peer)
for (i = 0; i < OL_TX_NUM_TIDS; i++) {
txq = &peer->txqs[i];
- ol_tx_queue_free(pdev, txq, i);
+ ol_tx_queue_free(pdev, txq, i, true);
}
}
#endif /* defined(CONFIG_HL_SUPPORT) */