diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-10-13 01:34:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-13 14:48:18 -0400 |
commit | 89d71a66c40d629e3b1285def543ab1425558cd5 (patch) | |
tree | 45159e85418170fe36e4e023d9617693625d1740 /drivers/net/tlan.c | |
parent | bff1c09640b3006bca711e18ef08a5fb955ad9b5 (diff) |
net: Use netdev_alloc_skb_ip_align()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tlan.c')
-rw-r--r-- | drivers/net/tlan.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index 3d31b47332bb..16f23f84920b 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c | |||
@@ -1549,7 +1549,8 @@ static u32 TLan_HandleRxEOF( struct net_device *dev, u16 host_int ) | |||
1549 | if (tmpCStat & TLAN_CSTAT_EOC) | 1549 | if (tmpCStat & TLAN_CSTAT_EOC) |
1550 | eoc = 1; | 1550 | eoc = 1; |
1551 | 1551 | ||
1552 | new_skb = netdev_alloc_skb(dev, TLAN_MAX_FRAME_SIZE + 7 ); | 1552 | new_skb = netdev_alloc_skb_ip_align(dev, |
1553 | TLAN_MAX_FRAME_SIZE + 5); | ||
1553 | if ( !new_skb ) | 1554 | if ( !new_skb ) |
1554 | goto drop_and_reuse; | 1555 | goto drop_and_reuse; |
1555 | 1556 | ||
@@ -1563,7 +1564,6 @@ static u32 TLan_HandleRxEOF( struct net_device *dev, u16 host_int ) | |||
1563 | skb->protocol = eth_type_trans( skb, dev ); | 1564 | skb->protocol = eth_type_trans( skb, dev ); |
1564 | netif_rx( skb ); | 1565 | netif_rx( skb ); |
1565 | 1566 | ||
1566 | skb_reserve( new_skb, NET_IP_ALIGN ); | ||
1567 | head_list->buffer[0].address = pci_map_single(priv->pciDev, | 1567 | head_list->buffer[0].address = pci_map_single(priv->pciDev, |
1568 | new_skb->data, | 1568 | new_skb->data, |
1569 | TLAN_MAX_FRAME_SIZE, | 1569 | TLAN_MAX_FRAME_SIZE, |
@@ -1967,13 +1967,12 @@ static void TLan_ResetLists( struct net_device *dev ) | |||
1967 | list->cStat = TLAN_CSTAT_READY; | 1967 | list->cStat = TLAN_CSTAT_READY; |
1968 | list->frameSize = TLAN_MAX_FRAME_SIZE; | 1968 | list->frameSize = TLAN_MAX_FRAME_SIZE; |
1969 | list->buffer[0].count = TLAN_MAX_FRAME_SIZE | TLAN_LAST_BUFFER; | 1969 | list->buffer[0].count = TLAN_MAX_FRAME_SIZE | TLAN_LAST_BUFFER; |
1970 | skb = netdev_alloc_skb(dev, TLAN_MAX_FRAME_SIZE + 7 ); | 1970 | skb = netdev_alloc_skb_ip_align(dev, TLAN_MAX_FRAME_SIZE + 5); |
1971 | if ( !skb ) { | 1971 | if ( !skb ) { |
1972 | pr_err("TLAN: out of memory for received data.\n" ); | 1972 | pr_err("TLAN: out of memory for received data.\n" ); |
1973 | break; | 1973 | break; |
1974 | } | 1974 | } |
1975 | 1975 | ||
1976 | skb_reserve( skb, NET_IP_ALIGN ); | ||
1977 | list->buffer[0].address = pci_map_single(priv->pciDev, | 1976 | list->buffer[0].address = pci_map_single(priv->pciDev, |
1978 | skb->data, | 1977 | skb->data, |
1979 | TLAN_MAX_FRAME_SIZE, | 1978 | TLAN_MAX_FRAME_SIZE, |