aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-04 21:51:24 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-05 11:58:39 -0500
commit2cc04d27c497af9e8d11181fa8ddef9c99592c78 (patch)
tree6ec8f0b0cfb698a4dbc965200bc68bc41b6f6fb3
parent6d55ad4a534e7de3417819c6e894ff1c0a38f626 (diff)
net: dm9601: convert to use mc helpers
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/usb/dm9601.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c
index 3d406f9b2f29..c820fec62041 100644
--- a/drivers/net/usb/dm9601.c
+++ b/drivers/net/usb/dm9601.c
@@ -381,13 +381,13 @@ static void dm9601_set_multicast(struct net_device *net)
381 381
382 if (net->flags & IFF_PROMISC) { 382 if (net->flags & IFF_PROMISC) {
383 rx_ctl |= 0x02; 383 rx_ctl |= 0x02;
384 } else if (net->flags & IFF_ALLMULTI || net->mc_count > DM_MAX_MCAST) { 384 } else if (net->flags & IFF_ALLMULTI ||
385 netdev_mc_count(net) > DM_MAX_MCAST) {
385 rx_ctl |= 0x04; 386 rx_ctl |= 0x04;
386 } else if (net->mc_count) { 387 } else if (!netdev_mc_empty(net)) {
387 struct dev_mc_list *mc_list = net->mc_list; 388 struct dev_mc_list *mc_list;
388 int i;
389 389
390 for (i = 0; i < net->mc_count; i++, mc_list = mc_list->next) { 390 netdev_for_each_mc_addr(mc_list, net) {
391 u32 crc = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26; 391 u32 crc = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26;
392 hashes[crc >> 3] |= 1 << (crc & 0x7); 392 hashes[crc >> 3] |= 1 << (crc & 0x7);
393 } 393 }