Sfoglia il codice sorgente

qcacld-3.0: Add argument to ol_tx_queue_free for vdev or peer queues

qcacld-2.0 to qcacld-3.0 propagation

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
Poddar, Siddarth 8 anni fa
parent
commit
74178df581
3 ha cambiato i file con 15 aggiunte e 13 eliminazioni
  1. 7 7
      core/dp/txrx/ol_tx_queue.c
  2. 6 4
      core/dp/txrx/ol_tx_queue.h
  3. 2 2
      core/dp/txrx/ol_txrx.c

+ 7 - 7
core/dp/txrx/ol_tx_queue.c

@@ -80,7 +80,7 @@ ol_tx_queue_vdev_flush(struct ol_txrx_pdev_t *pdev, struct ol_txrx_vdev_t *vdev)
 	/* flush VDEV TX queues */
 	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);
 	}
 	/* flush PEER TX queues */
 	do {
@@ -109,7 +109,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,
 				   "%s: Delete Peer %p\n", __func__, peer);
@@ -316,7 +316,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;
@@ -339,9 +339,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);
@@ -1503,7 +1503,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;
@@ -1516,7 +1516,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;
 

+ 6 - 4
core/dp/txrx/ol_tx_queue.h

@@ -76,6 +76,7 @@ ol_tx_queue_log_dequeue(struct ol_txrx_pdev_t *pdev,
  * @tid: tid value
  * @frms: number of frames for which logs need to be freed
  * @bytes: number of bytes
+ * @is_peer_txq - peer queue or not
  *
  *
  * Return: None
@@ -83,7 +84,7 @@ ol_tx_queue_log_dequeue(struct ol_txrx_pdev_t *pdev,
 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);
 
 #else
 
@@ -105,7 +106,7 @@ ol_tx_queue_log_dequeue(struct ol_txrx_pdev_t *pdev,
 static inline 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)
 {
 	return;
 }
@@ -171,12 +172,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
@@ -224,7 +226,7 @@ static inline 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)
 {
 	return;
 }

+ 2 - 2
core/dp/txrx/ol_txrx.c

@@ -848,7 +848,7 @@ ol_txrx_vdev_tx_queue_free(struct ol_txrx_vdev_t *vdev)
 
 	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);
 	}
 }
 
@@ -902,7 +902,7 @@ ol_txrx_peer_tx_queue_free(struct ol_txrx_pdev_t *pdev,
 
 	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);
 	}
 }
 #else