summaryrefslogtreecommitdiff
path: root/drivers/net/arcnet/capmode.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-20 01:30:44 +0300
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 09:24:32 +0400
commit459a98ed881802dee55897441bc7f77af614368e (patch)
treeb81f76632d8f2e21eb91ec3d885091a98398d93e /drivers/net/arcnet/capmode.c
parent4c13eb6657fe9ef7b4dc8f1a405c902e9e5234e0 (diff)
downloadlinux-459a98ed881802dee55897441bc7f77af614368e.tar.xz
[SK_BUFF]: Introduce skb_reset_mac_header(skb)
For the common, open coded 'skb->mac.raw = skb->data' operation, so that we can later turn skb->mac.raw into a offset, reducing the size of struct sk_buff in 64bit land while possibly keeping it as a pointer on 32bit. This one touches just the most simple case, next will handle the slightly more "complex" cases. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/arcnet/capmode.c')
-rw-r--r--drivers/net/arcnet/capmode.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/arcnet/capmode.c b/drivers/net/arcnet/capmode.c
index 66485585ab39..6c764b66e9cc 100644
--- a/drivers/net/arcnet/capmode.c
+++ b/drivers/net/arcnet/capmode.c
@@ -122,10 +122,8 @@ static void rx(struct net_device *dev, int bufnum,
}
skb_put(skb, length + ARC_HDR_SIZE + sizeof(int));
skb->dev = dev;
-
- pkt = (struct archdr *) skb->data;
-
- skb->mac.raw = skb->data;
+ skb_reset_mac_header(skb);
+ pkt = (struct archdr *)skb->mac.raw;
skb_pull(skb, ARC_HDR_SIZE);
/* up to sizeof(pkt->soft) has already been copied from the card */
@@ -270,9 +268,8 @@ static int ack_tx(struct net_device *dev, int acked)
skb_put(ackskb, length + ARC_HDR_SIZE );
ackskb->dev = dev;
- ackpkt = (struct archdr *) ackskb->data;
-
- ackskb->mac.raw = ackskb->data;
+ skb_reset_mac_header(ackskb);
+ ackpkt = (struct archdr *)ackskb->mac.raw;
/* skb_pull(ackskb, ARC_HDR_SIZE); */