aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tokenring/3c359.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/tokenring/3c359.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/tokenring/3c359.c')
-rw-r--r--drivers/net/tokenring/3c359.c11
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
120static struct pci_device_id xl_pci_tbl[] = 121static 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)
1391static void xl_set_rx_mode(struct net_device *dev) 1391static 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] ;