diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2021-11-27 12:12:49 +0000 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-01-18 10:17:24 +0000 |
commit | 947953b05c93aa94ab6a5da82806d74e09b5071a (patch) | |
tree | a90fde96084a0c1b5182a880d3c7e946fa48d1fa /include | |
parent | 98ac55fa2906aa8a4ecf161c2ee1f4052f266941 (diff) |
net: phylink: allow PCS to override MAC validation
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/phylink.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/phylink.h b/include/linux/phylink.h index a24af0f5e4c9..e6422e42c7d7 100644 --- a/include/linux/phylink.h +++ b/include/linux/phylink.h @@ -21,6 +21,11 @@ enum { MLO_AN_FIXED, /* Fixed-link mode */ MLO_AN_INBAND, /* In-band protocol */ + /* pcs_validate() return values */ + PCS_VALIDATE_FAIL = -EINVAL, /* Failed */ + PCS_VALIDATE_PASS = 0, /* Passed */ + PCS_VALIDATE_RATEADAPT = 1, /* Passed with rate adaption at PCS */ + MAC_SYM_PAUSE = BIT(0), MAC_ASYM_PAUSE = BIT(1), MAC_10HD = BIT(2), @@ -467,7 +472,9 @@ struct phylink_pcs_ops { * &struct phylink_mac_ops validate() method. * * Returns -EINVAL if the interface mode/autoneg mode is not supported. - * Returns non-zero positive if the link state can be supported. + * Returns non-zero positive if the link state can be supported and does + * not depend on the MAC. + * Returns 0 if the link state can be supported but does depend on the MAC. */ int pcs_validate(struct phylink_pcs *pcs, unsigned long *supported, const struct phylink_link_state *state); |