The AX88179A-Chip family supports reception of the FCS
at the host. This is configured by enabling the AX_RX_CTL_DROPCRCERR
flag in the USB-adapters RX-controls. For AX88279-based adapters,
the flag has already been always set in order to receive
complete frames, however, the FCS is not necessarily usable, as it
is only part of the transferred up-to 8-byte padding area, and for
some frame-lengths only 2 of the 4 bytes of the FCS are transferred
to the host.
Note, that the AX_RX_CTL_DROPCRCERR flag has no influence on dropping
of corrupt frames already by the USB adapter, even corrupt frames
are always transferred to the host.
Add Add NETIF_F_RXFCS and NETIF_F_RXALL features for
the AX88179A and take a trailing FCS into account for MTU
verification when checking packet length in rx_fixup().
Also add code rx_fixup() in order to Count dropped packets and those
with incorrect checksum.
Suggested-by: Benjamin Larsson <benj…@genexis.eu>
Signed-off-by: Birger Koblitz <ma…@birger-koblitz.de>
---
Changes in v3:
- In ax88179_set_multicast() make sure the behaviour for the older
AX88179 devices is not changed
- Improve error checking in set_features()
- Improve lower packet length check to take FCS into account
- Link to v2: https://lore.kernel.org/r/2026…@birger-koblitz.de
Changes in v2:
- Do not clobber rxctl in ax88179_set_multicast(): read and update it
- Use netdev_features_t for features in rx_fixup()
- Do not include FCS trailer when NETIF_F_RXFCS not set
- Count rx_errors together with crc_errors as per definition
- Link to v1: https://lore.kernel.org/r/2026…@birger-koblitz.de
---
Birger Koblitz (2):
net: usb: ax88179: Make receiving FCS on AX88179A configurable
net: usb: ax88179: Support NETIF_F_RXFCS and NETIF_F_RXALL on AX88179A
drivers/net/usb/ax88179_lib.c | 14 +++++++---
drivers/net/usb/ax88179a_devices.c | 52 +++++++++++++++++++++++++++++++++-----
2 files changed, 57 insertions(+), 9 deletions(-)
---
base-commit: eb6d6c80d35449c27471b1874f13066c09a8964d
change-id: 20261126-fcs-afccb4a76dd1
Best regards,
--
Birger Koblitz <ma…@birger-koblitz.de>