rt2x00: Optimize TX_STA_FIFO register reading
authorIvo van Doorn <ivdoorn@gmail.com>
Sat, 30 Apr 2011 15:14:23 +0000 (17:14 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 2 May 2011 18:49:16 +0000 (14:49 -0400)
commita073fdef46d50440ee573452a436023dcf4f9edf
treeea24b8ae383103b74cb1864e66d0fef82ecee6cf
parent16763478892c271293d02872475a67a648ae12fc
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>
drivers/net/wireless/rt2x00/rt2800usb.c
drivers/net/wireless/rt2x00/rt2x00usb.c
drivers/net/wireless/rt2x00/rt2x00usb.h