diff options
author | David S. Miller <davem@davemloft.net> | 2008-05-29 03:31:03 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-29 03:31:03 -0700 |
commit | a5b17df04c4ad8f25fc598fce37fccb4b387c94c (patch) | |
tree | 2d0084f6db86362eb067b617ff8470f255ba37e7 /drivers/net/hamachi.c | |
parent | b79eeeb9e48457579cb742cd02e162fcd673c4a3 (diff) | |
parent | c03571a3e22b821e5be7bda7b166c4554770f489 (diff) | |
download | kernel-crypto-a5b17df04c4ad8f25fc598fce37fccb4b387c94c.tar.gz kernel-crypto-a5b17df04c4ad8f25fc598fce37fccb4b387c94c.tar.xz kernel-crypto-a5b17df04c4ad8f25fc598fce37fccb4b387c94c.zip |
Merge branch 'upstream-next-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
Diffstat (limited to 'drivers/net/hamachi.c')
-rw-r--r-- | drivers/net/hamachi.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c index e5c2380f50c..3199526bcec 100644 --- a/drivers/net/hamachi.c +++ b/drivers/net/hamachi.c @@ -1140,11 +1140,11 @@ static void hamachi_tx_timeout(struct net_device *dev) } /* Fill in the Rx buffers. Handle allocation failure gracefully. */ for (i = 0; i < RX_RING_SIZE; i++) { - struct sk_buff *skb = dev_alloc_skb(hmp->rx_buf_sz); + struct sk_buff *skb = netdev_alloc_skb(dev, hmp->rx_buf_sz); hmp->rx_skbuff[i] = skb; if (skb == NULL) break; - skb->dev = dev; /* Mark as being used by this device. */ + skb_reserve(skb, 2); /* 16 byte align the IP header. */ hmp->rx_ring[i].addr = cpu_to_leXX(pci_map_single(hmp->pci_dev, skb->data, hmp->rx_buf_sz, PCI_DMA_FROMDEVICE)); @@ -1178,14 +1178,6 @@ static void hamachi_init_ring(struct net_device *dev) hmp->cur_rx = hmp->cur_tx = 0; hmp->dirty_rx = hmp->dirty_tx = 0; -#if 0 - /* This is wrong. I'm not sure what the original plan was, but this - * is wrong. An MTU of 1 gets you a buffer of 1536, while an MTU - * of 1501 gets a buffer of 1533? -KDU - */ - hmp->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32); -#endif - /* My attempt at a reasonable correction */ /* +26 gets the maximum ethernet encapsulation, +7 & ~7 because the * card needs room to do 8 byte alignment, +2 so we can reserve * the first 2 bytes, and +16 gets room for the status word from the |