usb: gadget: f_ncm: Add OS descriptor support
authorRomain Izard <romain.izard.pro@gmail.com>
Tue, 16 Apr 2019 14:07:32 +0000 (16:07 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 3 May 2019 06:13:47 +0000 (09:13 +0300)
commit793409292382027226769d0299987f06cbd97a6e
treeb03a8d710c9c2769658be58741516820aa218647
parent550eef0c353030ac4223b9c9479bdf77a05445d6
usb: gadget: f_ncm: Add OS descriptor support

To be able to use the default USB class drivers available in Microsoft
Windows, we need to add OS descriptors to the exported USB gadget to
tell the OS that we are compatible with the built-in drivers.

Copy the OS descriptor support from f_rndis into f_ncm. As a result,
using the WINNCM compatible ID, the UsbNcm driver is loaded on
enumeration without the need for a custom driver or inf file.

Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/function/f_ncm.c
drivers/usb/gadget/function/u_ncm.h