generic: 6.1: sync mt7530 DSA driver with upstream
[openwrt/openwrt.git] / target / linux / generic / backport-6.1 / 790-01-v6.2-net-dsa-mt7530-remove-redundant-assignment.patch
diff --git a/target/linux/generic/backport-6.1/790-01-v6.2-net-dsa-mt7530-remove-redundant-assignment.patch b/target/linux/generic/backport-6.1/790-01-v6.2-net-dsa-mt7530-remove-redundant-assignment.patch
new file mode 100644 (file)
index 0000000..f662a76
--- /dev/null
@@ -0,0 +1,32 @@
+From 27b692012840f658c84a3102c0aeca2676f03132 Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel@makrotopia.org>
+Date: Thu, 15 Dec 2022 03:47:59 +0000
+Subject: [PATCH 01/48] net: dsa: mt7530: remove redundant assignment
+
+Russell King correctly pointed out that the MAC_2500FD capability is
+already added for port 5 (if not in RGMII mode) and port 6 (which only
+supports SGMII) by mt7531_mac_port_get_caps. Remove the reduntant
+setting of this capability flag which was added by a previous commit.
+
+Fixes: e19de30d2080 ("net: dsa: mt7530: add support for in-band link status")
+Reported-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
+Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
+Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+Link: https://lore.kernel.org/r/Y5qY7x6la5TxZxzX@makrotopia.org
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -3010,9 +3010,6 @@ static void mt753x_phylink_get_caps(stru
+       config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
+                                  MAC_10 | MAC_100 | MAC_1000FD;
+-      if ((priv->id == ID_MT7531) && mt753x_is_mac_port(port))
+-              config->mac_capabilities |= MAC_2500FD;
+-
+       /* 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.