diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2013-08-06 14:28:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-29 09:47:35 -0700 |
commit | b169395145ce013ad1ed3ee25878112f647ffd56 (patch) | |
tree | 7edc187abbf55e53cc4e44f8e3ca97f0c1d48ec1 | |
parent | 0cbf39727e08f58246e763f8af2f8dcb8a9f648f (diff) | |
download | linux-3.10-b169395145ce013ad1ed3ee25878112f647ffd56.tar.gz linux-3.10-b169395145ce013ad1ed3ee25878112f647ffd56.tar.bz2 linux-3.10-b169395145ce013ad1ed3ee25878112f647ffd56.zip |
zd1201: do not use stack as URB transfer_buffer
commit 1206ff4ff9d2ef7468a355328bc58ac6ebf5be44 upstream.
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.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/net/wireless/zd1201.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c index 4941f201d6c..b8ba1f925e7 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; |