e1000e: Cleanup e1000_sw_lcd_config_ich8lan()
[safe/jmp/linux-2.6] / drivers / net / sundance.c
index 4171259..1680325 100644 (file)
@@ -84,7 +84,6 @@ static char *media[MAX_UNITS];
 #include <linux/timer.h>
 #include <linux/errno.h>
 #include <linux/ioport.h>
-#include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/pci.h>
 #include <linux/netdevice.h>
@@ -973,7 +972,7 @@ static void tx_timeout(struct net_device *dev)
 
        dev->if_port = 0;
 
-       dev->trans_start = jiffies;
+       dev->trans_start = jiffies; /* prevent tx timeout */
        dev->stats.tx_errors++;
        if (np->cur_tx - np->dirty_tx < TX_QUEUE_LEN - 4) {
                netif_wake_queue(dev);
@@ -1085,7 +1084,6 @@ start_tx (struct sk_buff *skb, struct net_device *dev)
        } else {
                netif_stop_queue (dev);
        }
-       dev->trans_start = jiffies;
        if (netif_msg_tx_queued(np)) {
                printk (KERN_DEBUG
                        "%s: Transmit frame #%d queued in slot %d.\n",
@@ -1523,14 +1521,13 @@ static void set_rx_mode(struct net_device *dev)
                memset(mc_filter, 0xff, sizeof(mc_filter));
                rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
        } else if (!netdev_mc_empty(dev)) {
-               struct dev_mc_list *mclist;
+               struct netdev_hw_addr *ha;
                int bit;
                int index;
                int crc;
                memset (mc_filter, 0, sizeof (mc_filter));
-               for (i = 0, mclist = dev->mc_list; mclist && i < netdev_mc_count(dev);
-                    i++, mclist = mclist->next) {
-                       crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr);
+               netdev_for_each_mc_addr(ha, dev) {
+                       crc = ether_crc_le(ETH_ALEN, ha->addr);
                        for (index=0, bit=0; bit < 6; bit++, crc <<= 1)
                                if (crc & 0x80000000) index |= 1 << bit;
                        mc_filter[index/16] |= (1 << (index % 16));