Преглед изворни кода

stmmac: enable wol via magic frame by default.

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>
Giuseppe Cavallaro пре 14 година
родитељ
комит
539c9aa5ba
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      drivers/net/stmmac/stmmac_main.c

+ 3 - 1
drivers/net/stmmac/stmmac_main.c

@@ -1560,8 +1560,10 @@ static int stmmac_mac_device_setup(struct net_device *dev)
 
 
 	priv->hw = device;
 	priv->hw = device;
 
 
-	if (device_can_wakeup(priv->device))
+	if (device_can_wakeup(priv->device)) {
 		priv->wolopts = WAKE_MAGIC; /* Magic Frame as default */
 		priv->wolopts = WAKE_MAGIC; /* Magic Frame as default */
+		enable_irq_wake(dev->irq);
+	}
 
 
 	return 0;
 	return 0;
 }
 }