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/bnx2x_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/bnx2x_main.c')
-rw-r--r-- | drivers/net/bnx2x_main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index ffc7381969ae..6d8559052ee6 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -11471,7 +11471,8 @@ static void bnx2x_set_rx_mode(struct net_device *dev) | |||
11471 | rx_mode = BNX2X_RX_MODE_PROMISC; | 11471 | rx_mode = BNX2X_RX_MODE_PROMISC; |
11472 | 11472 | ||
11473 | else if ((dev->flags & IFF_ALLMULTI) || | 11473 | else if ((dev->flags & IFF_ALLMULTI) || |
11474 | ((dev->mc_count > BNX2X_MAX_MULTICAST) && CHIP_IS_E1(bp))) | 11474 | ((netdev_mc_count(dev) > BNX2X_MAX_MULTICAST) && |
11475 | CHIP_IS_E1(bp))) | ||
11475 | rx_mode = BNX2X_RX_MODE_ALLMULTI; | 11476 | rx_mode = BNX2X_RX_MODE_ALLMULTI; |
11476 | 11477 | ||
11477 | else { /* some multicasts */ | 11478 | else { /* some multicasts */ |
@@ -11482,7 +11483,7 @@ static void bnx2x_set_rx_mode(struct net_device *dev) | |||
11482 | bnx2x_sp(bp, mcast_config); | 11483 | bnx2x_sp(bp, mcast_config); |
11483 | 11484 | ||
11484 | for (i = 0, mclist = dev->mc_list; | 11485 | for (i = 0, mclist = dev->mc_list; |
11485 | mclist && (i < dev->mc_count); | 11486 | mclist && (i < netdev_mc_count(dev)); |
11486 | i++, mclist = mclist->next) { | 11487 | i++, mclist = mclist->next) { |
11487 | 11488 | ||
11488 | config->config_table[i]. | 11489 | config->config_table[i]. |
@@ -11554,7 +11555,7 @@ static void bnx2x_set_rx_mode(struct net_device *dev) | |||
11554 | memset(mc_filter, 0, 4 * MC_HASH_SIZE); | 11555 | memset(mc_filter, 0, 4 * MC_HASH_SIZE); |
11555 | 11556 | ||
11556 | for (i = 0, mclist = dev->mc_list; | 11557 | for (i = 0, mclist = dev->mc_list; |
11557 | mclist && (i < dev->mc_count); | 11558 | mclist && (i < netdev_mc_count(dev)); |
11558 | i++, mclist = mclist->next) { | 11559 | i++, mclist = mclist->next) { |
11559 | 11560 | ||
11560 | DP(NETIF_MSG_IFUP, "Adding mcast MAC: %pM\n", | 11561 | DP(NETIF_MSG_IFUP, "Adding mcast MAC: %pM\n", |