mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
net: cdc_ncm: set reasonable padding limits
We pad frames larger than X to maximum size for devices which don't need a ZLP after maximum sized frames. This allows the device to optimize its transfers for one fixed buffer size. X was arbitrarily set at 512 bytes regardless of real buffer maximum, causing extreme overheads due to excessive padding of larger tx buffers. Limit the padding to at most 3 full USB packets, still allowing the overhead to payload ratio of 3/1. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
70559b8970
commit
43e4c6dfc0
2 changed files with 7 additions and 2 deletions
|
|
@ -115,6 +115,7 @@ struct cdc_ncm_ctx {
|
|||
u16 tx_seq;
|
||||
u16 rx_seq;
|
||||
u16 connected;
|
||||
u16 min_tx_pkt;
|
||||
};
|
||||
|
||||
u8 cdc_ncm_select_altsetting(struct usb_interface *intf);
|
||||
|
|
|
|||
Loading…
Reference in a new issue