aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2010-04-16 02:24:00 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-16 15:47:11 -0400
commiteac8e385e9446e591aacbc9ef2c2a3b0836dd2d4 (patch)
tree5484400ffd79db6811cedd2b779b0d69ede2a238 /drivers/net/wireless
parent0daa3e3a7d85d70cdd4d9cc8e589e79a4a37a5ef (diff)
ath9k_htc: Add dropped SKB count to debugfs
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/hif_usb.c13
-rw-r--r--drivers/net/wireless/ath/ath9k/htc.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c3
3 files changed, 13 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index fe994e22989..3091bb3cef9 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -129,6 +129,7 @@ static void hif_usb_tx_cb(struct urb *urb)
129 TX_STAT_INC(skb_completed); 129 TX_STAT_INC(skb_completed);
130 } else { 130 } else {
131 dev_kfree_skb_any(skb); 131 dev_kfree_skb_any(skb);
132 TX_STAT_INC(skb_dropped);
132 } 133 }
133 } 134 }
134 135
@@ -149,11 +150,15 @@ static void hif_usb_tx_cb(struct urb *urb)
149 } 150 }
150} 151}
151 152
152static inline void ath9k_skb_queue_purge(struct sk_buff_head *list) 153static inline void ath9k_skb_queue_purge(struct hif_device_usb *hif_dev,
154 struct sk_buff_head *list)
153{ 155{
154 struct sk_buff *skb; 156 struct sk_buff *skb;
155 while ((skb = __skb_dequeue(list)) != NULL) 157
158 while ((skb = __skb_dequeue(list)) != NULL) {
156 dev_kfree_skb_any(skb); 159 dev_kfree_skb_any(skb);
160 TX_STAT_INC(skb_dropped);
161 }
157} 162}
158 163
159/* TX lock has to be taken */ 164/* TX lock has to be taken */
@@ -214,7 +219,7 @@ static int __hif_usb_tx(struct hif_device_usb *hif_dev)
214 ret = usb_submit_urb(tx_buf->urb, GFP_ATOMIC); 219 ret = usb_submit_urb(tx_buf->urb, GFP_ATOMIC);
215 if (ret) { 220 if (ret) {
216 tx_buf->len = tx_buf->offset = 0; 221 tx_buf->len = tx_buf->offset = 0;
217 ath9k_skb_queue_purge(&tx_buf->skb_queue); 222 ath9k_skb_queue_purge(hif_dev, &tx_buf->skb_queue);
218 __skb_queue_head_init(&tx_buf->skb_queue); 223 __skb_queue_head_init(&tx_buf->skb_queue);
219 list_move_tail(&tx_buf->list, &hif_dev->tx.tx_buf); 224 list_move_tail(&tx_buf->list, &hif_dev->tx.tx_buf);
220 hif_dev->tx.tx_buf_cnt++; 225 hif_dev->tx.tx_buf_cnt++;
@@ -281,7 +286,7 @@ static void hif_usb_stop(void *hif_handle, u8 pipe_id)
281 unsigned long flags; 286 unsigned long flags;
282 287
283 spin_lock_irqsave(&hif_dev->tx.tx_lock, flags); 288 spin_lock_irqsave(&hif_dev->tx.tx_lock, flags);
284 ath9k_skb_queue_purge(&hif_dev->tx.tx_skb_queue); 289 ath9k_skb_queue_purge(hif_dev, &hif_dev->tx.tx_skb_queue);
285 hif_dev->tx.tx_skb_cnt = 0; 290 hif_dev->tx.tx_skb_cnt = 0;
286 hif_dev->tx.flags |= HIF_USB_TX_STOP; 291 hif_dev->tx.flags |= HIF_USB_TX_STOP;
287 spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags); 292 spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags);
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index 78213fc71b0..6a4614a8701 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -261,6 +261,7 @@ struct ath_tx_stats {
261 u32 buf_completed; 261 u32 buf_completed;
262 u32 skb_queued; 262 u32 skb_queued;
263 u32 skb_completed; 263 u32 skb_completed;
264 u32 skb_dropped;
264}; 265};
265 266
266struct ath_rx_stats { 267struct 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 2cea577f884..081f4450428 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -609,6 +609,9 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
609 len += snprintf(buf + len, sizeof(buf) - len, 609 len += snprintf(buf + len, sizeof(buf) - len,
610 "%20s : %10u\n", "SKBs completed", 610 "%20s : %10u\n", "SKBs completed",
611 priv->debug.tx_stats.skb_completed); 611 priv->debug.tx_stats.skb_completed);
612 len += snprintf(buf + len, sizeof(buf) - len,
613 "%20s : %10u\n", "SKBs dropped",
614 priv->debug.tx_stats.skb_dropped);
612 615
613 return simple_read_from_buffer(user_buf, count, ppos, buf, len); 616 return simple_read_from_buffer(user_buf, count, ppos, buf, len);
614} 617}