aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ks8851_mll.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ks8851_mll.c')
-rw-r--r--drivers/net/ks8851_mll.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/ks8851_mll.c b/drivers/net/ks8851_mll.c
index c146304d8d6c..6354ab3a45a6 100644
--- a/drivers/net/ks8851_mll.c
+++ b/drivers/net/ks8851_mll.c
@@ -31,6 +31,7 @@
31#include <linux/mii.h> 31#include <linux/mii.h>
32#include <linux/platform_device.h> 32#include <linux/platform_device.h>
33#include <linux/delay.h> 33#include <linux/delay.h>
34#include <linux/slab.h>
34 35
35#define DRV_NAME "ks8851_mll" 36#define DRV_NAME "ks8851_mll"
36 37
@@ -854,8 +855,8 @@ static void ks_update_link_status(struct net_device *netdev, struct ks_net *ks)
854 855
855static irqreturn_t ks_irq(int irq, void *pw) 856static irqreturn_t ks_irq(int irq, void *pw)
856{ 857{
857 struct ks_net *ks = pw; 858 struct net_device *netdev = pw;
858 struct net_device *netdev = ks->netdev; 859 struct ks_net *ks = netdev_priv(netdev);
859 u16 status; 860 u16 status;
860 861
861 /*this should be the first in IRQ handler */ 862 /*this should be the first in IRQ handler */
@@ -1193,10 +1194,11 @@ static void ks_set_rx_mode(struct net_device *netdev)
1193 else 1194 else
1194 ks_set_promis(ks, false); 1195 ks_set_promis(ks, false);
1195 1196
1196 if ((netdev->flags & IFF_MULTICAST) && netdev->mc_count) { 1197 if ((netdev->flags & IFF_MULTICAST) && netdev_mc_count(netdev)) {
1197 if (netdev->mc_count <= MAX_MCAST_LST) { 1198 if (netdev_mc_count(netdev) <= MAX_MCAST_LST) {
1198 int i = 0; 1199 int i = 0;
1199 for (ptr = netdev->mc_list; ptr; ptr = ptr->next) { 1200
1201 netdev_for_each_mc_addr(ptr, netdev) {
1200 if (!(*ptr->dmi_addr & 1)) 1202 if (!(*ptr->dmi_addr & 1))
1201 continue; 1203 continue;
1202 if (i >= MAX_MCAST_LST) 1204 if (i >= MAX_MCAST_LST)