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/hamachi.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/hamachi.c')
-rw-r--r-- | drivers/net/hamachi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c index dd72c5025e6a..c70b147b4feb 100644 --- a/drivers/net/hamachi.c +++ b/drivers/net/hamachi.c | |||
@@ -1854,13 +1854,13 @@ static void set_rx_mode(struct net_device *dev) | |||
1854 | 1854 | ||
1855 | if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */ | 1855 | if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */ |
1856 | writew(0x000F, ioaddr + AddrMode); | 1856 | writew(0x000F, ioaddr + AddrMode); |
1857 | } else if ((dev->mc_count > 63) || (dev->flags & IFF_ALLMULTI)) { | 1857 | } else if ((netdev_mc_count(dev) > 63) || (dev->flags & IFF_ALLMULTI)) { |
1858 | /* Too many to match, or accept all multicasts. */ | 1858 | /* Too many to match, or accept all multicasts. */ |
1859 | writew(0x000B, ioaddr + AddrMode); | 1859 | writew(0x000B, ioaddr + AddrMode); |
1860 | } else if (dev->mc_count > 0) { /* Must use the CAM filter. */ | 1860 | } else if (!netdev_mc_empty(dev)) { /* Must use the CAM filter. */ |
1861 | struct dev_mc_list *mclist; | 1861 | struct dev_mc_list *mclist; |
1862 | int i; | 1862 | int i; |
1863 | for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; | 1863 | for (i = 0, mclist = dev->mc_list; mclist && i < netdev_mc_count(dev); |
1864 | i++, mclist = mclist->next) { | 1864 | i++, mclist = mclist->next) { |
1865 | writel(*(u32*)(mclist->dmi_addr), ioaddr + 0x100 + i*8); | 1865 | writel(*(u32*)(mclist->dmi_addr), ioaddr + 0x100 + i*8); |
1866 | writel(0x20000 | (*(u16*)&mclist->dmi_addr[4]), | 1866 | writel(0x20000 | (*(u16*)&mclist->dmi_addr[4]), |