summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--class/cdc/usb_cdc.h2
-rw-r--r--class/cdc/usbd_cdc_ecm.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/class/cdc/usb_cdc.h b/class/cdc/usb_cdc.h
index b8a544f3..2bf0a17a 100644
--- a/class/cdc/usb_cdc.h
+++ b/class/cdc/usb_cdc.h
@@ -588,7 +588,7 @@ eth_statistics, wMaxSegmentSize, wNumberMCFilters, bNumberPowerFilters, str_idx)
CDC_FUNC_DESC_ETHERNET_NETWORKING, /* Ethernet Networking functional descriptor subtype */\
str_idx, /* Device's MAC string index */\
DBVAL_BE(eth_statistics), /* Ethernet statistics (bitmap) */\
- WBVAL(wMaxPacketSize),/* wMaxSegmentSize: Ethernet Maximum Segment size, typically 1514 bytes */\
+ WBVAL(wMaxSegmentSize),/* wMaxSegmentSize: Ethernet Maximum Segment size, typically 1514 bytes */\
WBVAL(wNumberMCFilters), /* wNumberMCFilters: the number of multicast filters */\
bNumberPowerFilters, /* bNumberPowerFilters: the number of wakeup power filters */\
0x07, /* bLength */ \
diff --git a/class/cdc/usbd_cdc_ecm.c b/class/cdc/usbd_cdc_ecm.c
index 2e1e8664..b0c1217d 100644
--- a/class/cdc/usbd_cdc_ecm.c
+++ b/class/cdc/usbd_cdc_ecm.c
@@ -210,9 +210,7 @@ int usbd_cdc_ecm_eth_tx(struct pbuf *p)
buffer += q->len;
}
- g_cdc_ecm_tx_data_length = p->tot_len;
-
- return usbd_cdc_ecm_start_write(g_cdc_ecm_tx_buffer, g_cdc_ecm_tx_data_length);
+ return usbd_cdc_ecm_start_write(g_cdc_ecm_tx_buffer, p->tot_len);
}
#endif
@@ -244,4 +242,4 @@ void usbd_cdc_ecm_set_connect_speed(uint32_t speed[2])
__WEAK void usbd_cdc_ecm_data_recv_done(uint8_t *buf, uint32_t len)
{
-} \ No newline at end of file
+}