aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/gianfar.c5
-rw-r--r--drivers/net/gianfar_ethtool.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index f5e6068f9b07..4d2ca490d76c 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -463,6 +463,9 @@ static int gfar_probe(struct of_device *ofdev,
463 goto register_fail; 463 goto register_fail;
464 } 464 }
465 465
466 device_init_wakeup(&dev->dev,
467 priv->device_flags & FSL_GIANFAR_DEV_HAS_MAGIC_PACKET);
468
466 /* fill out IRQ number and name fields */ 469 /* fill out IRQ number and name fields */
467 len_devname = strlen(dev->name); 470 len_devname = strlen(dev->name);
468 strncpy(&priv->int_name_tx[0], dev->name, len_devname); 471 strncpy(&priv->int_name_tx[0], dev->name, len_devname);
@@ -1200,6 +1203,8 @@ static int gfar_enet_open(struct net_device *dev)
1200 1203
1201 netif_start_queue(dev); 1204 netif_start_queue(dev);
1202 1205
1206 device_set_wakeup_enable(&dev->dev, priv->wol_en);
1207
1203 return err; 1208 return err;
1204} 1209}
1205 1210
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c
index 59b3b5d98efe..dbf06e9313cc 100644
--- a/drivers/net/gianfar_ethtool.c
+++ b/drivers/net/gianfar_ethtool.c
@@ -600,6 +600,7 @@ static int gfar_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
600 600
601 spin_lock_irqsave(&priv->bflock, flags); 601 spin_lock_irqsave(&priv->bflock, flags);
602 priv->wol_en = wol->wolopts & WAKE_MAGIC ? 1 : 0; 602 priv->wol_en = wol->wolopts & WAKE_MAGIC ? 1 : 0;
603 device_set_wakeup_enable(&dev->dev, priv->wol_en);
603 spin_unlock_irqrestore(&priv->bflock, flags); 604 spin_unlock_irqrestore(&priv->bflock, flags);
604 605
605 return 0; 606 return 0;