Parcourir la source

qcacmn: Add support to dump idle link ring hp tp

Add support to dump idle link ring hp tp.

Change-Id: Ia5fa1afd260a64c40133bf52368e93163b80c3ab
CRs-Fixed: 3128366
sandhu il y a 3 ans
Parent
commit
98f2bdc213
2 fichiers modifiés avec 43 ajouts et 0 suppressions
  1. 1 0
      dp/inc/cdp_txrx_cmn_struct.h
  2. 42 0
      dp/wifi3.0/dp_main.c

+ 1 - 0
dp/inc/cdp_txrx_cmn_struct.h

@@ -305,6 +305,7 @@ enum cdp_host_txrx_stats {
 	TXRX_SOC_FSE_STATS = 13,
 	TXRX_HAL_REG_WRITE_STATS = 14,
 	TXRX_SOC_REO_HW_DESC_DUMP = 15,
+	TXRX_SOC_WBM_IDLE_HPTP_DUMP = 16,
 	TXRX_HOST_STATS_MAX,
 };
 

+ 42 - 0
dp/wifi3.0/dp_main.c

@@ -401,6 +401,7 @@ const int dp_stats_mapping_table[][STATS_TYPE_MAX] = {
 	{TXRX_FW_STATS_INVALID, TXRX_SOC_FSE_STATS},
 	{TXRX_FW_STATS_INVALID, TXRX_HAL_REG_WRITE_STATS},
 	{TXRX_FW_STATS_INVALID, TXRX_SOC_REO_HW_DESC_DUMP},
+	{TXRX_FW_STATS_INVALID, TXRX_SOC_WBM_IDLE_HPTP_DUMP},
 	{HTT_DBG_EXT_STATS_PDEV_RX_RATE_EXT, TXRX_HOST_STATS_INVALID}
 };
 
@@ -9112,6 +9113,44 @@ dp_get_host_peer_stats(struct cdp_soc_t *soc, uint8_t *mac_addr)
 	return QDF_STATUS_SUCCESS;
 }
 
+/* *
+ * dp_dump_wbm_idle_hptp() -dump wbm idle ring, hw hp tp info.
+ * @soc: dp soc.
+ * @pdev: dp pdev.
+ *
+ * Return: None.
+ */
+static void
+dp_dump_wbm_idle_hptp(struct dp_soc *soc, struct dp_pdev *pdev)
+{
+	uint32_t hw_head;
+	uint32_t hw_tail;
+	struct dp_srng *srng;
+
+	if (!soc) {
+		dp_err("soc is NULL");
+		return;
+	}
+
+	if (!pdev) {
+		dp_err("pdev is NULL");
+		return;
+	}
+
+	srng = &pdev->soc->wbm_idle_link_ring;
+	if (!srng) {
+		dp_err("wbm_idle_link_ring srng is NULL");
+		return;
+	}
+
+	hal_get_hw_hptp(soc->hal_soc, srng->hal_srng, &hw_head,
+			&hw_tail, WBM_IDLE_LINK);
+
+	dp_debug("WBM_IDLE_LINK: HW hp: %d, HW tp: %d",
+			hw_head, hw_tail);
+}
+
+
 /**
  * dp_txrx_stats_help() - Helper function for Txrx_Stats
  *
@@ -9229,6 +9268,9 @@ dp_print_host_stats(struct dp_vdev *vdev,
 		dp_get_rx_reo_queue_info((struct cdp_soc_t *)pdev->soc,
 					 vdev->vdev_id);
 		break;
+	case TXRX_SOC_WBM_IDLE_HPTP_DUMP:
+		dp_dump_wbm_idle_hptp(pdev->soc, pdev);
+		break;
 	default:
 		dp_info("Wrong Input For TxRx Host Stats");
 		dp_txrx_stats_help();