summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cadence
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2019-11-21 03:36:22 +0300
committerJakub Kicinski <jakub.kicinski@netronome.com>2019-11-24 03:13:39 +0300
commitd46b7e4fb06037a61415f5b6964fcf632ee1dc34 (patch)
treed841ff4cec5acfc14f0517b409b055d279895832 /drivers/net/ethernet/cadence
parentab818362c9054beb950b97a09ce7b0d56f5a32a1 (diff)
downloadlinux-d46b7e4fb06037a61415f5b6964fcf632ee1dc34.tar.xz
net: phylink: rename mac_link_state() op to mac_pcs_get_state()
Rename the mac_link_state() method to mac_pcs_get_state() to make it clear that it should be returning the MACs PCS current state, which is used for inband negotiation rather than just reading back what the MAC has been configured for. Update the documentation to explicitly mention that this is for inband. We drop the return value as well; most of phylink doesn't check the return value and it is not clear what it should do on error - instead arrange for state->link to be false. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Diffstat (limited to 'drivers/net/ethernet/cadence')
-rw-r--r--drivers/net/ethernet/cadence/macb_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 8fc2e21f0bb1..d5ae2e1e0b0e 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -505,10 +505,10 @@ static void macb_validate(struct phylink_config *config,
__ETHTOOL_LINK_MODE_MASK_NBITS);
}
-static int macb_mac_link_state(struct phylink_config *config,
- struct phylink_link_state *state)
+static void macb_mac_pcs_get_state(struct phylink_config *config,
+ struct phylink_link_state *state)
{
- return -EOPNOTSUPP;
+ state->link = 0;
}
static void macb_mac_an_restart(struct phylink_config *config)
@@ -604,7 +604,7 @@ static void macb_mac_link_up(struct phylink_config *config, unsigned int mode,
static const struct phylink_mac_ops macb_phylink_ops = {
.validate = macb_validate,
- .mac_link_state = macb_mac_link_state,
+ .mac_pcs_get_state = macb_mac_pcs_get_state,
.mac_an_restart = macb_mac_an_restart,
.mac_config = macb_mac_config,
.mac_link_down = macb_mac_link_down,