ath10k: add debugfs support for Per STA total rx duration

Add debugfs support for per client total rx duration, track this
via the report of Peer stats rx duration reported for every 500ms

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
Mohammed Shafi Shajakhan
2016-01-13 21:16:34 +05:30
committed by Kalle Valo
parent 8351c05219
commit 856e7c3084
4 changed files with 54 additions and 3 deletions

View File

@@ -319,7 +319,7 @@ static void ath10k_debug_fw_stats_reset(struct ath10k *ar)
void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb)
{
struct ath10k_fw_stats stats = {};
bool is_start, is_started, is_end;
bool is_start, is_started, is_end, peer_stats_svc;
size_t num_peers;
size_t num_vdevs;
int ret;
@@ -347,8 +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 &&
!test_bit(WMI_SERVICE_PEER_STATS, ar->wmi.svc_map)) {
peer_stats_svc = test_bit(WMI_SERVICE_PEER_STATS, ar->wmi.svc_map);
if (ar->debug.fw_stats_done && !peer_stats_svc) {
ath10k_warn(ar, "received unsolicited stats update event\n");
goto free;
}
@@ -384,6 +384,9 @@ void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb)
goto free;
}
if (peer_stats_svc)
ath10k_sta_update_rx_duration(ar, &stats.peers);
list_splice_tail_init(&stats.peers, &ar->debug.fw_stats.peers);
list_splice_tail_init(&stats.vdevs, &ar->debug.fw_stats.vdevs);
}