aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2022-09-09 08:28:13 +0200
committerSander Vanheule <sander@svanheule.net>2022-09-09 22:11:55 +0200
commit2ca56028645c305d3d6b2a64b4bc8bbb5aaeebef (patch)
tree95ad03a7dacf18c97c9912673970966e6201dcbf /target/linux
parent2510a587a69101e0f2e7f73a84e1c348e0113d2a (diff)
downloadupstream-2ca56028645c305d3d6b2a64b4bc8bbb5aaeebef.tar.gz
upstream-2ca56028645c305d3d6b2a64b4bc8bbb5aaeebef.tar.bz2
upstream-2ca56028645c305d3d6b2a64b4bc8bbb5aaeebef.zip
realtek: fix RTL839x receive tag decoding
The previous fixup was incomplete, and the offsets for the queue and crc_error cpu_tag bitfields were still wrong on RTL839x. Fixes: 545c6113c93b ("realtek: fix RTL838x receive tag decoding") Suggested-by: Jan Hoffmann <jan@3e8.eu> Signed-off-by: Bjørn Mork <bjorn@mork.no>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c
index d9ade65526..e96c5a7216 100644
--- a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c
@@ -282,9 +282,9 @@ bool rtl839x_decode_tag(struct p_hdr *h, struct dsa_tag *t)
{
/* cpu_tag[0] is reserved. Fields are off-by-one */
t->reason = h->cpu_tag[5] & 0x1f;
- t->queue = (h->cpu_tag[3] & 0xe000) >> 13;
+ t->queue = (h->cpu_tag[4] & 0xe000) >> 13;
t->port = h->cpu_tag[1] & 0x3f;
- t->crc_error = h->cpu_tag[3] & BIT(2);
+ t->crc_error = h->cpu_tag[4] & BIT(6);
pr_debug("Reason: %d\n", t->reason);
if ((t->reason >= 7 && t->reason <= 13) || // NIC_RX_REASON_RMA