linux-stable/net/dsa
Vladimir Oltean 58b1b3c54e net: dsa: tag_sja1105: fix MAC DA patching from meta frames
[ Upstream commit 1dcf6efd5f ]

The SJA1105 manual says that at offset 4 into the meta frame payload we
have "MAC destination byte 2" and at offset 5 we have "MAC destination
byte 1". These are counted from the LSB, so byte 1 is h_dest[ETH_HLEN-2]
aka h_dest[4] and byte 2 is h_dest[ETH_HLEN-3] aka h_dest[3].

The sja1105_meta_unpack() function decodes these the other way around,
so a frame with MAC DA 01:80:c2:11:22:33 is received by the network
stack as having 01:80:c2:22:11:33.

Fixes: e53e18a6fe ("net: dsa: sja1105: Receive and decode meta frames")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
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>
2023-07-27 08:37:24 +02:00
..
Kconfig net: dsa: add GRO support via gro_cells 2021-03-11 14:06:48 +01:00
Makefile
dsa.c net: dsa: add GRO support via gro_cells 2021-03-11 14:06:48 +01:00
dsa2.c net: dsa: Add missing of_node_put() in dsa_port_parse_of 2022-03-23 09:12:07 +01:00
dsa_priv.h net: dsa: add GRO support via gro_cells 2021-03-11 14:06:48 +01:00
master.c net: dsa: fix a crash if ->get_sset_count() fails 2021-06-03 08:59:07 +02:00
port.c net: dsa: Don't instantiate phylink for CPU/DSA ports unless needed 2020-03-18 07:17:47 +01:00
slave.c net: dsa: destroy the phylink instance on any error in dsa_slave_phy_setup 2021-09-22 12:26:42 +02:00
switch.c
tag_8021q.c net: dsa: tag_8021q: replace dsa_8021q_remove_header with __skb_vlan_pop 2020-04-01 11:01:34 +02:00
tag_brcm.c net: dsa: Fix duplicate frames flooded by learning 2020-04-01 11:01:33 +02:00
tag_dsa.c
tag_edsa.c dsa: Allow forwarding of redirected IGMP traffic 2020-09-23 12:40:33 +02:00
tag_gswip.c net: dsa: tag_gswip: fix typo in tagger name 2020-01-23 08:22:52 +01:00
tag_ksz.c net: dsa: ksz: Check return value 2022-12-14 11:30:45 +01:00
tag_lan9303.c
tag_mtk.c net: dsa: tag_mtk: fix 802.1ad VLAN egress 2021-03-20 10:39:47 +01:00
tag_qca.c net: dsa: tag_qca: Make sure there is headroom for tag 2020-02-24 08:36:22 +01:00
tag_sja1105.c net: dsa: tag_sja1105: fix MAC DA patching from meta frames 2023-07-27 08:37:24 +02:00
tag_trailer.c