aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/stmmac
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/stmmac
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/stmmac')
-rw-r--r--drivers/net/stmmac/dwmac100.c4
-rw-r--r--drivers/net/stmmac/dwmac1000_core.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/stmmac/dwmac100.c b/drivers/net/stmmac/dwmac100.c
index 576b256ee388..803b0373d843 100644
--- a/drivers/net/stmmac/dwmac100.c
+++ b/drivers/net/stmmac/dwmac100.c
@@ -315,7 +315,6 @@ static void dwmac100_set_filter(struct net_device *dev)
315 value &= ~(MAC_CONTROL_PM | MAC_CONTROL_PR | MAC_CONTROL_IF | 315 value &= ~(MAC_CONTROL_PM | MAC_CONTROL_PR | MAC_CONTROL_IF |
316 MAC_CONTROL_HO | MAC_CONTROL_HP); 316 MAC_CONTROL_HO | MAC_CONTROL_HP);
317 } else { 317 } else {
318 int i;
319 u32 mc_filter[2]; 318 u32 mc_filter[2];
320 struct dev_mc_list *mclist; 319 struct dev_mc_list *mclist;
321 320
@@ -326,8 +325,7 @@ static void dwmac100_set_filter(struct net_device *dev)
326 MAC_CONTROL_IF | MAC_CONTROL_HO); 325 MAC_CONTROL_IF | MAC_CONTROL_HO);
327 326
328 memset(mc_filter, 0, sizeof(mc_filter)); 327 memset(mc_filter, 0, sizeof(mc_filter));
329 for (i = 0, mclist = dev->mc_list; 328 netdev_for_each_mc_addr(mclist, dev) {
330 mclist && i < netdev_mc_count(dev); i++, mclist = mclist->next) {
331 /* The upper 6 bits of the calculated CRC are used to 329 /* The upper 6 bits of the calculated CRC are used to
332 * index the contens of the hash table */ 330 * index the contens of the hash table */
333 int bit_nr = 331 int bit_nr =
diff --git a/drivers/net/stmmac/dwmac1000_core.c b/drivers/net/stmmac/dwmac1000_core.c
index 90dbb4f41ef3..a6538ae4694c 100644
--- a/drivers/net/stmmac/dwmac1000_core.c
+++ b/drivers/net/stmmac/dwmac1000_core.c
@@ -93,7 +93,6 @@ static void dwmac1000_set_filter(struct net_device *dev)
93 writel(0xffffffff, ioaddr + GMAC_HASH_HIGH); 93 writel(0xffffffff, ioaddr + GMAC_HASH_HIGH);
94 writel(0xffffffff, ioaddr + GMAC_HASH_LOW); 94 writel(0xffffffff, ioaddr + GMAC_HASH_LOW);
95 } else if (!netdev_mc_empty(dev)) { 95 } else if (!netdev_mc_empty(dev)) {
96 int i;
97 u32 mc_filter[2]; 96 u32 mc_filter[2];
98 struct dev_mc_list *mclist; 97 struct dev_mc_list *mclist;
99 98
@@ -101,8 +100,7 @@ static void dwmac1000_set_filter(struct net_device *dev)
101 value = GMAC_FRAME_FILTER_HMC; 100 value = GMAC_FRAME_FILTER_HMC;
102 101
103 memset(mc_filter, 0, sizeof(mc_filter)); 102 memset(mc_filter, 0, sizeof(mc_filter));
104 for (i = 0, mclist = dev->mc_list; 103 netdev_for_each_mc_addr(mclist, dev) {
105 mclist && i < netdev_mc_count(dev); i++, mclist = mclist->next) {
106 /* The upper 6 bits of the calculated CRC are used to 104 /* The upper 6 bits of the calculated CRC are used to
107 index the contens of the hash table */ 105 index the contens of the hash table */
108 int bit_nr = 106 int bit_nr =