summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/zd1201.c
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2013-08-06 14:28:42 +0300
committerJohn W. Linville <linville@tuxdriver.com>2013-08-09 14:01:05 -0400
commit1206ff4ff9d2ef7468a355328bc58ac6ebf5be44 (patch)
treecd35e9085e08597636cf9f570833f9b4a02de4ba /drivers/net/wireless/zd1201.c
parent4fec06a364a240d9f798d49ab28626dc1f21f629 (diff)
downloadop-kernel-dev-1206ff4ff9d2ef7468a355328bc58ac6ebf5be44.zip
op-kernel-dev-1206ff4ff9d2ef7468a355328bc58ac6ebf5be44.tar.gz
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>
Diffstat (limited to 'drivers/net/wireless/zd1201.c')
-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 4941f20..b8ba1f9 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)
goto exit;
err = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), 0x4,
- USB_DIR_IN | 0x40, 0,0, &ret, sizeof(ret), ZD1201_FW_TIMEOUT);
+ USB_DIR_IN | 0x40, 0, 0, buf, sizeof(ret), ZD1201_FW_TIMEOUT);
if (err < 0)
goto exit;
+ memcpy(&ret, buf, sizeof(ret));
+
if (ret & 0x80) {
err = -EIO;
goto exit;
OpenPOWER on IntegriCloud