diff options
-rw-r--r-- | drivers/net/stmmac/gmac.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/net/stmmac/gmac.c b/drivers/net/stmmac/gmac.c index 52586ee68953..982875646725 100644 --- a/drivers/net/stmmac/gmac.c +++ b/drivers/net/stmmac/gmac.c | |||
@@ -435,7 +435,7 @@ static void gmac_set_filter(struct net_device *dev) | |||
435 | unsigned int value = 0; | 435 | unsigned int value = 0; |
436 | 436 | ||
437 | DBG(KERN_INFO "%s: # mcasts %d, # unicast %d\n", | 437 | DBG(KERN_INFO "%s: # mcasts %d, # unicast %d\n", |
438 | __func__, dev->mc_count, dev->uc_count); | 438 | __func__, dev->mc_count, dev->uc.count); |
439 | 439 | ||
440 | if (dev->flags & IFF_PROMISC) | 440 | if (dev->flags & IFF_PROMISC) |
441 | value = GMAC_FRAME_FILTER_PR; | 441 | value = GMAC_FRAME_FILTER_PR; |
@@ -469,25 +469,17 @@ static void gmac_set_filter(struct net_device *dev) | |||
469 | } | 469 | } |
470 | 470 | ||
471 | /* Handle multiple unicast addresses (perfect filtering)*/ | 471 | /* Handle multiple unicast addresses (perfect filtering)*/ |
472 | if (dev->uc_count > GMAC_MAX_UNICAST_ADDRESSES) | 472 | if (dev->uc.count > GMAC_MAX_UNICAST_ADDRESSES) |
473 | /* Switch to promiscuous mode is more than 16 addrs | 473 | /* Switch to promiscuous mode is more than 16 addrs |
474 | are required */ | 474 | are required */ |
475 | value |= GMAC_FRAME_FILTER_PR; | 475 | value |= GMAC_FRAME_FILTER_PR; |
476 | else { | 476 | else { |
477 | int i; | 477 | int reg = 1; |
478 | struct dev_addr_list *uc_ptr = dev->uc_list; | 478 | struct netdev_hw_addr *ha; |
479 | 479 | ||
480 | for (i = 0; i < dev->uc_count; i++) { | 480 | list_for_each_entry(ha, &dev->uc.list, list) { |
481 | gmac_set_umac_addr(ioaddr, uc_ptr->da_addr, | 481 | gmac_set_umac_addr(ioaddr, ha->addr, reg); |
482 | i + 1); | 482 | reg++; |
483 | |||
484 | DBG(KERN_INFO "\t%d " | ||
485 | "- Unicast addr %02x:%02x:%02x:%02x:%02x:" | ||
486 | "%02x\n", i + 1, | ||
487 | uc_ptr->da_addr[0], uc_ptr->da_addr[1], | ||
488 | uc_ptr->da_addr[2], uc_ptr->da_addr[3], | ||
489 | uc_ptr->da_addr[4], uc_ptr->da_addr[5]); | ||
490 | uc_ptr = uc_ptr->next; | ||
491 | } | 483 | } |
492 | } | 484 | } |
493 | 485 | ||