diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index f91901ffda5b..29dba86c8cf0 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -300,7 +300,7 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb) | |||
300 | * If allocation fails, we should drop the current frame | 300 | * If allocation fails, we should drop the current frame |
301 | * so we can recycle the existing sk buffer for the new frame. | 301 | * so we can recycle the existing sk buffer for the new frame. |
302 | */ | 302 | */ |
303 | skb = rt2x00queue_alloc_rxskb(entry->queue); | 303 | skb = rt2x00queue_alloc_skb(entry->queue); |
304 | if (!skb) | 304 | if (!skb) |
305 | goto skip_entry; | 305 | goto skip_entry; |
306 | 306 | ||
@@ -434,8 +434,6 @@ static void rt2x00usb_free_urb(struct rt2x00_dev *rt2x00dev, | |||
434 | entry_priv = queue->entries[i].priv_data; | 434 | entry_priv = queue->entries[i].priv_data; |
435 | usb_kill_urb(entry_priv->urb); | 435 | usb_kill_urb(entry_priv->urb); |
436 | usb_free_urb(entry_priv->urb); | 436 | usb_free_urb(entry_priv->urb); |
437 | if (queue->entries[i].skb) | ||
438 | kfree_skb(queue->entries[i].skb); | ||
439 | } | 437 | } |
440 | 438 | ||
441 | /* | 439 | /* |
@@ -457,10 +455,7 @@ static void rt2x00usb_free_urb(struct rt2x00_dev *rt2x00dev, | |||
457 | int rt2x00usb_initialize(struct rt2x00_dev *rt2x00dev) | 455 | int rt2x00usb_initialize(struct rt2x00_dev *rt2x00dev) |
458 | { | 456 | { |
459 | struct data_queue *queue; | 457 | struct data_queue *queue; |
460 | struct sk_buff *skb; | 458 | int status; |
461 | unsigned int entry_size; | ||
462 | unsigned int i; | ||
463 | int uninitialized_var(status); | ||
464 | 459 | ||
465 | /* | 460 | /* |
466 | * Allocate DMA | 461 | * Allocate DMA |
@@ -471,18 +466,6 @@ int rt2x00usb_initialize(struct rt2x00_dev *rt2x00dev) | |||
471 | goto exit; | 466 | goto exit; |
472 | } | 467 | } |
473 | 468 | ||
474 | /* | ||
475 | * For the RX queue, skb's should be allocated. | ||
476 | */ | ||
477 | entry_size = rt2x00dev->rx->data_size + rt2x00dev->rx->desc_size; | ||
478 | for (i = 0; i < rt2x00dev->rx->limit; i++) { | ||
479 | skb = rt2x00queue_alloc_rxskb(rt2x00dev->rx); | ||
480 | if (!skb) | ||
481 | goto exit; | ||
482 | |||
483 | rt2x00dev->rx->entries[i].skb = skb; | ||
484 | } | ||
485 | |||
486 | return 0; | 469 | return 0; |
487 | 470 | ||
488 | exit: | 471 | exit: |