diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-18 04:02:26 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-18 14:47:50 -0800 |
commit | a92635dc77b14f0f28d45c0fbf91b5064d9d7617 (patch) | |
tree | efc3a7a9a4b559614e56339aaa26171495bfb0c9 /drivers/net/usb/mcs7830.c | |
parent | 4302b67e041ea81c8fc233bee1296516e1294a27 (diff) | |
download | linux-a92635dc77b14f0f28d45c0fbf91b5064d9d7617.tar.gz linux-a92635dc77b14f0f28d45c0fbf91b5064d9d7617.tar.bz2 linux-a92635dc77b14f0f28d45c0fbf91b5064d9d7617.zip |
net/usb: convert to use netdev_for_each_mc_addr
also removed needless checks in smsc95xx
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/mcs7830.c')
-rw-r--r-- | drivers/net/usb/mcs7830.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c index 34665137f2c3..70978219e98a 100644 --- a/drivers/net/usb/mcs7830.c +++ b/drivers/net/usb/mcs7830.c @@ -452,15 +452,13 @@ static void mcs7830_data_set_multicast(struct net_device *net) * for our 8 byte filter buffer * to avoid allocating memory that * is tricky to free later */ - struct dev_mc_list *mc_list = net->mc_list; + struct dev_mc_list *mc_list; u32 crc_bits; - int i; /* Build the multicast hash filter. */ - for (i = 0; i < netdev_mc_count(net); i++) { + netdev_for_each_mc_addr(mc_list, net) { crc_bits = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26; data->multi_filter[crc_bits >> 3] |= 1 << (crc_bits & 7); - mc_list = mc_list->next; } } } |