net: ocelot_net: remove interface checks in macb_validate()
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> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8ea8c5b492
commit
a6f5248bc0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user