diff options
Diffstat (limited to 'drivers/net/tokenring/3c359.c')
-rw-r--r-- | drivers/net/tokenring/3c359.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c index 724158966ec1..7d7f3eef1ab3 100644 --- a/drivers/net/tokenring/3c359.c +++ b/drivers/net/tokenring/3c359.c | |||
@@ -63,6 +63,7 @@ | |||
63 | #include <linux/spinlock.h> | 63 | #include <linux/spinlock.h> |
64 | #include <linux/bitops.h> | 64 | #include <linux/bitops.h> |
65 | #include <linux/firmware.h> | 65 | #include <linux/firmware.h> |
66 | #include <linux/slab.h> | ||
66 | 67 | ||
67 | #include <net/checksum.h> | 68 | #include <net/checksum.h> |
68 | 69 | ||
@@ -117,7 +118,7 @@ MODULE_PARM_DESC(message_level, "3c359: Level of reported messages") ; | |||
117 | * will be stuck with 1555 lines of hex #'s in the code. | 118 | * will be stuck with 1555 lines of hex #'s in the code. |
118 | */ | 119 | */ |
119 | 120 | ||
120 | static struct pci_device_id xl_pci_tbl[] = | 121 | static DEFINE_PCI_DEVICE_TABLE(xl_pci_tbl) = |
121 | { | 122 | { |
122 | {PCI_VENDOR_ID_3COM,PCI_DEVICE_ID_3COM_3C359, PCI_ANY_ID, PCI_ANY_ID, }, | 123 | {PCI_VENDOR_ID_3COM,PCI_DEVICE_ID_3COM_3C359, PCI_ANY_ID, PCI_ANY_ID, }, |
123 | { } /* terminate list */ | 124 | { } /* terminate list */ |
@@ -610,9 +611,8 @@ static int xl_open(struct net_device *dev) | |||
610 | 611 | ||
611 | u16 switchsettings, switchsettings_eeprom ; | 612 | u16 switchsettings, switchsettings_eeprom ; |
612 | 613 | ||
613 | if(request_irq(dev->irq, &xl_interrupt, IRQF_SHARED , "3c359", dev)) { | 614 | if (request_irq(dev->irq, xl_interrupt, IRQF_SHARED , "3c359", dev)) |
614 | return -EAGAIN; | 615 | return -EAGAIN; |
615 | } | ||
616 | 616 | ||
617 | /* | 617 | /* |
618 | * Read the information from the EEPROM that we need. | 618 | * Read the information from the EEPROM that we need. |
@@ -1391,10 +1391,9 @@ static int xl_close(struct net_device *dev) | |||
1391 | static void xl_set_rx_mode(struct net_device *dev) | 1391 | static void xl_set_rx_mode(struct net_device *dev) |
1392 | { | 1392 | { |
1393 | struct xl_private *xl_priv = netdev_priv(dev); | 1393 | struct xl_private *xl_priv = netdev_priv(dev); |
1394 | struct dev_mc_list *dmi ; | 1394 | struct dev_mc_list *dmi; |
1395 | unsigned char dev_mc_address[4] ; | 1395 | unsigned char dev_mc_address[4] ; |
1396 | u16 options ; | 1396 | u16 options ; |
1397 | int i ; | ||
1398 | 1397 | ||
1399 | if (dev->flags & IFF_PROMISC) | 1398 | if (dev->flags & IFF_PROMISC) |
1400 | options = 0x0004 ; | 1399 | options = 0x0004 ; |
@@ -1409,7 +1408,7 @@ static void xl_set_rx_mode(struct net_device *dev) | |||
1409 | 1408 | ||
1410 | dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ; | 1409 | dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ; |
1411 | 1410 | ||
1412 | for (i=0,dmi=dev->mc_list;i < dev->mc_count; i++,dmi = dmi->next) { | 1411 | netdev_for_each_mc_addr(dmi, dev) { |
1413 | dev_mc_address[0] |= dmi->dmi_addr[2] ; | 1412 | dev_mc_address[0] |= dmi->dmi_addr[2] ; |
1414 | dev_mc_address[1] |= dmi->dmi_addr[3] ; | 1413 | dev_mc_address[1] |= dmi->dmi_addr[3] ; |
1415 | dev_mc_address[2] |= dmi->dmi_addr[4] ; | 1414 | dev_mc_address[2] |= dmi->dmi_addr[4] ; |