diff options
Diffstat (limited to 'drivers/net/tulip/winbond-840.c')
-rw-r--r-- | drivers/net/tulip/winbond-840.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index 98dbf6cc1d68..608b279b921b 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c | |||
@@ -626,7 +626,6 @@ static void mdio_write(struct net_device *dev, int phy_id, int location, int val | |||
626 | iowrite32(MDIO_EnbIn | MDIO_ShiftClk, mdio_addr); | 626 | iowrite32(MDIO_EnbIn | MDIO_ShiftClk, mdio_addr); |
627 | mdio_delay(mdio_addr); | 627 | mdio_delay(mdio_addr); |
628 | } | 628 | } |
629 | return; | ||
630 | } | 629 | } |
631 | 630 | ||
632 | 631 | ||
@@ -969,9 +968,8 @@ static void tx_timeout(struct net_device *dev) | |||
969 | enable_irq(dev->irq); | 968 | enable_irq(dev->irq); |
970 | 969 | ||
971 | netif_wake_queue(dev); | 970 | netif_wake_queue(dev); |
972 | dev->trans_start = jiffies; | 971 | dev->trans_start = jiffies; /* prevent tx timeout */ |
973 | np->stats.tx_errors++; | 972 | np->stats.tx_errors++; |
974 | return; | ||
975 | } | 973 | } |
976 | 974 | ||
977 | /* Initialize the Rx and Tx rings, along with various 'dev' bits. */ | 975 | /* Initialize the Rx and Tx rings, along with various 'dev' bits. */ |
@@ -1055,8 +1053,6 @@ static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev) | |||
1055 | } | 1053 | } |
1056 | spin_unlock_irq(&np->lock); | 1054 | spin_unlock_irq(&np->lock); |
1057 | 1055 | ||
1058 | dev->trans_start = jiffies; | ||
1059 | |||
1060 | if (debug > 4) { | 1056 | if (debug > 4) { |
1061 | printk(KERN_DEBUG "%s: Transmit frame #%d queued in slot %d\n", | 1057 | printk(KERN_DEBUG "%s: Transmit frame #%d queued in slot %d\n", |
1062 | dev->name, np->cur_tx, entry); | 1058 | dev->name, np->cur_tx, entry); |
@@ -1366,13 +1362,15 @@ static u32 __set_rx_mode(struct net_device *dev) | |||
1366 | memset(mc_filter, 0xff, sizeof(mc_filter)); | 1362 | memset(mc_filter, 0xff, sizeof(mc_filter)); |
1367 | rx_mode = RxAcceptBroadcast | AcceptMulticast | AcceptMyPhys; | 1363 | rx_mode = RxAcceptBroadcast | AcceptMulticast | AcceptMyPhys; |
1368 | } else { | 1364 | } else { |
1369 | struct dev_mc_list *mclist; | 1365 | struct netdev_hw_addr *ha; |
1370 | 1366 | ||
1371 | memset(mc_filter, 0, sizeof(mc_filter)); | 1367 | memset(mc_filter, 0, sizeof(mc_filter)); |
1372 | netdev_for_each_mc_addr(mclist, dev) { | 1368 | netdev_for_each_mc_addr(ha, dev) { |
1373 | int filterbit = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26) ^ 0x3F; | 1369 | int filbit; |
1374 | filterbit &= 0x3f; | 1370 | |
1375 | mc_filter[filterbit >> 5] |= 1 << (filterbit & 31); | 1371 | filbit = (ether_crc(ETH_ALEN, ha->addr) >> 26) ^ 0x3F; |
1372 | filbit &= 0x3f; | ||
1373 | mc_filter[filbit >> 5] |= 1 << (filbit & 31); | ||
1376 | } | 1374 | } |
1377 | rx_mode = RxAcceptBroadcast | AcceptMulticast | AcceptMyPhys; | 1375 | rx_mode = RxAcceptBroadcast | AcceptMulticast | AcceptMyPhys; |
1378 | } | 1376 | } |