[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1165325822.12510.98.camel@fuzzie.sanpeople.com>
Date: 05 Dec 2006 15:37:02 +0200
From: Andrew Victor <andrew@...people.com>
To: netdev@...r.kernel.org
Cc: jgarzik@...ox.com
Subject: [PATCH 2.6.19 4/4] 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@...people.com>
diff -urN linux-2.6.19-final.orig/drivers/net/arm/at91_ether.c linux-2.6.19-final/drivers/net/arm/at91_ether.c
--- linux-2.6.19-final.orig/drivers/net/arm/at91_ether.c Tue Dec 5 14:12:53 2006
+++ linux-2.6.19-final/drivers/net/arm/at91_ether.c Tue Dec 5 14:13:38 2006
@@ -853,14 +853,13 @@
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);
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists