diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-04-25 20:55:53 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:16 -0400 |
commit | ea2ae17d6443abddc79480dc9f7af8feacabddc4 (patch) | |
tree | 2d6f48a5e4a40f761b5b510af9aac1fca55004cb /drivers/net/sungem.c | |
parent | badff6d01a8589a1c828b0bf118903ca38627f4e (diff) |
[SK_BUFF]: Introduce skb_transport_offset()
For the quite common 'skb->h.raw - skb->data' sequence.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sungem.c')
-rw-r--r-- | drivers/net/sungem.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index db2e1a6b7231..4bb89dec5650 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -1028,10 +1028,8 @@ static int gem_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1028 | 1028 | ||
1029 | ctrl = 0; | 1029 | ctrl = 0; |
1030 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 1030 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
1031 | u64 csum_start_off, csum_stuff_off; | 1031 | const u64 csum_start_off = skb_transport_offset(skb); |
1032 | 1032 | const u64 csum_stuff_off = csum_start_off + skb->csum_offset; | |
1033 | csum_start_off = (u64) (skb->h.raw - skb->data); | ||
1034 | csum_stuff_off = csum_start_off + skb->csum_offset; | ||
1035 | 1033 | ||
1036 | ctrl = (TXDCTRL_CENAB | | 1034 | ctrl = (TXDCTRL_CENAB | |
1037 | (csum_start_off << 15) | | 1035 | (csum_start_off << 15) | |