realtek: fix egress L2 learning on rtl839x
authorSander Vanheule <sander@svanheule.net>
Tue, 28 Jun 2022 19:15:00 +0000 (21:15 +0200)
committerSander Vanheule <sander@svanheule.net>
Sun, 17 Jul 2022 08:06:40 +0000 (10:06 +0200)
commitd6165ea75baea4f9039f3a378d55219c74b932a7
tree44791ab394c4b1af454eb02578801abc8dcf7406
parentd9516cacb087fed7716b34b1e02ce956bb6c27f1
realtek: fix egress L2 learning on rtl839x

The flag to enable L2 address learning on egress frames is in CPU header
bit 40, with bit 0 being the leftmost bit of the header. This
corresponds to BIT(7) in the third 16-bit value of the header.

Correctly set L2LEARNING by fixing the off-by-one error.

Fixes: 9eab76c84e31 ("realtek: Improve TX CPU-Tag usage")
Tested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c