All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ath10k: add accounting for the extended peer statistics
@ 2016-12-05 21:52 ` Christian Lamparter
  0 siblings, 0 replies; 52+ messages in thread
From: Christian Lamparter @ 2016-12-05 21:52 UTC (permalink / raw)
  To: linux-wireless, ath10k; +Cc: Kalle Valo

The 10.4 firmware adds extended peer information to the
firmware's statistics payload. This additional info is
stored as a separate data field and the elements are
stored in their own "peers_extd" list.

These elements can pile up in the same way as the peer
information elements. This is because the
ath10k_wmi_10_4_op_pull_fw_stats() function tries to
pull the same amount (num_peer_stats) for every statistic
data unit.

Fixes: 4a49ae94a448faa ("ath10k: fix 10.4 extended peer stats update")
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
 drivers/net/wireless/ath/ath10k/debug.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index 82a4c67f3672..4acd9eb65910 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -399,6 +399,7 @@ void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb)
 			 * prevent firmware from DoS-ing the host.
 			 */
 			ath10k_fw_stats_peers_free(&ar->debug.fw_stats.peers);
+			ath10k_fw_extd_stats_peers_free(&ar->debug.fw_stats.peers_extd);
 			ath10k_warn(ar, "dropping fw peer stats\n");
 			goto free;
 		}
@@ -409,10 +410,12 @@ void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb)
 			goto free;
 		}
 
+		if (!list_empty(&stats.peers))
+			list_splice_tail_init(&stats.peers_extd,
+					      &ar->debug.fw_stats.peers_extd);
+
 		list_splice_tail_init(&stats.peers, &ar->debug.fw_stats.peers);
 		list_splice_tail_init(&stats.vdevs, &ar->debug.fw_stats.vdevs);
-		list_splice_tail_init(&stats.peers_extd,
-				      &ar->debug.fw_stats.peers_extd);
 	}
 
 	complete(&ar->debug.fw_stats_complete);
-- 
2.11.0

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

end of thread, other threads:[~2017-05-05 12:51 UTC | newest]

Thread overview: 52+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-05 21:52 [PATCH 1/2] ath10k: add accounting for the extended peer statistics Christian Lamparter
2016-12-05 21:52 ` Christian Lamparter
2016-12-05 21:52 ` [PATCH 2/2] ath10k: fix potential memory leak in ath10k_wmi_tlv_op_pull_fw_stats() Christian Lamparter
2016-12-05 21:52   ` Christian Lamparter
2016-12-30  9:11   ` [2/2] " Kalle Valo
2016-12-30  9:11     ` Kalle Valo
2016-12-07  6:28 ` [PATCH 1/2] ath10k: add accounting for the extended peer statistics Mohammed Shafi Shajakhan
2016-12-07  6:28   ` Mohammed Shafi Shajakhan
2016-12-13 12:41   ` Christian Lamparter
2016-12-13 12:41     ` Christian Lamparter
2016-12-14  7:33     ` Mohammed Shafi Shajakhan
2016-12-14  7:33       ` Mohammed Shafi Shajakhan
2016-12-14 16:38       ` Christian Lamparter
2016-12-14 16:38         ` Christian Lamparter
2016-12-15 16:26         ` Mohammed Shafi Shajakhan
2016-12-15 16:26           ` Mohammed Shafi Shajakhan
2016-12-15 16:43           ` Mohammed Shafi Shajakhan
2016-12-15 16:43             ` Mohammed Shafi Shajakhan
2016-12-15 17:24             ` Christian Lamparter
2016-12-15 17:24               ` Christian Lamparter
2016-12-16  5:24               ` Mohammed Shafi Shajakhan
2016-12-16  5:24                 ` Mohammed Shafi Shajakhan
2016-12-17 17:46                 ` [PATCH] ath10k: merge extended peer info data with existing peers info Christian Lamparter
2016-12-17 17:46                   ` Christian Lamparter
2016-12-19 16:49                   ` Mohammed Shafi Shajakhan
2016-12-19 16:49                     ` Mohammed Shafi Shajakhan
2016-12-19 16:58                     ` Mohammed Shafi Shajakhan
2016-12-19 16:58                       ` Mohammed Shafi Shajakhan
2016-12-19 18:37                     ` Christian Lamparter
2016-12-19 18:37                       ` Christian Lamparter
2016-12-22 15:48                       ` Mohammed Shafi Shajakhan
2016-12-22 15:48                         ` Mohammed Shafi Shajakhan
2016-12-22 17:58                         ` Christian Lamparter
2016-12-22 17:58                           ` Christian Lamparter
2016-12-29 14:35                           ` Mohammed Shafi Shajakhan
2016-12-29 14:35                             ` Mohammed Shafi Shajakhan
2017-05-05 12:51                   ` Kalle Valo
2017-05-05 12:51                     ` Kalle Valo
2016-12-29 14:11 ` [1/2] ath10k: add accounting for the extended peer statistics Kalle Valo
2016-12-29 14:11   ` Kalle Valo
2016-12-30 14:35   ` Christian Lamparter
2016-12-30 14:35     ` Christian Lamparter
2016-12-30 14:47     ` Valo, Kalle
2016-12-30 14:47       ` Valo, Kalle
2017-01-03  5:28     ` Mohammed Shafi Shajakhan
2017-01-03  5:28       ` Mohammed Shafi Shajakhan
2017-01-04 20:06       ` Christian Lamparter
2017-01-04 20:06         ` Christian Lamparter
2017-01-11 10:49         ` Valo, Kalle
2017-01-11 10:49           ` Valo, Kalle
2017-01-13 13:28 ` Kalle Valo
2017-01-13 13:28   ` 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.