aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/3c505.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/3c505.c')
-rw-r--r--drivers/net/3c505.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/3c505.c b/drivers/net/3c505.c
index a21c9d15ef8a..29b8d1d63bde 100644
--- a/drivers/net/3c505.c
+++ b/drivers/net/3c505.c
@@ -102,12 +102,12 @@
102#include <linux/interrupt.h> 102#include <linux/interrupt.h>
103#include <linux/errno.h> 103#include <linux/errno.h>
104#include <linux/in.h> 104#include <linux/in.h>
105#include <linux/slab.h>
106#include <linux/ioport.h> 105#include <linux/ioport.h>
107#include <linux/spinlock.h> 106#include <linux/spinlock.h>
108#include <linux/ethtool.h> 107#include <linux/ethtool.h>
109#include <linux/delay.h> 108#include <linux/delay.h>
110#include <linux/bitops.h> 109#include <linux/bitops.h>
110#include <linux/gfp.h>
111 111
112#include <asm/uaccess.h> 112#include <asm/uaccess.h>
113#include <asm/io.h> 113#include <asm/io.h>
@@ -886,7 +886,7 @@ static int elp_open(struct net_device *dev)
886 /* 886 /*
887 * install our interrupt service routine 887 * install our interrupt service routine
888 */ 888 */
889 if ((retval = request_irq(dev->irq, &elp_interrupt, 0, dev->name, dev))) { 889 if ((retval = request_irq(dev->irq, elp_interrupt, 0, dev->name, dev))) {
890 pr_err("%s: could not allocate IRQ%d\n", dev->name, dev->irq); 890 pr_err("%s: could not allocate IRQ%d\n", dev->name, dev->irq);
891 return retval; 891 return retval;
892 } 892 }
@@ -1216,7 +1216,7 @@ static int elp_close(struct net_device *dev)
1216static void elp_set_mc_list(struct net_device *dev) 1216static void elp_set_mc_list(struct net_device *dev)
1217{ 1217{
1218 elp_device *adapter = netdev_priv(dev); 1218 elp_device *adapter = netdev_priv(dev);
1219 struct dev_mc_list *dmi = dev->mc_list; 1219 struct dev_mc_list *dmi;
1220 int i; 1220 int i;
1221 unsigned long flags; 1221 unsigned long flags;
1222 1222
@@ -1229,11 +1229,10 @@ static void elp_set_mc_list(struct net_device *dev)
1229 /* send a "load multicast list" command to the board, max 10 addrs/cmd */ 1229 /* send a "load multicast list" command to the board, max 10 addrs/cmd */
1230 /* if num_addrs==0 the list will be cleared */ 1230 /* if num_addrs==0 the list will be cleared */
1231 adapter->tx_pcb.command = CMD_LOAD_MULTICAST_LIST; 1231 adapter->tx_pcb.command = CMD_LOAD_MULTICAST_LIST;
1232 adapter->tx_pcb.length = 6 * dev->mc_count; 1232 adapter->tx_pcb.length = 6 * netdev_mc_count(dev);
1233 for (i = 0; i < dev->mc_count; i++) { 1233 i = 0;
1234 memcpy(adapter->tx_pcb.data.multicast[i], dmi->dmi_addr, 6); 1234 netdev_for_each_mc_addr(dmi, dev)
1235 dmi = dmi->next; 1235 memcpy(adapter->tx_pcb.data.multicast[i++], dmi->dmi_addr, 6);
1236 }
1237 adapter->got[CMD_LOAD_MULTICAST_LIST] = 0; 1236 adapter->got[CMD_LOAD_MULTICAST_LIST] = 0;
1238 if (!send_pcb(dev, &adapter->tx_pcb)) 1237 if (!send_pcb(dev, &adapter->tx_pcb))
1239 pr_err("%s: couldn't send set_multicast command\n", dev->name); 1238 pr_err("%s: couldn't send set_multicast command\n", dev->name);
@@ -1244,7 +1243,7 @@ static void elp_set_mc_list(struct net_device *dev)
1244 TIMEOUT_MSG(__LINE__); 1243 TIMEOUT_MSG(__LINE__);
1245 } 1244 }
1246 } 1245 }
1247 if (dev->mc_count) 1246 if (!netdev_mc_empty(dev))
1248 adapter->tx_pcb.data.configure = NO_LOOPBACK | RECV_BROAD | RECV_MULTI; 1247 adapter->tx_pcb.data.configure = NO_LOOPBACK | RECV_BROAD | RECV_MULTI;
1249 else /* num_addrs == 0 */ 1248 else /* num_addrs == 0 */
1250 adapter->tx_pcb.data.configure = NO_LOOPBACK | RECV_BROAD; 1249 adapter->tx_pcb.data.configure = NO_LOOPBACK | RECV_BROAD;