diff options
author | Johannes Stezenbach <js@sig21.net> | 2011-04-18 15:29:12 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-19 15:39:27 -0400 |
commit | 0e0d39e5f3a3e59c8513b59d4feeeadcb93b707d (patch) | |
tree | 72b63cb8c5a994cc7e6253b241aeddd131d618f0 /drivers/net/wireless/rt2x00/rt2x00usb.h | |
parent | 8da3efbb4a18be30ed03dd05af18d0b026b15173 (diff) | |
download | kernel_samsung_smdk4412-0e0d39e5f3a3e59c8513b59d4feeeadcb93b707d.zip kernel_samsung_smdk4412-0e0d39e5f3a3e59c8513b59d4feeeadcb93b707d.tar.gz kernel_samsung_smdk4412-0e0d39e5f3a3e59c8513b59d4feeeadcb93b707d.tar.bz2 |
rt2800usb: read TX_STA_FIFO asynchronously
Trying to fix the "TX status report missed" warnings
by reading the TX_STA_FIFO entries as quickly as possible.
The TX_STA_FIFO is too small in hardware, thus reading
it only from the workqueue is too slow and entries get lost.
Start an asynchronous read of the TX_STA_FIFO directly from
the TX URB completion callback (atomic context, thus it cannot
use the blocking rt2800_register_read()). If the async
read returns a valid FIFO entry, it is pushed into a larger
FIFO inside struct rt2x00_dev, until rt2800_txdone() picks
it up.
A .tx_dma_done callback is added to struct rt2x00lib_ops
to trigger the async read from the URB completion callback.
Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00usb.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.h b/drivers/net/wireless/rt2x00/rt2x00usb.h index 6aaf51f..e3faca6 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.h +++ b/drivers/net/wireless/rt2x00/rt2x00usb.h @@ -345,6 +345,21 @@ int rt2x00usb_regbusy_read(struct rt2x00_dev *rt2x00dev, const struct rt2x00_field32 field, u32 *reg); +/** + * rt2x00usb_register_read_async - Asynchronously read 32bit register word + * @rt2x00dev: Device pointer, see &struct rt2x00_dev. + * @offset: Register offset + * @callback: 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(). + */ +void rt2x00usb_register_read_async(struct rt2x00_dev *rt2x00dev, + const unsigned int offset, + void (*callback)(struct rt2x00_dev*,int,u32)); + /* * Radio handlers */ |