diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.c | 60 |
1 files changed, 23 insertions, 37 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index fa0cdd8b3e1a..63726a152a1a 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -333,43 +333,6 @@ skip_entry: | |||
333 | /* | 333 | /* |
334 | * Radio handlers | 334 | * Radio handlers |
335 | */ | 335 | */ |
336 | void rt2x00usb_enable_radio(struct rt2x00_dev *rt2x00dev) | ||
337 | { | ||
338 | struct usb_device *usb_dev = | ||
339 | interface_to_usbdev(rt2x00dev_usb(rt2x00dev)); | ||
340 | struct data_ring *ring; | ||
341 | struct data_entry *entry; | ||
342 | unsigned int i; | ||
343 | |||
344 | /* | ||
345 | * Initialize the TX rings | ||
346 | */ | ||
347 | txringall_for_each(rt2x00dev, ring) { | ||
348 | for (i = 0; i < ring->stats.limit; i++) | ||
349 | ring->entry[i].flags = 0; | ||
350 | |||
351 | rt2x00_ring_index_clear(ring); | ||
352 | } | ||
353 | |||
354 | /* | ||
355 | * Initialize and start the RX ring. | ||
356 | */ | ||
357 | rt2x00_ring_index_clear(rt2x00dev->rx); | ||
358 | |||
359 | for (i = 0; i < rt2x00dev->rx->stats.limit; i++) { | ||
360 | entry = &rt2x00dev->rx->entry[i]; | ||
361 | |||
362 | usb_fill_bulk_urb(entry->priv, usb_dev, | ||
363 | usb_rcvbulkpipe(usb_dev, 1), | ||
364 | entry->skb->data, entry->skb->len, | ||
365 | rt2x00usb_interrupt_rxdone, entry); | ||
366 | |||
367 | __set_bit(ENTRY_OWNER_NIC, &entry->flags); | ||
368 | usb_submit_urb(entry->priv, GFP_ATOMIC); | ||
369 | } | ||
370 | } | ||
371 | EXPORT_SYMBOL_GPL(rt2x00usb_enable_radio); | ||
372 | |||
373 | void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev) | 336 | void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev) |
374 | { | 337 | { |
375 | struct data_ring *ring; | 338 | struct data_ring *ring; |
@@ -391,6 +354,29 @@ EXPORT_SYMBOL_GPL(rt2x00usb_disable_radio); | |||
391 | /* | 354 | /* |
392 | * Device initialization handlers. | 355 | * Device initialization handlers. |
393 | */ | 356 | */ |
357 | void rt2x00usb_init_rxentry(struct rt2x00_dev *rt2x00dev, | ||
358 | struct data_entry *entry) | ||
359 | { | ||
360 | struct usb_device *usb_dev = | ||
361 | interface_to_usbdev(rt2x00dev_usb(rt2x00dev)); | ||
362 | |||
363 | usb_fill_bulk_urb(entry->priv, usb_dev, | ||
364 | usb_rcvbulkpipe(usb_dev, 1), | ||
365 | entry->skb->data, entry->skb->len, | ||
366 | rt2x00usb_interrupt_rxdone, entry); | ||
367 | |||
368 | __set_bit(ENTRY_OWNER_NIC, &entry->flags); | ||
369 | usb_submit_urb(entry->priv, GFP_ATOMIC); | ||
370 | } | ||
371 | EXPORT_SYMBOL_GPL(rt2x00usb_init_rxentry); | ||
372 | |||
373 | void rt2x00usb_init_txentry(struct rt2x00_dev *rt2x00dev, | ||
374 | struct data_entry *entry) | ||
375 | { | ||
376 | entry->flags = 0; | ||
377 | } | ||
378 | EXPORT_SYMBOL_GPL(rt2x00usb_init_txentry); | ||
379 | |||
394 | static int rt2x00usb_alloc_urb(struct rt2x00_dev *rt2x00dev, | 380 | static int rt2x00usb_alloc_urb(struct rt2x00_dev *rt2x00dev, |
395 | struct data_ring *ring) | 381 | struct data_ring *ring) |
396 | { | 382 | { |