Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194274
b: refs/heads/master
c: f8e1d08
h: refs/heads/master
v: v3
  • Loading branch information
Ming Lei authored and John W. Linville committed Apr 14, 2010
1 parent 1feee7c commit fe84eb9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: 0fa35a5836df2b8f285d6f53dfb4316c34621f88
refs/heads/master: f8e1d0803d2db9ef0116941a4ce46069a2009ea6
11 changes: 9 additions & 2 deletions trunk/drivers/net/wireless/ath/ath9k/hif_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ static void hif_usb_tx_cb(struct urb *urb)
}
}

static inline void ath9k_skb_queue_purge(struct sk_buff_head *list)
{
struct sk_buff *skb;
while ((skb = __skb_dequeue(list)) != NULL)
dev_kfree_skb_any(skb);
}

/* TX lock has to be taken */
static int __hif_usb_tx(struct hif_device_usb *hif_dev)
{
Expand Down Expand Up @@ -207,7 +214,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;
__skb_queue_purge(&tx_buf->skb_queue);
ath9k_skb_queue_purge(&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 @@ -274,7 +281,7 @@ static void hif_usb_stop(void *hif_handle, u8 pipe_id)
unsigned long flags;

spin_lock_irqsave(&hif_dev->tx.tx_lock, flags);
__skb_queue_purge(&hif_dev->tx.tx_skb_queue);
ath9k_skb_queue_purge(&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

0 comments on commit fe84eb9

Please sign in to comment.