aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/asix.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/usb/asix.c')
-rw-r--r--drivers/net/usb/asix.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 9e05639435f2..8e7d2374558b 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -34,6 +34,7 @@
34#include <linux/usb.h> 34#include <linux/usb.h>
35#include <linux/crc32.h> 35#include <linux/crc32.h>
36#include <linux/usb/usbnet.h> 36#include <linux/usb/usbnet.h>
37#include <linux/slab.h>
37 38
38#define DRIVER_VERSION "14-Jun-2006" 39#define DRIVER_VERSION "14-Jun-2006"
39static const char driver_name [] = "asix"; 40static const char driver_name [] = "asix";
@@ -557,16 +558,14 @@ static void asix_set_multicast(struct net_device *net)
557 * for our 8 byte filter buffer 558 * for our 8 byte filter buffer
558 * to avoid allocating memory that 559 * to avoid allocating memory that
559 * is tricky to free later */ 560 * is tricky to free later */
560 struct dev_mc_list *mc_list; 561 struct netdev_hw_addr *ha;
561 u32 crc_bits; 562 u32 crc_bits;
562 563
563 memset(data->multi_filter, 0, AX_MCAST_FILTER_SIZE); 564 memset(data->multi_filter, 0, AX_MCAST_FILTER_SIZE);
564 565
565 /* Build the multicast hash filter. */ 566 /* Build the multicast hash filter. */
566 netdev_for_each_mc_addr(mc_list, net) { 567 netdev_for_each_mc_addr(ha, net) {
567 crc_bits = 568 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] |= 569 data->multi_filter[crc_bits >> 3] |=
571 1 << (crc_bits & 7); 570 1 << (crc_bits & 7);
572 } 571 }
@@ -793,16 +792,14 @@ static void ax88172_set_multicast(struct net_device *net)
793 * for our 8 byte filter buffer 792 * for our 8 byte filter buffer
794 * to avoid allocating memory that 793 * to avoid allocating memory that
795 * is tricky to free later */ 794 * is tricky to free later */
796 struct dev_mc_list *mc_list; 795 struct netdev_hw_addr *ha;
797 u32 crc_bits; 796 u32 crc_bits;
798 797
799 memset(data->multi_filter, 0, AX_MCAST_FILTER_SIZE); 798 memset(data->multi_filter, 0, AX_MCAST_FILTER_SIZE);
800 799
801 /* Build the multicast hash filter. */ 800 /* Build the multicast hash filter. */
802 netdev_for_each_mc_addr(mc_list, net) { 801 netdev_for_each_mc_addr(ha, net) {
803 crc_bits = 802 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] |= 803 data->multi_filter[crc_bits >> 3] |=
807 1 << (crc_bits & 7); 804 1 << (crc_bits & 7);
808 } 805 }