diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2010-05-14 01:48:54 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-02 16:13:02 -0400 |
commit | 2edb4583c6a581e1e48af259db2a2d467d11551d (patch) | |
tree | c7186a72858621b0927cb3a7ef323e81ec6545ea /drivers/net/wireless | |
parent | 6473d24d5b6b76bb5fd16914709a619a00c44d28 (diff) |
ath9k_htc: Add queue statistics to xmit debugfs file
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 4 |
3 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h index c251603ab032..351c4a44c984 100644 --- a/drivers/net/wireless/ath/ath9k/htc.h +++ b/drivers/net/wireless/ath/ath9k/htc.h | |||
@@ -257,12 +257,15 @@ struct ath9k_htc_tx_ctl { | |||
257 | #define TX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c++) | 257 | #define TX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.tx_stats.c++) |
258 | #define RX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.rx_stats.c++) | 258 | #define RX_STAT_INC(c) (hif_dev->htc_handle->drv_priv->debug.rx_stats.c++) |
259 | 259 | ||
260 | #define TX_QSTAT_INC(q) (priv->debug.tx_stats.queue_stats[q]++) | ||
261 | |||
260 | struct ath_tx_stats { | 262 | struct ath_tx_stats { |
261 | u32 buf_queued; | 263 | u32 buf_queued; |
262 | u32 buf_completed; | 264 | u32 buf_completed; |
263 | u32 skb_queued; | 265 | u32 skb_queued; |
264 | u32 skb_completed; | 266 | u32 skb_completed; |
265 | u32 skb_dropped; | 267 | u32 skb_dropped; |
268 | u32 queue_stats[WME_NUM_AC]; | ||
266 | }; | 269 | }; |
267 | 270 | ||
268 | struct ath_rx_stats { | 271 | struct ath_rx_stats { |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 9d371c18eb41..cf1112be2a9a 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -617,6 +617,19 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf, | |||
617 | "%20s : %10u\n", "SKBs dropped", | 617 | "%20s : %10u\n", "SKBs dropped", |
618 | priv->debug.tx_stats.skb_dropped); | 618 | priv->debug.tx_stats.skb_dropped); |
619 | 619 | ||
620 | len += snprintf(buf + len, sizeof(buf) - len, | ||
621 | "%20s : %10u\n", "BE queued", | ||
622 | priv->debug.tx_stats.queue_stats[WME_AC_BE]); | ||
623 | len += snprintf(buf + len, sizeof(buf) - len, | ||
624 | "%20s : %10u\n", "BK queued", | ||
625 | priv->debug.tx_stats.queue_stats[WME_AC_BK]); | ||
626 | len += snprintf(buf + len, sizeof(buf) - len, | ||
627 | "%20s : %10u\n", "VI queued", | ||
628 | priv->debug.tx_stats.queue_stats[WME_AC_VI]); | ||
629 | len += snprintf(buf + len, sizeof(buf) - len, | ||
630 | "%20s : %10u\n", "VO queued", | ||
631 | priv->debug.tx_stats.queue_stats[WME_AC_VO]); | ||
632 | |||
620 | return simple_read_from_buffer(user_buf, count, ppos, buf, len); | 633 | return simple_read_from_buffer(user_buf, count, ppos, buf, len); |
621 | } | 634 | } |
622 | 635 | ||
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index 2571b443ac82..09ff8f1a68e0 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | |||
@@ -135,16 +135,20 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, struct sk_buff *skb) | |||
135 | 135 | ||
136 | switch (hw_qnum) { | 136 | switch (hw_qnum) { |
137 | case 0: | 137 | case 0: |
138 | TX_QSTAT_INC(WME_AC_BE); | ||
138 | epid = priv->data_be_ep; | 139 | epid = priv->data_be_ep; |
139 | break; | 140 | break; |
140 | case 2: | 141 | case 2: |
142 | TX_QSTAT_INC(WME_AC_VI); | ||
141 | epid = priv->data_vi_ep; | 143 | epid = priv->data_vi_ep; |
142 | break; | 144 | break; |
143 | case 3: | 145 | case 3: |
146 | TX_QSTAT_INC(WME_AC_VO); | ||
144 | epid = priv->data_vo_ep; | 147 | epid = priv->data_vo_ep; |
145 | break; | 148 | break; |
146 | case 1: | 149 | case 1: |
147 | default: | 150 | default: |
151 | TX_QSTAT_INC(WME_AC_BK); | ||
148 | epid = priv->data_bk_ep; | 152 | epid = priv->data_bk_ep; |
149 | break; | 153 | break; |
150 | } | 154 | } |