realtek: fix RTL838x receive tag decoding
authorBjørn Mork <bjorn@mork.no>
Thu, 8 Sep 2022 17:35:34 +0000 (19:35 +0200)
committerSander Vanheule <sander@svanheule.net>
Thu, 8 Sep 2022 20:29:10 +0000 (22:29 +0200)
commit47ba7cdfc34d1fde837a5840c009dafa2fba377b
treec5e4875d7acf55cdfc9dce1eeb625725eca7807c
parentda7b26dfb86a4ad3e1f09ec787e914799508c749
realtek: fix RTL838x receive tag decoding

Commit dc9cc0d3e2a1 ("realtek: add QoS and rate control") replaced a
16 bit reserved field in the RTL83xx packet header with the initial
cpu_tag word, shifting the real cpu_tag fields by one.  Adjusting for
this new shift was partially forgotten in the new RX tag decoders.

This caused the switch to block IGMP, effectively blocking IPv4
multicast.

The bug was partially fixed by commit 9d847244d9fd ("realtek: fix
RTL839X receive tag decoding")

Fix on RTL838x too, including correct NIC_RX_REASON_SPECIAL_TRAP value.

Suggested-by: Jan Hoffmann <jan@3e8.eu>
Fixes: dc9cc0d3e2a1 ("realtek: add QoS and rate control")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
(cherry picked from commit 545c6113c93bbf7de1b0e515141a4565f7e6cece)
target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c