diff options
author | Anilkumar Kolli <akolli@codeaurora.org> | 2018-10-12 08:03:28 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-11-05 11:07:12 +0100 |
commit | e88975ca37d10a486cf3a3c7199a669eb393c123 (patch) | |
tree | 7da3fe3bde83657dd6223a188ea3c0f0c84bc63f /drivers/net/wireless/ath/ath10k/debugfs_sta.c | |
parent | ath10k: add support for WCN3990 firmware crash recovery (diff) | |
download | linux-e88975ca37d10a486cf3a3c7199a669eb393c123.tar.xz linux-e88975ca37d10a486cf3a3c7199a669eb393c123.zip |
ath10k: dump tx stats in rate table format
This patch adds the tx statistics pkts/bytes dump
in rate table format.
Dump format table is similar to http://mcsindex.com/
Tested on QCA9984/QCA4019/QCA988x
Firmware: 10.4-3.5.3-00057
10.2.4-1.0-00037
command:
cat /sys/kernel/debug/ieee80211/phy0/netdev\:wlan0/
stations/<MACADDR>/tx_stats
Signed-off-by: Anilkumar Kolli <akolli@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/debugfs_sta.c')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/debugfs_sta.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/debugfs_sta.c b/drivers/net/wireless/ath/ath10k/debugfs_sta.c index b09cdc699c69..0f3fd65a459e 100644 --- a/drivers/net/wireless/ath/ath10k/debugfs_sta.c +++ b/drivers/net/wireless/ath/ath10k/debugfs_sta.c @@ -665,7 +665,7 @@ static ssize_t ath10k_dbg_sta_dump_tx_stats(struct file *file, "retry", "ampdu"}; const char *str[ATH10K_COUNTER_TYPE_MAX] = {"bytes", "packets"}; int len = 0, i, j, k, retval = 0; - const int size = 2 * 4096; + const int size = 16 * 4096; char *buf; buf = kzalloc(size, GFP_KERNEL); @@ -719,6 +719,16 @@ static ssize_t ath10k_dbg_sta_dump_tx_stats(struct file *file, len += scnprintf(buf + len, size - len, "%llu ", stats->legacy[j][i]); len += scnprintf(buf + len, size - len, "\n"); + len += scnprintf(buf + len, size - len, + " Rate table %s (1,2 ... Mbps)\n ", + str[j]); + for (i = 0; i < ATH10K_RATE_TABLE_NUM; i++) { + len += scnprintf(buf + len, size - len, "%llu ", + stats->rate_table[j][i]); + if (!((i + 1) % 8)) + len += + scnprintf(buf + len, size - len, "\n "); + } } } |