Skip to content

Commit

Permalink
8139too: use netdev_alloc_skb
Browse files Browse the repository at this point in the history
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 <kevlo@kevlo.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Kevin Lo authored and Jeff Garzik committed Sep 3, 2008
1 parent a52be1c commit 1c460af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/8139too.c
Original file line number Diff line number Diff line change
Expand Up @@ -2009,9 +2009,9 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp,
/* Malloc up new buffer, compatible with net-2e. */
/* Omit the four octet CRC from the length. */

skb = dev_alloc_skb (pkt_size + 2);
skb = netdev_alloc_skb(dev, pkt_size + NET_IP_ALIGN);
if (likely(skb)) {
skb_reserve (skb, 2); /* 16 byte align the IP fields. */
skb_reserve (skb, NET_IP_ALIGN); /* 16 byte align the IP fields. */
#if RX_BUF_IDX == 3
wrap_copy(skb, rx_ring, ring_offset+4, pkt_size);
#else
Expand Down

0 comments on commit 1c460af

Please sign in to comment.