summaryrefslogtreecommitdiffstats
path: root/net/ax25/ax25_out.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-10 22:16:10 -0300
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:24:58 -0700
commitbbe735e4247dba32568a305553b010081c8dea99 (patch)
tree95d96619c85785a47ccee48965b68d99cf946854 /net/ax25/ax25_out.c
parente7dd65dafda5737a983c04d652a69ab8da78ee3f (diff)
downloadop-kernel-dev-bbe735e4247dba32568a305553b010081c8dea99.zip
op-kernel-dev-bbe735e4247dba32568a305553b010081c8dea99.tar.gz
[SK_BUFF]: Introduce skb_network_offset()
For the quite common 'skb->nh.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 'net/ax25/ax25_out.c')
-rw-r--r--net/ax25/ax25_out.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ax25/ax25_out.c b/net/ax25/ax25_out.c
index 6e08dc8..02dea85 100644
--- a/net/ax25/ax25_out.c
+++ b/net/ax25/ax25_out.c
@@ -148,7 +148,7 @@ void ax25_output(ax25_cb *ax25, int paclen, struct sk_buff *skb)
if (ka9qfrag == 1) {
skb_reserve(skbn, frontlen + 2);
- skbn->nh.raw = skbn->data + (skb->nh.raw - skb->data);
+ skbn->nh.raw = skbn->data + skb_network_offset(skb);
memcpy(skb_put(skbn, len), skb->data, len);
p = skb_push(skbn, 2);
@@ -161,7 +161,7 @@ void ax25_output(ax25_cb *ax25, int paclen, struct sk_buff *skb)
}
} else {
skb_reserve(skbn, frontlen + 1);
- skbn->nh.raw = skbn->data + (skb->nh.raw - skb->data);
+ skbn->nh.raw = skbn->data + skb_network_offset(skb);
memcpy(skb_put(skbn, len), skb->data, len);
p = skb_push(skbn, 1);
*p = AX25_P_TEXT;
OpenPOWER on IntegriCloud