diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-07 23:30:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-12 14:38:58 -0500 |
commit | 4cd24eaf0c6ee7f0242e34ee77ec899f255e66b5 (patch) | |
tree | 99f57f6374a58022e1e5ed1cbc12699288c7eae1 /drivers/net/smc911x.c | |
parent | 8e5574211d96c0552f84c757718475fdb4021be7 (diff) |
net: use netdev_mc_count and netdev_mc_empty when appropriate
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss
anything). Used spatch and did small tweaks and conding style changes when
it was suitable.
Jirka
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/smc911x.c')
-rw-r--r-- | drivers/net/smc911x.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 3c5a4f52345c..ef9674c6713f 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -1323,7 +1323,7 @@ static void smc911x_set_multicast_list(struct net_device *dev) | |||
1323 | * I don't need to zero the multicast table, because the flag is | 1323 | * I don't need to zero the multicast table, because the flag is |
1324 | * checked before the table is | 1324 | * checked before the table is |
1325 | */ | 1325 | */ |
1326 | else if (dev->flags & IFF_ALLMULTI || dev->mc_count > 16) { | 1326 | else if (dev->flags & IFF_ALLMULTI || netdev_mc_count(dev) > 16) { |
1327 | DBG(SMC_DEBUG_MISC, "%s: RCR_ALMUL\n", dev->name); | 1327 | DBG(SMC_DEBUG_MISC, "%s: RCR_ALMUL\n", dev->name); |
1328 | mcr |= MAC_CR_MCPAS_; | 1328 | mcr |= MAC_CR_MCPAS_; |
1329 | } | 1329 | } |
@@ -1340,7 +1340,7 @@ static void smc911x_set_multicast_list(struct net_device *dev) | |||
1340 | * the number of the 32 bit register, while the low 5 bits are the bit | 1340 | * the number of the 32 bit register, while the low 5 bits are the bit |
1341 | * within that register. | 1341 | * within that register. |
1342 | */ | 1342 | */ |
1343 | else if (dev->mc_count) { | 1343 | else if (!netdev_mc_empty(dev)) { |
1344 | int i; | 1344 | int i; |
1345 | struct dev_mc_list *cur_addr; | 1345 | struct dev_mc_list *cur_addr; |
1346 | 1346 | ||
@@ -1351,7 +1351,7 @@ static void smc911x_set_multicast_list(struct net_device *dev) | |||
1351 | memset(multicast_table, 0, sizeof(multicast_table)); | 1351 | memset(multicast_table, 0, sizeof(multicast_table)); |
1352 | 1352 | ||
1353 | cur_addr = dev->mc_list; | 1353 | cur_addr = dev->mc_list; |
1354 | for (i = 0; i < dev->mc_count; i++, cur_addr = cur_addr->next) { | 1354 | for (i = 0; i < netdev_mc_count(dev); i++, cur_addr = cur_addr->next) { |
1355 | u32 position; | 1355 | u32 position; |
1356 | 1356 | ||
1357 | /* do we have a pointer here? */ | 1357 | /* do we have a pointer here? */ |