TX duration output of tx_stats in debugfs and station dump had big
difference because they got tx duration value from different statistic
data. We should use the same statistic data.

Tested: QCA988X with firmware ver 10.2.4-1.0-00043

Signed-off-by: Lei Wang <le...@codeaurora.org>
---
 drivers/net/wireless/ath/ath10k/mac.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c 
b/drivers/net/wireless/ath/ath10k/mac.c
index b73c23d..5414169 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -7977,6 +7977,11 @@ static void ath10k_sta_statistics(struct ieee80211_hw 
*hw,
        sinfo->rx_duration = arsta->rx_duration;
        sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_DURATION);
 
+       if (arsta->tx_stats && ath10k_debug_is_extd_tx_stats_enabled(ar)) {
+               sinfo->tx_duration = arsta->tx_stats->tx_duration;
+               sinfo->filled |= 1ULL << NL80211_STA_INFO_TX_DURATION;
+       }
+
        if (!arsta->txrate.legacy && !arsta->txrate.nss)
                return;
 
-- 
1.9.1


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

Reply via email to