Skip to content

Commit

Permalink
ixp2000: use netdev_alloc_skb
Browse files Browse the repository at this point in the history
Use netdev_alloc_skb. This sets skb->dev and allows arch specific
allocation.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed May 22, 2008
1 parent 3f7a353 commit d27e7c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ixp2000/ixpdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ static int ixpdev_rx(struct net_device *dev, int processed, int budget)
if (unlikely(!netif_running(nds[desc->channel])))
goto err;

skb = dev_alloc_skb(desc->pkt_length + 2);
skb = netdev_alloc_skb(dev, desc->pkt_length + 2);
if (likely(skb != NULL)) {
skb_reserve(skb, 2);
skb_copy_to_linear_data(skb, buf, desc->pkt_length);
skb_put(skb, desc->pkt_length);
skb->protocol = eth_type_trans(skb, nds[desc->channel]);

skb->dev->last_rx = jiffies;
dev->last_rx = jiffies;

netif_receive_skb(skb);
}
Expand Down

0 comments on commit d27e7c3

Please sign in to comment.