ixgb and e1000: Use new function for copybreak tests
[safe/jmp/linux-2.6] / drivers / net / smsc911x.c
index 13c0b76..89f35f9 100644 (file)
@@ -41,7 +41,6 @@
 #include <linux/netdevice.h>
 #include <linux/platform_device.h>
 #include <linux/sched.h>
-#include <linux/slab.h>
 #include <linux/timer.h>
 #include <linux/bug.h>
 #include <linux/bitops.h>
@@ -1336,7 +1335,6 @@ static int smsc911x_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
        smsc911x_tx_writefifo(pdata, (unsigned int *)bufp, wrsz);
        freespace -= (skb->len + 32);
        dev_kfree_skb(skb);
-       dev->trans_start = jiffies;
 
        if (unlikely(smsc911x_tx_get_txstatcount(pdata) >= 30))
                smsc911x_tx_update_txcounters(dev);
@@ -1383,29 +1381,20 @@ static void smsc911x_set_multicast_list(struct net_device *dev)
                /* Enabling specific multicast addresses */
                unsigned int hash_high = 0;
                unsigned int hash_low = 0;
-               unsigned int count = 0;
-               struct dev_mc_list *mc_list = dev->mc_list;
+               struct netdev_hw_addr *ha;
 
                pdata->set_bits_mask = MAC_CR_HPFILT_;
                pdata->clear_bits_mask = (MAC_CR_PRMS_ | MAC_CR_MCPAS_);
 
-               while (mc_list) {
-                       count++;
-                       if ((mc_list->dmi_addrlen) == ETH_ALEN) {
-                               unsigned int bitnum =
-                                   smsc911x_hash(mc_list->dmi_addr);
-                               unsigned int mask = 0x01 << (bitnum & 0x1F);
-                               if (bitnum & 0x20)
-                                       hash_high |= mask;
-                               else
-                                       hash_low |= mask;
-                       } else {
-                               SMSC_WARNING(DRV, "dmi_addrlen != 6");
-                       }
-                       mc_list = mc_list->next;
+               netdev_for_each_mc_addr(ha, dev) {
+                       unsigned int bitnum = smsc911x_hash(ha->addr);
+                       unsigned int mask = 0x01 << (bitnum & 0x1F);
+
+                       if (bitnum & 0x20)
+                               hash_high |= mask;
+                       else
+                               hash_low |= mask;
                }
-               if (count != (unsigned int)netdev_mc_count(dev))
-                       SMSC_WARNING(DRV, "mc_count != dev->mc_count");
 
                pdata->hashhi = hash_high;
                pdata->hashlo = hash_low;