]> git.baikalelectronics.ru Git - kernel.git/commit
net: cdc_ncm: use true max dgram count for header estimates
authorBjørn Mork <bjorn@mork.no>
Fri, 16 May 2014 19:48:23 +0000 (21:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 May 2014 02:39:01 +0000 (22:39 -0400)
commit6dea61c776f05f32419382e856f9a8c45e456cf7
tree830aa1d9187223a54eb91bbe0f904c7cd72c98bd
parent3c86ad878d6655af6737b2bc2447c3a59a8cf8bd
net: cdc_ncm: use true max dgram count for header estimates

Many newer NCM and MBIM devices will request a maximum tx
datagram count which is much smaller than our hard-coded
absolute max. We can reduce the overhead without sacrificing
any of the simplicity for these devices, by simply using the
true negotiated count in when calculated the maximum NTH and
NDP header sizes.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/cdc_ncm.c
include/linux/usb/cdc_ncm.h