summaryrefslogtreecommitdiff
path: root/drivers/net/b44.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-20 00:13:58 +0000
committerDavid S. Miller <davem@davemloft.net>2010-02-22 15:45:51 -0800
commit0ddf477b8a9b02412a6cabd51c486998811c7dd1 (patch)
treedf82cf6637248439897153aca2f8fa6216003b61 /drivers/net/b44.c
parent3b9a7728d878a3e7adc79fb89c3bb9ebc23760d7 (diff)
downloadlinux-3.10-0ddf477b8a9b02412a6cabd51c486998811c7dd1.tar.gz
linux-3.10-0ddf477b8a9b02412a6cabd51c486998811c7dd1.tar.bz2
linux-3.10-0ddf477b8a9b02412a6cabd51c486998811c7dd1.zip
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/b44.c')
-rw-r--r--drivers/net/b44.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index bcb6a029a0a..332c6035628 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -1684,9 +1684,11 @@ static int __b44_load_mcast(struct b44 *bp, struct net_device *dev)
int i, num_ents;
num_ents = min_t(int, netdev_mc_count(dev), B44_MCAST_TABLE_SIZE);
- mclist = dev->mc_list;
- for (i = 0; mclist && i < num_ents; i++, mclist = mclist->next) {
- __b44_cam_write(bp, mclist->dmi_addr, i + 1);
+ i = 0;
+ netdev_for_each_mc_addr(mclist, dev) {
+ if (i == num_ents)
+ break;
+ __b44_cam_write(bp, mclist->dmi_addr, i++ + 1);
}
return i+1;
}