diff options
author | 2021-10-27 10:03:48 +0100 | |
---|---|---|
committer | 2021-10-27 14:50:11 +0100 | |
commit | d9ca72807ecb236f679b960c70ef5b7d4a5f0222 (patch) | |
tree | 7799df7d0421262661e3c7a0c95b76d40fba2491 /drivers/net/ethernet/marvell/mvneta.c | |
parent | net: mvneta: populate supported_interfaces member (diff) | |
download | linux-d9ca72807ecb236f679b960c70ef5b7d4a5f0222.tar.gz linux-d9ca72807ecb236f679b960c70ef5b7d4a5f0222.tar.bz2 linux-d9ca72807ecb236f679b960c70ef5b7d4a5f0222.zip |
net: mvneta: remove interface checks in mvneta_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>
Diffstat (limited to 'drivers/net/ethernet/marvell/mvneta.c')
-rw-r--r-- | drivers/net/ethernet/marvell/mvneta.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 7df923648bc4..446cdd496f1b 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -3832,15 +3832,8 @@ static void mvneta_validate(struct phylink_config *config, * "Bit 2 Field InBandAnEn In-band Auto-Negotiation enable. ... * When <PortType> = 1 (1000BASE-X) this field must be set to 1." */ - if (phy_interface_mode_is_8023z(state->interface)) { - if (!phylink_test(state->advertising, Autoneg)) { - linkmode_zero(supported); - return; - } - } else if (state->interface != PHY_INTERFACE_MODE_NA && - state->interface != PHY_INTERFACE_MODE_QSGMII && - state->interface != PHY_INTERFACE_MODE_SGMII && - !phy_interface_mode_is_rgmii(state->interface)) { + if (phy_interface_mode_is_8023z(state->interface) && + !phylink_test(state->advertising, Autoneg)) { linkmode_zero(supported); return; } |