summaryrefslogtreecommitdiff
path: root/net/packet
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2010-12-14 18:24:08 +0300
committerDavid S. Miller <davem@davemloft.net>2010-12-17 01:43:14 +0300
commit55508d601dab7df5cbcc7a63f4be8620eface204 (patch)
tree346f30fae9c726d2e73aba2e37ce1e4a31dcea8c /net/packet
parent04fb451eff978ca059399eab83d5594b073caf6f (diff)
downloadlinux-55508d601dab7df5cbcc7a63f4be8620eface204.tar.xz
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 'net/packet')
-rw-r--r--net/packet/af_packet.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index e79efaf06389..91cb1d71f018 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1650,8 +1650,7 @@ static int packet_recvmsg(struct kiocb *iocb, struct socket *sock,
if (skb->ip_summed == CHECKSUM_PARTIAL) {
vnet_hdr.flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
- vnet_hdr.csum_start = skb->csum_start -
- skb_headroom(skb);
+ vnet_hdr.csum_start = skb_checksum_start_offset(skb);
vnet_hdr.csum_offset = skb->csum_offset;
} /* else everything is zero */