diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-08 04:30:35 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-12 11:38:58 -0800 |
commit | 4cd24eaf0c6ee7f0242e34ee77ec899f255e66b5 (patch) | |
tree | 99f57f6374a58022e1e5ed1cbc12699288c7eae1 /drivers/net/epic100.c | |
parent | 8e5574211d96c0552f84c757718475fdb4021be7 (diff) | |
download | blackbird-op-linux-4cd24eaf0c6ee7f0242e34ee77ec899f255e66b5.tar.gz blackbird-op-linux-4cd24eaf0c6ee7f0242e34ee77ec899f255e66b5.zip |
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/epic100.c')
-rw-r--r-- | drivers/net/epic100.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c index 1f8b11449fad..31a3adb65566 100644 --- a/drivers/net/epic100.c +++ b/drivers/net/epic100.c @@ -1390,20 +1390,20 @@ static void set_rx_mode(struct net_device *dev) outl(0x002C, ioaddr + RxCtrl); /* Unconditionally log net taps. */ memset(mc_filter, 0xff, sizeof(mc_filter)); - } else if ((dev->mc_count > 0) || (dev->flags & IFF_ALLMULTI)) { + } else if ((!netdev_mc_empty(dev)) || (dev->flags & IFF_ALLMULTI)) { /* There is apparently a chip bug, so the multicast filter is never enabled. */ /* Too many to filter perfectly -- accept all multicasts. */ memset(mc_filter, 0xff, sizeof(mc_filter)); outl(0x000C, ioaddr + RxCtrl); - } else if (dev->mc_count == 0) { + } else if (netdev_mc_empty(dev)) { outl(0x0004, ioaddr + RxCtrl); return; } else { /* Never executed, for now. */ struct dev_mc_list *mclist; memset(mc_filter, 0, sizeof(mc_filter)); - for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; + for (i = 0, mclist = dev->mc_list; mclist && i < netdev_mc_count(dev); i++, mclist = mclist->next) { unsigned int bit_nr = ether_crc_le(ETH_ALEN, mclist->dmi_addr) & 0x3f; |