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/arlan | |
parent | a92635dc77b14f0f28d45c0fbf91b5064d9d7617 (diff) | |
download | linux-d59079425f6f1be0da995926b5ad1d54d9e4545d.tar.bz2 |
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/arlan')
-rw-r--r-- | drivers/staging/arlan/arlan-main.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/drivers/staging/arlan/arlan-main.c b/drivers/staging/arlan/arlan-main.c index 921a082487a1..88fdd53cf5d3 100644 --- a/drivers/staging/arlan/arlan-main.c +++ b/drivers/staging/arlan/arlan-main.c @@ -1455,10 +1455,10 @@ static void arlan_rx_interrupt(struct net_device *dev, u_char rxStatus, u_short #ifdef ARLAN_MULTICAST if (!(dev->flags & IFF_ALLMULTI) && !(dev->flags & IFF_PROMISC) && - dev->mc_list) + !netdev_mc_empty(dev)) { char hw_dst_addr[6]; - struct dev_mc_list *dmi = dev->mc_list; + struct dev_mc_list *dmi; int i; memcpy_fromio(hw_dst_addr, arlan->ultimateDestAddress, 6); @@ -1469,20 +1469,15 @@ static void arlan_rx_interrupt(struct net_device *dev, u_char rxStatus, u_short printk(KERN_ERR "%s mcast 0x0100 \n", dev->name); else if (hw_dst_addr[1] == 0x40) printk(KERN_ERR "%s m/bcast 0x0140 \n", dev->name); - while (dmi) - { - if (dmi->dmi_addrlen == 6) { - if (arlan_debug & ARLAN_DEBUG_HEADER_DUMP) - printk(KERN_ERR "%s mcl %pM\n", - dev->name, dmi->dmi_addr); - for (i = 0; i < 6; i++) - if (dmi->dmi_addr[i] != hw_dst_addr[i]) - break; - if (i == 6) + netdev_for_each_mc_entry(dmi, dev) { + if (arlan_debug & ARLAN_DEBUG_HEADER_DUMP) + printk(KERN_ERR "%s mcl %pM\n", + dev->name, dmi->dmi_addr); + for (i = 0; i < 6; i++) + if (dmi->dmi_addr[i] != hw_dst_addr[i]) break; - } else - printk(KERN_ERR "%s: invalid multicast address length given.\n", dev->name); - dmi = dmi->next; + if (i == 6) + break; } /* we reach here if multicast filtering is on and packet * is multicast and not for receive */ |