3c59x: Use device_set_wakeup_enable
authorSteffen Klassert <[email protected]>
Fri, 9 Jan 2009 03:53:17 +0000 (03:53 +0000)
committerDavid S. Miller <[email protected]>
Sun, 11 Jan 2009 08:06:32 +0000 (00:06 -0800)
Since dev->power.should_wakeup bit is used by the PCI core to
decide whether the device should wake up the system from sleep
states, set this bit by calling device_set_wakeup_enable().

This restores proper WOL for the 3c59x driver.

Reported-and-tested-by: Graeme Wilford <[email protected]>
Reported-by: Gunnar Degnbol <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/3c59x.c

index 665e7fdf27a15707f2a7aeffae50346371ff4ec1..cdbbb6226fc598d3fd5bb5b072fd5ffba7ef1c9d 100644 (file)
@@ -3109,6 +3109,8 @@ static void acpi_set_WOL(struct net_device *dev)
        struct vortex_private *vp = netdev_priv(dev);
        void __iomem *ioaddr = vp->ioaddr;
 
+       device_set_wakeup_enable(vp->gendev, vp->enable_wol);
+
        if (vp->enable_wol) {
                /* Power up on: 1==Downloaded Filter, 2==Magic Packets, 4==Link Status. */
                EL3WINDOW(7);