Sfoglia il codice sorgente

qcacld-3.0: Add TX packet trace info for debugging for module QCA6574

Add TX packet trace for module qca6574 to get more info for debugging

Change-Id: I226eb904d9a86a86f7ee4403da97445242b13909
CRs-Fixed: 3405782
Tiger Yu 2 anni fa
parent
commit
33aef11cd3

+ 12 - 0
core/dp/txrx/ol_tx.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -231,6 +232,17 @@ ol_tx_non_std(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
 }
 #endif
 
+/**
+ * ol_tx_trace_pkt() - Trace TX packet at OL layer
+ *
+ * @skb: skb to be traced
+ * @msdu_id: msdu_id of the packet
+ * @vdev_id: vdev_id of the packet
+ *
+ * Return: None
+ */
+void ol_tx_trace_pkt(qdf_nbuf_t skb, uint16_t msdu_id, uint8_t vdev_id);
+
 void ol_txrx_mgmt_tx_complete(void *ctxt, qdf_nbuf_t netbuf, int err);
 
 /**

+ 17 - 1
core/dp/txrx/ol_tx_ll.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -187,6 +187,22 @@ ol_tx_non_std_ll(struct ol_txrx_vdev_t *vdev,
 	return NULL;            /* all MSDUs were accepted */
 }
 
+void ol_tx_trace_pkt(qdf_nbuf_t skb, uint16_t msdu_id, uint8_t vdev_id)
+{
+	DPTRACE(qdf_dp_trace_ptr(skb,
+				 QDF_DP_TRACE_TXRX_FAST_PACKET_PTR_RECORD,
+				 QDF_TRACE_DEFAULT_PDEV_ID,
+				 qdf_nbuf_data_addr(skb),
+				 sizeof(qdf_nbuf_data(skb)),
+				 msdu_id, vdev_id, 0));
+
+	qdf_dp_trace_log_pkt(vdev_id, skb, QDF_TX, QDF_TRACE_DEFAULT_PDEV_ID);
+
+	DPTRACE(qdf_dp_trace_data_pkt(skb, QDF_TRACE_DEFAULT_PDEV_ID,
+				      QDF_DP_TRACE_TX_PACKET_RECORD,
+				      msdu_id, QDF_TX));
+}
+
 #if defined(HELIUMPLUS)
 void ol_txrx_dump_frag_desc(char *msg, struct ol_tx_desc_t *tx_desc)
 {

+ 3 - 27
core/dp/txrx/ol_tx_ll_fastpath.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -89,32 +89,6 @@ ol_tx_ll_wrapper(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list)
 	return msdu_list;
 }
 
-/**
- * ol_tx_trace_pkt() - Trace TX packet at OL layer
- *
- * @skb: skb to be traced
- * @msdu_id: msdu_id of the packet
- * @vdev_id: vdev_id of the packet
- *
- * Return: None
- */
-static inline void ol_tx_trace_pkt(qdf_nbuf_t skb, uint16_t msdu_id,
-				   uint8_t vdev_id)
-{
-	DPTRACE(qdf_dp_trace_ptr(skb,
-				 QDF_DP_TRACE_TXRX_FAST_PACKET_PTR_RECORD,
-				 QDF_TRACE_DEFAULT_PDEV_ID,
-				 qdf_nbuf_data_addr(skb),
-				 sizeof(qdf_nbuf_data(skb)),
-				 msdu_id, vdev_id, 0));
-
-	qdf_dp_trace_log_pkt(vdev_id, skb, QDF_TX, QDF_TRACE_DEFAULT_PDEV_ID);
-
-	DPTRACE(qdf_dp_trace_data_pkt(skb, QDF_TRACE_DEFAULT_PDEV_ID,
-				      QDF_DP_TRACE_TX_PACKET_RECORD,
-				      msdu_id, QDF_TX));
-}
-
 /**
  * ol_tx_tso_adjust_pkt_dnld_len() Update download len for TSO pkt
  *
@@ -595,6 +569,8 @@ ol_tx_ll_fast(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list)
 				qdf_nbuf_data_addr(msdu),
 				sizeof(qdf_nbuf_data(msdu)), tx_desc->id,
 				vdev->vdev_id, 0));
+
+			ol_tx_trace_pkt(msdu, tx_desc->id, vdev->vdev_id);
 			/*
 			 * If debug display is enabled, show the meta-data being
 			 * downloaded to the target via the HTT tx descriptor.

+ 6 - 1
core/dp/txrx/ol_tx_ll_legacy.c

@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2018,The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -112,6 +113,8 @@ qdf_nbuf_t ol_tx_ll(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list)
 			if (!tx_desc)
 				return msdu;
 
+			ol_tx_trace_pkt(msdu, tx_desc->id, vdev->vdev_id);
+
 			/*
 			 * If this is a jumbo nbuf, then increment the number
 			 * of nbuf users for each additional segment of the msdu
@@ -174,6 +177,8 @@ qdf_nbuf_t ol_tx_ll(ol_txrx_vdev_handle vdev, qdf_nbuf_t msdu_list)
 		if (!tx_desc)
 			return msdu;
 
+		ol_tx_trace_pkt(msdu, tx_desc->id, vdev->vdev_id);
+
 		TXRX_STATS_MSDU_INCR(vdev->pdev, tx.from_stack, msdu);
 
 		/*