diff options
Diffstat (limited to 'drivers/net/lp486e.c')
-rw-r--r-- | drivers/net/lp486e.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/lp486e.c b/drivers/net/lp486e.c index e20fefc73c8b..b1f5d79af61f 100644 --- a/drivers/net/lp486e.c +++ b/drivers/net/lp486e.c | |||
@@ -1253,18 +1253,19 @@ static void set_multicast_list(struct net_device *dev) { | |||
1253 | 1253 | ||
1254 | if (i596_debug > 1) | 1254 | if (i596_debug > 1) |
1255 | printk ("%s: set multicast list %d\n", | 1255 | printk ("%s: set multicast list %d\n", |
1256 | dev->name, dev->mc_count); | 1256 | dev->name, netdev_mc_count(dev)); |
1257 | 1257 | ||
1258 | if (dev->mc_count > 0) { | 1258 | if (!netdev_mc_empty(dev)) { |
1259 | struct dev_mc_list *dmi; | 1259 | struct dev_mc_list *dmi; |
1260 | char *cp; | 1260 | char *cp; |
1261 | cmd = kmalloc(sizeof(struct i596_cmd)+2+dev->mc_count*6, GFP_ATOMIC); | 1261 | cmd = kmalloc(sizeof(struct i596_cmd) + 2 + |
1262 | netdev_mc_count(dev) * 6, GFP_ATOMIC); | ||
1262 | if (cmd == NULL) { | 1263 | if (cmd == NULL) { |
1263 | printk (KERN_ERR "%s: set_multicast Memory squeeze.\n", dev->name); | 1264 | printk (KERN_ERR "%s: set_multicast Memory squeeze.\n", dev->name); |
1264 | return; | 1265 | return; |
1265 | } | 1266 | } |
1266 | cmd->command = CmdMulticastList; | 1267 | cmd->command = CmdMulticastList; |
1267 | *((unsigned short *) (cmd + 1)) = dev->mc_count * 6; | 1268 | *((unsigned short *) (cmd + 1)) = netdev_mc_count(dev) * 6; |
1268 | cp = ((char *)(cmd + 1))+2; | 1269 | cp = ((char *)(cmd + 1))+2; |
1269 | for (dmi = dev->mc_list; dmi != NULL; dmi = dmi->next) { | 1270 | for (dmi = dev->mc_list; dmi != NULL; dmi = dmi->next) { |
1270 | memcpy(cp, dmi,6); | 1271 | memcpy(cp, dmi,6); |
@@ -1277,7 +1278,8 @@ static void set_multicast_list(struct net_device *dev) { | |||
1277 | if (lp->set_conf.pa_next != I596_NULL) { | 1278 | if (lp->set_conf.pa_next != I596_NULL) { |
1278 | return; | 1279 | return; |
1279 | } | 1280 | } |
1280 | if (dev->mc_count == 0 && !(dev->flags & (IFF_PROMISC | IFF_ALLMULTI))) { | 1281 | if (netdev_mc_empty(dev) && |
1282 | !(dev->flags & (IFF_PROMISC | IFF_ALLMULTI))) { | ||
1281 | lp->i596_config[8] &= ~0x01; | 1283 | lp->i596_config[8] &= ~0x01; |
1282 | } else { | 1284 | } else { |
1283 | lp->i596_config[8] |= 0x01; | 1285 | lp->i596_config[8] |= 0x01; |