From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: UNGLinuxDriver@microchip.com,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org
Subject: [PATCH net-next 2/3] net: ocelot_net: remove interface checks in macb_validate()
Date: Tue, 16 Nov 2021 10:09:36 +0000 [thread overview]
Message-ID: <E1mmvPE-0078fd-BV@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <YZODOgRlR3RY/JWX@shell.armlinux.org.uk>
As phylink checks the interface mode against the supported_interfaces
bitmap, we no longer need to validate the interface mode in the
validation function. Remove this to simplify it.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
drivers/net/ethernet/mscc/ocelot_net.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/net/ethernet/mscc/ocelot_net.c b/drivers/net/ethernet/mscc/ocelot_net.c
index 37c158df60ce..21df548dcf64 100644
--- a/drivers/net/ethernet/mscc/ocelot_net.c
+++ b/drivers/net/ethernet/mscc/ocelot_net.c
@@ -1502,17 +1502,8 @@ static void vsc7514_phylink_validate(struct phylink_config *config,
unsigned long *supported,
struct phylink_link_state *state)
{
- struct net_device *ndev = to_net_dev(config->dev);
- struct ocelot_port_private *priv = netdev_priv(ndev);
- struct ocelot_port *ocelot_port = &priv->port;
__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = {};
- if (state->interface != PHY_INTERFACE_MODE_NA &&
- state->interface != ocelot_port->phy_mode) {
- linkmode_zero(supported);
- return;
- }
-
phylink_set_port_modes(mask);
phylink_set(mask, Pause);
--
2.30.2
next prev parent reply other threads:[~2021-11-16 10:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-16 10:08 [PATCH net-next 0/3] net: ocelot_net: phylink validate implementation updates Russell King (Oracle)
2021-11-16 10:09 ` [PATCH net-next 1/3] net: ocelot_net: populate supported_interfaces member Russell King (Oracle)
2021-11-16 10:09 ` Russell King (Oracle) [this message]
2021-11-16 10:09 ` [PATCH net-next 3/3] net: ocelot_net: use phylink_generic_validate() Russell King (Oracle)
2021-11-17 11:30 ` [PATCH net-next 0/3] net: ocelot_net: phylink validate implementation updates patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1mmvPE-0078fd-BV@rmk-PC.armlinux.org.uk \
--to=rmk+kernel@armlinux.org.uk \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.