diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2011-04-30 17:14:23 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-02 14:49:16 -0400 |
commit | a073fdef46d50440ee573452a436023dcf4f9edf (patch) | |
tree | ea24b8ae383103b74cb1864e66d0fef82ecee6cf /drivers/net/wireless/rt2x00/rt2x00usb.h | |
parent | 16763478892c271293d02872475a67a648ae12fc (diff) | |
download | linux-a073fdef46d50440ee573452a436023dcf4f9edf.tar.bz2 |
rt2x00: Optimize TX_STA_FIFO register reading
Add recycling functionality to rt2x00usb_register_read_async.
When the callback function returns true, resubmit the urb to
read the register again.
This optimizes the rt2800usb driver when multiple TX status reports
are pending in the register, because now we don't need to allocate
the rt2x00_async_read_data and urb structure each time.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Gertjan van Wingerde <gwingerde@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 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.h b/drivers/net/wireless/rt2x00/rt2x00usb.h index 52b09d2e11de..a69f18758871 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.h +++ b/drivers/net/wireless/rt2x00/rt2x00usb.h @@ -349,10 +349,12 @@ int rt2x00usb_regbusy_read(struct rt2x00_dev *rt2x00dev, * 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. */ void rt2x00usb_register_read_async(struct rt2x00_dev *rt2x00dev, const unsigned int offset, - void (*callback)(struct rt2x00_dev*,int,u32)); + bool (*callback)(struct rt2x00_dev*, int, u32)); /* * Radio handlers |