usb: gadget: f_ncm: Fix NTP-32 support
authorRomain Izard <romain.izard.pro@gmail.com>
Tue, 16 Apr 2019 14:07:31 +0000 (16:07 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 3 May 2019 06:13:47 +0000 (09:13 +0300)
commit550eef0c353030ac4223b9c9479bdf77a05445d6
tree151fc2c246fb3fc13dcb7dd74be8d7660b14214f
parent60722c4eefbc9acddaf5e641f6dfb24bce930f9a
usb: gadget: f_ncm: Fix NTP-32 support

When connecting a CDC-NCM gadget to an host that uses the NTP-32 mode,
or that relies on the default CRC setting, the current implementation gets
confused, and does not expect the correct signature for its packets.

Fix this, by ensuring that the ndp_sign member in the f_ncm structure
always contain a valid value.

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