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/ixgb/ixgb_main.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/ixgb/ixgb_main.c')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index c56ea69762cd..6a7b2ccef72c 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -1077,7 +1077,7 @@ ixgb_set_multi(struct net_device *netdev) | |||
1077 | rctl |= IXGB_RCTL_VFE; | 1077 | rctl |= IXGB_RCTL_VFE; |
1078 | } | 1078 | } |
1079 | 1079 | ||
1080 | if (netdev->mc_count > IXGB_MAX_NUM_MULTICAST_ADDRESSES) { | 1080 | if (netdev_mc_count(netdev) > IXGB_MAX_NUM_MULTICAST_ADDRESSES) { |
1081 | rctl |= IXGB_RCTL_MPE; | 1081 | rctl |= IXGB_RCTL_MPE; |
1082 | IXGB_WRITE_REG(hw, RCTL, rctl); | 1082 | IXGB_WRITE_REG(hw, RCTL, rctl); |
1083 | } else { | 1083 | } else { |
@@ -1092,7 +1092,7 @@ ixgb_set_multi(struct net_device *netdev) | |||
1092 | memcpy(&mta[i * IXGB_ETH_LENGTH_OF_ADDRESS], | 1092 | memcpy(&mta[i * IXGB_ETH_LENGTH_OF_ADDRESS], |
1093 | mc_ptr->dmi_addr, IXGB_ETH_LENGTH_OF_ADDRESS); | 1093 | mc_ptr->dmi_addr, IXGB_ETH_LENGTH_OF_ADDRESS); |
1094 | 1094 | ||
1095 | ixgb_mc_addr_list_update(hw, mta, netdev->mc_count, 0); | 1095 | ixgb_mc_addr_list_update(hw, mta, netdev_mc_count(netdev), 0); |
1096 | } | 1096 | } |
1097 | } | 1097 | } |
1098 | 1098 | ||
@@ -1616,7 +1616,7 @@ ixgb_update_stats(struct ixgb_adapter *adapter) | |||
1616 | return; | 1616 | return; |
1617 | 1617 | ||
1618 | if ((netdev->flags & IFF_PROMISC) || (netdev->flags & IFF_ALLMULTI) || | 1618 | if ((netdev->flags & IFF_PROMISC) || (netdev->flags & IFF_ALLMULTI) || |
1619 | (netdev->mc_count > IXGB_MAX_NUM_MULTICAST_ADDRESSES)) { | 1619 | (netdev_mc_count(netdev) > IXGB_MAX_NUM_MULTICAST_ADDRESSES)) { |
1620 | u64 multi = IXGB_READ_REG(&adapter->hw, MPRCL); | 1620 | u64 multi = IXGB_READ_REG(&adapter->hw, MPRCL); |
1621 | u32 bcast_l = IXGB_READ_REG(&adapter->hw, BPRCL); | 1621 | u32 bcast_l = IXGB_READ_REG(&adapter->hw, BPRCL); |
1622 | u32 bcast_h = IXGB_READ_REG(&adapter->hw, BPRCH); | 1622 | u32 bcast_h = IXGB_READ_REG(&adapter->hw, BPRCH); |