All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath10k: fix printing of peer stats in non-AP firmware
@ 2014-03-25  7:55 ` Chun-Yeow Yeoh
  0 siblings, 0 replies; 22+ messages in thread
From: Chun-Yeow Yeoh @ 2014-03-25  7:55 UTC (permalink / raw)
  To: ath10k; +Cc: kvalo, linux-wireless, Chun-Yeow Yeoh

This patch is intended to fix the problem if we use the
firmware 999.999.0.636 to get peer stats when the number
of peer is more than 3. The WMI_UPDATE_STATS_EVENTID may
trigger more than 1 time if the number of peers is more
than 3. So this patch allows us to do the checking on this
and make sure that we print the peer stats correctly.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
---
 drivers/net/wireless/ath/ath10k/debug.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index 7be284c..4a4072e 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -245,10 +245,17 @@ void ath10k_debug_read_target_stats(struct ath10k *ar,
 	if (num_peer_stats) {
 		struct wmi_peer_stats_10x *peer_stats;
 		struct ath10k_peer_stat *s;
+		int j = 0;
+
+		if (!test_bit(ATH10K_FW_FEATURE_WMI_10X, ar->fw_features) &&
+		    !num_pdev_stats) {
+			j = 3;
+			num_peer_stats += 3;
+		}
 
 		stats->peers = num_peer_stats;
 
-		for (i = 0; i < num_peer_stats; i++) {
+		for (i = j; i < num_peer_stats; i++) {
 			peer_stats = (struct wmi_peer_stats_10x *)tmp;
 			s = &stats->peer_stat[i];
 
-- 
1.7.9.5


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

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

end of thread, other threads:[~2014-03-28 12:47 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-25  7:55 [PATCH] ath10k: fix printing of peer stats in non-AP firmware Chun-Yeow Yeoh
2014-03-25  7:55 ` Chun-Yeow Yeoh
2014-03-25  8:11 ` Michal Kazior
2014-03-25  8:11   ` Michal Kazior
2014-03-25  8:33   ` Yeoh Chun-Yeow
2014-03-25  8:33     ` Yeoh Chun-Yeow
2014-03-25  8:45     ` Michal Kazior
2014-03-25  8:45       ` Michal Kazior
2014-03-25  8:54       ` Yeoh Chun-Yeow
2014-03-25  8:54         ` Yeoh Chun-Yeow
2014-03-25  8:57         ` Michal Kazior
2014-03-25  8:57           ` Michal Kazior
2014-03-25  9:38           ` Yeoh Chun-Yeow
2014-03-25  9:38             ` Yeoh Chun-Yeow
2014-03-25  9:47             ` Michal Kazior
2014-03-25  9:47               ` Michal Kazior
2014-03-25 10:31               ` Yeoh Chun-Yeow
2014-03-25 10:31                 ` Yeoh Chun-Yeow
2014-03-25 16:09   ` Ben Greear
2014-03-25 16:09     ` Ben Greear
2014-03-28 12:47 ` Kalle Valo
2014-03-28 12:47   ` 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.