summaryrefslogtreecommitdiff
path: root/include/linux/phy_fixed.h
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@infinera.com>2018-12-14 17:17:05 +0300
committerDavid S. Miller <davem@davemloft.net>2018-12-17 22:24:32 +0300
commitb3e5464e36c07dba70b544044a297d5819351765 (patch)
treeed694951dab275d9335067ea3e0cc64e2100fb78 /include/linux/phy_fixed.h
parent4beaacc6fea5a5ec43c55c22a6c83c03a5ecc775 (diff)
downloadlinux-b3e5464e36c07dba70b544044a297d5819351765.tar.xz
Fixed PHY: Add fixed_phy_change_carrier()
Drivers can use this as .ndo_change_carrier() to change carrier via /sys/class/net/ethX/carrier. Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phy_fixed.h')
-rw-r--r--include/linux/phy_fixed.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/phy_fixed.h b/include/linux/phy_fixed.h
index ee54453a40a0..9525567b1951 100644
--- a/include/linux/phy_fixed.h
+++ b/include/linux/phy_fixed.h
@@ -13,6 +13,7 @@ struct fixed_phy_status {
struct device_node;
#if IS_ENABLED(CONFIG_FIXED_PHY)
+extern int fixed_phy_change_carrier(struct net_device *dev, bool new_carrier);
extern int fixed_phy_add(unsigned int irq, int phy_id,
struct fixed_phy_status *status,
int link_gpio);
@@ -47,6 +48,10 @@ static inline int fixed_phy_set_link_update(struct phy_device *phydev,
{
return -ENODEV;
}
+static inline int fixed_phy_change_carrier(struct net_device *dev, bool new_carrier)
+{
+ return -EINVAL;
+}
#endif /* CONFIG_FIXED_PHY */
#endif /* __PHY_FIXED_H */