mirror of
https://github.com/apache/nuttx.git
synced 2025-12-11 12:57:57 +08:00
usbdev/cdcncm: fix ndpsign mismatch after NCM_SET_NTB_FORMAT
Otherwise, the NCM_SET_NTB_FORMAT message from the host may cause subsequent parsing exceptions. Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
@@ -2609,11 +2609,15 @@ static int cdcncm_setup(FAR struct usbdevclass_driver_s *driver,
|
||||
{
|
||||
case 0x0000:
|
||||
self->parseropts = &g_ndp16_opts;
|
||||
self->ndpsign = self->isncm ? self->parseropts->ndpsign :
|
||||
CDC_MBIM_NDP16_NOCRC_SIGN;
|
||||
uinfo("NCM16 selected\n");
|
||||
ret = 0;
|
||||
break;
|
||||
case 0x0001:
|
||||
self->parseropts = &g_ndp32_opts;
|
||||
self->ndpsign = self->isncm ? self->parseropts->ndpsign :
|
||||
CDC_MBIM_NDP32_NOCRC_SIGN;
|
||||
uinfo("NCM32 selected\n");
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user