linux/net/dsa
Linus Walleij 0e90dfa7a8 net: dsa: tag_rtl4_a: Fix egress tags
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>
2021-09-01 11:48:05 +01:00
..
dsa2.c net: dsa: track unique bridge numbers across all DSA switch trees 2021-08-23 11:52:31 +01:00
dsa_priv.h net: dsa: don't advertise 'rx-vlan-filter' when not needed 2021-08-24 09:30:58 +01:00
dsa.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00
Kconfig net: dsa: tag_sja1105: be dsa_loop-safe 2021-08-18 10:33:15 +01:00
Makefile net: dsa: build tag_8021q.c as part of DSA core 2021-07-20 06:36:42 -07:00
master.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
port.c net: dsa: don't advertise 'rx-vlan-filter' when not needed 2021-08-24 09:30:58 +01:00
slave.c net: dsa: let drivers state that they need VLAN filtering while standalone 2021-08-24 09:30:58 +01:00
switch.c net: dsa: let drivers state that they need VLAN filtering while standalone 2021-08-24 09:30:58 +01:00
tag_8021q.c net: dsa: tag_8021q: fix notifiers broadcast when they shouldn't, and vice versa 2021-08-16 11:14:18 +01:00
tag_ar9331.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00
tag_brcm.c net: dsa: create a helper for locating EtherType DSA headers on RX 2021-08-11 14:44:58 +01:00
tag_dsa.c net: dsa: create a helper for locating EtherType DSA headers on TX 2021-08-11 14:44:58 +01:00
tag_gswip.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00
tag_hellcreek.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00
tag_ksz.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00
tag_lan9303.c net: dsa: create a helper for locating EtherType DSA headers on TX 2021-08-11 14:44:58 +01:00
tag_mtk.c net: dsa: create a helper for locating EtherType DSA headers on TX 2021-08-11 14:44:58 +01:00
tag_ocelot_8021q.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00
tag_ocelot.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00
tag_qca.c net: dsa: create a helper for locating EtherType DSA headers on TX 2021-08-11 14:44:58 +01:00
tag_rtl4_a.c net: dsa: tag_rtl4_a: Fix egress tags 2021-09-01 11:48:05 +01:00
tag_sja1105.c net: dsa: tag_sja1105: stop asking the sja1105 driver in sja1105_xmit_tpid 2021-08-25 11:14:34 +01:00
tag_trailer.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00
tag_xrs700x.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00