summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/b53/b53_common.c
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2021-11-27 16:05:36 +0000
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2024-05-09 18:17:31 +0100
commit8b4e465f0d10115f74c05cdb746a8cde407186ef (patch)
tree5c1def2cb98b8972014fff8ff6a320f9e261f8d7 /drivers/net/dsa/b53/b53_common.c
parent86f12e762f917927d8fd024b72e0061732676491 (diff)
net: use phylink_mode_*() helpers
Use the phylink_mode_*() helpers in all drivers so we can change the definition of the "mode" argument. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers/net/dsa/b53/b53_common.c')
-rw-r--r--drivers/net/dsa/b53/b53_common.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 3bd665fbbd8d..c7bdf24c50b7 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -1426,10 +1426,10 @@ static void b53_phylink_mac_link_down(struct phylink_config *config,
struct b53_device *dev = dp->ds->priv;
int port = dp->index;
- if (mode == MLO_AN_PHY)
+ if (phylink_mode_phy(mode))
return;
- if (mode == MLO_AN_FIXED) {
+ if (phylink_mode_fixed(mode)) {
b53_force_link(dev, port, false);
return;
}
@@ -1452,12 +1452,13 @@ static void b53_phylink_mac_link_up(struct phylink_config *config,
struct ethtool_eee *p = &dev->ports[dp->index].eee;
int port = dp->index;
- if (mode == MLO_AN_PHY) {
+ if (phylink_mode_phy(mode)) {
/* Re-negotiate EEE if it was enabled already */
p->eee_enabled = b53_eee_init(ds, port, phydev);
return;
}
+ if (phylink_mode_fixed(mode)) {
if (mode == MLO_AN_FIXED) {
/* Force flow control on BCM5301x's CPU port */
if (is5301x(dev) && dsa_is_cpu_port(ds, port))