aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/arm/ks8695net.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-19 18:06:27 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-22 18:45:50 -0500
commit3b9a7728d878a3e7adc79fb89c3bb9ebc23760d7 (patch)
tree1d39563eabca941f0a8f763d5c2b5973e0d0b6e0 /drivers/net/arm/ks8695net.c
parent0bc88e4af07621bc4b84477374745d01a470e85d (diff)
net/arm: convert to use netdev_for_each_mc_addr
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/arm/ks8695net.c')
-rw-r--r--drivers/net/arm/ks8695net.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/net/arm/ks8695net.c b/drivers/net/arm/ks8695net.c
index 1dc181a9fbc3..238069699515 100644
--- a/drivers/net/arm/ks8695net.c
+++ b/drivers/net/arm/ks8695net.c
@@ -327,25 +327,24 @@ ks8695_refill_rxbuffers(struct ks8695_priv *ksp)
327 */ 327 */
328static void 328static void
329ks8695_init_partial_multicast(struct ks8695_priv *ksp, 329ks8695_init_partial_multicast(struct ks8695_priv *ksp,
330 struct dev_mc_list *addr, 330 struct net_device *ndev)
331 int nr_addr)
332{ 331{
333 u32 low, high; 332 u32 low, high;
334 int i; 333 int i;
334 struct dev_mc_list *dmi;
335 335
336 for (i = 0; i < nr_addr; i++, addr = addr->next) { 336 i = 0;
337 /* Ran out of addresses? */ 337 netdev_for_each_mc_addr(dmi, ndev) {
338 if (!addr)
339 break;
340 /* Ran out of space in chip? */ 338 /* Ran out of space in chip? */
341 BUG_ON(i == KS8695_NR_ADDRESSES); 339 BUG_ON(i == KS8695_NR_ADDRESSES);
342 340
343 low = (addr->dmi_addr[2] << 24) | (addr->dmi_addr[3] << 16) | 341 low = (dmi->dmi_addr[2] << 24) | (dmi->dmi_addr[3] << 16) |
344 (addr->dmi_addr[4] << 8) | (addr->dmi_addr[5]); 342 (dmi->dmi_addr[4] << 8) | (dmi->dmi_addr[5]);
345 high = (addr->dmi_addr[0] << 8) | (addr->dmi_addr[1]); 343 high = (dmi->dmi_addr[0] << 8) | (dmi->dmi_addr[1]);
346 344
347 ks8695_writereg(ksp, KS8695_AAL_(i), low); 345 ks8695_writereg(ksp, KS8695_AAL_(i), low);
348 ks8695_writereg(ksp, KS8695_AAH_(i), AAH_E | high); 346 ks8695_writereg(ksp, KS8695_AAH_(i), AAH_E | high);
347 i++;
349 } 348 }
350 349
351 /* Clear the remaining Additional Station Addresses */ 350 /* Clear the remaining Additional Station Addresses */
@@ -1215,8 +1214,7 @@ ks8695_set_multicast(struct net_device *ndev)
1215 } else { 1214 } else {
1216 /* enable specific multicasts */ 1215 /* enable specific multicasts */
1217 ctrl &= ~DRXC_RM; 1216 ctrl &= ~DRXC_RM;
1218 ks8695_init_partial_multicast(ksp, ndev->mc_list, 1217 ks8695_init_partial_multicast(ksp, ndev);
1219 netdev_mc_count(ndev));
1220 } 1218 }
1221 1219
1222 ks8695_writereg(ksp, KS8695_DRXC, ctrl); 1220 ks8695_writereg(ksp, KS8695_DRXC, ctrl);