From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
To: <ath10k@lists.infradead.org>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>,
<linux-wireless@vger.kernel.org>,
Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Subject: [PATCH 5/7] ath10k: Provision to support periodic peer stats update
Date: Wed, 13 Jan 2016 21:16:32 +0530 [thread overview]
Message-ID: <1452699994-5078-6-git-send-email-mohammed@qca.qualcomm.com> (raw)
In-Reply-To: <1452699994-5078-1-git-send-email-mohammed@qca.qualcomm.com>
From: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Enable support for periodic peer stats update when peer stats
service is enabled. The host to update the peer stats received
from the firmware periodically, since firmware will reset this to zero
after sometime (due to memory constraints)
While enabling periodic peer / vdev stats cleanup the existing
list in debugfs if max limit is reached, so that the new stats is
updated.
Ideally speaking based on 'Michal Kazior's' suggestion
we need to completely move to periodic update of all the stats making
the 'ping - pong' method obselete. This requires a bit of re-work and
some testing as well, also confirmation regarding backward comptability
for various firmware and chipsets. Hence allow periodic update only
for peer_stats.
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/debug.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index 4fb1e0e..3b8da81 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -347,7 +347,8 @@ void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb)
* delivered which is treated as end-of-data and is itself discarded
*/
- if (ar->debug.fw_stats_done) {
+ if (ar->debug.fw_stats_done &&
+ !test_bit(WMI_SERVICE_PEER_STATS, ar->wmi.svc_map)) {
ath10k_warn(ar, "received unsolicited stats update event\n");
goto free;
}
@@ -372,11 +373,13 @@ void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb)
/* Although this is unlikely impose a sane limit to
* prevent firmware from DoS-ing the host.
*/
+ ath10k_fw_stats_peers_free(&ar->debug.fw_stats.peers);
ath10k_warn(ar, "dropping fw peer stats\n");
goto free;
}
if (num_vdevs >= BITS_PER_LONG) {
+ ath10k_fw_stats_vdevs_free(&ar->debug.fw_stats.vdevs);
ath10k_warn(ar, "dropping fw vdev stats\n");
goto free;
}
--
1.7.9.5
next prev parent reply other threads:[~2016-01-13 15:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 15:46 [PATCH 0/7] Add support for Per STA Rx duration Mohammed Shafi Shajakhan
2016-01-13 15:46 ` [PATCH 1/7] ath10k: Add support for parsing per STA rx_duration for 10.2.4 Mohammed Shafi Shajakhan
2016-01-13 15:46 ` [PATCH 2/7] ath10k: Fix naming Peer stats rssi_changed field in 10.2.4 Mohammed Shafi Shajakhan
2016-01-13 15:46 ` [PATCH 3/7] ath10k: Cleanup setting pdev paramaters Mohammed Shafi Shajakhan
2016-01-13 15:46 ` [PATCH 4/7] ath10k: Rename few function names of firmware stats Mohammed Shafi Shajakhan
2016-01-13 15:46 ` Mohammed Shafi Shajakhan [this message]
2016-01-13 15:46 ` [PATCH 6/7] ath10k: Enable periodic peer stats update Mohammed Shafi Shajakhan
2016-01-21 12:48 ` Kalle Valo
2016-01-21 14:01 ` Mohammed Shafi Shajakhan
2016-01-13 15:46 ` [PATCH 7/7] ath10k: Add debugfs support for Per STA total rx duration Mohammed Shafi Shajakhan
2016-01-26 15:02 ` [PATCH 0/7] Add support for Per STA Rx duration Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1452699994-5078-6-git-send-email-mohammed@qca.qualcomm.com \
--to=mohammed@qti.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=kvalo@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox