diff options
author | Lukasz Majewski <l.majewski@samsung.com> | 2012-02-10 03:54:51 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-04-10 12:11:50 -0400 |
commit | f135617224b4a1113b26b8ee5877e94f38e40d1e (patch) | |
tree | 6877b3c8fcae57bc2806ab5e6d624509ee17f6db /drivers/usb | |
parent | ad579699c4f0274bf522a9252ff9b20c72197e48 (diff) |
usb: gadget: rndis: fix Missing req->context assignment
It is crucial to assign each req->context value to struct rndis.
The problem happens for multi function gadget (g_multi) when multiple
functions are calling common usb_composite_dev control request.
It might happen that *_setup method from one usb function will
alter some fields of this common request issued by other USB
function.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/f_rndis.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index 7b1cf18df5e3..52343654f5df 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c | |||
@@ -500,6 +500,7 @@ rndis_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl) | |||
500 | if (buf) { | 500 | if (buf) { |
501 | memcpy(req->buf, buf, n); | 501 | memcpy(req->buf, buf, n); |
502 | req->complete = rndis_response_complete; | 502 | req->complete = rndis_response_complete; |
503 | req->context = rndis; | ||
503 | rndis_free_response(rndis->config, buf); | 504 | rndis_free_response(rndis->config, buf); |
504 | value = n; | 505 | value = n; |
505 | } | 506 | } |