aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macvtap.c
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2010-12-14 10:24:08 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-16 17:43:14 -0500
commit55508d601dab7df5cbcc7a63f4be8620eface204 (patch)
tree346f30fae9c726d2e73aba2e37ce1e4a31dcea8c /drivers/net/macvtap.c
parent04fb451eff978ca059399eab83d5594b073caf6f (diff)
net: Use skb_checksum_start_offset()
Replace skb->csum_start - skb_headroom(skb) with skb_checksum_start_offset(). Note for usb/smsc95xx: skb->data - skb->head == skb_headroom(skb). Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvtap.c')
-rw-r--r--drivers/net/macvtap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 42567279843e..21845affea13 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -504,8 +504,7 @@ static int macvtap_skb_to_vnet_hdr(const struct sk_buff *skb,
504 504
505 if (skb->ip_summed == CHECKSUM_PARTIAL) { 505 if (skb->ip_summed == CHECKSUM_PARTIAL) {
506 vnet_hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM; 506 vnet_hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
507 vnet_hdr->csum_start = skb->csum_start - 507 vnet_hdr->csum_start = skb_checksum_start_offset(skb);
508 skb_headroom(skb);
509 vnet_hdr->csum_offset = skb->csum_offset; 508 vnet_hdr->csum_offset = skb->csum_offset;
510 } /* else everything is zero */ 509 } /* else everything is zero */
511 510