e287e39d6a4ea751cd18ccd0428064451cebd821
[openwrt/staging/thess.git] /
1 From d9ca72807ecb236f679b960c70ef5b7d4a5f0222 Mon Sep 17 00:00:00 2001
2 From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
3 Date: Wed, 27 Oct 2021 10:03:48 +0100
4 Subject: [PATCH] net: mvneta: remove interface checks in mvneta_validate()
5
6 As phylink checks the interface mode against the supported_interfaces
7 bitmap, we no longer need to validate the interface mode in the
8 validation function. Remove this to simplify it.
9
10 Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
11 Signed-off-by: David S. Miller <davem@davemloft.net>
12 ---
13 drivers/net/ethernet/marvell/mvneta.c | 11 ++---------
14 1 file changed, 2 insertions(+), 9 deletions(-)
15
16 --- a/drivers/net/ethernet/marvell/mvneta.c
17 +++ b/drivers/net/ethernet/marvell/mvneta.c
18 @@ -3833,15 +3833,8 @@ static void mvneta_validate(struct phyli
19 * "Bit 2 Field InBandAnEn In-band Auto-Negotiation enable. ...
20 * When <PortType> = 1 (1000BASE-X) this field must be set to 1."
21 */
22 - if (phy_interface_mode_is_8023z(state->interface)) {
23 - if (!phylink_test(state->advertising, Autoneg)) {
24 - linkmode_zero(supported);
25 - return;
26 - }
27 - } else if (state->interface != PHY_INTERFACE_MODE_NA &&
28 - state->interface != PHY_INTERFACE_MODE_QSGMII &&
29 - state->interface != PHY_INTERFACE_MODE_SGMII &&
30 - !phy_interface_mode_is_rgmii(state->interface)) {
31 + if (phy_interface_mode_is_8023z(state->interface) &&
32 + !phylink_test(state->advertising, Autoneg)) {
33 linkmode_zero(supported);
34 return;
35 }