summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1211rw/zd_usb.h
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2011-02-12 20:43:32 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-02-14 15:51:21 -0500
commiteefdbec1ea8b7093d2c09d1825f68438701723cf (patch)
tree6dc40b6d25f8dede0522927f48c4a716ff9c88c9 /drivers/net/wireless/zd1211rw/zd_usb.h
parent37939810b937aba830dd751291fcdc51cae1a6cb (diff)
downloadblackbird-op-linux-eefdbec1ea8b7093d2c09d1825f68438701723cf.tar.gz
blackbird-op-linux-eefdbec1ea8b7093d2c09d1825f68438701723cf.zip
zd1211rw: use async urb for write command
Writing beacon to device happen through multiple write command calls. zd_usb_iowrite16v uses synchronous urb call and with multiple write commands in row causes high CPU usage. This patch makes zd_usb_iowrite16v use asynchronous urb submit within zd_usb.c. zd_usb_iowrite16v_async_start is used to initiate writing multiple commands to device using zd_usb_iowrite16v_async. Each URB is delayed and submitted to device by next zd_usb_iowrite16v_async call or by call to zd_usb_iowrite16v_async_end. URBs submitted by zd_usb_iowrite16v_async have URB_NO_INTERRUPT set and last URB send by zd_usb_iowrite16v_async_end does not. This lower CPU usage when doing writes that require multiple URBs. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_usb.h')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.h b/drivers/net/wireless/zd1211rw/zd_usb.h
index 2d688f48a34c..929142692063 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.h
+++ b/drivers/net/wireless/zd1211rw/zd_usb.h
@@ -217,8 +217,11 @@ struct zd_usb {
struct zd_usb_rx rx;
struct zd_usb_tx tx;
struct usb_interface *intf;
+ struct usb_anchor submitted_cmds;
+ struct urb *urb_async_waiting;
+ int cmd_error;
u8 req_buf[64]; /* zd_usb_iowrite16v needs 62 bytes */
- u8 is_zd1211b:1, initialized:1, was_running:1;
+ u8 is_zd1211b:1, initialized:1, was_running:1, in_async:1;
};
#define zd_usb_dev(usb) (&usb->intf->dev)
OpenPOWER on IntegriCloud