]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
usb: gadget: rndis: don't test against req->length
authorFelipe Balbi <balbi@ti.com>
Fri, 13 May 2011 13:53:48 +0000 (16:53 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Jun 2011 00:32:25 +0000 (09:32 +0900)
commit4cb5ddcc9b8d2f5714f608924726d3076c7c212b
tree1453e7dc165ead3504c6ed9cea2b023ff2ed3665
parent0e3d8df94196537be5998c7aa36827fe2dac6a2f
usb: gadget: rndis: don't test against req->length

commit 472b91274a6c6857877b5caddb875dcb5ecdfcb8 upstream.

composite.c always sets req->length to zero
and expects function driver's setup handlers
to return the amount of bytes to be used
on req->length. If we test against req->length
w_length will always be greater than req->length
thus making us always stall that particular
SEND_ENCAPSULATED_COMMAND request.

Tested against a Windows XP SP3.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/f_rndis.c