diff options
Diffstat (limited to '')
-rw-r--r-- | drivers/net/smsc9420.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c index 12f0f5d74e3c..aafaebf45748 100644 --- a/drivers/net/smsc9420.c +++ b/drivers/net/smsc9420.c @@ -26,6 +26,7 @@ #include <linux/if_vlan.h> #include <linux/dma-mapping.h> #include <linux/crc32.h> +#include <linux/slab.h> #include <asm/unaligned.h> #include "smsc9420.h" @@ -80,7 +81,7 @@ struct smsc9420_pdata { int last_carrier; }; -static const struct pci_device_id smsc9420_id_table[] = { +static DEFINE_PCI_DEVICE_TABLE(smsc9420_id_table) = { { PCI_VENDOR_ID_9420, PCI_DEVICE_ID_9420, PCI_ANY_ID, PCI_ANY_ID, }, { 0, } }; @@ -1062,12 +1063,12 @@ static void smsc9420_set_multicast_list(struct net_device *dev) mac_cr &= (~MAC_CR_PRMS_); mac_cr |= MAC_CR_MCPAS_; mac_cr &= (~MAC_CR_HPFILT_); - } else if (dev->mc_count > 0) { - struct dev_mc_list *mc_list = dev->mc_list; + } else if (!netdev_mc_empty(dev)) { + struct dev_mc_list *mc_list; u32 hash_lo = 0, hash_hi = 0; smsc_dbg(HW, "Multicast filter enabled"); - while (mc_list) { + netdev_for_each_mc_addr(mc_list, dev) { u32 bit_num = smsc9420_hash(mc_list->dmi_addr); u32 mask = 1 << (bit_num & 0x1F); @@ -1076,7 +1077,6 @@ static void smsc9420_set_multicast_list(struct net_device *dev) else hash_lo |= mask; - mc_list = mc_list->next; } smsc9420_reg_write(pd, HASHH, hash_hi); smsc9420_reg_write(pd, HASHL, hash_lo); @@ -1348,7 +1348,7 @@ static int smsc9420_open(struct net_device *dev) netif_carrier_off(dev); - /* disable, mask and acknowlege all interrupts */ + /* disable, mask and acknowledge all interrupts */ spin_lock_irqsave(&pd->int_lock, flags); int_cfg = smsc9420_reg_read(pd, INT_CFG) & (~INT_CFG_IRQ_EN_); smsc9420_reg_write(pd, INT_CFG, int_cfg); |