net: dsa: mt7530: fix handling of LLDP frames
authorArınç ÜNAL <arinc.unal@arinc9.com>
Sat, 17 Jun 2023 06:26:47 +0000 (09:26 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Jun 2023 09:12:31 +0000 (11:12 +0200)
commit50f689918db4bbb4f380189e98bbdd64e87416dd
treee6e871b01924c9a583af3d7919e2f78e42930b34
parenta50f84af215ee26cf9d54b871a156d15ac02df03
net: dsa: mt7530: fix handling of LLDP frames

[ Upstream commit 8332cf6fd7c7087dbc2067115b33979c9851bbc4 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/mt7530.c
drivers/net/dsa/mt7530.h