diff options
Diffstat (limited to 'drivers/net/netxen/netxen_nic_hw.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 25f4414cc33e..a945591298a8 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -539,7 +539,7 @@ void netxen_p2_nic_set_multi(struct net_device *netdev) | |||
539 | struct netxen_adapter *adapter = netdev_priv(netdev); | 539 | struct netxen_adapter *adapter = netdev_priv(netdev); |
540 | struct dev_mc_list *mc_ptr; | 540 | struct dev_mc_list *mc_ptr; |
541 | u8 null_addr[6]; | 541 | u8 null_addr[6]; |
542 | int index = 0; | 542 | int i; |
543 | 543 | ||
544 | memset(null_addr, 0, 6); | 544 | memset(null_addr, 0, 6); |
545 | 545 | ||
@@ -570,16 +570,13 @@ void netxen_p2_nic_set_multi(struct net_device *netdev) | |||
570 | 570 | ||
571 | netxen_nic_enable_mcast_filter(adapter); | 571 | netxen_nic_enable_mcast_filter(adapter); |
572 | 572 | ||
573 | for (mc_ptr = netdev->mc_list; mc_ptr; mc_ptr = mc_ptr->next, index++) | 573 | i = 0; |
574 | netxen_nic_set_mcast_addr(adapter, index, mc_ptr->dmi_addr); | 574 | netdev_for_each_mc_addr(mc_ptr, netdev) |
575 | 575 | netxen_nic_set_mcast_addr(adapter, i++, mc_ptr->dmi_addr); | |
576 | if (index != netdev_mc_count(netdev)) | ||
577 | printk(KERN_WARNING "%s: %s multicast address count mismatch\n", | ||
578 | netxen_nic_driver_name, netdev->name); | ||
579 | 576 | ||
580 | /* Clear out remaining addresses */ | 577 | /* Clear out remaining addresses */ |
581 | for (; index < adapter->max_mc_count; index++) | 578 | while (i < adapter->max_mc_count) |
582 | netxen_nic_set_mcast_addr(adapter, index, null_addr); | 579 | netxen_nic_set_mcast_addr(adapter, i++, null_addr); |
583 | } | 580 | } |
584 | 581 | ||
585 | static int | 582 | static int |
@@ -710,10 +707,8 @@ void netxen_p3_nic_set_multi(struct net_device *netdev) | |||
710 | } | 707 | } |
711 | 708 | ||
712 | if (!netdev_mc_empty(netdev)) { | 709 | if (!netdev_mc_empty(netdev)) { |
713 | for (mc_ptr = netdev->mc_list; mc_ptr; | 710 | netdev_for_each_mc_addr(mc_ptr, netdev) |
714 | mc_ptr = mc_ptr->next) { | ||
715 | nx_p3_nic_add_mac(adapter, mc_ptr->dmi_addr, &del_list); | 711 | nx_p3_nic_add_mac(adapter, mc_ptr->dmi_addr, &del_list); |
716 | } | ||
717 | } | 712 | } |
718 | 713 | ||
719 | send_fw_cmd: | 714 | send_fw_cmd: |