net: Use netdev_alloc_skb_ip_align()
[deliverable/linux.git] / drivers / net / 8139too.c
index 0e2ba21d4441810a279432229d7d078ef3e65bdd..7e333f73b22853d40092bd7022b836d61483fdca 100644 (file)
@@ -628,8 +628,8 @@ static void mdio_write (struct net_device *dev, int phy_id, int location,
 static void rtl8139_start_thread(struct rtl8139_private *tp);
 static void rtl8139_tx_timeout (struct net_device *dev);
 static void rtl8139_init_ring (struct net_device *dev);
-static int rtl8139_start_xmit (struct sk_buff *skb,
-                              struct net_device *dev);
+static netdev_tx_t rtl8139_start_xmit (struct sk_buff *skb,
+                                      struct net_device *dev);
 #ifdef CONFIG_NET_POLL_CONTROLLER
 static void rtl8139_poll_controller(struct net_device *dev);
 #endif
@@ -1687,7 +1687,8 @@ static void rtl8139_tx_timeout (struct net_device *dev)
        }
 }
 
-static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t rtl8139_start_xmit (struct sk_buff *skb,
+                                            struct net_device *dev)
 {
        struct rtl8139_private *tp = netdev_priv(dev);
        void __iomem *ioaddr = tp->mmio_addr;
@@ -1707,7 +1708,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
        } else {
                dev_kfree_skb(skb);
                dev->stats.tx_dropped++;
-               return 0;
+               return NETDEV_TX_OK;
        }
 
        spin_lock_irqsave(&tp->lock, flags);
@@ -1732,7 +1733,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev)
                pr_debug("%s: Queued Tx packet size %u to slot %d.\n",
                        dev->name, len, entry);
 
-       return 0;
+       return NETDEV_TX_OK;
 }
 
 
@@ -2003,9 +2004,8 @@ no_early_rx:
                /* Malloc up new buffer, compatible with net-2e. */
                /* Omit the four octet CRC from the length. */
 
-               skb = netdev_alloc_skb(dev, pkt_size + NET_IP_ALIGN);
+               skb = netdev_alloc_skb_ip_align(dev, pkt_size);
                if (likely(skb)) {
-                       skb_reserve (skb, NET_IP_ALIGN);        /* 16 byte align the IP fields. */
 #if RX_BUF_IDX == 3
                        wrap_copy(skb, rx_ring, ring_offset+4, pkt_size);
 #else
This page took 0.027249 seconds and 5 git commands to generate.