From b4949adcdb6c00e82695e4579df423acb00b9935 Mon Sep 17 00:00:00 2001 From: a17671 Date: Sat, 29 Sep 2018 13:51:40 +0800 Subject: [PATCH] usb:rndis:Fix the no auto installation problem The samsung rndis driver has to be manually installed on Windows Switch the function class to wireless controller to trigger auto Installation on Windows Change-Id: I7fdd0f439cbae41a6a4142785db360fe57873c5f Signed-off-by: a17671 Reviewed-on: https://gerrit.mot.com/1248692 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- drivers/usb/gadget/function/f_rndis.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/usb/gadget/function/f_rndis.c b/drivers/usb/gadget/function/f_rndis.c index 5799fb6e929c..d0deef3ac7d9 100644 --- a/drivers/usb/gadget/function/f_rndis.c +++ b/drivers/usb/gadget/function/f_rndis.c @@ -745,6 +745,15 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f) rndis_data_intf.bInterfaceNumber = status; rndis_union_desc.bSlaveInterface0 = status; + /* "Wireless" RNDIS; auto-detected by Windows */ + rndis_iad_descriptor.bFunctionClass = + USB_CLASS_WIRELESS_CONTROLLER; + rndis_iad_descriptor.bFunctionSubClass = 0x01; + rndis_iad_descriptor.bFunctionProtocol = 0x03; + rndis_control_intf.bInterfaceClass = + USB_CLASS_WIRELESS_CONTROLLER; + rndis_control_intf.bInterfaceSubClass = 0x01; + rndis_control_intf.bInterfaceProtocol = 0x03; status = -ENODEV; /* allocate instance-specific endpoints */ -- 2.20.1