From d2e553e973bc22f4e08ef4353bc7e18b1442b0b6 Mon Sep 17 00:00:00 2001 From: Amir Date: Sun, 3 May 2020 17:52:43 +0530 Subject: [PATCH] qcacmn: Add debug statistics for monitor mode qcacmn: Add debug statistics for monitor mode Change-Id: I3fe59af1c7f561bd22f502eb5b19265ecd49ee69 CRs-Fixed: 2677656 --- dp/inc/cdp_txrx_mon_struct.h | 4 ++++ dp/wifi3.0/dp_stats.c | 4 ++++ dp/wifi3.0/dp_types.h | 6 ++++++ hal/wifi3.0/hal_api_mon.h | 3 +++ 4 files changed, 17 insertions(+) diff --git a/dp/inc/cdp_txrx_mon_struct.h b/dp/inc/cdp_txrx_mon_struct.h index 096e10738157..6801f14eb771 100644 --- a/dp/inc/cdp_txrx_mon_struct.h +++ b/dp/inc/cdp_txrx_mon_struct.h @@ -225,6 +225,8 @@ enum { * mointor status and monitor destination ring * @ppdu_id_match: counter to track ppdu id match in * mointor status and monitor destination ring + * @status_ppdu_drop: Number of ppdu dropped from monitor status ring + * @dest_ppdu_drop: Number of ppdu dropped from monitor destination ring */ struct cdp_pdev_mon_stats { #ifndef REMOVE_MON_DBG_STATS @@ -250,5 +252,7 @@ struct cdp_pdev_mon_stats { uint32_t mon_rx_bufs_reaped_dest; uint32_t ppdu_id_mismatch; uint32_t ppdu_id_match; + uint32_t status_ppdu_drop; + uint32_t dest_ppdu_drop; }; #endif diff --git a/dp/wifi3.0/dp_stats.c b/dp/wifi3.0/dp_stats.c index 215f3e376357..e6a995c41373 100644 --- a/dp/wifi3.0/dp_stats.c +++ b/dp/wifi3.0/dp_stats.c @@ -6212,6 +6212,10 @@ dp_print_pdev_rx_mon_stats(struct dp_pdev *pdev) rx_mon_stats->ppdu_id_mismatch); DP_PRINT_STATS("mpdu_ppdu_id_match_cnt = %d", rx_mon_stats->ppdu_id_match); + DP_PRINT_STATS("ppdus dropped frm status ring = %d", + rx_mon_stats->status_ppdu_drop); + DP_PRINT_STATS("ppdus dropped frm dest ring = %d", + rx_mon_stats->dest_ppdu_drop); stat_ring_ppdu_ids = (uint32_t *)qdf_mem_malloc(sizeof(uint32_t) * MAX_PPDU_ID_HIST); dest_ring_ppdu_ids = diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index a236c620933d..dca6c94ed188 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -1884,6 +1884,12 @@ struct dp_pdev { struct hal_rx_mon_desc_info *mon_desc; #endif qdf_nbuf_t mcopy_status_nbuf; + + /* Flag to hold on to monitor destination ring */ + bool hold_mon_dest_ring; + + /* Maintains first status buffer's paddr of a PPDU */ + uint64_t status_buf_addr; }; struct dp_peer; diff --git a/hal/wifi3.0/hal_api_mon.h b/hal/wifi3.0/hal_api_mon.h index a0569d8e64e1..5af0dbc46a7e 100644 --- a/hal/wifi3.0/hal_api_mon.h +++ b/hal/wifi3.0/hal_api_mon.h @@ -179,6 +179,8 @@ * @status_buf: for a PPDU, status buffers can span acrosss * multiple buffers, status_buf points to first * status buffer address of PPDU + * @drop_ppdu: flag to indicate current destination + * ring ppdu drop */ struct hal_rx_mon_desc_info { uint16_t ppdu_id; @@ -189,6 +191,7 @@ struct hal_rx_mon_desc_info { uint8_t end_of_ppdu; struct hal_buf_info link_desc; struct hal_buf_info status_buf; + bool drop_ppdu; }; /*