aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2010-12-14 15:24:08 +0000
committerDavid S. Miller <davem@davemloft.net>2010-12-16 14:43:14 -0800
commit55508d601dab7df5cbcc7a63f4be8620eface204 (patch)
tree346f30fae9c726d2e73aba2e37ce1e4a31dcea8c /net/core/dev.c
parentnet: Introduce skb_checksum_start_offset() (diff)
downloadlinux-dev-55508d601dab7df5cbcc7a63f4be8620eface204.tar.xz
linux-dev-55508d601dab7df5cbcc7a63f4be8620eface204.zip
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/core/dev.c')
-rw-r--r--net/core/dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 794b20de5d44..92d414ac0e30 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1793,7 +1793,7 @@ int skb_checksum_help(struct sk_buff *skb)
goto out_set_summed;
}
- offset = skb->csum_start - skb_headroom(skb);
+ offset = skb_checksum_start_offset(skb);
BUG_ON(offset >= skb_headlen(skb));
csum = skb_checksum(skb, offset, skb->len - offset, 0);
@@ -2090,8 +2090,8 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
* checksumming here.
*/
if (skb->ip_summed == CHECKSUM_PARTIAL) {
- skb_set_transport_header(skb, skb->csum_start -
- skb_headroom(skb));
+ skb_set_transport_header(skb,
+ skb_checksum_start_offset(skb));
if (!dev_can_checksum(dev, skb) &&
skb_checksum_help(skb))
goto out_kfree_skb;