drivers/net/wireless/ralink/rt2x00/rt2x00usb.h

Source file repositories/reference/linux-study-clean/drivers/net/wireless/ralink/rt2x00/rt2x00usb.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wireless/ralink/rt2x00/rt2x00usb.h
Extension
.h
Size
13336 bytes
Lines
410
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct queue_entry_priv_usb {
	struct urb *urb;
};

/**
 * struct queue_entry_priv_usb_bcn: Per TX entry USB specific information
 *
 * The first section should match &struct queue_entry_priv_usb exactly.
 * rt2500usb can use this structure to send a guardian byte when working
 * with beacons.
 *
 * @urb: Urb structure used for device communication.
 * @guardian_data: Set to 0, used for sending the guardian data.
 * @guardian_urb: Urb structure used to send the guardian data.
 */
struct queue_entry_priv_usb_bcn {
	struct urb *urb;

	unsigned int guardian_data;
	struct urb *guardian_urb;
};

/**
 * rt2x00usb_kick_queue - Kick data queue
 * @queue: Data queue to kick
 *
 * This will walk through all entries of the queue and push all pending
 * frames to the hardware as a single burst.
 */
void rt2x00usb_kick_queue(struct data_queue *queue);

/**
 * rt2x00usb_flush_queue - Flush data queue
 * @queue: Data queue to stop
 * @drop: True to drop all pending frames.
 *
 * This will walk through all entries of the queue and will optionally
 * kill all URB's which were send to the device, or at least wait until
 * they have been returned from the device..
 */
void rt2x00usb_flush_queue(struct data_queue *queue, bool drop);

/**
 * rt2x00usb_watchdog - Watchdog for USB communication
 * @rt2x00dev: Pointer to &struct rt2x00_dev
 *
 * Check the health of the USB communication and determine
 * if timeouts have occurred. If this is the case, this function
 * will reset all communication to restore functionality again.
 */
void rt2x00usb_watchdog(struct rt2x00_dev *rt2x00dev);

/*
 * Device initialization handlers.
 */
void rt2x00usb_clear_entry(struct queue_entry *entry);
int rt2x00usb_initialize(struct rt2x00_dev *rt2x00dev);
void rt2x00usb_uninitialize(struct rt2x00_dev *rt2x00dev);

/*
 * USB driver handlers.
 */
int rt2x00usb_probe(struct usb_interface *usb_intf,
		    const struct rt2x00_ops *ops);
void rt2x00usb_disconnect(struct usb_interface *usb_intf);
#ifdef CONFIG_PM
int rt2x00usb_suspend(struct usb_interface *usb_intf, pm_message_t state);
int rt2x00usb_resume(struct usb_interface *usb_intf);
#else
#define rt2x00usb_suspend	NULL
#define rt2x00usb_resume	NULL
#endif /* CONFIG_PM */

#endif /* RT2X00USB_H */

Annotation

Implementation Notes