Skip to content

Commit

Permalink
skge: Enable WoL by default if supported
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafael J. Wysocki authored and David S. Miller committed Jul 22, 2009
1 parent d14a767 commit 7b55a4a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/skge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 7b55a4a

Please sign in to comment.