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-velocity.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-velocity.c')
-rw-r--r-- | drivers/net/via-velocity.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index f15485efe40e..bdb19c3d6568 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
@@ -1132,7 +1132,7 @@ static void velocity_set_multi(struct net_device *dev) | |||
1132 | writel(0xffffffff, ®s->MARCAM[0]); | 1132 | writel(0xffffffff, ®s->MARCAM[0]); |
1133 | writel(0xffffffff, ®s->MARCAM[4]); | 1133 | writel(0xffffffff, ®s->MARCAM[4]); |
1134 | rx_mode = (RCR_AM | RCR_AB | RCR_PROM); | 1134 | rx_mode = (RCR_AM | RCR_AB | RCR_PROM); |
1135 | } else if ((dev->mc_count > vptr->multicast_limit) || | 1135 | } else if ((netdev_mc_count(dev) > vptr->multicast_limit) || |
1136 | (dev->flags & IFF_ALLMULTI)) { | 1136 | (dev->flags & IFF_ALLMULTI)) { |
1137 | writel(0xffffffff, ®s->MARCAM[0]); | 1137 | writel(0xffffffff, ®s->MARCAM[0]); |
1138 | writel(0xffffffff, ®s->MARCAM[4]); | 1138 | writel(0xffffffff, ®s->MARCAM[4]); |
@@ -1141,7 +1141,9 @@ static void velocity_set_multi(struct net_device *dev) | |||
1141 | int offset = MCAM_SIZE - vptr->multicast_limit; | 1141 | int offset = MCAM_SIZE - vptr->multicast_limit; |
1142 | mac_get_cam_mask(regs, vptr->mCAMmask); | 1142 | mac_get_cam_mask(regs, vptr->mCAMmask); |
1143 | 1143 | ||
1144 | for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; i++, mclist = mclist->next) { | 1144 | for (i = 0, mclist = dev->mc_list; |
1145 | mclist && i < netdev_mc_count(dev); | ||
1146 | i++, mclist = mclist->next) { | ||
1145 | mac_set_cam(regs, i + offset, mclist->dmi_addr); | 1147 | mac_set_cam(regs, i + offset, mclist->dmi_addr); |
1146 | vptr->mCAMmask[(offset + i) / 8] |= 1 << ((offset + i) & 7); | 1148 | vptr->mCAMmask[(offset + i) / 8] |= 1 << ((offset + i) & 7); |
1147 | } | 1149 | } |