diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2009-07-22 04:58:55 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-22 20:24:26 +0200 |
commit | 7b55a4a3f761db7daba1ac526ef60f64f5c53689 (patch) | |
tree | d16afd1b41047872bef20c3c3c1b669a145a5812 /drivers/net/skge.c | |
parent | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linvil... (diff) | |
download | linux-7b55a4a3f761db7daba1ac526ef60f64f5c53689.tar.xz linux-7b55a4a3f761db7daba1ac526ef60f64f5c53689.zip |
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 <rjw@sisk.pl>
Tested-by: Michael Guntsche <mike@it-loops.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/skge.c')
-rw-r--r-- | drivers/net/skge.c | 4 |
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; |