summaryrefslogtreecommitdiffstats
path: root/drivers/net/arm/at91_ether.c
diff options
context:
space:
mode:
authorAndrew Victor <andrew@sanpeople.com>2006-12-05 14:37:02 +0100
committerJeff Garzik <jeff@garzik.org>2006-12-07 10:58:32 +0100
commita3f63e4f4be0da938771d754e846ff0019f9d42e (patch)
treebbf52899d47775a517a10c76693826bc3efa85d5 /drivers/net/arm/at91_ether.c
parent[PATCH] AT91RM9200 Ethernet: Add netpoll / netconsole support (diff)
downloadlinux-a3f63e4f4be0da938771d754e846ff0019f9d42e.tar.xz
linux-a3f63e4f4be0da938771d754e846ff0019f9d42e.zip
[PATCH] AT91RM9200 Ethernet: Use dev_alloc_skb()
Use dev_alloc_skb() instead of alloc_skb(). It is also not necessary to adjust skb->len manually since that's already done by skb_put(). Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/arm/at91_ether.c')
-rw-r--r--drivers/net/arm/at91_ether.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c
index f33d957adc7a..fada15d959de 100644
--- a/drivers/net/arm/at91_ether.c
+++ b/drivers/net/arm/at91_ether.c
@@ -853,14 +853,13 @@ static void at91ether_rx(struct net_device *dev)
while (dlist->descriptors[lp->rxBuffIndex].addr & EMAC_DESC_DONE) {
p_recv = dlist->recv_buf[lp->rxBuffIndex];
pktlen = dlist->descriptors[lp->rxBuffIndex].size & 0x7ff; /* Length of frame including FCS */
- skb = alloc_skb(pktlen + 2, GFP_ATOMIC);
+ skb = dev_alloc_skb(pktlen + 2);
if (skb != NULL) {
skb_reserve(skb, 2);
memcpy(skb_put(skb, pktlen), p_recv, pktlen);
skb->dev = dev;
skb->protocol = eth_type_trans(skb, dev);
- skb->len = pktlen;
dev->last_rx = jiffies;
lp->stats.rx_bytes += pktlen;
netif_rx(skb);