aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vmxnet3/vmxnet3_drv.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-03-12 11:41:28 -0400
committerGrant Likely <grant.likely@secretlab.ca>2012-03-12 11:41:28 -0400
commite2aa4177264c1a459779d6e35fae22adf17a9232 (patch)
treebeba4b40aa90f6f033eb261cf5a5453c5957c87c /drivers/net/vmxnet3/vmxnet3_drv.c
parent25db711df3258d125dc1209800317e5c0ef3c870 (diff)
parentfde7d9049e55ab85a390be7f415d74c9f62dd0f9 (diff)
Merge tag 'v3.3-rc7' into gpio/next
Linux 3.3-rc7. Merged into the gpio branch to pick up gpio bugfixes already in mainline before queueing up move v3.4 patches
Diffstat (limited to 'drivers/net/vmxnet3/vmxnet3_drv.c')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index de7fc345148a..756c0f5565a5 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -830,21 +830,16 @@ vmxnet3_parse_and_copy_hdr(struct sk_buff *skb, struct vmxnet3_tx_queue *tq,
830 ctx->l4_hdr_size = ((struct tcphdr *) 830 ctx->l4_hdr_size = ((struct tcphdr *)
831 skb_transport_header(skb))->doff * 4; 831 skb_transport_header(skb))->doff * 4;
832 else if (iph->protocol == IPPROTO_UDP) 832 else if (iph->protocol == IPPROTO_UDP)
833 /*
834 * Use tcp header size so that bytes to
835 * be copied are more than required by
836 * the device.
837 */
838 ctx->l4_hdr_size = 833 ctx->l4_hdr_size =
839 sizeof(struct tcphdr); 834 sizeof(struct udphdr);
840 else 835 else
841 ctx->l4_hdr_size = 0; 836 ctx->l4_hdr_size = 0;
842 } else { 837 } else {
843 /* for simplicity, don't copy L4 headers */ 838 /* for simplicity, don't copy L4 headers */
844 ctx->l4_hdr_size = 0; 839 ctx->l4_hdr_size = 0;
845 } 840 }
846 ctx->copy_size = ctx->eth_ip_hdr_size + 841 ctx->copy_size = min(ctx->eth_ip_hdr_size +
847 ctx->l4_hdr_size; 842 ctx->l4_hdr_size, skb->len);
848 } else { 843 } else {
849 ctx->eth_ip_hdr_size = 0; 844 ctx->eth_ip_hdr_size = 0;
850 ctx->l4_hdr_size = 0; 845 ctx->l4_hdr_size = 0;