diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2010-11-24 10:01:18 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2010-11-24 10:01:18 +0000 |
commit | 64b16b9f3459abd783d02d31e02a9e47017716f3 (patch) | |
tree | 6d54f5761c37aef96772e11a7412c07ef093c10e /target/linux/ramips/files/drivers/net/ramips.c | |
parent | 624cfc5c9114dabe86ca85bbd01147c25845b128 (diff) | |
download | upstream-64b16b9f3459abd783d02d31e02a9e47017716f3.tar.gz upstream-64b16b9f3459abd783d02d31e02a9e47017716f3.tar.bz2 upstream-64b16b9f3459abd783d02d31e02a9e47017716f3.zip |
ramips: Use NET_IP_ALIGN instead of hardcoding 2
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
SVN-Revision: 24124
Diffstat (limited to 'target/linux/ramips/files/drivers/net/ramips.c')
-rw-r--r-- | target/linux/ramips/files/drivers/net/ramips.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/target/linux/ramips/files/drivers/net/ramips.c b/target/linux/ramips/files/drivers/net/ramips.c index 1f3c35aa9d..812507328f 100644 --- a/target/linux/ramips/files/drivers/net/ramips.c +++ b/target/linux/ramips/files/drivers/net/ramips.c @@ -169,12 +169,13 @@ ramips_alloc_dma(struct raeth_priv *re) memset(re->rx, 0, sizeof(struct ramips_rx_dma) * NUM_RX_DESC); for (i = 0; i < NUM_RX_DESC; i++) { - struct sk_buff *new_skb = dev_alloc_skb(MAX_RX_LENGTH + 2); + struct sk_buff *new_skb = dev_alloc_skb(MAX_RX_LENGTH + + NET_IP_ALIGN); if (!new_skb) goto err_cleanup; - skb_reserve(new_skb, 2); + skb_reserve(new_skb, NET_IP_ALIGN); re->rx[i].rxd1 = dma_map_single(NULL, new_skb->data, MAX_RX_LENGTH, @@ -272,7 +273,7 @@ ramips_eth_rx_hw(unsigned long ptr) break; max_rx--; - new_skb = netdev_alloc_skb(dev, MAX_RX_LENGTH + 2); + new_skb = netdev_alloc_skb(dev, MAX_RX_LENGTH + NET_IP_ALIGN); /* Reuse the buffer on allocation failures */ if (new_skb) { rx_skb = priv->rx_skb[rx]; @@ -285,7 +286,7 @@ ramips_eth_rx_hw(unsigned long ptr) netif_rx(rx_skb); priv->rx_skb[rx] = new_skb; - skb_reserve(new_skb, 2); + skb_reserve(new_skb, NET_IP_ALIGN); priv->rx[rx].rxd1 = dma_map_single(NULL, new_skb->data, MAX_RX_LENGTH, |