diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/3c523.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/3c523.c')
-rw-r--r-- | drivers/net/3c523.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c index cb0b730799ba..1719079cc498 100644 --- a/drivers/net/3c523.c +++ b/drivers/net/3c523.c | |||
@@ -99,7 +99,6 @@ | |||
99 | #include <linux/errno.h> | 99 | #include <linux/errno.h> |
100 | #include <linux/ioport.h> | 100 | #include <linux/ioport.h> |
101 | #include <linux/skbuff.h> | 101 | #include <linux/skbuff.h> |
102 | #include <linux/slab.h> | ||
103 | #include <linux/interrupt.h> | 102 | #include <linux/interrupt.h> |
104 | #include <linux/delay.h> | 103 | #include <linux/delay.h> |
105 | #include <linux/mca-legacy.h> | 104 | #include <linux/mca-legacy.h> |
@@ -288,7 +287,7 @@ static int elmc_open(struct net_device *dev) | |||
288 | 287 | ||
289 | elmc_id_attn586(); /* disable interrupts */ | 288 | elmc_id_attn586(); /* disable interrupts */ |
290 | 289 | ||
291 | ret = request_irq(dev->irq, &elmc_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM, | 290 | ret = request_irq(dev->irq, elmc_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM, |
292 | dev->name, dev); | 291 | dev->name, dev); |
293 | if (ret) { | 292 | if (ret) { |
294 | pr_err("%s: couldn't get irq %d\n", dev->name, dev->irq); | 293 | pr_err("%s: couldn't get irq %d\n", dev->name, dev->irq); |
@@ -625,8 +624,8 @@ static int init586(struct net_device *dev) | |||
625 | volatile struct iasetup_cmd_struct *ias_cmd; | 624 | volatile struct iasetup_cmd_struct *ias_cmd; |
626 | volatile struct tdr_cmd_struct *tdr_cmd; | 625 | volatile struct tdr_cmd_struct *tdr_cmd; |
627 | volatile struct mcsetup_cmd_struct *mc_cmd; | 626 | volatile struct mcsetup_cmd_struct *mc_cmd; |
628 | struct dev_mc_list *dmi = dev->mc_list; | 627 | struct dev_mc_list *dmi; |
629 | int num_addrs = dev->mc_count; | 628 | int num_addrs = netdev_mc_count(dev); |
630 | 629 | ||
631 | ptr = (void *) ((char *) p->scb + sizeof(struct scb_struct)); | 630 | ptr = (void *) ((char *) p->scb + sizeof(struct scb_struct)); |
632 | 631 | ||
@@ -771,7 +770,7 @@ static int init586(struct net_device *dev) | |||
771 | * Multicast setup | 770 | * Multicast setup |
772 | */ | 771 | */ |
773 | 772 | ||
774 | if (dev->mc_count) { | 773 | if (num_addrs) { |
775 | /* I don't understand this: do we really need memory after the init? */ | 774 | /* I don't understand this: do we really need memory after the init? */ |
776 | int len = ((char *) p->iscp - (char *) ptr - 8) / 6; | 775 | int len = ((char *) p->iscp - (char *) ptr - 8) / 6; |
777 | if (len <= 0) { | 776 | if (len <= 0) { |
@@ -787,10 +786,9 @@ static int init586(struct net_device *dev) | |||
787 | mc_cmd->cmd_cmd = CMD_MCSETUP | CMD_LAST; | 786 | mc_cmd->cmd_cmd = CMD_MCSETUP | CMD_LAST; |
788 | mc_cmd->cmd_link = 0xffff; | 787 | mc_cmd->cmd_link = 0xffff; |
789 | mc_cmd->mc_cnt = num_addrs * 6; | 788 | mc_cmd->mc_cnt = num_addrs * 6; |
790 | for (i = 0; i < num_addrs; i++) { | 789 | i = 0; |
791 | memcpy((char *) mc_cmd->mc_list[i], dmi->dmi_addr, 6); | 790 | netdev_for_each_mc_addr(dmi, dev) |
792 | dmi = dmi->next; | 791 | memcpy((char *) mc_cmd->mc_list[i++], dmi->dmi_addr, 6); |
793 | } | ||
794 | p->scb->cbl_offset = make16(mc_cmd); | 792 | p->scb->cbl_offset = make16(mc_cmd); |
795 | p->scb->cmd = CUC_START; | 793 | p->scb->cmd = CUC_START; |
796 | elmc_id_attn586(); | 794 | elmc_id_attn586(); |