realtek: Fix buffer length calculation on RTL8380 with CRC offload
authorBirger Koblitz <mail@birger-koblitz.de>
Sun, 6 Jun 2021 14:20:59 +0000 (16:20 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 22 Jun 2021 21:23:00 +0000 (23:23 +0200)
commit76428494c323d0bb6572f9a2d247092b322fa221
tree7e65f5834a0d9340624aab2691247884ec183375
parentbf98faaac8ed24cf7d3d93dd4fcd7304d109363b
realtek: Fix buffer length calculation on RTL8380 with CRC offload

Fixes the buffer and packet length calculations for Ethernet TX on
the RTL8380 SoC when CRC calculation offload is enabled.
CRC-offload is always done by the SoC, but additional CRC
calculation was previously done also by the kernel.
It also fixes detection of the DSA tag for packets on RTL8390
SoCs for ports > 28.

v2 has correct whitespace

Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
target/linux/realtek/files-5.4/drivers/net/ethernet/rtl838x_eth.c