diff options
Diffstat (limited to 'drivers/net/usb/asix.c')
-rw-r--r-- | drivers/net/usb/asix.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index 9e05639435f2..763364f0972e 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c | |||
@@ -557,16 +557,14 @@ static void asix_set_multicast(struct net_device *net) | |||
557 | * for our 8 byte filter buffer | 557 | * for our 8 byte filter buffer |
558 | * to avoid allocating memory that | 558 | * to avoid allocating memory that |
559 | * is tricky to free later */ | 559 | * is tricky to free later */ |
560 | struct dev_mc_list *mc_list; | 560 | struct netdev_hw_addr *ha; |
561 | u32 crc_bits; | 561 | u32 crc_bits; |
562 | 562 | ||
563 | memset(data->multi_filter, 0, AX_MCAST_FILTER_SIZE); | 563 | memset(data->multi_filter, 0, AX_MCAST_FILTER_SIZE); |
564 | 564 | ||
565 | /* Build the multicast hash filter. */ | 565 | /* Build the multicast hash filter. */ |
566 | netdev_for_each_mc_addr(mc_list, net) { | 566 | netdev_for_each_mc_addr(ha, net) { |
567 | crc_bits = | 567 | crc_bits = ether_crc(ETH_ALEN, ha->addr) >> 26; |
568 | ether_crc(ETH_ALEN, | ||
569 | mc_list->dmi_addr) >> 26; | ||
570 | data->multi_filter[crc_bits >> 3] |= | 568 | data->multi_filter[crc_bits >> 3] |= |
571 | 1 << (crc_bits & 7); | 569 | 1 << (crc_bits & 7); |
572 | } | 570 | } |
@@ -793,16 +791,14 @@ static void ax88172_set_multicast(struct net_device *net) | |||
793 | * for our 8 byte filter buffer | 791 | * for our 8 byte filter buffer |
794 | * to avoid allocating memory that | 792 | * to avoid allocating memory that |
795 | * is tricky to free later */ | 793 | * is tricky to free later */ |
796 | struct dev_mc_list *mc_list; | 794 | struct netdev_hw_addr *ha; |
797 | u32 crc_bits; | 795 | u32 crc_bits; |
798 | 796 | ||
799 | memset(data->multi_filter, 0, AX_MCAST_FILTER_SIZE); | 797 | memset(data->multi_filter, 0, AX_MCAST_FILTER_SIZE); |
800 | 798 | ||
801 | /* Build the multicast hash filter. */ | 799 | /* Build the multicast hash filter. */ |
802 | netdev_for_each_mc_addr(mc_list, net) { | 800 | netdev_for_each_mc_addr(ha, net) { |
803 | crc_bits = | 801 | crc_bits = ether_crc(ETH_ALEN, ha->addr) >> 26; |
804 | ether_crc(ETH_ALEN, | ||
805 | mc_list->dmi_addr) >> 26; | ||
806 | data->multi_filter[crc_bits >> 3] |= | 802 | data->multi_filter[crc_bits >> 3] |= |
807 | 1 << (crc_bits & 7); | 803 | 1 << (crc_bits & 7); |
808 | } | 804 | } |