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/via-rhine.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/via-rhine.c')
-rw-r--r-- | drivers/net/via-rhine.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index a7e0c84426ea..85df7ac636b5 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c | |||
@@ -1697,7 +1697,7 @@ static void rhine_set_rx_mode(struct net_device *dev) | |||
1697 | rx_mode = 0x1C; | 1697 | rx_mode = 0x1C; |
1698 | iowrite32(0xffffffff, ioaddr + MulticastFilter0); | 1698 | iowrite32(0xffffffff, ioaddr + MulticastFilter0); |
1699 | iowrite32(0xffffffff, ioaddr + MulticastFilter1); | 1699 | iowrite32(0xffffffff, ioaddr + MulticastFilter1); |
1700 | } else if ((dev->mc_count > multicast_filter_limit) || | 1700 | } else if ((netdev_mc_count(dev) > multicast_filter_limit) || |
1701 | (dev->flags & IFF_ALLMULTI)) { | 1701 | (dev->flags & IFF_ALLMULTI)) { |
1702 | /* Too many to match, or accept all multicasts. */ | 1702 | /* Too many to match, or accept all multicasts. */ |
1703 | iowrite32(0xffffffff, ioaddr + MulticastFilter0); | 1703 | iowrite32(0xffffffff, ioaddr + MulticastFilter0); |
@@ -1707,7 +1707,8 @@ static void rhine_set_rx_mode(struct net_device *dev) | |||
1707 | struct dev_mc_list *mclist; | 1707 | struct dev_mc_list *mclist; |
1708 | int i; | 1708 | int i; |
1709 | memset(mc_filter, 0, sizeof(mc_filter)); | 1709 | memset(mc_filter, 0, sizeof(mc_filter)); |
1710 | for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; | 1710 | for (i = 0, mclist = dev->mc_list; |
1711 | mclist && i < netdev_mc_count(dev); | ||
1711 | i++, mclist = mclist->next) { | 1712 | i++, mclist = mclist->next) { |
1712 | int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26; | 1713 | int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26; |
1713 | 1714 | ||