diff options
author | 2018-12-14 15:17:05 +0100 | |
---|---|---|
committer | 2018-12-17 11:24:32 -0800 | |
commit | b3e5464e36c07dba70b544044a297d5819351765 (patch) | |
tree | ed694951dab275d9335067ea3e0cc64e2100fb78 /include/linux/phy_fixed.h | |
parent | net/mlx4_en: remove fallback after kzalloc_node() (diff) | |
download | linux-b3e5464e36c07dba70b544044a297d5819351765.tar.gz linux-b3e5464e36c07dba70b544044a297d5819351765.tar.bz2 linux-b3e5464e36c07dba70b544044a297d5819351765.zip |
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.h | 5 |
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 */ |