From b5029b0a9cc3dd2118207cf35ffddc9e84487537 Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Wed, 24 Jul 2019 14:46:12 +0530 Subject: [PATCH] qcacmn: Add rx_errors stats Update rx error stats. It is a summation of below failures: - desc_alloc_failure [No free desc available] - csum error [IP/TCP_UDP] These failure stats are updated at pdev level and no need to aggregate this.Directly add at pdev level and export. Change-Id: I0a5fa8f972babf092163f3cb2d0093547ded4877 CRs-Fixed: 2496037 --- dp/inc/cdp_txrx_cmn_struct.h | 2 ++ dp/wifi3.0/dp_main.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/dp/inc/cdp_txrx_cmn_struct.h b/dp/inc/cdp_txrx_cmn_struct.h index 4ad3a8241675..537cb3135a1b 100644 --- a/dp/inc/cdp_txrx_cmn_struct.h +++ b/dp/inc/cdp_txrx_cmn_struct.h @@ -1396,6 +1396,7 @@ struct cdp_tx_completion_ppdu { * @tx_dropped: Tx dropped is same as tx errors as above * @rx_packets: Rx total packets transmitted * @rx_bytes : Rx total bytes transmitted + * @rx_errors : Rx erros */ struct cdp_dev_stats { uint32_t tx_packets; @@ -1404,6 +1405,7 @@ struct cdp_dev_stats { uint32_t tx_dropped; uint32_t rx_packets; uint32_t rx_bytes; + uint32_t rx_errors; }; /** diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 0ecd427ef5e5..807c59666b91 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -6830,6 +6830,12 @@ static void dp_pdev_getstats(void *pdev_handle, stats->rx_bytes = pdev->stats.rx.unicast.bytes + pdev->stats.rx.multicast.bytes + pdev->stats.rx.bcast.bytes; + stats->rx_errors = pdev->stats.err.desc_alloc_fail + + pdev->stats.err.ip_csum_err + + pdev->stats.err.tcp_udp_csum_err + + pdev->stats.rx.err. mic_err + + pdev->stats.rx.err. decrypt_err + + pdev->stats.rx.err. fcserr; } /**