summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/mt7530.h
diff options
context:
space:
mode:
authorArınç ÜNAL <arinc.unal@arinc9.com>2023-06-17 08:26:47 +0200
committerDavid S. Miller <davem@davemloft.net>2023-06-20 10:40:26 +0200
commit8332cf6fd7c7087dbc2067115b33979c9851bbc4 (patch)
treea19a2cc752ab2c676ab2f750deee8961e6cfb357 /drivers/net/dsa/mt7530.h
parentnet: dsa: mt7530: fix handling of BPDUs on MT7530 switch (diff)
downloadlinux-8332cf6fd7c7087dbc2067115b33979c9851bbc4.tar.xz
linux-8332cf6fd7c7087dbc2067115b33979c9851bbc4.zip
net: dsa: mt7530: fix handling of LLDP frames
LLDP frames are link-local frames, therefore they must be trapped to the CPU port. Currently, the MT753X switches treat LLDP frames as regular multicast frames, therefore flooding them to user ports. To fix this, set LLDP frames to be trapped to the CPU port(s). Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mt7530.h')
-rw-r--r--drivers/net/dsa/mt7530.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/dsa/mt7530.h b/drivers/net/dsa/mt7530.h
index e590cf43f3ae..08045b035e6a 100644
--- a/drivers/net/dsa/mt7530.h
+++ b/drivers/net/dsa/mt7530.h
@@ -67,6 +67,11 @@ enum mt753x_id {
#define MT753X_BPC 0x24
#define MT753X_BPDU_PORT_FW_MASK GENMASK(2, 0)
+/* Register for :03 and :0E MAC DA frame control */
+#define MT753X_RGAC2 0x2c
+#define MT753X_R0E_PORT_FW_MASK GENMASK(18, 16)
+#define MT753X_R0E_PORT_FW(x) FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x)
+
enum mt753x_bpdu_port_fw {
MT753X_BPDU_FOLLOW_MFC,
MT753X_BPDU_CPU_EXCLUDE = 4,