diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2023-07-13 09:42:17 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-07-14 08:51:48 +0100 |
commit | 24699cc1ff3e633d7c3a0d3ef394243db11757ec (patch) | |
tree | 5970b48470ba6dd2c06301f6a776c3b1845d2037 /include/linux | |
parent | aee6098822ed8a298ad817da8339ba4c7ea381fe (diff) |
net: phylink: add support for PCS link change notifications
Add a function, phylink_pcs_change() which can be used by PCs drivers
to notify phylink about changes to the PCS link state.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/phylink.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/phylink.h b/include/linux/phylink.h index 99fc2fa60695..b28aa3eef7d5 100644 --- a/include/linux/phylink.h +++ b/include/linux/phylink.h @@ -9,6 +9,7 @@ struct device_node; struct ethtool_cmd; struct fwnode_handle; struct net_device; +struct phylink; enum { MLO_PAUSE_NONE, @@ -520,14 +521,19 @@ struct phylink_pcs_ops; /** * struct phylink_pcs - PHYLINK PCS instance * @ops: a pointer to the &struct phylink_pcs_ops structure + * @phylink: pointer to &struct phylink_config * @neg_mode: provide PCS neg mode via "mode" argument * @poll: poll the PCS for link changes * * This structure is designed to be embedded within the PCS private data, * and will be passed between phylink and the PCS. + * + * The @phylink member is private to phylink and must not be touched by + * the PCS driver. */ struct phylink_pcs { const struct phylink_pcs_ops *ops; + struct phylink *phylink; bool neg_mode; bool poll; }; @@ -699,6 +705,7 @@ int phylink_fwnode_phy_connect(struct phylink *pl, void phylink_disconnect_phy(struct phylink *); void phylink_mac_change(struct phylink *, bool up); +void phylink_pcs_change(struct phylink_pcs *, bool up); void phylink_start(struct phylink *); void phylink_stop(struct phylink *); |