aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00usb.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00usb.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.h31
1 files changed, 21 insertions, 10 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.h b/drivers/net/wireless/rt2x00/rt2x00usb.h
index e11c759ac9e..64be34f612f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.h
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.h
@@ -35,12 +35,6 @@
35}) 35})
36 36
37/* 37/*
38 * This variable should be used with the
39 * usb_driver structure initialization.
40 */
41#define USB_DEVICE_DATA(__ops) .driver_info = (kernel_ulong_t)(__ops)
42
43/*
44 * For USB vendor requests we need to pass a timeout 38 * For USB vendor requests we need to pass a timeout
45 * time in ms, for this we use the REGISTER_TIMEOUT, 39 * time in ms, for this we use the REGISTER_TIMEOUT,
46 * however when loading firmware a higher value is 40 * however when loading firmware a higher value is
@@ -345,6 +339,21 @@ int rt2x00usb_regbusy_read(struct rt2x00_dev *rt2x00dev,
345 const struct rt2x00_field32 field, 339 const struct rt2x00_field32 field,
346 u32 *reg); 340 u32 *reg);
347 341
342/**
343 * rt2x00usb_register_read_async - Asynchronously read 32bit register word
344 * @rt2x00dev: Device pointer, see &struct rt2x00_dev.
345 * @offset: Register offset
346 * @callback: Functon to call when read completes.
347 *
348 * Submit a control URB to read a 32bit register. This safe to
349 * be called from atomic context. The callback will be called
350 * when the URB completes. Otherwise the function is similar
351 * to rt2x00usb_register_read().
352 */
353void rt2x00usb_register_read_async(struct rt2x00_dev *rt2x00dev,
354 const unsigned int offset,
355 void (*callback)(struct rt2x00_dev*,int,u32));
356
348/* 357/*
349 * Radio handlers 358 * Radio handlers
350 */ 359 */
@@ -389,11 +398,13 @@ void rt2x00usb_kick_queue(struct data_queue *queue);
389/** 398/**
390 * rt2x00usb_flush_queue - Flush data queue 399 * rt2x00usb_flush_queue - Flush data queue
391 * @queue: Data queue to stop 400 * @queue: Data queue to stop
401 * @drop: True to drop all pending frames.
392 * 402 *
393 * This will walk through all entries of the queue and kill all 403 * This will walk through all entries of the queue and will optionally
394 * URB's which were send to the device. 404 * kill all URB's which were send to the device, or at least wait until
405 * they have been returned from the device..
395 */ 406 */
396void rt2x00usb_flush_queue(struct data_queue *queue); 407void rt2x00usb_flush_queue(struct data_queue *queue, bool drop);
397 408
398/** 409/**
399 * rt2x00usb_watchdog - Watchdog for USB communication 410 * rt2x00usb_watchdog - Watchdog for USB communication
@@ -416,7 +427,7 @@ void rt2x00usb_uninitialize(struct rt2x00_dev *rt2x00dev);
416 * USB driver handlers. 427 * USB driver handlers.
417 */ 428 */
418int rt2x00usb_probe(struct usb_interface *usb_intf, 429int rt2x00usb_probe(struct usb_interface *usb_intf,
419 const struct usb_device_id *id); 430 const struct rt2x00_ops *ops);
420void rt2x00usb_disconnect(struct usb_interface *usb_intf); 431void rt2x00usb_disconnect(struct usb_interface *usb_intf);
421#ifdef CONFIG_PM 432#ifdef CONFIG_PM
422int rt2x00usb_suspend(struct usb_interface *usb_intf, pm_message_t state); 433int rt2x00usb_suspend(struct usb_interface *usb_intf, pm_message_t state);