aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/natsemi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/natsemi.c')
-rw-r--r--drivers/net/natsemi.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index e52038783245..2a17b503feaa 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -1905,7 +1905,7 @@ static void ns_tx_timeout(struct net_device *dev)
1905 spin_unlock_irq(&np->lock); 1905 spin_unlock_irq(&np->lock);
1906 enable_irq(dev->irq); 1906 enable_irq(dev->irq);
1907 1907
1908 dev->trans_start = jiffies; 1908 dev->trans_start = jiffies; /* prevent tx timeout */
1909 np->stats.tx_errors++; 1909 np->stats.tx_errors++;
1910 netif_wake_queue(dev); 1910 netif_wake_queue(dev);
1911} 1911}
@@ -2119,8 +2119,6 @@ static netdev_tx_t start_tx(struct sk_buff *skb, struct net_device *dev)
2119 } 2119 }
2120 spin_unlock_irqrestore(&np->lock, flags); 2120 spin_unlock_irqrestore(&np->lock, flags);
2121 2121
2122 dev->trans_start = jiffies;
2123
2124 if (netif_msg_tx_queued(np)) { 2122 if (netif_msg_tx_queued(np)) {
2125 printk(KERN_DEBUG "%s: Transmit frame #%d queued in slot %d.\n", 2123 printk(KERN_DEBUG "%s: Transmit frame #%d queued in slot %d.\n",
2126 dev->name, np->cur_tx, entry); 2124 dev->name, np->cur_tx, entry);
@@ -2493,12 +2491,12 @@ static void __set_rx_mode(struct net_device *dev)
2493 rx_mode = RxFilterEnable | AcceptBroadcast 2491 rx_mode = RxFilterEnable | AcceptBroadcast
2494 | AcceptAllMulticast | AcceptMyPhys; 2492 | AcceptAllMulticast | AcceptMyPhys;
2495 } else { 2493 } else {
2496 struct dev_mc_list *mclist; 2494 struct netdev_hw_addr *ha;
2497 int i; 2495 int i;
2498 2496
2499 memset(mc_filter, 0, sizeof(mc_filter)); 2497 memset(mc_filter, 0, sizeof(mc_filter));
2500 netdev_for_each_mc_addr(mclist, dev) { 2498 netdev_for_each_mc_addr(ha, dev) {
2501 int b = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 23) & 0x1ff; 2499 int b = (ether_crc(ETH_ALEN, ha->addr) >> 23) & 0x1ff;
2502 mc_filter[b/8] |= (1 << (b & 0x07)); 2500 mc_filter[b/8] |= (1 << (b & 0x07));
2503 } 2501 }
2504 rx_mode = RxFilterEnable | AcceptBroadcast 2502 rx_mode = RxFilterEnable | AcceptBroadcast