Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194463
b: refs/heads/master
c: eac8e38
h: refs/heads/master
i:
  194461: 0b48677
  194459: f34c1ab
  194455: 9a0d64b
  194447: 37b860a
  194431: bfcaf50
v: v3
  • Loading branch information
Sujith authored and John W. Linville committed Apr 16, 2010
1 parent c398244 commit 99fa618
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0daa3e3a7d85d70cdd4d9cc8e589e79a4a37a5ef
refs/heads/master: eac8e385e9446e591aacbc9ef2c2a3b0836dd2d4
13 changes: 9 additions & 4 deletions trunk/drivers/net/wireless/ath/ath9k/hif_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ static void hif_usb_tx_cb(struct urb *urb)
TX_STAT_INC(skb_completed);
} else {
dev_kfree_skb_any(skb);
TX_STAT_INC(skb_dropped);
}
}

Expand All @@ -149,11 +150,15 @@ static void hif_usb_tx_cb(struct urb *urb)
}
}

static inline void ath9k_skb_queue_purge(struct sk_buff_head *list)
static inline void ath9k_skb_queue_purge(struct hif_device_usb *hif_dev,
struct sk_buff_head *list)
{
struct sk_buff *skb;
while ((skb = __skb_dequeue(list)) != NULL)

while ((skb = __skb_dequeue(list)) != NULL) {
dev_kfree_skb_any(skb);
TX_STAT_INC(skb_dropped);
}
}

/* TX lock has to be taken */
Expand Down Expand Up @@ -214,7 +219,7 @@ static int __hif_usb_tx(struct hif_device_usb *hif_dev)
ret = usb_submit_urb(tx_buf->urb, GFP_ATOMIC);
if (ret) {
tx_buf->len = tx_buf->offset = 0;
ath9k_skb_queue_purge(&tx_buf->skb_queue);
ath9k_skb_queue_purge(hif_dev, &tx_buf->skb_queue);
__skb_queue_head_init(&tx_buf->skb_queue);
list_move_tail(&tx_buf->list, &hif_dev->tx.tx_buf);
hif_dev->tx.tx_buf_cnt++;
Expand Down Expand Up @@ -281,7 +286,7 @@ static void hif_usb_stop(void *hif_handle, u8 pipe_id)
unsigned long flags;

spin_lock_irqsave(&hif_dev->tx.tx_lock, flags);
ath9k_skb_queue_purge(&hif_dev->tx.tx_skb_queue);
ath9k_skb_queue_purge(hif_dev, &hif_dev->tx.tx_skb_queue);
hif_dev->tx.tx_skb_cnt = 0;
hif_dev->tx.flags |= HIF_USB_TX_STOP;
spin_unlock_irqrestore(&hif_dev->tx.tx_lock, flags);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath9k/htc.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ struct ath_tx_stats {
u32 buf_completed;
u32 skb_queued;
u32 skb_completed;
u32 skb_dropped;
};

struct ath_rx_stats {
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/htc_drv_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,9 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
len += snprintf(buf + len, sizeof(buf) - len,
"%20s : %10u\n", "SKBs completed",
priv->debug.tx_stats.skb_completed);
len += snprintf(buf + len, sizeof(buf) - len,
"%20s : %10u\n", "SKBs dropped",
priv->debug.tx_stats.skb_dropped);

return simple_read_from_buffer(user_buf, count, ppos, buf, len);
}
Expand Down

0 comments on commit 99fa618

Please sign in to comment.