]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitaabfd5a37d5a809eaad9b89d682396bda7836ccf
treeea5cc5c1f61fe0a3a0c87a8093527be6dc7c4c74
parent53993ff9c0846b9bf3365ab457a80bef5123a9d5
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