summaryrefslogtreecommitdiff
path: root/drivers/net/3c59x.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-08 22:15:23 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-08 22:15:23 +0400
commitf2d7499be1b1fe1cd8a5e6a01c1f44173894a241 (patch)
tree64d341a90d8cb831a5097e365d303367906f1373 /drivers/net/3c59x.c
parent8d659f5e43c5db2630e85f507b7384365e9e1c1e (diff)
parent76aab2c1eae491a5d73ac83deec97dd28ebac584 (diff)
downloadlinux-f2d7499be1b1fe1cd8a5e6a01c1f44173894a241.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (99 commits) pkt_sched: Fix actions referencing bnx2x: fix logical op tcp: (whitespace only) fix confusing indentation pkt_sched: Fix qdisc config when link is down. [Bluetooth] Add full quirk implementation for btusb driver [Bluetooth] Removal of unnecessary ignore module parameter [Bluetooth] Add parameters to control BNEP header compression ath9k: Revamp wireless mode usage ath9k: More unused macros ath9k: Remove a few unused macros and fix indentation ath9k: Use mac80211's band macros and remove enum hal_freq_band ath9k: Remove redundant data structure ath9k_txq_info ath9k: Cleanup data structures related to HW capabilities ath9k: work around gcc ICEs ath9k: Add new Atheros IEEE 802.11n driver ath5k: remove Atheros 11n devices from supported list list.h: add list_cut_position() list.h: Add list_splice_tail() and list_splice_tail_init() p54: swap short slot time dcf values rt2x00: Block all unsupported modes ...
Diffstat (limited to 'drivers/net/3c59x.c')
-rw-r--r--drivers/net/3c59x.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index 8db4e6b89482..491ee16da5c1 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -1692,12 +1692,14 @@ vortex_open(struct net_device *dev)
vp->rx_ring[i].next = cpu_to_le32(vp->rx_ring_dma + sizeof(struct boom_rx_desc) * (i+1));
vp->rx_ring[i].status = 0; /* Clear complete bit. */
vp->rx_ring[i].length = cpu_to_le32(PKT_BUF_SZ | LAST_FRAG);
- skb = dev_alloc_skb(PKT_BUF_SZ);
+
+ skb = __netdev_alloc_skb(dev, PKT_BUF_SZ + NET_IP_ALIGN,
+ GFP_KERNEL);
vp->rx_skbuff[i] = skb;
if (skb == NULL)
break; /* Bad news! */
- skb->dev = dev; /* Mark as being used by this device. */
- skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
+
+ skb_reserve(skb, NET_IP_ALIGN); /* Align IP on 16 byte boundaries */
vp->rx_ring[i].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->data, PKT_BUF_SZ, PCI_DMA_FROMDEVICE));
}
if (i != RX_RING_SIZE) {
@@ -2538,7 +2540,7 @@ boomerang_rx(struct net_device *dev)
struct sk_buff *skb;
entry = vp->dirty_rx % RX_RING_SIZE;
if (vp->rx_skbuff[entry] == NULL) {
- skb = dev_alloc_skb(PKT_BUF_SZ);
+ skb = netdev_alloc_skb(dev, PKT_BUF_SZ + NET_IP_ALIGN);
if (skb == NULL) {
static unsigned long last_jif;
if (time_after(jiffies, last_jif + 10 * HZ)) {
@@ -2549,8 +2551,8 @@ boomerang_rx(struct net_device *dev)
mod_timer(&vp->rx_oom_timer, RUN_AT(HZ * 1));
break; /* Bad news! */
}
- skb->dev = dev; /* Mark as being used by this device. */
- skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
+
+ skb_reserve(skb, NET_IP_ALIGN);
vp->rx_ring[entry].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->data, PKT_BUF_SZ, PCI_DMA_FROMDEVICE));
vp->rx_skbuff[entry] = skb;
}