Skip to content

Commit 1c460af

Browse files
kevloJeff Garzik
authored andcommitted
8139too: use netdev_alloc_skb
This patch uses netdev_alloc_skb. This sets skb->dev and allows arch specific allocation. Also cleanup the alignment code. Signed-off-by: Kevin Lo <[email protected]> Signed-off-by: Jeff Garzik <[email protected]>
1 parent a52be1c commit 1c460af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/8139too.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2009,9 +2009,9 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,
20092009
/* Malloc up new buffer, compatible with net-2e. */
20102010
/* Omit the four octet CRC from the length. */
20112011

2012-
skb = dev_alloc_skb (pkt_size + 2);
2012+
skb = netdev_alloc_skb(dev, pkt_size + NET_IP_ALIGN);
20132013
if (likely(skb)) {
2014-
skb_reserve (skb, 2); /* 16 byte align the IP fields. */
2014+
skb_reserve (skb, NET_IP_ALIGN); /* 16 byte align the IP fields. */
20152015
#if RX_BUF_IDX == 3
20162016
wrap_copy(skb, rx_ring, ring_offset+4, pkt_size);
20172017
#else

0 commit comments

Comments
 (0)