Commit 2edb4583 authored by Sujith's avatar Sujith Committed by John W. Linville

ath9k_htc: Add queue statistics to xmit debugfs file

Signed-off-by: default avatarSujith <Sujith.Manoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 6473d24d
...@@ -257,12 +257,15 @@ struct ath9k_htc_tx_ctl { ...@@ -257,12 +257,15 @@ struct ath9k_htc_tx_ctl {
#define TX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c++) #define TX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c++)
#define RX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.rx_stats.c++) #define RX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.rx_stats.c++)
#define TX_QSTAT_INC(q) (priv->debug.tx_stats.queue_stats[q]++)
struct ath_tx_stats { struct ath_tx_stats {
u32 buf_queued; u32 buf_queued;
u32 buf_completed; u32 buf_completed;
u32 skb_queued; u32 skb_queued;
u32 skb_completed; u32 skb_completed;
u32 skb_dropped; u32 skb_dropped;
u32 queue_stats[WME_NUM_AC];
}; };
struct ath_rx_stats { struct ath_rx_stats {
......
...@@ -617,6 +617,19 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf, ...@@ -617,6 +617,19 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
"%20s : %10u\n", "SKBs dropped", "%20s : %10u\n", "SKBs dropped",
priv->debug.tx_stats.skb_dropped); priv->debug.tx_stats.skb_dropped);
len += snprintf(buf + len, sizeof(buf) - len,
"%20s : %10u\n", "BE queued",
priv->debug.tx_stats.queue_stats[WME_AC_BE]);
len += snprintf(buf + len, sizeof(buf) - len,
"%20s : %10u\n", "BK queued",
priv->debug.tx_stats.queue_stats[WME_AC_BK]);
len += snprintf(buf + len, sizeof(buf) - len,
"%20s : %10u\n", "VI queued",
priv->debug.tx_stats.queue_stats[WME_AC_VI]);
len += snprintf(buf + len, sizeof(buf) - len,
"%20s : %10u\n", "VO queued",
priv->debug.tx_stats.queue_stats[WME_AC_VO]);
return simple_read_from_buffer(user_buf, count, ppos, buf, len); return simple_read_from_buffer(user_buf, count, ppos, buf, len);
} }
......
...@@ -135,16 +135,20 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb) ...@@ -135,16 +135,20 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb)
switch (hw_qnum) { switch (hw_qnum) {
case 0: case 0:
TX_QSTAT_INC(WME_AC_BE);
epid = priv->data_be_ep; epid = priv->data_be_ep;
break; break;
case 2: case 2:
TX_QSTAT_INC(WME_AC_VI);
epid = priv->data_vi_ep; epid = priv->data_vi_ep;
break; break;
case 3: case 3:
TX_QSTAT_INC(WME_AC_VO);
epid = priv->data_vo_ep; epid = priv->data_vo_ep;
break; break;
case 1: case 1:
default: default:
TX_QSTAT_INC(WME_AC_BK);
epid = priv->data_bk_ep; epid = priv->data_bk_ep;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment