[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>
This commit is contained in:
committed by
David S. Miller
parent
badff6d01a
commit
ea2ae17d64
@@ -1421,7 +1421,7 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
|
||||
|
||||
/* Handle TCP checksum offload */
|
||||
if (skb->ip_summed == CHECKSUM_PARTIAL) {
|
||||
unsigned offset = skb->h.raw - skb->data;
|
||||
const unsigned offset = skb_transport_offset(skb);
|
||||
u32 tcpsum;
|
||||
|
||||
tcpsum = offset << 16; /* sum start */
|
||||
|
Reference in New Issue
Block a user