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/e100.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/e100.c')
-rw-r--r-- | drivers/net/e100.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 679965c2bb86..ff83efd47b0d 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -1839,11 +1839,10 @@ static inline void e100_start_receiver(struct nic *nic, struct rx *rx) | |||
1839 | #define RFD_BUF_LEN (sizeof(struct rfd) + VLAN_ETH_FRAME_LEN) | 1839 | #define RFD_BUF_LEN (sizeof(struct rfd) + VLAN_ETH_FRAME_LEN) |
1840 | static int e100_rx_alloc_skb(struct nic *nic, struct rx *rx) | 1840 | static int e100_rx_alloc_skb(struct nic *nic, struct rx *rx) |
1841 | { | 1841 | { |
1842 | if (!(rx->skb = netdev_alloc_skb(nic->netdev, RFD_BUF_LEN + NET_IP_ALIGN))) | 1842 | if (!(rx->skb = netdev_alloc_skb_ip_align(nic->netdev, RFD_BUF_LEN))) |
1843 | return -ENOMEM; | 1843 | return -ENOMEM; |
1844 | 1844 | ||
1845 | /* Align, init, and map the RFD. */ | 1845 | /* Init, and map the RFD. */ |
1846 | skb_reserve(rx->skb, NET_IP_ALIGN); | ||
1847 | skb_copy_to_linear_data(rx->skb, &nic->blank_rfd, sizeof(struct rfd)); | 1846 | skb_copy_to_linear_data(rx->skb, &nic->blank_rfd, sizeof(struct rfd)); |
1848 | rx->dma_addr = pci_map_single(nic->pdev, rx->skb->data, | 1847 | rx->dma_addr = pci_map_single(nic->pdev, rx->skb->data, |
1849 | RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL); | 1848 | RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL); |