diff options
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 | } |