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/wlags49_h2 | |
parent | a92635dc77b14f0f28d45c0fbf91b5064d9d7617 (diff) |
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/wlags49_h2')
-rw-r--r-- | drivers/staging/wlags49_h2/wl_netdev.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/staging/wlags49_h2/wl_netdev.c b/drivers/staging/wlags49_h2/wl_netdev.c index a95ebf881fc..c33e225bc0e 100644 --- a/drivers/staging/wlags49_h2/wl_netdev.c +++ b/drivers/staging/wlags49_h2/wl_netdev.c @@ -1049,7 +1049,7 @@ void wl_multicast( struct net_device *dev ) //;?seems reasonable that even an AP-only driver could afford this small additional footprint int x; - struct dev_mc_list *mclist; + struct dev_mc_list *mclist; struct wl_private *lp = wl_priv(dev); unsigned long flags; /*------------------------------------------------------------------------*/ @@ -1072,11 +1072,9 @@ void wl_multicast( struct net_device *dev ) DBG_PRINT( " mc_count: %d\n", netdev_mc_count(dev)); - for( x = 0, mclist = dev->mc_list; mclist && x < netdev_mc_count(dev); - x++, mclist = mclist->next ) { + netdev_for_each_mc_addr(mclist, dev) DBG_PRINT( " %s (%d)\n", DbgHwAddr(mclist->dmi_addr), mclist->dmi_addrlen ); - } } #endif /* DBG */ @@ -1120,12 +1118,10 @@ void wl_multicast( struct net_device *dev ) lp->ltvRecord.len = ( netdev_mc_count(dev) * 3 ) + 1; lp->ltvRecord.typ = CFG_GROUP_ADDR; - for( x = 0, mclist = dev->mc_list; - ( x < netdev_mc_count(dev)) && ( mclist != NULL ); - x++, mclist = mclist->next ) { - memcpy( &( lp->ltvRecord.u.u8[x * ETH_ALEN] ), - mclist->dmi_addr, ETH_ALEN ); - } + x = 0; + netdev_for_each_mc_addr(mclist, dev) + memcpy(&(lp->ltvRecord.u.u8[x++ * ETH_ALEN]), + mclist->dmi_addr, ETH_ALEN); DBG_PRINT( "Setting multicast list\n" ); hcf_put_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord )); } else { |