diff options
Diffstat (limited to 'drivers/net/hp100.c')
-rw-r--r-- | drivers/net/hp100.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c index dd8665138062..4daad8cd56ea 100644 --- a/drivers/net/hp100.c +++ b/drivers/net/hp100.c | |||
@@ -102,7 +102,6 @@ | |||
102 | #include <linux/string.h> | 102 | #include <linux/string.h> |
103 | #include <linux/errno.h> | 103 | #include <linux/errno.h> |
104 | #include <linux/ioport.h> | 104 | #include <linux/ioport.h> |
105 | #include <linux/slab.h> | ||
106 | #include <linux/interrupt.h> | 105 | #include <linux/interrupt.h> |
107 | #include <linux/eisa.h> | 106 | #include <linux/eisa.h> |
108 | #include <linux/pci.h> | 107 | #include <linux/pci.h> |
@@ -210,7 +209,7 @@ MODULE_DEVICE_TABLE(eisa, hp100_eisa_tbl); | |||
210 | #endif | 209 | #endif |
211 | 210 | ||
212 | #ifdef CONFIG_PCI | 211 | #ifdef CONFIG_PCI |
213 | static struct pci_device_id hp100_pci_tbl[] = { | 212 | static DEFINE_PCI_DEVICE_TABLE(hp100_pci_tbl) = { |
214 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_J2585A, PCI_ANY_ID, PCI_ANY_ID,}, | 213 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_J2585A, PCI_ANY_ID, PCI_ANY_ID,}, |
215 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_J2585B, PCI_ANY_ID, PCI_ANY_ID,}, | 214 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_J2585B, PCI_ANY_ID, PCI_ANY_ID,}, |
216 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_J2970A, PCI_ANY_ID, PCI_ANY_ID,}, | 215 | {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_J2970A, PCI_ANY_ID, PCI_ANY_ID,}, |
@@ -993,8 +992,8 @@ static void hp100_mmuinit(struct net_device *dev) | |||
993 | if (lp->mode == 1) { /* only needed for Busmaster */ | 992 | if (lp->mode == 1) { /* only needed for Busmaster */ |
994 | int xmit_stop, recv_stop; | 993 | int xmit_stop, recv_stop; |
995 | 994 | ||
996 | if ((lp->chip == HP100_CHIPID_RAINIER) | 995 | if ((lp->chip == HP100_CHIPID_RAINIER) || |
997 | || (lp->chip == HP100_CHIPID_SHASTA)) { | 996 | (lp->chip == HP100_CHIPID_SHASTA)) { |
998 | int pdl_stop; | 997 | int pdl_stop; |
999 | 998 | ||
1000 | /* | 999 | /* |
@@ -2090,7 +2089,7 @@ static void hp100_set_multicast_list(struct net_device *dev) | |||
2090 | lp->mac2_mode = HP100_MAC2MODE6; /* promiscuous mode = get all good */ | 2089 | lp->mac2_mode = HP100_MAC2MODE6; /* promiscuous mode = get all good */ |
2091 | lp->mac1_mode = HP100_MAC1MODE6; /* packets on the net */ | 2090 | lp->mac1_mode = HP100_MAC1MODE6; /* packets on the net */ |
2092 | memset(&lp->hash_bytes, 0xff, 8); | 2091 | memset(&lp->hash_bytes, 0xff, 8); |
2093 | } else if (dev->mc_count || (dev->flags & IFF_ALLMULTI)) { | 2092 | } else if (!netdev_mc_empty(dev) || (dev->flags & IFF_ALLMULTI)) { |
2094 | lp->mac2_mode = HP100_MAC2MODE5; /* multicast mode = get packets for */ | 2093 | lp->mac2_mode = HP100_MAC2MODE5; /* multicast mode = get packets for */ |
2095 | lp->mac1_mode = HP100_MAC1MODE5; /* me, broadcasts and all multicasts */ | 2094 | lp->mac1_mode = HP100_MAC1MODE5; /* me, broadcasts and all multicasts */ |
2096 | #ifdef HP100_MULTICAST_FILTER /* doesn't work!!! */ | 2095 | #ifdef HP100_MULTICAST_FILTER /* doesn't work!!! */ |
@@ -2098,22 +2097,23 @@ static void hp100_set_multicast_list(struct net_device *dev) | |||
2098 | /* set hash filter to receive all multicast packets */ | 2097 | /* set hash filter to receive all multicast packets */ |
2099 | memset(&lp->hash_bytes, 0xff, 8); | 2098 | memset(&lp->hash_bytes, 0xff, 8); |
2100 | } else { | 2099 | } else { |
2101 | int i, j, idx; | 2100 | int i, idx; |
2102 | u_char *addrs; | 2101 | u_char *addrs; |
2103 | struct dev_mc_list *dmi; | 2102 | struct dev_mc_list *dmi; |
2104 | 2103 | ||
2105 | memset(&lp->hash_bytes, 0x00, 8); | 2104 | memset(&lp->hash_bytes, 0x00, 8); |
2106 | #ifdef HP100_DEBUG | 2105 | #ifdef HP100_DEBUG |
2107 | printk("hp100: %s: computing hash filter - mc_count = %i\n", dev->name, dev->mc_count); | 2106 | printk("hp100: %s: computing hash filter - mc_count = %i\n", |
2107 | dev->name, netdev_mc_count(dev)); | ||
2108 | #endif | 2108 | #endif |
2109 | for (i = 0, dmi = dev->mc_list; i < dev->mc_count; i++, dmi = dmi->next) { | 2109 | netdev_for_each_mc_addr(dmi, dev) { |
2110 | addrs = dmi->dmi_addr; | 2110 | addrs = dmi->dmi_addr; |
2111 | if ((*addrs & 0x01) == 0x01) { /* multicast address? */ | 2111 | if ((*addrs & 0x01) == 0x01) { /* multicast address? */ |
2112 | #ifdef HP100_DEBUG | 2112 | #ifdef HP100_DEBUG |
2113 | printk("hp100: %s: multicast = %pM, ", | 2113 | printk("hp100: %s: multicast = %pM, ", |
2114 | dev->name, addrs); | 2114 | dev->name, addrs); |
2115 | #endif | 2115 | #endif |
2116 | for (j = idx = 0; j < 6; j++) { | 2116 | for (i = idx = 0; i < 6; i++) { |
2117 | idx ^= *addrs++ & 0x3f; | 2117 | idx ^= *addrs++ & 0x3f; |
2118 | printk(":%02x:", idx); | 2118 | printk(":%02x:", idx); |
2119 | } | 2119 | } |