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/fealnx.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/fealnx.c')
-rw-r--r-- | drivers/net/fealnx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c index e6a98129d787..f95b5ff0587d 100644 --- a/drivers/net/fealnx.c +++ b/drivers/net/fealnx.c | |||
@@ -1786,7 +1786,7 @@ static void __set_rx_mode(struct net_device *dev) | |||
1786 | if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */ | 1786 | if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */ |
1787 | memset(mc_filter, 0xff, sizeof(mc_filter)); | 1787 | memset(mc_filter, 0xff, sizeof(mc_filter)); |
1788 | rx_mode = CR_W_PROM | CR_W_AB | CR_W_AM; | 1788 | rx_mode = CR_W_PROM | CR_W_AB | CR_W_AM; |
1789 | } else if ((dev->mc_count > multicast_filter_limit) || | 1789 | } else if ((netdev_mc_count(dev) > multicast_filter_limit) || |
1790 | (dev->flags & IFF_ALLMULTI)) { | 1790 | (dev->flags & IFF_ALLMULTI)) { |
1791 | /* Too many to match, or accept all multicasts. */ | 1791 | /* Too many to match, or accept all multicasts. */ |
1792 | memset(mc_filter, 0xff, sizeof(mc_filter)); | 1792 | memset(mc_filter, 0xff, sizeof(mc_filter)); |
@@ -1796,7 +1796,7 @@ static void __set_rx_mode(struct net_device *dev) | |||
1796 | int i; | 1796 | int i; |
1797 | 1797 | ||
1798 | memset(mc_filter, 0, sizeof(mc_filter)); | 1798 | memset(mc_filter, 0, sizeof(mc_filter)); |
1799 | for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; | 1799 | for (i = 0, mclist = dev->mc_list; mclist && i < netdev_mc_count(dev); |
1800 | i++, mclist = mclist->next) { | 1800 | i++, mclist = mclist->next) { |
1801 | unsigned int bit; | 1801 | unsigned int bit; |
1802 | bit = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26) ^ 0x3F; | 1802 | bit = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26) ^ 0x3F; |