Commit 45465273 authored by Andrzej Pietrasiewicz's avatar Andrzej Pietrasiewicz Committed by Felipe Balbi
Browse files

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: <> # v3.16
Acked-by: default avatarMichal Nazarewicz <>
Signed-off-by: default avatarAndrzej Pietrasiewicz <>
Signed-off-by: default avatarFelipe Balbi <>
parent 55f7840a
...@@ -727,6 +727,10 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f) ...@@ -727,6 +727,10 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
rndis_control_intf.bInterfaceNumber = status; rndis_control_intf.bInterfaceNumber = status;
rndis_union_desc.bMasterInterface0 = status; rndis_union_desc.bMasterInterface0 = status;
if (cdev->use_os_string)
f->os_desc_table[0].if_id =
status = usb_interface_id(c, f); status = usb_interface_id(c, f);
if (status < 0) if (status < 0)
goto fail; goto fail;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment