aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-23 04:19:49 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-26 05:07:30 -0500
commitf9dcbcc9e338d08c0f7de7eba4eaafbbb7f81249 (patch)
tree8a1d9a37bc057440220a5ad23231e0fe974b93f6 /drivers/net/netxen
parent52c793f24054f5dc30d228e37e0e19cc8313f086 (diff)
net: convert multiple drivers to use netdev_for_each_mc_addr, part5 V2
removed some needless checks and also corrected bug in lp486e (dmi was passed instead of dmi->dmi_addr) Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r--drivers/net/netxen/netxen_nic_hw.c19
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
585static int 582static 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
719send_fw_cmd: 714send_fw_cmd: