usb: gadget: Add support for different rndis usbif class codes
RNDIS (Remote NDIS) is supported using many combinations of class, subclass and protocol. Enhance the current implementation to allow dynamically choosing one of the combinations. Currently, Windows7/ Windows10 automatically loads RNDIS drivers for class drivers which represents MISC_ACTIVE_SYNC, MISC_RNDIS_OVER_ETHERNET and WIRELESS_CONTROLLER_REMOTE_NDIS. All the codes listed below are from http://www.usb.org/developers/defined_class and its unknown why windows loads rndis class driver for some of them. Note that, Windows loads NDIS6 stack automatically for MISC_RNDIS_OVER_ETHERNET. Windows loads NDIS5 stack for MISC_ACTIVE_SYNC and WIRELESS_CONTROLLER_REMOTE_NDIS. For other class codes, NDIS stack can be installed using customized INF file but that defeats the purpose as its expected to load drivers automatically for known class drivers published by usbif. Linux rndis host driver supports MISC_ACTIVE_SYNC and WIRELESS_CONTROLLER_REMOTE_NDIS as of now. rndis_class_id - usb class/subclass/protocol 1 - WIRELESS_CONTROLLER_REMOTE_NDIS (0xE0/0x1/0x3) 2 - MISC_ACTIVE_SYNC(0xEF/0x1/0x1) 3 - MISC_RNDIS_OVER_ETHERNET(0xEF/0x4/0x1) 4 - MISC_RNDIS_OVER_WIFI(0xEF/0x4/0x2) 5 - MISC_RNDIS_OVER_WIMAX(0xEF/0x4/0x3) 6 - MISC_RNDIS_OVER_WWAN(0xEF/0x4/0x4) 7 - MISC_RNDIS_FOR_IPV4(0xEF/0x4/0x5) 8 - MISC_RNDIS_FOR_IPV6(0xEF/0x4/0x6) 9 - MISC_RNDIS_FOR_GPRS(0xEF/0x4/0x7) Example: to select MISC_RNDIS_OVER_ETHERNET use following command: echo 3 > /config/usb_gadget/g1/functions/gsi.rndis/rndis_class_id Change-Id: Ic650867b3038556d055c4449372103564ae95a11 Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org> Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Loading
Please register or sign in to comment