mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-25 03:01:09 +02:00
ramips: Use NET_IP_ALIGN instead of hardcoding 2
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24124 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
37b545f00f
commit
d59a23df99
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user