diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-03-26 15:55:59 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-03-26 15:55:59 +0100 |
commit | 329f9052dbadf6f4afe2231668bd00c579a4aa10 (patch) | |
tree | e080a5c70df40f3ae8cf28a95a3267757668ab97 /drivers/net/smc91x.c | |
parent | mtd/maps/pismo: remove dangling pointer and a leak (diff) | |
parent | Linux 2.6.34-rc2 (diff) | |
download | linux-329f9052dbadf6f4afe2231668bd00c579a4aa10.tar.xz linux-329f9052dbadf6f4afe2231668bd00c579a4aa10.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/mtd/nand/sh_flctl.c
Maxim's patch to initialise sysfs attributes depends on the patch which
actually adds sysfs_attr_init().
Diffstat (limited to 'drivers/net/smc91x.c')
-rw-r--r-- | drivers/net/smc91x.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index ea4fae79d6ec..fc1b5a1a3583 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c @@ -1395,7 +1395,7 @@ static void smc_set_multicast_list(struct net_device *dev) * I don't need to zero the multicast table, because the flag is * checked before the table is */ - else if (dev->flags & IFF_ALLMULTI || dev->mc_count > 16) { + else if (dev->flags & IFF_ALLMULTI || netdev_mc_count(dev) > 16) { DBG(2, "%s: RCR_ALMUL\n", dev->name); lp->rcr_cur_mode |= RCR_ALMUL; } @@ -1412,8 +1412,7 @@ static void smc_set_multicast_list(struct net_device *dev) * the number of the 8 bit register, while the low 3 bits are the bit * within that register. */ - else if (dev->mc_count) { - int i; + else if (!netdev_mc_empty(dev)) { struct dev_mc_list *cur_addr; /* table for flipping the order of 3 bits */ @@ -1422,13 +1421,9 @@ static void smc_set_multicast_list(struct net_device *dev) /* start with a table of all zeros: reject all */ memset(multicast_table, 0, sizeof(multicast_table)); - cur_addr = dev->mc_list; - for (i = 0; i < dev->mc_count; i++, cur_addr = cur_addr->next) { + netdev_for_each_mc_addr(cur_addr, dev) { int position; - /* do we have a pointer here? */ - if (!cur_addr) - break; /* make sure this is a multicast address - shouldn't this be a given if we have it here ? */ if (!(*cur_addr->dmi_addr & 1)) |