aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smsc9420.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-02 10:55:08 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-02 10:55:08 -0500
commit6d6b89bd2e316b78d668f761d380837b81fa71ef (patch)
tree7e63c58611fc6181153526abbdafdd846ed1a19d /drivers/net/smsc9420.c
parent13dda80e48439b446d0bc9bab34b91484bc8f533 (diff)
parent2507c05ff55fbf38326b08ed27eaed233bc75042 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1341 commits) virtio_net: remove forgotten assignment be2net: fix tx completion polling sis190: fix cable detect via link status poll net: fix protocol sk_buff field bridge: Fix build error when IGMP_SNOOPING is not enabled bnx2x: Tx barriers and locks scm: Only support SCM_RIGHTS on unix domain sockets. vhost-net: restart tx poll on sk_sndbuf full vhost: fix get_user_pages_fast error handling vhost: initialize log eventfd context pointer vhost: logging thinko fix wireless: convert to use netdev_for_each_mc_addr ethtool: do not set some flags, if others failed ipoib: returned back addrlen check for mc addresses netlink: Adding inode field to /proc/net/netlink axnet_cs: add new id bridge: Make IGMP snooping depend upon BRIDGE. bridge: Add multicast count/interval sysfs entries bridge: Add hash elasticity/max sysfs entries bridge: Add multicast_snooping sysfs toggle ... Trivial conflicts in Documentation/feature-removal-schedule.txt
Diffstat (limited to 'drivers/net/smsc9420.c')
-rw-r--r--drivers/net/smsc9420.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c
index 12f0f5d74e3..30110a11d73 100644
--- a/drivers/net/smsc9420.c
+++ b/drivers/net/smsc9420.c
@@ -80,7 +80,7 @@ struct smsc9420_pdata {
80 int last_carrier; 80 int last_carrier;
81}; 81};
82 82
83static const struct pci_device_id smsc9420_id_table[] = { 83static DEFINE_PCI_DEVICE_TABLE(smsc9420_id_table) = {
84 { PCI_VENDOR_ID_9420, PCI_DEVICE_ID_9420, PCI_ANY_ID, PCI_ANY_ID, }, 84 { PCI_VENDOR_ID_9420, PCI_DEVICE_ID_9420, PCI_ANY_ID, PCI_ANY_ID, },
85 { 0, } 85 { 0, }
86}; 86};
@@ -1062,12 +1062,12 @@ static void smsc9420_set_multicast_list(struct net_device *dev)
1062 mac_cr &= (~MAC_CR_PRMS_); 1062 mac_cr &= (~MAC_CR_PRMS_);
1063 mac_cr |= MAC_CR_MCPAS_; 1063 mac_cr |= MAC_CR_MCPAS_;
1064 mac_cr &= (~MAC_CR_HPFILT_); 1064 mac_cr &= (~MAC_CR_HPFILT_);
1065 } else if (dev->mc_count > 0) { 1065 } else if (!netdev_mc_empty(dev)) {
1066 struct dev_mc_list *mc_list = dev->mc_list; 1066 struct dev_mc_list *mc_list;
1067 u32 hash_lo = 0, hash_hi = 0; 1067 u32 hash_lo = 0, hash_hi = 0;
1068 1068
1069 smsc_dbg(HW, "Multicast filter enabled"); 1069 smsc_dbg(HW, "Multicast filter enabled");
1070 while (mc_list) { 1070 netdev_for_each_mc_addr(mc_list, dev) {
1071 u32 bit_num = smsc9420_hash(mc_list->dmi_addr); 1071 u32 bit_num = smsc9420_hash(mc_list->dmi_addr);
1072 u32 mask = 1 << (bit_num & 0x1F); 1072 u32 mask = 1 << (bit_num & 0x1F);
1073 1073
@@ -1076,7 +1076,6 @@ static void smsc9420_set_multicast_list(struct net_device *dev)
1076 else 1076 else
1077 hash_lo |= mask; 1077 hash_lo |= mask;
1078 1078
1079 mc_list = mc_list->next;
1080 } 1079 }
1081 smsc9420_reg_write(pd, HASHH, hash_hi); 1080 smsc9420_reg_write(pd, HASHH, hash_hi);
1082 smsc9420_reg_write(pd, HASHL, hash_lo); 1081 smsc9420_reg_write(pd, HASHL, hash_lo);