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/sonic.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/sonic.c')
-rw-r--r-- | drivers/net/sonic.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/sonic.c b/drivers/net/sonic.c index 9599ce77ef85..bd8bc66f2e00 100644 --- a/drivers/net/sonic.c +++ b/drivers/net/sonic.c | |||
@@ -541,13 +541,15 @@ static void sonic_multicast_list(struct net_device *dev) | |||
541 | if (dev->flags & IFF_PROMISC) { /* set promiscuous mode */ | 541 | if (dev->flags & IFF_PROMISC) { /* set promiscuous mode */ |
542 | rcr |= SONIC_RCR_PRO; | 542 | rcr |= SONIC_RCR_PRO; |
543 | } else { | 543 | } else { |
544 | if ((dev->flags & IFF_ALLMULTI) || (dev->mc_count > 15)) { | 544 | if ((dev->flags & IFF_ALLMULTI) || |
545 | (netdev_mc_count(dev) > 15)) { | ||
545 | rcr |= SONIC_RCR_AMC; | 546 | rcr |= SONIC_RCR_AMC; |
546 | } else { | 547 | } else { |
547 | if (sonic_debug > 2) | 548 | if (sonic_debug > 2) |
548 | printk("sonic_multicast_list: mc_count %d\n", dev->mc_count); | 549 | printk("sonic_multicast_list: mc_count %d\n", |
550 | netdev_mc_count(dev)); | ||
549 | sonic_set_cam_enable(dev, 1); /* always enable our own address */ | 551 | sonic_set_cam_enable(dev, 1); /* always enable our own address */ |
550 | for (i = 1; i <= dev->mc_count; i++) { | 552 | for (i = 1; i <= netdev_mc_count(dev); i++) { |
551 | addr = dmi->dmi_addr; | 553 | addr = dmi->dmi_addr; |
552 | dmi = dmi->next; | 554 | dmi = dmi->next; |
553 | sonic_cda_put(dev, i, SONIC_CD_CAP0, addr[1] << 8 | addr[0]); | 555 | sonic_cda_put(dev, i, SONIC_CD_CAP0, addr[1] << 8 | addr[0]); |