cdc_ncm: fix TCP window scaling issue for NCM driver
authorSteve Lin <stlin@nvidia.com>
Thu, 14 Feb 2013 22:08:05 +0000 (14:08 -0800)
committerMandar Padmawar <mpadmawar@nvidia.com>
Tue, 19 Feb 2013 06:17:56 +0000 (22:17 -0800)
commitd5d229da0c1230142dd3516e1e465666f619dabd
treecd6831aedf9dec26f49210c32bf4f367d1864601
parent33b146ef361242ba1d6752f7de3bfde49056896b
cdc_ncm: fix TCP window scaling issue for NCM driver

TCP network stack uses skb->truesize as hint to grow TCP window size.
However, the NCM driver uses skb_clone to push the ethernet packet to
the network stack. The skb->truesize is actually the memory allocated
for the whole transfer block, not the true packet size with overhead.
tcp_grow_window function doesn't handle this case properly so the
receiver window will not grow. This patch is to update the skb->truesize
in the cdc_ncm_rx_fixup function so the TCP stack can use it to grow the
window size as expected.

Bug 1207244
Bug 1235981

Change-Id: I7c48eb65e7f991d7eb0f2ef14c515134b9180ea4
Signed-off-by: Steve Lin <stlin@nvidia.com>
Reviewed-on: http://git-master/r/200895
Reviewed-by: David Norman <dnorman@nvidia.com>
Reviewed-by: Rick Song <ricks@nvidia.com>
drivers/net/usb/cdc_ncm.c