diff options
Diffstat (limited to 'drivers/net/typhoon.c')
-rw-r--r-- | drivers/net/typhoon.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index 38c216132ef5..e3ddcb8f29df 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c | |||
@@ -922,12 +922,9 @@ typhoon_set_rx_mode(struct net_device *dev) | |||
922 | filter |= TYPHOON_RX_FILTER_ALL_MCAST; | 922 | filter |= TYPHOON_RX_FILTER_ALL_MCAST; |
923 | } else if (!netdev_mc_empty(dev)) { | 923 | } else if (!netdev_mc_empty(dev)) { |
924 | struct dev_mc_list *mclist; | 924 | struct dev_mc_list *mclist; |
925 | int i; | ||
926 | 925 | ||
927 | memset(mc_filter, 0, sizeof(mc_filter)); | 926 | memset(mc_filter, 0, sizeof(mc_filter)); |
928 | for (i = 0, mclist = dev->mc_list; | 927 | netdev_for_each_mc_addr(mclist, dev) { |
929 | mclist && i < netdev_mc_count(dev); | ||
930 | i++, mclist = mclist->next) { | ||
931 | int bit = ether_crc(ETH_ALEN, mclist->dmi_addr) & 0x3f; | 928 | int bit = ether_crc(ETH_ALEN, mclist->dmi_addr) & 0x3f; |
932 | mc_filter[bit >> 5] |= 1 << (bit & 0x1f); | 929 | mc_filter[bit >> 5] |= 1 << (bit & 0x1f); |
933 | } | 930 | } |