aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2013-08-06 14:28:42 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-29 09:42:12 -0700
commit50e27a160f6146de036e81420dc13ec9f4824564 (patch)
treeee4d7b7fbd35dfd7d863277031ae79908caab187 /drivers/net/wireless
parent77a83f016ce93273734ae6a732737c0d700e8113 (diff)
downloadkernel_samsung_smdk4412-50e27a160f6146de036e81420dc13ec9f4824564.zip
kernel_samsung_smdk4412-50e27a160f6146de036e81420dc13ec9f4824564.tar.gz
kernel_samsung_smdk4412-50e27a160f6146de036e81420dc13ec9f4824564.tar.bz2
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>
Diffstat (limited to 'drivers/net/wireless')
-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 415eec4..af792a4 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;