Skip to content

Commit

Permalink
net: stmmac: dwmac-mediatek: Fix inverted handling of mediatek,mac-wol
Browse files Browse the repository at this point in the history
The mediatek,mac-wol property is being handled backwards to what is
described in the binding: it currently enables PHY WOL when the property
is present and vice versa. Invert the driver logic so it matches the
binding description.

Fixes: fd1d62d ("net: stmmac: replace the use_phy_wol field with a flag")
Signed-off-by: Nícolas F. R. A. Prado <[email protected]>
Link: https://patch.msgid.link/20241109-mediatek-mac-wol-noninverted-v2-1-0e264e213878@collabora.com
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
nfraprado authored and kuba-moo committed Nov 14, 2024
1 parent e28acc9 commit a03b18a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,9 @@ static int mediatek_dwmac_common_data(struct platform_device *pdev,

plat->mac_interface = priv_plat->phy_mode;
if (priv_plat->mac_wol)
plat->flags |= STMMAC_FLAG_USE_PHY_WOL;
else
plat->flags &= ~STMMAC_FLAG_USE_PHY_WOL;
else
plat->flags |= STMMAC_FLAG_USE_PHY_WOL;
plat->riwt_off = 1;
plat->maxmtu = ETH_DATA_LEN;
plat->host_dma_width = priv_plat->variant->dma_bit_mask;
Expand Down

0 comments on commit a03b18a

Please sign in to comment.