]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/ns83820.c
Merge branch 'for-2.6.23' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc
[linux-2.6-omap-h63xx.git] / drivers / net / ns83820.c
index 717d8e9b98332ab4a59256079005c3560cedb141..ea80e6cb3dec1600ba4b5baecba4f4d56c612bba 100644 (file)
@@ -1582,7 +1582,7 @@ static void ns83820_set_multicast(struct net_device *ndev)
        else
                and_mask &= ~(RFCR_AAU | RFCR_AAM);
 
-       if (ndev->flags & IFF_ALLMULTI)
+       if (ndev->flags & IFF_ALLMULTI || ndev->mc_count)
                or_mask |= RFCR_AAM;
        else
                and_mask &= ~RFCR_AAM;
@@ -1831,11 +1831,13 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
 
        ndev = alloc_etherdev(sizeof(struct ns83820));
        dev = PRIV(ndev);
-       dev->ndev = ndev;
+
        err = -ENOMEM;
        if (!dev)
                goto out;
 
+       dev->ndev = ndev;
+
        spin_lock_init(&dev->rx_info.lock);
        spin_lock_init(&dev->tx_lock);
        spin_lock_init(&dev->misc_lock);