Thread (6 messages) flat view 6 messages, 4 authors, 2011-11-08

Re: [PATCH 7/7] gianfar: add support for wake-on-packet

From: Scott Wood <hidden>
Date: 2011-11-04 21:13:54
Also in: netdev

On 11/04/2011 04:11 PM, Scott Wood wrote:
On 11/04/2011 07:40 AM, Zhao Chenhui wrote:
quoted
 static int gfar_suspend(struct device *dev)
 {
@@ -1268,9 +1443,17 @@ static int gfar_suspend(struct device *dev)
 	struct gfar __iomem *regs = priv->gfargrp[0].regs;
 	unsigned long flags;
 	u32 tempval;
-
 	int magic_packet = priv->wol_en &&
-		(priv->device_flags & FSL_GIANFAR_DEV_HAS_MAGIC_PACKET);
+		(priv->wol_opts & GIANFAR_WOL_MAGIC);
+	int arp_packet = priv->wol_en &&
+		(priv->wol_opts & GIANFAR_WOL_ARP);
+
+	if (arp_packet) {
+		pmc_enable_wake(priv->ofdev, PM_SUSPEND_MEM, 1);
+		pmc_enable_lossless(1);
+		gfar_arp_suspend(ndev);
+		return 0;
+	}
How do we know this isn't standby?
Or suspend to disk, for that matter?

-Scott
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help