net: phylink: add phylink_expects_phy() method
authorMichael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Thu, 30 Mar 2023 09:14:02 +0000 (17:14 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 Mar 2023 08:23:41 +0000 (09:23 +0100)
commit653a180957a85c3fc30320cc7e84f5dc913a64f8
treeddcf40e0e337278122e8d1be5f24521dbeba3701
parent44d807320000db0d0013372ad39b53e12d52f758
net: phylink: add phylink_expects_phy() method

Provide phylink_expects_phy() to allow MAC drivers to check if it
is expecting a PHY to attach to. Since fixed-linked setups do not
need to attach to a PHY.

Provides a boolean value as to if the MAC should expect a PHY.
Returns true if a PHY is expected.

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c
include/linux/phylink.h