ixgb and e1000: Use new function for copybreak tests
[safe/jmp/linux-2.6] / drivers / net / tlan.c
index e44d5a0..ccee3ed 100644 (file)
@@ -1034,7 +1034,7 @@ static void TLan_tx_timeout(struct net_device *dev)
        TLan_ResetLists( dev );
        TLan_ReadAndClearStats( dev, TLAN_IGNORE );
        TLan_ResetAdapter( dev );
-       dev->trans_start = jiffies;
+       dev->trans_start = jiffies; /* prevent tx timeout */
        netif_wake_queue( dev );
 
 }
@@ -1147,7 +1147,6 @@ static netdev_tx_t TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
 
        CIRC_INC( priv->txTail, TLAN_NUM_TX_LISTS );
 
-       dev->trans_start = jiffies;
        return NETDEV_TX_OK;
 
 } /* TLan_StartTx */
@@ -1314,7 +1313,7 @@ static struct net_device_stats *TLan_GetStats( struct net_device *dev )
 
 static void TLan_SetMulticastList( struct net_device *dev )
 {
-       struct dev_mc_list      *dmi = dev->mc_list;
+       struct netdev_hw_addr *ha;
        u32                     hash1 = 0;
        u32                     hash2 = 0;
        int                     i;
@@ -1335,18 +1334,19 @@ static void TLan_SetMulticastList( struct net_device *dev )
                        TLan_DioWrite32( dev->base_addr, TLAN_HASH_1, 0xFFFFFFFF );
                        TLan_DioWrite32( dev->base_addr, TLAN_HASH_2, 0xFFFFFFFF );
                } else {
-                       for ( i = 0; i < netdev_mc_count(dev); i++ ) {
+                       i = 0;
+                       netdev_for_each_mc_addr(ha, dev) {
                                if ( i < 3 ) {
                                        TLan_SetMac( dev, i + 1,
-                                                    (char *) &dmi->dmi_addr );
+                                                    (char *) &ha->addr);
                                } else {
-                                       offset = TLan_HashFunc( (u8 *) &dmi->dmi_addr );
+                                       offset = TLan_HashFunc((u8 *)&ha->addr);
                                        if ( offset < 32 )
                                                hash1 |= ( 1 << offset );
                                        else
                                                hash2 |= ( 1 << ( offset - 32 ) );
                                }
-                               dmi = dmi->next;
+                               i++;
                        }
                        for ( ; i < 3; i++ )
                                TLan_SetMac( dev, i + 1, NULL );
@@ -2463,7 +2463,7 @@ static void TLan_PhyPrint( struct net_device *dev )
                printk( "TLAN:   Device %s, Unmanaged PHY.\n", dev->name );
        } else if ( phy <= TLAN_PHY_MAX_ADDR ) {
                printk( "TLAN:   Device %s, PHY 0x%02x.\n", dev->name, phy );
-               printk( "TLAN:      Off.  +0     +1     +2     +3 \n" );
+               printk( "TLAN:      Off.  +0     +1     +2     +3\n" );
                 for ( i = 0; i < 0x20; i+= 4 ) {
                        printk( "TLAN:      0x%02x", i );
                        TLan_MiiReadReg( dev, phy, i, &data0 );