]> Gentwo Git Trees - linux/.git/commit
net: phy: add phy_may_wakeup()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 23 Oct 2025 09:16:35 +0000 (10:16 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 25 Oct 2025 01:52:07 +0000 (18:52 -0700)
commitb344bfacf1de2dd776a218ce8341b9c672745a01
tree48f8b0d93913476f1617d318f56064070288d77d
parent330ce8ffc1848cbfa3e06c2c22750cfffa115579
net: phy: add phy_may_wakeup()

Add phy_may_wakeup() which uses the driver model's device_may_wakeup()
when the PHY driver has marked the device as wakeup capable in the
driver model, otherwise use phy_drv_wol_enabled().

Replace the sites that used to call phy_drv_wol_enabled() with this
as checking the driver model will be more efficient than checking the
WoL state.

Export phy_may_wakeup() so that phylink can use it.

Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1vBrQx-0000000BLzO-1RLt@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phy_device.c
include/linux/phy.h