diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-07 23:30:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-12 14:38:58 -0500 |
commit | 4cd24eaf0c6ee7f0242e34ee77ec899f255e66b5 (patch) | |
tree | 99f57f6374a58022e1e5ed1cbc12699288c7eae1 /drivers/net/netxen/netxen_nic_hw.c | |
parent | 8e5574211d96c0552f84c757718475fdb4021be7 (diff) |
net: use netdev_mc_count and netdev_mc_empty when appropriate
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss
anything). Used spatch and did small tweaks and conding style changes when
it was suitable.
Jirka
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_hw.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index dd45c7a9122e..25f4414cc33e 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -554,7 +554,7 @@ void netxen_p2_nic_set_multi(struct net_device *netdev) | |||
554 | return; | 554 | return; |
555 | } | 555 | } |
556 | 556 | ||
557 | if (netdev->mc_count == 0) { | 557 | if (netdev_mc_empty(netdev)) { |
558 | adapter->set_promisc(adapter, | 558 | adapter->set_promisc(adapter, |
559 | NETXEN_NIU_NON_PROMISC_MODE); | 559 | NETXEN_NIU_NON_PROMISC_MODE); |
560 | netxen_nic_disable_mcast_filter(adapter); | 560 | netxen_nic_disable_mcast_filter(adapter); |
@@ -563,7 +563,7 @@ void netxen_p2_nic_set_multi(struct net_device *netdev) | |||
563 | 563 | ||
564 | adapter->set_promisc(adapter, NETXEN_NIU_ALLMULTI_MODE); | 564 | adapter->set_promisc(adapter, NETXEN_NIU_ALLMULTI_MODE); |
565 | if (netdev->flags & IFF_ALLMULTI || | 565 | if (netdev->flags & IFF_ALLMULTI || |
566 | netdev->mc_count > adapter->max_mc_count) { | 566 | netdev_mc_count(netdev) > adapter->max_mc_count) { |
567 | netxen_nic_disable_mcast_filter(adapter); | 567 | netxen_nic_disable_mcast_filter(adapter); |
568 | return; | 568 | return; |
569 | } | 569 | } |
@@ -573,7 +573,7 @@ void netxen_p2_nic_set_multi(struct net_device *netdev) | |||
573 | for (mc_ptr = netdev->mc_list; mc_ptr; mc_ptr = mc_ptr->next, index++) | 573 | for (mc_ptr = netdev->mc_list; mc_ptr; mc_ptr = mc_ptr->next, index++) |
574 | netxen_nic_set_mcast_addr(adapter, index, mc_ptr->dmi_addr); | 574 | netxen_nic_set_mcast_addr(adapter, index, mc_ptr->dmi_addr); |
575 | 575 | ||
576 | if (index != netdev->mc_count) | 576 | if (index != netdev_mc_count(netdev)) |
577 | printk(KERN_WARNING "%s: %s multicast address count mismatch\n", | 577 | printk(KERN_WARNING "%s: %s multicast address count mismatch\n", |
578 | netxen_nic_driver_name, netdev->name); | 578 | netxen_nic_driver_name, netdev->name); |
579 | 579 | ||
@@ -704,12 +704,12 @@ void netxen_p3_nic_set_multi(struct net_device *netdev) | |||
704 | } | 704 | } |
705 | 705 | ||
706 | if ((netdev->flags & IFF_ALLMULTI) || | 706 | if ((netdev->flags & IFF_ALLMULTI) || |
707 | (netdev->mc_count > adapter->max_mc_count)) { | 707 | (netdev_mc_count(netdev) > adapter->max_mc_count)) { |
708 | mode = VPORT_MISS_MODE_ACCEPT_MULTI; | 708 | mode = VPORT_MISS_MODE_ACCEPT_MULTI; |
709 | goto send_fw_cmd; | 709 | goto send_fw_cmd; |
710 | } | 710 | } |
711 | 711 | ||
712 | if (netdev->mc_count > 0) { | 712 | if (!netdev_mc_empty(netdev)) { |
713 | for (mc_ptr = netdev->mc_list; mc_ptr; | 713 | for (mc_ptr = netdev->mc_list; mc_ptr; |
714 | mc_ptr = mc_ptr->next) { | 714 | mc_ptr = mc_ptr->next) { |
715 | nx_p3_nic_add_mac(adapter, mc_ptr->dmi_addr, &del_list); | 715 | nx_p3_nic_add_mac(adapter, mc_ptr->dmi_addr, &del_list); |