Skip to content

Commit

Permalink
net: stmmac: Remove WAKE_MAGIC if HW shows no pmt_magic_frame
Browse files Browse the repository at this point in the history
Remove WAKE_MAGIC from supported modes if the HW capability register
shows no support for pmt_magic_frame.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jisheng Zhang authored and David S. Miller committed Jul 29, 2020
1 parent f11df04 commit 1057d68
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1057d68

Please sign in to comment.