Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: sh_eth: Disable WoL if system can not suspend

The MAC can't facilitate WoL if the system can't go to sleep. Gate the
WoL support callbacks in ethtool at compile time using CONFIG_PM_SLEEP.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/20250909085849.3808169-1-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Niklas Söderlund and committed by
Jakub Kicinski
9c02ea54 38611e5a

+4
+4
drivers/net/ethernet/renesas/sh_eth.c
··· 2360 2360 return 0; 2361 2361 } 2362 2362 2363 + #ifdef CONFIG_PM_SLEEP 2363 2364 static void sh_eth_get_wol(struct net_device *ndev, struct ethtool_wolinfo *wol) 2364 2365 { 2365 2366 struct sh_eth_private *mdp = netdev_priv(ndev); ··· 2387 2386 2388 2387 return 0; 2389 2388 } 2389 + #endif 2390 2390 2391 2391 static const struct ethtool_ops sh_eth_ethtool_ops = { 2392 2392 .get_regs_len = sh_eth_get_regs_len, ··· 2403 2401 .set_ringparam = sh_eth_set_ringparam, 2404 2402 .get_link_ksettings = phy_ethtool_get_link_ksettings, 2405 2403 .set_link_ksettings = phy_ethtool_set_link_ksettings, 2404 + #ifdef CONFIG_PM_SLEEP 2406 2405 .get_wol = sh_eth_get_wol, 2407 2406 .set_wol = sh_eth_set_wol, 2407 + #endif 2408 2408 }; 2409 2409 2410 2410 /* network device open function */