ath10k: fix pointless update of peer stats list
authorMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Wed, 3 Feb 2016 15:37:43 +0000 (21:07 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 3 Mar 2016 17:17:57 +0000 (19:17 +0200)
We periodically receive f/w stats event for updating
the rx duration and there is no reason to keep on appending
the f/w stats peer list, as this gets completely cleaned up when
the user polls for f/w stats {pdev, vdev, peer stats}. Only don't
print the warning message in the case PEER_STATS service is enabled

Fixes: 856e7c3 ("ath10k: add debugfs support for Per STA total rx duration")
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/debug.c

index 848a0ddca72262184a803740fb1e1cb9a5221f82..a633152787e09e22aec047611246fc377c29a2e0 100644 (file)
@@ -351,8 +351,10 @@ void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb)
        if (peer_stats_svc)
                ath10k_sta_update_rx_duration(ar, &stats.peers);
 
-       if (ar->debug.fw_stats_done && !peer_stats_svc) {
-               ath10k_warn(ar, "received unsolicited stats update event\n");
+       if (ar->debug.fw_stats_done) {
+               if (!peer_stats_svc)
+                       ath10k_warn(ar, "received unsolicited stats update event\n");
+
                goto free;
        }