From 0ddf477b8a9b02412a6cabd51c486998811c7dd1 Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Sat, 20 Feb 2010 00:13:58 +0000 Subject: net: convert multiple drivers to use netdev_for_each_mc_addr, part3 Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- drivers/net/bnx2x_main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'drivers/net/bnx2x_main.c') diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 7f9db47e8cc3..5adf2a05246f 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c @@ -11483,10 +11483,8 @@ static void bnx2x_set_rx_mode(struct net_device *dev) struct mac_configuration_cmd *config = bnx2x_sp(bp, mcast_config); - for (i = 0, mclist = dev->mc_list; - mclist && (i < netdev_mc_count(dev)); - i++, mclist = mclist->next) { - + i = 0; + netdev_for_each_mc_addr(mclist, dev) { config->config_table[i]. cam_entry.msb_mac_addr = swab16(*(u16 *)&mclist->dmi_addr[0]); @@ -11514,6 +11512,7 @@ static void bnx2x_set_rx_mode(struct net_device *dev) cam_entry.middle_mac_addr, config->config_table[i]. cam_entry.lsb_mac_addr); + i++; } old = config->hdr.length; if (old > i) { @@ -11555,10 +11554,7 @@ static void bnx2x_set_rx_mode(struct net_device *dev) memset(mc_filter, 0, 4 * MC_HASH_SIZE); - for (i = 0, mclist = dev->mc_list; - mclist && (i < netdev_mc_count(dev)); - i++, mclist = mclist->next) { - + netdev_for_each_mc_addr(mclist, dev) { DP(NETIF_MSG_IFUP, "Adding mcast MAC: %pM\n", mclist->dmi_addr); -- cgit v1.2.2