diff options
| author | sakumisu <[email protected]> | 2024-01-09 21:20:38 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2024-01-09 21:20:38 +0800 |
| commit | 07ced6d02307eee93e00408dea16fdfe8b000796 (patch) | |
| tree | 931eea8d63cf189a331b07b33dab78d2e6f85ea9 /class | |
| parent | 45cca3930b83238807fdc69507b508a6a009b392 (diff) | |
fix cdc ecm zlp check
Diffstat (limited to 'class')
| -rw-r--r-- | class/cdc/usbh_cdc_ecm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/class/cdc/usbh_cdc_ecm.c b/class/cdc/usbh_cdc_ecm.c index 3d5d3631..a23e4855 100644 --- a/class/cdc/usbh_cdc_ecm.c +++ b/class/cdc/usbh_cdc_ecm.c @@ -257,7 +257,7 @@ find_class: g_cdc_ecm_rx_length += g_cdc_ecm_class.bulkin_urb.actual_length; - if (g_cdc_ecm_rx_length % USB_GET_MAXPACKETSIZE(g_cdc_ecm_class.bulkin->wMaxPacketSize)) { + if (g_cdc_ecm_class.bulkin_urb.actual_length != USB_GET_MAXPACKETSIZE(g_cdc_ecm_class.bulkin->wMaxPacketSize)) { USB_LOG_DBG("rxlen:%d\r\n", g_cdc_ecm_rx_length); p = pbuf_alloc(PBUF_RAW, g_cdc_ecm_rx_length, PBUF_POOL); @@ -274,6 +274,7 @@ find_class: USB_LOG_ERR("No memory to alloc pbuf for cdc ecm rx\r\n"); } } else { + /* read continue util read short packet */ } } // clang-format off |
