Skip to content

Commit

Permalink
zd1201: do not use stack as URB transfer_buffer
Browse files Browse the repository at this point in the history
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: [email protected]
Signed-off-by: Jussi Kivilinna <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
jkivilin authored and linvjw committed Aug 9, 2013
1 parent 4fec06a commit 1206ff4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/wireless/zd1201.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1206ff4

Please sign in to comment.