]> git.baikalelectronics.ru Git - kernel.git/commit
net: cdc_ncm: no not set tx_max higher than the device supports
authorBjørn Mork <bjorn@mork.no>
Fri, 1 Nov 2013 10:17:01 +0000 (11:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Nov 2013 06:02:05 +0000 (02:02 -0400)
commitea6c5673b158cc5ca78bca5f186eb578b1fd0cd6
treeb5bd37a8edb1e3ff5f0c261daddd8b3362824d9f
parent8d1835a356fffa346010ee266597a71a02ec63c5
net: cdc_ncm: no not set tx_max higher than the device supports

There are MBIM devices out there reporting

  dwNtbInMaxSize=2048 dwNtbOutMaxSize=2048

and since the spec require a datagram max size of at least
2048, this means that a full sized datagram will never fit.

Still, sending larger NTBs than the device supports is not
going to help.  We do not have any other options than either
 a) refusing to bindi, or
 b) respect the insanely low value.

Alternative b will at least make these devices work, so go
for it.

Cc: Alexey Orishko <alexey.orishko@gmail.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/cdc_ncm.c