]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net: stmmac: dwmac-mediatek: Fix inverted handling of mediatek,mac-wol
authorNĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Sat, 9 Nov 2024 15:16:32 +0000 (10:16 -0500)
committerJakub Kicinski <kuba@kernel.org>
Thu, 14 Nov 2024 03:23:02 +0000 (19:23 -0800)
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: fd1d62d80ebc ("net: stmmac: replace the use_phy_wol field with a flag")
Signed-off-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Link: https://patch.msgid.link/20241109-mediatek-mac-wol-noninverted-v2-1-0e264e213878@collabora.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c

index 2a9132d6d743ceb213ab30f21b5f59df9d47fbdb..001857c294fba1bac5340d4957e5c8a3f7c8f59f 100644 (file)
@@ -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;