All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath10k: fix retry packets update in station dump
@ 2020-06-11  6:20 ` Venkateswara Naralasetty
  0 siblings, 0 replies; 6+ messages in thread
From: Venkateswara Naralasetty @ 2020-06-11  6:20 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Venkateswara Naralasetty

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.

HW used: QCA9984
FW version: 10.4-3.6-00104

Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
---
 drivers/net/wireless/ath/ath10k/htt_rx.c | 8 +++++---
 drivers/net/wireless/ath/ath10k/mac.c    | 5 +++--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index d787cbe..cac05e7 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -3575,12 +3575,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);
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 919d155..d9d4b15 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -8547,12 +8547,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);
 }
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] ath10k: fix retry packets update in station dump
@ 2020-06-11  6:20 ` Venkateswara Naralasetty
  0 siblings, 0 replies; 6+ messages in thread
From: Venkateswara Naralasetty @ 2020-06-11  6:20 UTC (permalink / raw)
  To: ath10k; +Cc: Venkateswara Naralasetty, linux-wireless

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.

HW used: QCA9984
FW version: 10.4-3.6-00104

Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
---
 drivers/net/wireless/ath/ath10k/htt_rx.c | 8 +++++---
 drivers/net/wireless/ath/ath10k/mac.c    | 5 +++--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index d787cbe..cac05e7 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -3575,12 +3575,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);
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 919d155..d9d4b15 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -8547,12 +8547,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);
 }
 
-- 
2.7.4


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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ath10k: fix retry packets update in station dump
  2020-06-11  6:20 ` Venkateswara Naralasetty
@ 2020-06-11 10:26   ` Markus Theil
  -1 siblings, 0 replies; 6+ messages in thread
From: Markus Theil @ 2020-06-11 10:26 UTC (permalink / raw)
  To: Venkateswara Naralasetty, ath10k; +Cc: linux-wireless

On 6/11/20 8:20 AM, Venkateswara Naralasetty wrote:
> 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.
>
> HW used: QCA9984
> FW version: 10.4-3.6-00104

Thanks a lot for this patch! I tested it on the following HW, where it
also works.

HW: QCA9882
FW: 10.2.4-1.0-00047

Markus


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ath10k: fix retry packets update in station dump
@ 2020-06-11 10:26   ` Markus Theil
  0 siblings, 0 replies; 6+ messages in thread
From: Markus Theil @ 2020-06-11 10:26 UTC (permalink / raw)
  To: Venkateswara Naralasetty, ath10k; +Cc: linux-wireless

On 6/11/20 8:20 AM, Venkateswara Naralasetty wrote:
> 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.
>
> HW used: QCA9984
> FW version: 10.4-3.6-00104

Thanks a lot for this patch! I tested it on the following HW, where it
also works.

HW: QCA9882
FW: 10.2.4-1.0-00047

Markus


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ath10k: fix retry packets update in station dump
  2020-06-11  6:20 ` Venkateswara Naralasetty
                   ` (2 preceding siblings ...)
  (?)
@ 2020-06-16  8:15 ` Kalle Valo
  -1 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2020-06-16  8:15 UTC (permalink / raw)
  To: Venkateswara Naralasetty; +Cc: ath10k, linux-wireless, Venkateswara Naralasetty

Venkateswara Naralasetty <vnaralas@codeaurora.org> wrote:

> 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>

Patch applied to ath-next branch of ath.git, thanks.

67b927f98208 ath10k: fix retry packets update in station dump

-- 
https://patchwork.kernel.org/patch/11599289/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ath10k: fix retry packets update in station dump
  2020-06-11  6:20 ` Venkateswara Naralasetty
  (?)
  (?)
@ 2020-06-16  8:15 ` Kalle Valo
  -1 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2020-06-16  8:15 UTC (permalink / raw)
  To: Venkateswara Naralasetty; +Cc: linux-wireless, ath10k

Venkateswara Naralasetty <vnaralas@codeaurora.org> wrote:

> 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>

Patch applied to ath-next branch of ath.git, thanks.

67b927f98208 ath10k: fix retry packets update in station dump

-- 
https://patchwork.kernel.org/patch/11599289/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-06-16  8:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11  6:20 [PATCH] ath10k: fix retry packets update in station dump Venkateswara Naralasetty
2020-06-11  6:20 ` Venkateswara Naralasetty
2020-06-11 10:26 ` Markus Theil
2020-06-11 10:26   ` Markus Theil
2020-06-16  8:15 ` Kalle Valo
2020-06-16  8:15 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.