From: Rafael J. Wysocki Date: Wed, 22 Jul 2009 02:58:55 +0000 (+0000) Subject: skge: Enable WoL by default if supported X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7b55a4a3f761db7daba1ac526ef60f64f5c53689;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Tested-by: Michael Guntsche Acked-by: Stephen Hemminger Signed-off-by: David S. Miller --- 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;