aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sunhme.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sunhme.c')
-rw-r--r--drivers/net/sunhme.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index 905df35ff78a..b17dbb11bd67 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -1523,17 +1523,13 @@ static int happy_meal_init(struct happy_meal *hp)
1523 hme_write32(hp, bregs + BMAC_HTABLE3, 0xffff); 1523 hme_write32(hp, bregs + BMAC_HTABLE3, 0xffff);
1524 } else if ((hp->dev->flags & IFF_PROMISC) == 0) { 1524 } else if ((hp->dev->flags & IFF_PROMISC) == 0) {
1525 u16 hash_table[4]; 1525 u16 hash_table[4];
1526 struct dev_mc_list *dmi = hp->dev->mc_list; 1526 struct dev_mc_list *dmi;
1527 char *addrs; 1527 char *addrs;
1528 int i;
1529 u32 crc; 1528 u32 crc;
1530 1529
1531 for (i = 0; i < 4; i++) 1530 memset(hash_table, 0, sizeof(hash_table));
1532 hash_table[i] = 0; 1531 netdev_for_each_mc_addr(dmi, hp->dev) {
1533
1534 for (i = 0; i < netdev_mc_count(hp->dev); i++) {
1535 addrs = dmi->dmi_addr; 1532 addrs = dmi->dmi_addr;
1536 dmi = dmi->next;
1537 1533
1538 if (!(*addrs & 1)) 1534 if (!(*addrs & 1))
1539 continue; 1535 continue;
@@ -2366,9 +2362,8 @@ static void happy_meal_set_multicast(struct net_device *dev)
2366{ 2362{
2367 struct happy_meal *hp = netdev_priv(dev); 2363 struct happy_meal *hp = netdev_priv(dev);
2368 void __iomem *bregs = hp->bigmacregs; 2364 void __iomem *bregs = hp->bigmacregs;
2369 struct dev_mc_list *dmi = dev->mc_list; 2365 struct dev_mc_list *dmi;
2370 char *addrs; 2366 char *addrs;
2371 int i;
2372 u32 crc; 2367 u32 crc;
2373 2368
2374 spin_lock_irq(&hp->happy_lock); 2369 spin_lock_irq(&hp->happy_lock);
@@ -2384,12 +2379,9 @@ static void happy_meal_set_multicast(struct net_device *dev)
2384 } else { 2379 } else {
2385 u16 hash_table[4]; 2380 u16 hash_table[4];
2386 2381
2387 for (i = 0; i < 4; i++) 2382 memset(hash_table, 0, sizeof(hash_table));
2388 hash_table[i] = 0; 2383 netdev_for_each_mc_addr(dmi, dev) {
2389
2390 for (i = 0; i < netdev_mc_count(dev); i++) {
2391 addrs = dmi->dmi_addr; 2384 addrs = dmi->dmi_addr;
2392 dmi = dmi->next;
2393 2385
2394 if (!(*addrs & 1)) 2386 if (!(*addrs & 1))
2395 continue; 2387 continue;