aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/skge.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-17 19:42:54 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-18 17:47:49 -0500
commit5508590c193661bc1484ad7b952af5fceacea40d (patch)
tree8b7d1655f63034725127b9456afa5bad4bb6e83a /drivers/net/skge.c
parent2a0d18f97cc15d57ad0c93259a3df4cb72c5a28b (diff)
net: convert multiple drivers to use netdev_for_each_mc_addr, part2
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/skge.c')
-rw-r--r--drivers/net/skge.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 720af1c7854b..d0058e5bb6ae 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -2917,8 +2917,7 @@ static void genesis_set_multicast(struct net_device *dev)
2917 struct skge_port *skge = netdev_priv(dev); 2917 struct skge_port *skge = netdev_priv(dev);
2918 struct skge_hw *hw = skge->hw; 2918 struct skge_hw *hw = skge->hw;
2919 int port = skge->port; 2919 int port = skge->port;
2920 int i, count = netdev_mc_count(dev); 2920 struct dev_mc_list *list;
2921 struct dev_mc_list *list = dev->mc_list;
2922 u32 mode; 2921 u32 mode;
2923 u8 filter[8]; 2922 u8 filter[8];
2924 2923
@@ -2938,7 +2937,7 @@ static void genesis_set_multicast(struct net_device *dev)
2938 skge->flow_status == FLOW_STAT_SYMMETRIC) 2937 skge->flow_status == FLOW_STAT_SYMMETRIC)
2939 genesis_add_filter(filter, pause_mc_addr); 2938 genesis_add_filter(filter, pause_mc_addr);
2940 2939
2941 for (i = 0; list && i < count; i++, list = list->next) 2940 netdev_for_each_mc_addr(list, dev)
2942 genesis_add_filter(filter, list->dmi_addr); 2941 genesis_add_filter(filter, list->dmi_addr);
2943 } 2942 }
2944 2943
@@ -2957,7 +2956,7 @@ static void yukon_set_multicast(struct net_device *dev)
2957 struct skge_port *skge = netdev_priv(dev); 2956 struct skge_port *skge = netdev_priv(dev);
2958 struct skge_hw *hw = skge->hw; 2957 struct skge_hw *hw = skge->hw;
2959 int port = skge->port; 2958 int port = skge->port;
2960 struct dev_mc_list *list = dev->mc_list; 2959 struct dev_mc_list *list;
2961 int rx_pause = (skge->flow_status == FLOW_STAT_REM_SEND || 2960 int rx_pause = (skge->flow_status == FLOW_STAT_REM_SEND ||
2962 skge->flow_status == FLOW_STAT_SYMMETRIC); 2961 skge->flow_status == FLOW_STAT_SYMMETRIC);
2963 u16 reg; 2962 u16 reg;
@@ -2975,13 +2974,12 @@ static void yukon_set_multicast(struct net_device *dev)
2975 else if (netdev_mc_empty(dev) && !rx_pause)/* no multicast */ 2974 else if (netdev_mc_empty(dev) && !rx_pause)/* no multicast */
2976 reg &= ~GM_RXCR_MCF_ENA; 2975 reg &= ~GM_RXCR_MCF_ENA;
2977 else { 2976 else {
2978 int i;
2979 reg |= GM_RXCR_MCF_ENA; 2977 reg |= GM_RXCR_MCF_ENA;
2980 2978
2981 if (rx_pause) 2979 if (rx_pause)
2982 yukon_add_filter(filter, pause_mc_addr); 2980 yukon_add_filter(filter, pause_mc_addr);
2983 2981
2984 for (i = 0; list && i < netdev_mc_count(dev); i++, list = list->next) 2982 netdev_for_each_mc_addr(list, dev)
2985 yukon_add_filter(filter, list->dmi_addr); 2983 yukon_add_filter(filter, list->dmi_addr);
2986 } 2984 }
2987 2985