diff --git a/core/cds/inc/cds_api.h b/core/cds/inc/cds_api.h index 58ccfe78758d..673b2284ec8c 100644 --- a/core/cds/inc/cds_api.h +++ b/core/cds/inc/cds_api.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2021 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 @@ -79,9 +80,12 @@ enum cds_driver_state { * struce cds_vdev_dp_stats - vdev stats populated from DP * @tx_retries: packet number of successfully transmitted after more * than one retransmission attempt + * @tx_mpdu_success_with_retries: Number of MPDU transmission retries done + * in case of successful transmission. */ struct cds_vdev_dp_stats { uint32_t tx_retries; + uint32_t tx_mpdu_success_with_retries; }; #define __CDS_IS_DRIVER_STATE(_state, _mask) (((_state) & (_mask)) == (_mask)) diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index ae2d37821270..8f99a4b81192 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2021 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 @@ -2817,6 +2818,8 @@ cds_dp_get_vdev_stats(uint8_t vdev_id, struct cds_vdev_dp_stats *stats) if (cds_get_cdp_vdev_stats(vdev_id, vdev_stats)) { stats->tx_retries = vdev_stats->tx.retries; + stats->tx_mpdu_success_with_retries = + vdev_stats->tx.mpdu_success_with_retries; ret = true; } diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 315ba5f24a3f..026ba84dc9c4 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2021 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 @@ -3820,6 +3821,7 @@ static void wlan_hdd_fill_summary_stats(tCsrSummaryStatsInfo *stats, int i; struct cds_vdev_dp_stats dp_stats; uint32_t orig_cnt; + uint32_t orig_fail_cnt; info->rx_packets = stats->rx_frm_cnt; info->tx_packets = 0; @@ -3834,9 +3836,13 @@ static void wlan_hdd_fill_summary_stats(tCsrSummaryStatsInfo *stats, if (cds_dp_get_vdev_stats(vdev_id, &dp_stats)) { orig_cnt = info->tx_retries; + orig_fail_cnt = info->tx_failed; info->tx_retries = dp_stats.tx_retries; + info->tx_failed += dp_stats.tx_mpdu_success_with_retries; hdd_debug("vdev %d tx retries adjust from %d to %d", vdev_id, orig_cnt, info->tx_retries); + hdd_debug("tx failed adjust from %d to %d", + orig_fail_cnt, info->tx_failed); } info->filled |= HDD_INFO_TX_PACKETS |