diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-18 05:10:14 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-18 14:47:51 -0800 |
commit | d59079425f6f1be0da995926b5ad1d54d9e4545d (patch) | |
tree | 26eb7414eba48eba2b5760b867c11e252701a9a6 /drivers/staging/et131x | |
parent | a92635dc77b14f0f28d45c0fbf91b5064d9d7617 (diff) | |
download | linux-stable-d59079425f6f1be0da995926b5ad1d54d9e4545d.tar.gz linux-stable-d59079425f6f1be0da995926b5ad1d54d9e4545d.tar.bz2 linux-stable-d59079425f6f1be0da995926b5ad1d54d9e4545d.zip |
staging: convert to use netdev_for_each_mc_addr
removed needless checks in arlan-main.c and slicoss.c
fixed bug in et131x_netdev.c to actually fill addresses in.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/staging/et131x')
-rw-r--r-- | drivers/staging/et131x/et131x_netdev.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c index bc1fad248952..edb78ae9e593 100644 --- a/drivers/staging/et131x/et131x_netdev.c +++ b/drivers/staging/et131x/et131x_netdev.c @@ -411,9 +411,9 @@ void et131x_multicast(struct net_device *netdev) { struct et131x_adapter *adapter = netdev_priv(netdev); uint32_t PacketFilter = 0; - uint32_t count; unsigned long flags; - struct dev_mc_list *mclist = netdev->mc_list; + struct dev_mc_list *mclist; + int i; spin_lock_irqsave(&adapter->Lock, flags); @@ -456,12 +456,13 @@ void et131x_multicast(struct net_device *netdev) } /* Set values in the private adapter struct */ - adapter->MCAddressCount = netdev_mc_count(netdev); - - if (!netdev_mc_empty(netdev)) { - count = netdev_mc_count(netdev) - 1; - memcpy(adapter->MCList[count], mclist->dmi_addr, ETH_ALEN); + i = 0; + netdev_for_each_mc_addr(mclist, netdev) { + if (i == NIC_MAX_MCAST_LIST) + break; + memcpy(adapter->MCList[i++], mclist->dmi_addr, ETH_ALEN); } + adapter->MCAddressCount = i; /* Are the new flags different from the previous ones? If not, then no * action is required |