Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b55a4a3 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by David S. Miller
Browse files

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: default avatarRafael J. Wysocki <rjw@sisk.pl>
Tested-by: default avatarMichael Guntsche <mike@it-loops.com>
Acked-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d14a7679
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;