linux-snapdragon/net/dsa
Linus Walleij e67dcd6556 net: dsa: tag_rtl4_a: Fix egress tags
[ Upstream commit 0e90dfa7a8d817db755c7b5d89d77b9c485e4180 ]

I noticed that only port 0 worked on the RTL8366RB since we
started to use custom tags.

It turns out that the format of egress custom tags is actually
different from ingress custom tags. While the lower bits just
contain the port number in ingress tags, egress tags need to
indicate destination port by setting the bit for the
corresponding port.

It was working on port 0 because port 0 added 0x00 as port
number in the lower bits, and if you do this the packet appears
at all ports, including the intended port. Ooops.

Fix this and all ports work again. Use the define for shifting
the "type A" into place while we're at it.

Tested on the D-Link DIR-685 by sending traffic to each of
the ports in turn. It works.

Fixes: 86dd9868b8 ("net: dsa: tag_rtl4_a: Support also egress tags")
Cc: DENG Qingfang <dqfext@gmail.com>
Cc: Mauri Sandberg <sandberg@mailfence.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-22 12:39:30 +02:00
..
dsa2.c net: dsa: flush switchdev workqueue before tearing down CPU/DSA ports 2021-09-22 12:39:24 +02:00
dsa_priv.h net: dsa: flush switchdev workqueue before tearing down CPU/DSA ports 2021-09-22 12:39:24 +02:00
dsa.c net: dsa: flush switchdev workqueue before tearing down CPU/DSA ports 2021-09-22 12:39:24 +02:00
Kconfig net: dsa: tag_sja1105: optionally build as module when switch driver is module if PTP is enabled 2021-09-15 10:02:18 +02:00
Makefile net: dsa: build tag_8021q.c as part of DSA core 2021-09-15 10:02:18 +02:00
master.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
port.c net: dsa: don't disable multicast flooding to the CPU even without an IGMP querier 2021-09-15 10:02:19 +02:00
slave.c net: dsa: destroy the phylink instance on any error in dsa_slave_phy_setup 2021-09-22 12:39:21 +02:00
switch.c net: dsa: properly check for the bridge_leave methods in dsa_switch_bridge_leave() 2021-07-13 14:47:10 -07:00
tag_8021q.c net: dsa: build tag_8021q.c as part of DSA core 2021-09-15 10:02:18 +02:00
tag_ar9331.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_brcm.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_dsa.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_gswip.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_hellcreek.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_ksz.c net: dsa: tag_ksz: dont let the hardware process the layer 4 checksum 2021-07-21 23:14:49 -07:00
tag_lan9303.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_mtk.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_ocelot_8021q.c net: dsa: tag_8021q: refactor RX VLAN parsing into a dedicated function 2021-06-11 12:45:38 -07:00
tag_ocelot.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_qca.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_rtl4_a.c net: dsa: tag_rtl4_a: Fix egress tags 2021-09-22 12:39:30 +02:00
tag_sja1105.c net: dsa: sja1105: implement TX timestamping for SJA1110 2021-06-11 12:45:38 -07:00
tag_trailer.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_xrs700x.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00