aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hp100.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/hp100.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/hp100.c')
-rw-r--r--drivers/net/hp100.c18
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
213static struct pci_device_id hp100_pci_tbl[] = { 212static 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 }