diff options
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c index e8eff09bbbd7..0395f9eba801 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | |||
@@ -430,6 +430,12 @@ static int stmmac_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | |||
430 | struct stmmac_priv *priv = netdev_priv(dev); | 430 | struct stmmac_priv *priv = netdev_priv(dev); |
431 | u32 support = WAKE_MAGIC | WAKE_UCAST; | 431 | u32 support = WAKE_MAGIC | WAKE_UCAST; |
432 | 432 | ||
433 | /* By default almost all GMAC devices support the WoL via | ||
434 | * magic frame but we can disable it if the HW capability | ||
435 | * register shows no support for pmt_magic_frame. */ | ||
436 | if ((priv->hw_cap_support) && (!priv->dma_cap.pmt_magic_frame)) | ||
437 | wol->wolopts &= ~WAKE_MAGIC; | ||
438 | |||
433 | if (!device_can_wakeup(priv->device)) | 439 | if (!device_can_wakeup(priv->device)) |
434 | return -EINVAL; | 440 | return -EINVAL; |
435 | 441 | ||