aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sundance.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/sundance.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/sundance.c')
-rw-r--r--drivers/net/sundance.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index d58e1891ca6..a855934dfc3 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -206,7 +206,7 @@ IVc. Errata
206#define USE_IO_OPS 1 206#define USE_IO_OPS 1
207#endif 207#endif
208 208
209static const struct pci_device_id sundance_pci_tbl[] = { 209static DEFINE_PCI_DEVICE_TABLE(sundance_pci_tbl) = {
210 { 0x1186, 0x1002, 0x1186, 0x1002, 0, 0, 0 }, 210 { 0x1186, 0x1002, 0x1186, 0x1002, 0, 0, 0 },
211 { 0x1186, 0x1002, 0x1186, 0x1003, 0, 0, 1 }, 211 { 0x1186, 0x1002, 0x1186, 0x1003, 0, 0, 1 },
212 { 0x1186, 0x1002, 0x1186, 0x1012, 0, 0, 2 }, 212 { 0x1186, 0x1002, 0x1186, 0x1012, 0, 0, 2 },
@@ -1517,19 +1517,18 @@ static void set_rx_mode(struct net_device *dev)
1517 if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */ 1517 if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */
1518 memset(mc_filter, 0xff, sizeof(mc_filter)); 1518 memset(mc_filter, 0xff, sizeof(mc_filter));
1519 rx_mode = AcceptBroadcast | AcceptMulticast | AcceptAll | AcceptMyPhys; 1519 rx_mode = AcceptBroadcast | AcceptMulticast | AcceptAll | AcceptMyPhys;
1520 } else if ((dev->mc_count > multicast_filter_limit) || 1520 } else if ((netdev_mc_count(dev) > multicast_filter_limit) ||
1521 (dev->flags & IFF_ALLMULTI)) { 1521 (dev->flags & IFF_ALLMULTI)) {
1522 /* Too many to match, or accept all multicasts. */ 1522 /* Too many to match, or accept all multicasts. */
1523 memset(mc_filter, 0xff, sizeof(mc_filter)); 1523 memset(mc_filter, 0xff, sizeof(mc_filter));
1524 rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; 1524 rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
1525 } else if (dev->mc_count) { 1525 } else if (!netdev_mc_empty(dev)) {
1526 struct dev_mc_list *mclist; 1526 struct dev_mc_list *mclist;
1527 int bit; 1527 int bit;
1528 int index; 1528 int index;
1529 int crc; 1529 int crc;
1530 memset (mc_filter, 0, sizeof (mc_filter)); 1530 memset (mc_filter, 0, sizeof (mc_filter));
1531 for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; 1531 netdev_for_each_mc_addr(mclist, dev) {
1532 i++, mclist = mclist->next) {
1533 crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr); 1532 crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr);
1534 for (index=0, bit=0; bit < 6; bit++, crc <<= 1) 1533 for (index=0, bit=0; bit < 6; bit++, crc <<= 1)
1535 if (crc & 0x80000000) index |= 1 << bit; 1534 if (crc & 0x80000000) index |= 1 << bit;