提交 7b55a4a3 编写于 作者: R Rafael J. Wysocki 提交者: David S. Miller

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: NRafael J. Wysocki <rjw@sisk.pl>
Tested-by: NMichael Guntsche <mike@it-loops.com>
Acked-by: NStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d14a7679
...@@ -3854,8 +3854,10 @@ static struct net_device *skge_devinit(struct skge_hw *hw, int port, ...@@ -3854,8 +3854,10 @@ static struct net_device *skge_devinit(struct skge_hw *hw, int port,
skge->speed = -1; skge->speed = -1;
skge->advertising = skge_supported_modes(hw); 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; skge->wol = wol_supported(hw) & WAKE_MAGIC;
device_set_wakeup_enable(&hw->pdev->dev, skge->wol);
}
hw->dev[port] = dev; hw->dev[port] = dev;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册