summaryrefslogtreecommitdiff
path: root/src/class/net/ncm_device.c
diff options
context:
space:
mode:
authorcopilot-swe-agent[bot] <[email protected]>2026-03-22 19:54:27 +0000
committercopilot-swe-agent[bot] <[email protected]>2026-03-22 19:54:27 +0000
commitebeb495bd0cc3deb1758c6fcf79739ae5eac543d (patch)
tree0c49cc6e2c9f00a308eddd9bc0daaa699826f931 /src/class/net/ncm_device.c
parentcec6ea2223e9b6c814c6e3b17d88e54324d4f957 (diff)
net: remove CFG_TUD_NET_ENDPOINT_SIZE, manage ZLP based on real speed in drivers
Co-authored-by: HiFiPhile <[email protected]> Agent-Logs-Url: https://github.com/hathach/tinyusb/sessions/5d355974-2223-4071-8d14-b6d4ac1fd030
Diffstat (limited to 'src/class/net/ncm_device.c')
-rw-r--r--src/class/net/ncm_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/class/net/ncm_device.c b/src/class/net/ncm_device.c
index 405e4467b..4f75dc478 100644
--- a/src/class/net/ncm_device.c
+++ b/src/class/net/ncm_device.c
@@ -340,7 +340,7 @@ static xmit_ntb_t *xmit_get_next_ready_ntb(void) {
static bool xmit_insert_required_zlp(uint8_t rhport, uint32_t xferred_bytes) {
TU_LOG_DRV("xmit_insert_required_zlp(%d,%ld)\n", rhport, xferred_bytes);
- if (xferred_bytes == 0 || xferred_bytes % CFG_TUD_NET_ENDPOINT_SIZE != 0) {
+ if (xferred_bytes == 0 || xferred_bytes % (tud_speed_get() == TUSB_SPEED_HIGH ? 512 : 64) != 0) {
return false;
}