diff options
Diffstat (limited to 'drivers/net/arcnet/capmode.c')
-rw-r--r-- | drivers/net/arcnet/capmode.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/arcnet/capmode.c b/drivers/net/arcnet/capmode.c index 66485585ab39..cc4610db6395 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, | |||
122 | } | 122 | } |
123 | skb_put(skb, length + ARC_HDR_SIZE + sizeof(int)); | 123 | skb_put(skb, length + ARC_HDR_SIZE + sizeof(int)); |
124 | skb->dev = dev; | 124 | skb->dev = dev; |
125 | 125 | skb_reset_mac_header(skb); | |
126 | pkt = (struct archdr *) skb->data; | 126 | pkt = (struct archdr *)skb_mac_header(skb); |
127 | |||
128 | skb->mac.raw = skb->data; | ||
129 | skb_pull(skb, ARC_HDR_SIZE); | 127 | skb_pull(skb, ARC_HDR_SIZE); |
130 | 128 | ||
131 | /* up to sizeof(pkt->soft) has already been copied from the card */ | 129 | /* up to sizeof(pkt->soft) has already been copied from the card */ |
@@ -270,13 +268,13 @@ static int ack_tx(struct net_device *dev, int acked) | |||
270 | skb_put(ackskb, length + ARC_HDR_SIZE ); | 268 | skb_put(ackskb, length + ARC_HDR_SIZE ); |
271 | ackskb->dev = dev; | 269 | ackskb->dev = dev; |
272 | 270 | ||
273 | ackpkt = (struct archdr *) ackskb->data; | 271 | skb_reset_mac_header(ackskb); |
274 | 272 | ackpkt = (struct archdr *)skb_mac_header(ackskb); | |
275 | ackskb->mac.raw = ackskb->data; | ||
276 | /* skb_pull(ackskb, ARC_HDR_SIZE); */ | 273 | /* skb_pull(ackskb, ARC_HDR_SIZE); */ |
277 | 274 | ||
278 | 275 | ||
279 | memcpy(ackpkt, lp->outgoing.skb->data, ARC_HDR_SIZE+sizeof(struct arc_cap)); | 276 | skb_copy_from_linear_data(lp->outgoing.skb, ackpkt, |
277 | ARC_HDR_SIZE + sizeof(struct arc_cap)); | ||
280 | ackpkt->soft.cap.proto=0; /* using protocol 0 for acknowledge */ | 278 | ackpkt->soft.cap.proto=0; /* using protocol 0 for acknowledge */ |
281 | ackpkt->soft.cap.mes.ack=acked; | 279 | ackpkt->soft.cap.mes.ack=acked; |
282 | 280 | ||