summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1211rw/zd_usb.c
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2011-02-12 20:43:42 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-02-14 15:51:21 -0500
commit8662b2518ff7995002378058488326ef7cb80de8 (patch)
treee7b0d1c7fca5820a46ac2411a5b4a8e36f8779c4 /drivers/net/wireless/zd1211rw/zd_usb.c
parenteefdbec1ea8b7093d2c09d1825f68438701723cf (diff)
downloadop-kernel-dev-8662b2518ff7995002378058488326ef7cb80de8.zip
op-kernel-dev-8662b2518ff7995002378058488326ef7cb80de8.tar.gz
zd1211rw: move async iowrite16v up to callers
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. Make asynchronous zd_usb_iowrite16v_async available outside zd_usb.c and use where possible. This lower CPU usage from ~10% to ~2% on Intel Atom when running AP-mode with 100 TU beacon interval. 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.c')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index c98f6e7..81e8048 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -1674,7 +1674,7 @@ static void iowrite16v_urb_complete(struct urb *urb)
static int zd_submit_waiting_urb(struct zd_usb *usb, bool last)
{
- int r;
+ int r = 0;
struct urb *urb = usb->urb_async_waiting;
if (!urb)
@@ -1700,7 +1700,7 @@ error:
return r;
}
-static void zd_usb_iowrite16v_async_start(struct zd_usb *usb)
+void zd_usb_iowrite16v_async_start(struct zd_usb *usb)
{
ZD_ASSERT(usb_anchor_empty(&usb->submitted_cmds));
ZD_ASSERT(usb->urb_async_waiting == NULL);
@@ -1713,7 +1713,7 @@ static void zd_usb_iowrite16v_async_start(struct zd_usb *usb)
usb->urb_async_waiting = NULL;
}
-static int zd_usb_iowrite16v_async_end(struct zd_usb *usb, unsigned int timeout)
+int zd_usb_iowrite16v_async_end(struct zd_usb *usb, unsigned int timeout)
{
int r;
@@ -1749,9 +1749,8 @@ error:
return r;
}
-static int zd_usb_iowrite16v_async(struct zd_usb *usb,
- const struct zd_ioreq16 *ioreqs,
- unsigned int count)
+int zd_usb_iowrite16v_async(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs,
+ unsigned int count)
{
int r;
struct usb_device *udev;
OpenPOWER on IntegriCloud