From dd4203ebefe819f87f8442b9b5ed5953a318e66f Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Wed, 29 Dec 2021 22:41:45 +0800 Subject: [PATCH] qcacld-3.0: Change tx retries unit from msdu to mpdu Customer reported their HLOS LTE-WLAN transition algo sometimes go wrong for wrong low layer stats, Txretry delta is bigger than Txtotal delta. Txretry unit is msdu while Txtotal unit is mpdu. Add vdev/peer stats for mpdu number of successfully transmitted after more than one retransmission attempt, to align mpdu tx_packets, tx_failed. CRs-Fixed: 3102117 Change-Id: Id4b9d8fd81af4bf0c141dad481bfd2b3f6c1db2a --- core/cds/inc/cds_api.h | 3 +++ core/cds/src/cds_api.c | 1 + core/hdd/src/wlan_hdd_stats.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/cds/inc/cds_api.h b/core/cds/inc/cds_api.h index 673b2284ec8c..7b8a2b9de7f1 100644 --- a/core/cds/inc/cds_api.h +++ b/core/cds/inc/cds_api.h @@ -80,11 +80,14 @@ 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_retries_mpdu: mpdu 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_retries_mpdu; uint32_t tx_mpdu_success_with_retries; }; diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index 8f99a4b81192..017e73941636 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -2818,6 +2818,7 @@ 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_retries_mpdu = vdev_stats->tx.retries_mpdu; 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 8c495ff61814..43ac9856be11 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -4194,7 +4194,7 @@ 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_retries = dp_stats.tx_retries_mpdu; 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);