diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2014-07-01 09:47:47 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-07-16 13:58:20 -0400 |
commit | 4546527350c3c508554dff53e9086e9d3de0b97b (patch) | |
tree | 83065721cc1e5eec39087c05ad1d5cdd420254ea /drivers/usb | |
parent | 55f7840ac4c6224263d88014b69f8cd35fa66817 (diff) |
usb: gadget: f_rndis: fix interface id for OS descriptors
f->os_desc_table[0].if_id is zero by default. If the actual id happens
to be different then no Feature Descriptors will be returned to the host
for this interface, so assign if_id as soon as it is known.
Cc: <stable@vger.kernel.org> # v3.16
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/function/f_rndis.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/f_rndis.c b/drivers/usb/gadget/function/f_rndis.c index eed3ad878047..a7b6bbbd697d 100644 --- a/drivers/usb/gadget/function/f_rndis.c +++ b/drivers/usb/gadget/function/f_rndis.c | |||
@@ -727,6 +727,10 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f) | |||
727 | rndis_control_intf.bInterfaceNumber = status; | 727 | rndis_control_intf.bInterfaceNumber = status; |
728 | rndis_union_desc.bMasterInterface0 = status; | 728 | rndis_union_desc.bMasterInterface0 = status; |
729 | 729 | ||
730 | if (cdev->use_os_string) | ||
731 | f->os_desc_table[0].if_id = | ||
732 | rndis_iad_descriptor.bFirstInterface; | ||
733 | |||
730 | status = usb_interface_id(c, f); | 734 | status = usb_interface_id(c, f); |
731 | if (status < 0) | 735 | if (status < 0) |
732 | goto fail; | 736 | goto fail; |