android_kernel_xiaomi_sm8350/net/dsa
Vladimir Oltean 58b1b3c54e net: dsa: tag_sja1105: fix MAC DA patching from meta frames
[ Upstream commit 1dcf6efd5f0c1f4496b3ef7ec5a7db104a53b38c ]

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
..
dsa2.c
dsa_priv.h
dsa.c net: dsa: add GRO support via gro_cells 2021-03-11 14:06:48 +01:00
Kconfig
Makefile
master.c
port.c
slave.c
switch.c net: dsa: program VLAN on CPU port from slave 2019-08-27 20:17:28 -07:00
tag_8021q.c
tag_brcm.c
tag_dsa.c
tag_edsa.c
tag_gswip.c
tag_ksz.c
tag_lan9303.c
tag_mtk.c
tag_qca.c
tag_sja1105.c
tag_trailer.c