aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1211rw/zd_usb.c
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2011-02-12 13:43:23 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-02-14 15:51:21 -0500
commit37939810b937aba830dd751291fcdc51cae1a6cb (patch)
tree77b6a130bc287a8243333397d1a2ba75fd525248 /drivers/net/wireless/zd1211rw/zd_usb.c
parent0c2530cec5672f38f8ab834ee53d17175d3bca95 (diff)
zd1211rw: correct use of usb_bulk_msg on interrupt endpoints
zd1211rw is using usb_bulk_msg() with usb_sndbulkpipe() on interrupt endpoint. However usb_bulk_msg() internally corrects this and makes interrupt URB. It's better to change usb_bulk_msgs in zd1211rw to usb_interrupt_msg for less confusion. 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.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index f6df3665fdb6..7346512158e8 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -1634,15 +1634,15 @@ int zd_usb_ioread16v(struct zd_usb *usb, u16 *values,
1634 1634
1635 udev = zd_usb_to_usbdev(usb); 1635 udev = zd_usb_to_usbdev(usb);
1636 prepare_read_regs_int(usb); 1636 prepare_read_regs_int(usb);
1637 r = usb_bulk_msg(udev, usb_sndbulkpipe(udev, EP_REGS_OUT), 1637 r = usb_interrupt_msg(udev, usb_sndintpipe(udev, EP_REGS_OUT),
1638 req, req_len, &actual_req_len, 50 /* ms */); 1638 req, req_len, &actual_req_len, 50 /* ms */);
1639 if (r) { 1639 if (r) {
1640 dev_dbg_f(zd_usb_dev(usb), 1640 dev_dbg_f(zd_usb_dev(usb),
1641 "error in usb_bulk_msg(). Error number %d\n", r); 1641 "error in usb_interrupt_msg(). Error number %d\n", r);
1642 goto error; 1642 goto error;
1643 } 1643 }
1644 if (req_len != actual_req_len) { 1644 if (req_len != actual_req_len) {
1645 dev_dbg_f(zd_usb_dev(usb), "error in usb_bulk_msg()\n" 1645 dev_dbg_f(zd_usb_dev(usb), "error in usb_interrupt_msg()\n"
1646 " req_len %d != actual_req_len %d\n", 1646 " req_len %d != actual_req_len %d\n",
1647 req_len, actual_req_len); 1647 req_len, actual_req_len);
1648 r = -EIO; 1648 r = -EIO;
@@ -1705,16 +1705,16 @@ int zd_usb_iowrite16v(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs,
1705 } 1705 }
1706 1706
1707 udev = zd_usb_to_usbdev(usb); 1707 udev = zd_usb_to_usbdev(usb);
1708 r = usb_bulk_msg(udev, usb_sndbulkpipe(udev, EP_REGS_OUT), 1708 r = usb_interrupt_msg(udev, usb_sndintpipe(udev, EP_REGS_OUT),
1709 req, req_len, &actual_req_len, 50 /* ms */); 1709 req, req_len, &actual_req_len, 50 /* ms */);
1710 if (r) { 1710 if (r) {
1711 dev_dbg_f(zd_usb_dev(usb), 1711 dev_dbg_f(zd_usb_dev(usb),
1712 "error in usb_bulk_msg(). Error number %d\n", r); 1712 "error in usb_interrupt_msg(). Error number %d\n", r);
1713 goto error; 1713 goto error;
1714 } 1714 }
1715 if (req_len != actual_req_len) { 1715 if (req_len != actual_req_len) {
1716 dev_dbg_f(zd_usb_dev(usb), 1716 dev_dbg_f(zd_usb_dev(usb),
1717 "error in usb_bulk_msg()" 1717 "error in usb_interrupt_msg()"
1718 " req_len %d != actual_req_len %d\n", 1718 " req_len %d != actual_req_len %d\n",
1719 req_len, actual_req_len); 1719 req_len, actual_req_len);
1720 r = -EIO; 1720 r = -EIO;
@@ -1794,15 +1794,15 @@ int zd_usb_rfwrite(struct zd_usb *usb, u32 value, u8 bits)
1794 } 1794 }
1795 1795
1796 udev = zd_usb_to_usbdev(usb); 1796 udev = zd_usb_to_usbdev(usb);
1797 r = usb_bulk_msg(udev, usb_sndbulkpipe(udev, EP_REGS_OUT), 1797 r = usb_interrupt_msg(udev, usb_sndintpipe(udev, EP_REGS_OUT),
1798 req, req_len, &actual_req_len, 50 /* ms */); 1798 req, req_len, &actual_req_len, 50 /* ms */);
1799 if (r) { 1799 if (r) {
1800 dev_dbg_f(zd_usb_dev(usb), 1800 dev_dbg_f(zd_usb_dev(usb),
1801 "error in usb_bulk_msg(). Error number %d\n", r); 1801 "error in usb_interrupt_msg(). Error number %d\n", r);
1802 goto out; 1802 goto out;
1803 } 1803 }
1804 if (req_len != actual_req_len) { 1804 if (req_len != actual_req_len) {
1805 dev_dbg_f(zd_usb_dev(usb), "error in usb_bulk_msg()" 1805 dev_dbg_f(zd_usb_dev(usb), "error in usb_interrupt_msg()"
1806 " req_len %d != actual_req_len %d\n", 1806 " req_len %d != actual_req_len %d\n",
1807 req_len, actual_req_len); 1807 req_len, actual_req_len);
1808 r = -EIO; 1808 r = -EIO;