diff --git a/dp/wifi3.0/dp_rx.c b/dp/wifi3.0/dp_rx.c index 9650f8259346..28100f246b23 100644 --- a/dp/wifi3.0/dp_rx.c +++ b/dp/wifi3.0/dp_rx.c @@ -2065,8 +2065,10 @@ more_data: rx_buf_cookie = HAL_RX_REO_BUF_COOKIE_GET(ring_desc); status = dp_rx_cookie_check_and_invalidate(ring_desc); - if (qdf_unlikely(QDF_IS_STATUS_ERROR(status))) + if (qdf_unlikely(QDF_IS_STATUS_ERROR(status))) { + DP_STATS_INC(soc, rx.err.stale_cookie, 1); break; + } rx_desc = dp_rx_cookie_2_va_rxdma_buf(soc, rx_buf_cookie); status = dp_rx_desc_sanity(soc, hal_soc, hal_ring_hdl, diff --git a/dp/wifi3.0/dp_stats.c b/dp/wifi3.0/dp_stats.c index e8a05f1939ac..e953f9f3e640 100644 --- a/dp/wifi3.0/dp_stats.c +++ b/dp/wifi3.0/dp_stats.c @@ -6035,8 +6035,10 @@ void dp_txrx_path_stats(struct dp_soc *soc) pdev->soc->stats.rx.err.defrag_peer_uninit); DP_PRINT_STATS("pkts delivered no peer %u", pdev->soc->stats.rx.err.pkt_delivered_no_peer); - DP_PRINT_STATS("RX invalid cookie: %d", + DP_PRINT_STATS("RX stale cookie: %d", soc->stats.rx.err.invalid_cookie); + DP_PRINT_STATS("RX invalid cookie: %d", + soc->stats.rx.err.stale_cookie); DP_PRINT_STATS("2k jump delba sent: %u", pdev->soc->stats.rx.err.rx_2k_jump_delba_sent); DP_PRINT_STATS("2k jump msdu to stack: %u", @@ -6579,6 +6581,9 @@ dp_print_soc_rx_stats(struct dp_soc *soc) DP_PRINT_STATS("RX invalid cookie: %d", soc->stats.rx.err.invalid_cookie); + DP_PRINT_STATS("RX stale cookie: %d", + soc->stats.rx.err.stale_cookie); + DP_PRINT_STATS("RX wait completed msdu break: %d", soc->stats.rx.msdu_scatter_wait_break); diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h index 9c014d4a989a..e4213158edc0 100644 --- a/dp/wifi3.0/dp_types.h +++ b/dp/wifi3.0/dp_types.h @@ -833,6 +833,8 @@ struct dp_soc_stats { uint32_t scatter_msdu; /* RX msdu drop count due to invalid cookie */ uint32_t invalid_cookie; + /* Count of stale cookie read in RX path */ + uint32_t stale_cookie; /* Delba sent count due to RX 2k jump */ uint32_t rx_2k_jump_delba_sent; /* RX 2k jump msdu indicated to stack count */