summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/wil6210/debugfs.c
diff options
context:
space:
mode:
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>2014-06-16 20:37:22 +0400
committerJohn W. Linville <linville@tuxdriver.com>2014-06-19 23:49:26 +0400
commitbe299858d0611ee9f43fab7fa6dbea8671748267 (patch)
tree1aae9c6ad4319d3a227c8a9d7e37adea83ad885f /drivers/net/wireless/ath/wil6210/debugfs.c
parent84bb29b7ab71daed9318073dd33632274373a1ea (diff)
downloadlinux-be299858d0611ee9f43fab7fa6dbea8671748267.tar.xz
wil6210: interrupt statistics
Track number of interrupts and Tx/Rx packets; expose through debugfs 'info'. Reset upon read. Used to analyse effectivness of interrupt coalescing and NAPI. Read twice with some interval like cat info > /dev/null; sleep 1; cat info Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/debugfs.c')
-rw-r--r--drivers/net/wireless/ath/wil6210/debugfs.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c
index 8bf00aca321b..94ac69a380b8 100644
--- a/drivers/net/wireless/ath/wil6210/debugfs.c
+++ b/drivers/net/wireless/ath/wil6210/debugfs.c
@@ -851,10 +851,21 @@ static const struct file_operations fops_link = {
/*---------info------------*/
static int wil_info_debugfs_show(struct seq_file *s, void *data)
{
+ struct wil6210_priv *wil = s->private;
+ struct net_device *ndev = wil_to_ndev(wil);
int is_ac = power_supply_is_system_supplied();
+ int rx = atomic_xchg(&wil->isr_count_rx, 0);
+ int tx = atomic_xchg(&wil->isr_count_tx, 0);
+ static ulong rxf_old, txf_old;
+ ulong rxf = ndev->stats.rx_packets;
+ ulong txf = ndev->stats.tx_packets;
/* >0 : AC; 0 : battery; <0 : error */
seq_printf(s, "AC powered : %d\n", is_ac);
+ seq_printf(s, "Rx irqs:packets : %8d : %8ld\n", rx, rxf - rxf_old);
+ seq_printf(s, "Tx irqs:packets : %8d : %8ld\n", tx, txf - txf_old);
+ rxf_old = rxf;
+ txf_old = txf;
return 0;
}