summaryrefslogtreecommitdiffstats
path: root/drivers/net/defxx.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-17 12:09:31 +0100
committerDavid S. Miller <davem@davemloft.net>2010-02-17 22:27:12 +0100
commite1d444771e0895c7706bc99857d69e4f2a58a531 (patch)
treeb17410e94c6c78416b6e125fad0c4ed208edc39f /drivers/net/defxx.c
parentcassini: convert to use netdev_for_each_mc_addr (diff)
downloadlinux-e1d444771e0895c7706bc99857d69e4f2a58a531.tar.xz
linux-e1d444771e0895c7706bc99857d69e4f2a58a531.zip
net: convert multiple drivers 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/defxx.c')
-rw-r--r--drivers/net/defxx.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/defxx.c b/drivers/net/defxx.c
index 5adb1e03956d..ed53a8d45f4e 100644
--- a/drivers/net/defxx.c
+++ b/drivers/net/defxx.c
@@ -2240,12 +2240,11 @@ static void dfx_ctl_set_multicast_list(struct net_device *dev)
/* Copy addresses to multicast address table, then update adapter CAM */
- dmi = dev->mc_list; /* point to first multicast addr */
- for (i=0; i < bp->mc_count; i++)
- {
- memcpy(&bp->mc_table[i*FDDI_K_ALEN], dmi->dmi_addr, FDDI_K_ALEN);
- dmi = dmi->next; /* point to next multicast addr */
- }
+ i = 0;
+ netdev_for_each_mc_addr(dmi, dev)
+ memcpy(&bp->mc_table[i++ * FDDI_K_ALEN],
+ dmi->dmi_addr, FDDI_K_ALEN);
+
if (dfx_ctl_update_cam(bp) != DFX_K_SUCCESS)
{
DBG_printk("%s: Could not update multicast address table!\n", dev->name);