Merge branch 'for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[safe/jmp/linux-2.6] / drivers / net / a2065.c
index 08787f5..f142cc2 100644 (file)
@@ -46,7 +46,6 @@
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/skbuff.h>
-#include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/init.h>
 #include <linux/crc32.h>
@@ -526,7 +525,7 @@ static inline int lance_reset (struct net_device *dev)
        load_csrs (lp);
 
        lance_init_ring (dev);
-       dev->trans_start = jiffies;
+       dev->trans_start = jiffies; /* prevent tx timeout */
        netif_start_queue(dev);
 
        status = init_restart_lance (lp);
@@ -547,17 +546,18 @@ static void lance_tx_timeout(struct net_device *dev)
        netif_wake_queue(dev);
 }
 
-static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
+static netdev_tx_t lance_start_xmit (struct sk_buff *skb,
+                                    struct net_device *dev)
 {
        struct lance_private *lp = netdev_priv(dev);
        volatile struct lance_regs *ll = lp->ll;
        volatile struct lance_init_block *ib = lp->init_block;
        int entry, skblen;
-       int status = 0;
+       int status = NETDEV_TX_OK;
        unsigned long flags;
 
        if (skb_padto(skb, ETH_ZLEN))
-               return 0;
+               return NETDEV_TX_OK;
        skblen = max_t(unsigned, skb->len, ETH_ZLEN);
 
        local_irq_save(flags);
@@ -588,7 +588,6 @@ static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)
 
        /* Kick the lance: transmit now */
        ll->rdp = LE_C0_INEA | LE_C0_TDMD;
-       dev->trans_start = jiffies;
        dev_kfree_skb (skb);
 
        local_irq_restore(flags);
@@ -602,9 +601,8 @@ static void lance_load_multicast (struct net_device *dev)
        struct lance_private *lp = netdev_priv(dev);
        volatile struct lance_init_block *ib = lp->init_block;
        volatile u16 *mcast_table = (u16 *)&ib->filter;
-       struct dev_mc_list *dmi=dev->mc_list;
+       struct netdev_hw_addr *ha;
        char *addrs;
-       int i;
        u32 crc;
 
        /* set all multicast bits */
@@ -618,9 +616,8 @@ static void lance_load_multicast (struct net_device *dev)
        ib->filter [1] = 0;
 
        /* Add addresses */
-       for (i = 0; i < dev->mc_count; i++){
-               addrs = dmi->dmi_addr;
-               dmi   = dmi->next;
+       netdev_for_each_mc_addr(ha, dev) {
+               addrs = ha->addr;
 
                /* multicast address? */
                if (!(*addrs & 1))
@@ -630,7 +627,6 @@ static void lance_load_multicast (struct net_device *dev)
                crc = crc >> 26;
                mcast_table [crc >> 4] |= 1 << (crc & 0xf);
        }
-       return;
 }
 
 static void lance_set_multicast (struct net_device *dev)
@@ -676,6 +672,7 @@ static struct zorro_device_id a2065_zorro_tbl[] __devinitdata = {
        { ZORRO_PROD_AMERISTAR_A2065 },
        { 0 }
 };
+MODULE_DEVICE_TABLE(zorro, a2065_zorro_tbl);
 
 static struct zorro_driver a2065_driver = {
        .name           = "a2065",