Commit 1057d685 authored by Jisheng Zhang's avatar Jisheng Zhang Committed by David S. Miller

net: stmmac: Remove WAKE_MAGIC if HW shows no pmt_magic_frame

Remove WAKE_MAGIC from supported modes if the HW capability register
shows no support for pmt_magic_frame.
Signed-off-by: default avatarJisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f11df045
......@@ -603,6 +603,8 @@ static void stmmac_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
mutex_lock(&priv->lock);
if (device_can_wakeup(priv->device)) {
wol->supported = WAKE_MAGIC | WAKE_UCAST;
if (priv->hw_cap_support && !priv->dma_cap.pmt_magic_frame)
wol->supported &= ~WAKE_MAGIC;
wol->wolopts = priv->wolopts;
}
mutex_unlock(&priv->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment