aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_main.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-19 19:13:58 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-22 18:45:51 -0500
commit0ddf477b8a9b02412a6cabd51c486998811c7dd1 (patch)
treedf82cf6637248439897153aca2f8fa6216003b61 /drivers/net/bnx2x_main.c
parent3b9a7728d878a3e7adc79fb89c3bb9ebc23760d7 (diff)
net: convert multiple drivers to use netdev_for_each_mc_addr, part3
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.c12
1 files changed, 4 insertions, 8 deletions
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)
11483 struct mac_configuration_cmd *config = 11483 struct mac_configuration_cmd *config =
11484 bnx2x_sp(bp, mcast_config); 11484 bnx2x_sp(bp, mcast_config);
11485 11485
11486 for (i = 0, mclist = dev->mc_list; 11486 i = 0;
11487 mclist && (i < netdev_mc_count(dev)); 11487 netdev_for_each_mc_addr(mclist, dev) {
11488 i++, mclist = mclist->next) {
11489
11490 config->config_table[i]. 11488 config->config_table[i].
11491 cam_entry.msb_mac_addr = 11489 cam_entry.msb_mac_addr =
11492 swab16(*(u16 *)&mclist->dmi_addr[0]); 11490 swab16(*(u16 *)&mclist->dmi_addr[0]);
@@ -11514,6 +11512,7 @@ static void bnx2x_set_rx_mode(struct net_device *dev)
11514 cam_entry.middle_mac_addr, 11512 cam_entry.middle_mac_addr,
11515 config->config_table[i]. 11513 config->config_table[i].
11516 cam_entry.lsb_mac_addr); 11514 cam_entry.lsb_mac_addr);
11515 i++;
11517 } 11516 }
11518 old = config->hdr.length; 11517 old = config->hdr.length;
11519 if (old > i) { 11518 if (old > i) {
@@ -11555,10 +11554,7 @@ static void bnx2x_set_rx_mode(struct net_device *dev)
11555 11554
11556 memset(mc_filter, 0, 4 * MC_HASH_SIZE); 11555 memset(mc_filter, 0, 4 * MC_HASH_SIZE);
11557 11556
11558 for (i = 0, mclist = dev->mc_list; 11557 netdev_for_each_mc_addr(mclist, dev) {
11559 mclist && (i < netdev_mc_count(dev));
11560 i++, mclist = mclist->next) {
11561
11562 DP(NETIF_MSG_IFUP, "Adding mcast MAC: %pM\n", 11558 DP(NETIF_MSG_IFUP, "Adding mcast MAC: %pM\n",
11563 mclist->dmi_addr); 11559 mclist->dmi_addr);
11564 11560