]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: dsa: mt7530: fix incorrect test in mt753x_phylink_validate()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 7 Mar 2022 12:13:30 +0000 (12:13 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 8 Mar 2022 11:12:25 +0000 (12:12 +0100)
Discussing one of the tests in mt753x_phylink_validate() with Landen
Chao confirms that the "||" should be "&&". Fix this.

Fixes: 311e10ceeec6 ("net: dsa: mt7530: Add the support of MT7531 switch")
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/E1nRCF0-00CiXD-7q@rmk-PC.armlinux.org.uk
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/dsa/mt7530.c

index ff3c267d0f268cbc46658763a75802eb8645c2ff..a251bc55727ff180d65beca59085f0337fdde908 100644 (file)
@@ -2936,7 +2936,7 @@ mt753x_phylink_validate(struct dsa_switch *ds, int port,
 
        phylink_set_port_modes(mask);
 
-       if (state->interface != PHY_INTERFACE_MODE_TRGMII ||
+       if (state->interface != PHY_INTERFACE_MODE_TRGMII &&
            !phy_interface_mode_is_8023z(state->interface)) {
                phylink_set(mask, 10baseT_Half);
                phylink_set(mask, 10baseT_Full);