Merge branch 'topic/core-cleanup' into for-linus
[safe/jmp/linux-2.6] / drivers / net / pcmcia / 3c574_cs.c
index 17a2722..757f87b 100644 (file)
@@ -781,8 +781,13 @@ static netdev_tx_t el3_start_xmit(struct sk_buff *skb,
                  inw(ioaddr + EL3_STATUS));
 
        spin_lock_irqsave(&lp->window_lock, flags);
+
+       dev->stats.tx_bytes += skb->len;
+
+       /* Put out the doubleword header... */
        outw(skb->len, ioaddr + TX_FIFO);
        outw(0, ioaddr + TX_FIFO);
+       /* ... and the packet rounded to a doubleword. */
        outsl(ioaddr + TX_FIFO, skb->data, (skb->len+3)>>2);
 
        dev->trans_start = jiffies;
@@ -912,7 +917,11 @@ static void media_check(unsigned long arg)
        if ((inw(ioaddr + EL3_STATUS) & IntLatch) && (inb(ioaddr + Timer) == 0xff)) {
                if (!lp->fast_poll)
                        printk(KERN_INFO "%s: interrupt(s) dropped!\n", dev->name);
+
+               local_irq_save(flags);
                el3_interrupt(dev->irq, dev);
+               local_irq_restore(flags);
+
                lp->fast_poll = HZ;
        }
        if (lp->fast_poll) {
@@ -1017,8 +1026,6 @@ static void update_stats(struct net_device *dev)
        /* BadSSD */                               inb(ioaddr + 12);
        up                                       = inb(ioaddr + 13);
 
-       dev->stats.tx_bytes                     += tx + ((up & 0xf0) << 12);
-
        EL3WINDOW(1);
 }
 
@@ -1144,7 +1151,7 @@ static void set_rx_mode(struct net_device *dev)
        if (dev->flags & IFF_PROMISC)
                outw(SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm,
                         ioaddr + EL3_CMD);
-       else if (dev->mc_count || (dev->flags & IFF_ALLMULTI))
+       else if (!netdev_mc_empty(dev) || (dev->flags & IFF_ALLMULTI))
                outw(SetRxFilter|RxStation|RxMulticast|RxBroadcast, ioaddr + EL3_CMD);
        else
                outw(SetRxFilter | RxStation | RxBroadcast, ioaddr + EL3_CMD);