net: cdc_ncm: use sane defaults for rx/tx buffers
authorBjørn Mork <bjorn@mork.no>
Fri, 16 May 2014 19:48:26 +0000 (21:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 May 2014 02:39:02 +0000 (22:39 -0400)
commit50f1cb1cc8f50fa88dbeaf990ae2bae91b9ff306
tree9210c226f517b80fae8c4762ec30d0b1a3996ea3
parentbeeecd42c3b41d17d0bf1d839db99274c287f514
net: cdc_ncm: use sane defaults for rx/tx buffers

Lots of devices request much larger buffers than reasonable. This
cause real problems for users of hosts with limited resources.

Reducing the default buffer size to 16kB for such devices is
a reasonable trade-off between allowing them to aggregate traffic
and avoiding memory exhaustion on resource restrained hosts.

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