#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/bug.h>
#include "rt2x00.h"
#include "rt2x00usb.h"
Go to the source code of this file.
|
int | rt2x00usb_vendor_request (struct rt2x00_dev *rt2x00dev, const u8 request, const u8 requesttype, const u16 offset, const u16 value, void *buffer, const u16 buffer_length, const int timeout) |
|
| EXPORT_SYMBOL_GPL (rt2x00usb_vendor_request) |
|
int | rt2x00usb_vendor_req_buff_lock (struct rt2x00_dev *rt2x00dev, const u8 request, const u8 requesttype, const u16 offset, void *buffer, const u16 buffer_length, const int timeout) |
|
| EXPORT_SYMBOL_GPL (rt2x00usb_vendor_req_buff_lock) |
|
int | rt2x00usb_vendor_request_buff (struct rt2x00_dev *rt2x00dev, const u8 request, const u8 requesttype, const u16 offset, void *buffer, const u16 buffer_length, const int timeout) |
|
| EXPORT_SYMBOL_GPL (rt2x00usb_vendor_request_buff) |
|
int | rt2x00usb_regbusy_read (struct rt2x00_dev *rt2x00dev, const unsigned int offset, const struct rt2x00_field32 field, u32 *reg) |
|
| EXPORT_SYMBOL_GPL (rt2x00usb_regbusy_read) |
|
void | rt2x00usb_register_read_async (struct rt2x00_dev *rt2x00dev, const unsigned int offset, bool(*callback)(struct rt2x00_dev *, int, u32)) |
|
| EXPORT_SYMBOL_GPL (rt2x00usb_register_read_async) |
|
void | rt2x00usb_kick_queue (struct data_queue *queue) |
|
| EXPORT_SYMBOL_GPL (rt2x00usb_kick_queue) |
|
void | rt2x00usb_flush_queue (struct data_queue *queue, bool drop) |
|
| EXPORT_SYMBOL_GPL (rt2x00usb_flush_queue) |
|
void | rt2x00usb_watchdog (struct rt2x00_dev *rt2x00dev) |
|
| EXPORT_SYMBOL_GPL (rt2x00usb_watchdog) |
|
void | rt2x00usb_disable_radio (struct rt2x00_dev *rt2x00dev) |
|
| EXPORT_SYMBOL_GPL (rt2x00usb_disable_radio) |
|
void | rt2x00usb_clear_entry (struct queue_entry *entry) |
|
| EXPORT_SYMBOL_GPL (rt2x00usb_clear_entry) |
|
int | rt2x00usb_initialize (struct rt2x00_dev *rt2x00dev) |
|
| EXPORT_SYMBOL_GPL (rt2x00usb_initialize) |
|
void | rt2x00usb_uninitialize (struct rt2x00_dev *rt2x00dev) |
|
| EXPORT_SYMBOL_GPL (rt2x00usb_uninitialize) |
|
int | rt2x00usb_probe (struct usb_interface *usb_intf, const struct rt2x00_ops *ops) |
|
| EXPORT_SYMBOL_GPL (rt2x00usb_probe) |
|
void | rt2x00usb_disconnect (struct usb_interface *usb_intf) |
|
| EXPORT_SYMBOL_GPL (rt2x00usb_disconnect) |
|
| MODULE_AUTHOR (DRV_PROJECT) |
|
| MODULE_VERSION (DRV_VERSION) |
|
| MODULE_DESCRIPTION ("rt2x00 usb library") |
|
| MODULE_LICENSE ("GPL") |
|
MODULE_DESCRIPTION |
( |
"rt2x00 usb library" |
| ) |
|
void rt2x00usb_clear_entry |
( |
struct queue_entry * |
entry | ) |
|
rt2x00usb_flush_queue - Flush data queue : Data queue to stop : 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..
Definition at line 465 of file rt2x00usb.c.
rt2x00usb_kick_queue - Kick data 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.
Definition at line 422 of file rt2x00usb.c.
rt2x00usb_regbusy_read - Read from register with busy check : Device pointer, see &struct rt2x00_dev. : Register offset : Field to check if register is busy : Pointer to where register contents should be stored
This function will read the given register, and checks if the register is busy. If it is, it will sleep for a couple of microseconds before reading the register again. If the register is not read after a certain timeout, this function will return FALSE.
Definition at line 143 of file rt2x00usb.c.
rt2x00usb_register_read_async - Asynchronously read 32bit register word : Device pointer, see &struct rt2x00_dev. : Register offset : Functon to call when read completes.
Submit a control URB to read a 32bit register. This safe to be called from atomic context. The callback will be called when the URB completes. Otherwise the function is similar to rt2x00usb_register_read(). When the callback function returns false, the memory will be cleaned up, when it returns true, the urb will be fired again.
Definition at line 186 of file rt2x00usb.c.
rt2x00usb_vendor_request_buff - Send register command to device (buffered) : Pointer to &struct rt2x00_dev : USB vendor command (See &enum rt2x00usb_vendor_request) : Request type &USB_VENDOR_REQUEST_* : Register offset to perform action on : Buffer where information will be read/written to by device : Size of &buffer : Operation timeout
A version of &rt2x00usb_vendor_request_buff which must be called if the usb_cache_mutex is already held.
Definition at line 81 of file rt2x00usb.c.
rt2x00usb_vendor_request - Send register command to device : Pointer to &struct rt2x00_dev : USB vendor command (See &enum rt2x00usb_vendor_request) : Request type &USB_VENDOR_REQUEST_* : Register offset to perform action on : Value to write to device : Buffer where information will be read/written to by device : Size of &buffer : Operation timeout
This is the main function to communicate with the device, the &buffer argument must either be NULL or point to a buffer allocated by kmalloc. Failure to do so can lead to unexpected behavior depending on the architecture.
Definition at line 39 of file rt2x00usb.c.
rt2x00usb_vendor_request_buff - Send register command to device (buffered) : Pointer to &struct rt2x00_dev : USB vendor command (See &enum rt2x00usb_vendor_request) : Request type &USB_VENDOR_REQUEST_* : Register offset to perform action on : Buffer where information will be read/written to by device : Size of &buffer : Operation timeout
This function will use a previously with kmalloc allocated cache to communicate with the device. The contents of the buffer pointer will be copied to this cache when writing, or read from the cache when reading. Buffers send to &rt2x00usb_vendor_request must be allocated with kmalloc. Hence the reason for using a previously allocated cache which has been allocated properly.
Definition at line 112 of file rt2x00usb.c.
rt2x00usb_watchdog - Watchdog for USB communication : 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.
Definition at line 531 of file rt2x00usb.c.