Skip to content

Commit

Permalink
stmmac: enable wol via magic frame by default.
Browse files Browse the repository at this point in the history
This patch enables it by default when the driver starts.
This has been required by many people and seems to actually be
useful on STB.
At any rate, the WoL modes can be selected and turned-on/off
by using the ethtool at run-time by users.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Giuseppe Cavallaro authored and David S. Miller committed Feb 14, 2011
1 parent da1ab3e commit 539c9aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1560,8 +1560,10 @@ static int stmmac_mac_device_setup(struct net_device *dev)

priv->hw = device;

if (device_can_wakeup(priv->device))
if (device_can_wakeup(priv->device)) {
priv->wolopts = WAKE_MAGIC; /* Magic Frame as default */
enable_irq_wake(dev->irq);
}

return 0;
}
Expand Down

0 comments on commit 539c9aa

Please sign in to comment.