aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <[email protected]>2009-07-22 02:58:55 +0000
committerDavid S. Miller <[email protected]>2009-07-22 11:24:26 -0700
commit7b55a4a3f761db7daba1ac526ef60f64f5c53689 (patch)
treed16afd1b41047872bef20c3c3c1b669a145a5812
parentd14a7679ae9b7d4eb4b92e81f5039b719fd98c4d (diff)
skge: Enable WoL by default if supported
If skge hardware is capable of waking up the system from sleep, enable magic packet WoL during driver initialisation. This makes WoL work without calling 'ethtool -s ethX wol g' for each adapter. Signed-off-by: Rafael J. Wysocki <[email protected]> Tested-by: Michael Guntsche <[email protected]> Acked-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--drivers/net/skge.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 60d502eef4fc..543af2044f40 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -3854,8 +3854,10 @@ static struct net_device *skge_devinit(struct skge_hw *hw, int port,
skge->speed = -1;
skge->advertising = skge_supported_modes(hw);
- if (device_may_wakeup(&hw->pdev->dev))
+ if (device_can_wakeup(&hw->pdev->dev)) {
skge->wol = wol_supported(hw) & WAKE_MAGIC;
+ device_set_wakeup_enable(&hw->pdev->dev, skge->wol);
+ }
hw->dev[port] = dev;