]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net: dsa: mt7530: mark as non-legacy
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 11 Apr 2022 09:46:37 +0000 (10:46 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 12 Apr 2022 08:33:15 +0000 (10:33 +0200)
The mt7530 driver does not make use of the speed, duplex, pause or
advertisement in its phylink_mac_config() implementation, so it can be
marked as a non-legacy driver.

Tested-by: Marek BehĂșn <kabel@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/dsa/mt7530.c

index 0ee2cb7e56649bfc72bad24c2190a50ddbb944d4..c4ea73d996e881bd70a47c4d4406d10b0806f824 100644 (file)
@@ -2897,6 +2897,12 @@ static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
        config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
                                   MAC_10 | MAC_100 | MAC_1000FD;
 
+       /* This driver does not make use of the speed, duplex, pause or the
+        * advertisement in its mac_config, so it is safe to mark this driver
+        * as non-legacy.
+        */
+       config->legacy_pre_march2020 = false;
+
        priv->info->mac_port_get_caps(ds, port, config);
 }