aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2013-08-06 07:28:42 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-08-09 14:01:05 -0400
commit1206ff4ff9d2ef7468a355328bc58ac6ebf5be44 (patch)
treecd35e9085e08597636cf9f570833f9b4a02de4ba
parent4fec06a364a240d9f798d49ab28626dc1f21f629 (diff)
zd1201: do not use stack as URB transfer_buffer
Patch fixes zd1201 not to use stack as URB transfer_buffer. URB buffers need to be DMA-able, which stack is not. Patch is only compile tested. Cc: stable@vger.kernel.org Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/zd1201.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c
index 4941f201d6c8..b8ba1f925e75 100644
--- a/drivers/net/wireless/zd1201.c
+++ b/drivers/net/wireless/zd1201.c
@@ -98,10 +98,12 @@ static int zd1201_fw_upload(struct usb_device *dev, int apfw)
98 goto exit; 98 goto exit;
99 99
100 err = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), 0x4, 100 err = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), 0x4,
101 USB_DIR_IN | 0x40, 0,0, &ret, sizeof(ret), ZD1201_FW_TIMEOUT); 101 USB_DIR_IN | 0x40, 0, 0, buf, sizeof(ret), ZD1201_FW_TIMEOUT);
102 if (err < 0) 102 if (err < 0)
103 goto exit; 103 goto exit;
104 104
105 memcpy(&ret, buf, sizeof(ret));
106
105 if (ret & 0x80) { 107 if (ret & 0x80) {
106 err = -EIO; 108 err = -EIO;
107 goto exit; 109 goto exit;