Commit d27e7c3f authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Jeff Garzik

ixp2000: use netdev_alloc_skb

Use netdev_alloc_skb. This sets skb->dev and allows arch specific
allocation.
Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 3f7a3535
...@@ -108,14 +108,14 @@ static int ixpdev_rx(struct net_device *dev, int processed, int budget) ...@@ -108,14 +108,14 @@ static int ixpdev_rx(struct net_device *dev, int processed, int budget)
if (unlikely(!netif_running(nds[desc->channel]))) if (unlikely(!netif_running(nds[desc->channel])))
goto err; goto err;
skb = dev_alloc_skb(desc->pkt_length + 2); skb = netdev_alloc_skb(dev, desc->pkt_length + 2);
if (likely(skb != NULL)) { if (likely(skb != NULL)) {
skb_reserve(skb, 2); skb_reserve(skb, 2);
skb_copy_to_linear_data(skb, buf, desc->pkt_length); skb_copy_to_linear_data(skb, buf, desc->pkt_length);
skb_put(skb, desc->pkt_length); skb_put(skb, desc->pkt_length);
skb->protocol = eth_type_trans(skb, nds[desc->channel]); skb->protocol = eth_type_trans(skb, nds[desc->channel]);
skb->dev->last_rx = jiffies; dev->last_rx = jiffies;
netif_receive_skb(skb); netif_receive_skb(skb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment