usb: netusb: Align NETUSB_MTU & wMaxSegmentSize and increase it to 1522
As rx_buf & tx_buf are defined with a NETUSB_MTU size, this cause that the frames over 1500 bytes can not be received and are discarded. Secondly, as fragmentation is not supported (for UDP and TCP datagram), increase NETUSB_MTU to the maximum possible ethernet frame size :1522 Signed-off-by: Nicolas LANTZ <nicolas.lantz@ubicore.net>
This commit is contained in:
parent
968d423a44
commit
766101cf09
@ -101,7 +101,7 @@ USBD_CLASS_DESCR_DEFINE(primary, 0) struct usb_cdc_ecm_config cdc_ecm_cfg = {
|
||||
.bDescriptorSubtype = ETHERNET_FUNC_DESC,
|
||||
.iMACAddress = 4,
|
||||
.bmEthernetStatistics = sys_cpu_to_le32(0), /* None */
|
||||
.wMaxSegmentSize = sys_cpu_to_le16(1514),
|
||||
.wMaxSegmentSize = sys_cpu_to_le16(NETUSB_MTU),
|
||||
.wNumberMCFilters = sys_cpu_to_le16(0), /* None */
|
||||
.bNumberPowerFilters = 0, /* No wake up */
|
||||
},
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
* USB definitions
|
||||
*/
|
||||
|
||||
#define NETUSB_MTU 1500
|
||||
#define NETUSB_MTU 1522
|
||||
|
||||
#define CDC_ECM_INT_EP_ADDR 0x83
|
||||
#define CDC_ECM_IN_EP_ADDR 0x82
|
||||
|
||||
Loading…
Reference in New Issue
Block a user