mt7601u: fix dma from stack address
authorJakub Kicinski <kubakici@wp.pl>
Fri, 31 Jul 2015 13:04:46 +0000 (15:04 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 10 Aug 2015 19:19:31 +0000 (22:19 +0300)
commitbed429e1ae8b7ee207e01f3aa60dcc0d06a8ed4d
treeea5cc5c1f61fe0a3a0c87a8093527be6dc7c4c74
parent7845af35e0deeb7537de759ebc69d6395d4123bf
mt7601u: fix dma from stack address

DMA to variables located on the stack is a bad idea.
For simplicity and to avoid frequent allocations create
a buffer inside the device structure.  Protect this
buffer with vendor_req_mutex.  Don't protect vendor
requests which don't use this buffer.

Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mediatek/mt7601u/mt7601u.h
drivers/net/wireless/mediatek/mt7601u/usb.c
drivers/net/wireless/mediatek/mt7601u/usb.h