aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atlx/atl1.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-10-13 01:34:20 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-13 14:48:18 -0400
commit89d71a66c40d629e3b1285def543ab1425558cd5 (patch)
tree45159e85418170fe36e4e023d9617693625d1740 /drivers/net/atlx/atl1.c
parentbff1c09640b3006bca711e18ef08a5fb955ad9b5 (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/atlx/atl1.c')
-rw-r--r--drivers/net/atlx/atl1.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index 00569dc1313c..963df502260a 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -1864,21 +1864,14 @@ static u16 atl1_alloc_rx_buffers(struct atl1_adapter *adapter)
1864 1864
1865 rfd_desc = ATL1_RFD_DESC(rfd_ring, rfd_next_to_use); 1865 rfd_desc = ATL1_RFD_DESC(rfd_ring, rfd_next_to_use);
1866 1866
1867 skb = netdev_alloc_skb(adapter->netdev, 1867 skb = netdev_alloc_skb_ip_align(adapter->netdev,
1868 adapter->rx_buffer_len + NET_IP_ALIGN); 1868 adapter->rx_buffer_len);
1869 if (unlikely(!skb)) { 1869 if (unlikely(!skb)) {
1870 /* Better luck next round */ 1870 /* Better luck next round */
1871 adapter->netdev->stats.rx_dropped++; 1871 adapter->netdev->stats.rx_dropped++;
1872 break; 1872 break;
1873 } 1873 }
1874 1874
1875 /*
1876 * Make buffer alignment 2 beyond a 16 byte boundary
1877 * this will result in a 16 byte aligned IP header after
1878 * the 14 byte MAC header is removed
1879 */
1880 skb_reserve(skb, NET_IP_ALIGN);
1881
1882 buffer_info->alloced = 1; 1875 buffer_info->alloced = 1;
1883 buffer_info->skb = skb; 1876 buffer_info->skb = skb;
1884 buffer_info->length = (u16) adapter->rx_buffer_len; 1877 buffer_info->length = (u16) adapter->rx_buffer_len;