]> git.karo-electronics.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)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 17 May 2012 15:20:35 +0000 (11:20 -0400)
commit6d9190455ff09e666dbf8f568e2974be92370e90
tree22c30c24923a7324ba65f5d123352a14e6351c59
parente9f13bc2f4c78adf48aa88eba7ceedc3c4a02c96
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>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/usb/gadget/f_rndis.c