]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ath10k: fix retry packets update in station dump
authorVenkateswara Naralasetty <vnaralas@codeaurora.org>
Mon, 15 Jun 2020 17:29:01 +0000 (20:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Nov 2020 10:51:16 +0000 (11:51 +0100)
[ Upstream commit 67b927f9820847d30e97510b2f00cd142b9559b6 ]

When tx status enabled, retry count is updated from tx completion status.
which is not working as expected due to firmware limitation where
firmware can not provide per MSDU rate statistics from tx completion
status. Due to this tx retry count is always 0 in station dump.

Fix this issue by updating the retry packet count from per peer
statistics. This patch will not break on SDIO devices since, this retry
count is already updating from peer statistics for SDIO devices.

Tested-on: QCA9984 PCI 10.4-3.6-00104
Tested-on: QCA9882 PCI 10.2.4-1.0-00047

Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1591856446-26977-1-git-send-email-vnaralas@codeaurora.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath10k/htt_rx.c
drivers/net/wireless/ath/ath10k/mac.c

index 215ade6faf328f42d1bc8ba7af083dfcd5621869..69ad4ca1a87c1fb0494d7680396e4eb5afd4b7e0 100644 (file)
@@ -3583,12 +3583,14 @@ ath10k_update_per_peer_tx_stats(struct ath10k *ar,
        }
 
        if (ar->htt.disable_tx_comp) {
-               arsta->tx_retries += peer_stats->retry_pkts;
                arsta->tx_failed += peer_stats->failed_pkts;
-               ath10k_dbg(ar, ATH10K_DBG_HTT, "htt tx retries %d tx failed %d\n",
-                          arsta->tx_retries, arsta->tx_failed);
+               ath10k_dbg(ar, ATH10K_DBG_HTT, "tx failed %d\n",
+                          arsta->tx_failed);
        }
 
+       arsta->tx_retries += peer_stats->retry_pkts;
+       ath10k_dbg(ar, ATH10K_DBG_HTT, "htt tx retries %d", arsta->tx_retries);
+
        if (ath10k_debug_is_extd_tx_stats_enabled(ar))
                ath10k_accumulate_per_peer_tx_stats(ar, arsta, peer_stats,
                                                    rate_idx);
index 2177e9d92bdff70d67fc71324160768c5a8a7ef2..03c7edf05a1d1e6931f97542ce49cd6f70fce009 100644 (file)
@@ -8542,12 +8542,13 @@ static void ath10k_sta_statistics(struct ieee80211_hw *hw,
        sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
 
        if (ar->htt.disable_tx_comp) {
-               sinfo->tx_retries = arsta->tx_retries;
-               sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_RETRIES);
                sinfo->tx_failed = arsta->tx_failed;
                sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED);
        }
 
+       sinfo->tx_retries = arsta->tx_retries;
+       sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_RETRIES);
+
        ath10k_mac_sta_get_peer_stats_info(ar, sta, sinfo);
 }