diff options
author | Kevin Lo <kevlo@kevlo.org> | 2008-08-27 11:35:09 +0800 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-03 10:24:04 -0400 |
commit | b26b555a7b4decf765ade265fa9da3bd6ff3e9e0 (patch) | |
tree | 353b588b86a382d3f68268acea09ebf51b26a8af /drivers/net | |
parent | c844d483004df596b0bd6e68a3be8e0cd85536ce (diff) | |
download | linux-3.10-b26b555a7b4decf765ade265fa9da3bd6ff3e9e0.tar.gz linux-3.10-b26b555a7b4decf765ade265fa9da3bd6ff3e9e0.tar.bz2 linux-3.10-b26b555a7b4decf765ade265fa9da3bd6ff3e9e0.zip |
via-rhine: changed to use netdev_alloc_skb() from dev_alloc_skb
Use 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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/via-rhine.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index 96dff04334b..5b7870080c5 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c @@ -914,7 +914,7 @@ static void alloc_rbufs(struct net_device *dev) /* Fill in the Rx buffers. Handle allocation failure gracefully. */ for (i = 0; i < RX_RING_SIZE; i++) { - struct sk_buff *skb = dev_alloc_skb(rp->rx_buf_sz); + struct sk_buff *skb = netdev_alloc_skb(dev, rp->rx_buf_sz); rp->rx_skbuff[i] = skb; if (skb == NULL) break; @@ -1473,8 +1473,8 @@ static int rhine_rx(struct net_device *dev, int limit) /* Check if the packet is long enough to accept without copying to a minimally-sized skbuff. */ if (pkt_len < rx_copybreak && - (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { - skb_reserve(skb, 2); /* 16 byte align the IP header */ + (skb = netdev_alloc_skb(dev, pkt_len + NET_IP_ALIGN)) != NULL) { + skb_reserve(skb, NET_IP_ALIGN); /* 16 byte align the IP header */ pci_dma_sync_single_for_cpu(rp->pdev, rp->rx_skbuff_dma[entry], rp->rx_buf_sz, @@ -1518,7 +1518,7 @@ static int rhine_rx(struct net_device *dev, int limit) struct sk_buff *skb; entry = rp->dirty_rx % RX_RING_SIZE; if (rp->rx_skbuff[entry] == NULL) { - skb = dev_alloc_skb(rp->rx_buf_sz); + skb = netdev_alloc_skb(dev, rp->rx_buf_sz); rp->rx_skbuff[entry] = skb; if (skb == NULL) break; /* Better luck next round. */ |