🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #27137

[PATCH net-next v4 0/2] net: usb: ax88179: Support NETIF_F_RXFCS and NETIF_F_RXALL on AX88179A

#27137
From: Birger Koblitz
Date: Fri, 04 Dec 2026 21:21
61 lines
12403 bytes
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 <benjamin.larsson@genexis.eu>
Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
---
Changes in v4:
- Add locking for changes in rxctl
- Include read-modify-write changes to rxctl in commit message
- Add comment to explain AX_RX_CTL_DROPCRCERR behaviour
- Link to v3: https://lore.kernel.org/r/20261201-fcs-v3-0-6c355917b17e@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/20261129-fcs-v2-0-f60d6b105a15@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/20261127-fcs-v1-0-0c4ede015bf5@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      | 18 +++++++++---
 drivers/net/usb/ax88179_lib.h      |  1 +
 drivers/net/usb/ax88179a_devices.c | 56 ++++++++++++++++++++++++++++++++++----
 3 files changed, 65 insertions(+), 10 deletions(-)
---
base-commit: eb6d6c80d35449c27471b1874f13066c09a8964d
change-id: 20261126-fcs-afccb4a76dd1

Best regards,
-- 
Birger Koblitz <mail@birger-koblitz.de>
Technical Details
Message-ID: <20261204-fcs-v4-0-32773b612c81@birger-koblitz.de>
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377638-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377638-linux-kernel-netdev=dewy.ru
From: mail@birger-koblitz.de (Birger Koblitz)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net-next v4 0/2] net: usb: ax88179: Support NETIF_F_RXFCS
 and NETIF_F_RXALL on AX88179A
Date: Fri, 04 Dec 2026 22:21:42 +0100
Organization: Usenet Network
Message-ID: <20261204-fcs-v4-0-32773b612c81@birger-koblitz.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="2871226"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:nH9twpwInSUDa6URpbAfa0p/8RQ= sha256:6W2Qe+5JB1NU5Q6S/tO5QICNcyfTXi5m2FuC8UIb+YU=
	sha1:GT14E1A/txmevNRAVkkVtyJJv44= sha256:1J1L/HHIB72ZlEjUHcQhHhgGuYhk9dg6tPw0sg0+Eds=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id CF4F5117CEB; Sat,  5 Dec 2026 00:22:28 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.297
X-Spam-Status: No, score=-2.297 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, TVD_PH_BODY_ACCOUNTS_PRE=0.001, URIBL_BLOCKED=0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=birger-koblitz.de header.b=JYDSTh1m; dkim=pass (2048-bit key)
	header.d=birger-koblitz.de header.b=dZwmbhBY
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id WQVDLHVLxPQe;
	Sat,  5 Dec 2026 00:22:25 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-377638-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=birger-koblitz.de
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 968BE117CDC; Sat,  5 Dec 2026 00:22:09 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 4A8AE29872; Fri,  4 Dec 2026 21:22:07 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail;
	t=1796419325;
	b=Iks8DLsTngJahZRxH8w5PB27CmQb/llMKtYi2d+4Y6DMeO783rDStsDy2C0bemfSshBn
	 1+b3LjMvEoXaMSuleelt4NvC978W/a7Yo60srAfCj3QcHOc8g1cKlC2XyE1/K0bLySEZt
	 3k9GrgNTqCW13B+gpUnrTkN6pIX0CaX5fA/QceZtEkypiJtBU+NdnvLdqGPEpWVa7k1fm
	 HJcJomHLF0Nqj2GoD6LfT3/FFTA6/7CwkR/j+u9CNqwgUKpcZoGZrQE3IOPyXMecvf0AS
	 U1CLeEp+5aNfbWFo4z3todIjkJh6vGs/xubIj+nmt38aIcun0IweG39KqXV36LXpVYA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796419325;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:
	 X-Spam-Level:DKIM-Signature:Received:From:Subject:Date:Message-Id:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type:
	 Content-Transfer-Encoding:X-B4-Tracking:X-Change-ID:To:Cc:X-Mailer;
	bh=nANbeKOcVtSeC2B+moy65b2aXfYcdljnJRt6SUvsv30=;
	b=jvPiEkqnvxi6pCo/VeCoi9D1WlEV9MXm/VKYqwbufFMmIBXEFZZQRIjoxq4YDNcGm7jP
	 ARmu+NpsyAYsRbxw8JGj2CeIrZsKt2d4SN80Q19oAbDrRnDqcvlhgWJWKKykfgv7AjCD8
	 FoaDbu/m98B0bEyc0qrSfPYb2d8oPL0kLwnptqRgzmNrFJ/mO8TKyoyWxMXU6UiT5JSmL
	 oYaycTdZ8OeBlBzMnKgLEN0RrySAGVTbnNONt5w2vRn+rRGflYPtwemsdH0ky6+O4L0LX
	 dgbvWRtL01lu/EkEAKxYdQsapDliSUBVOEjFEfs/sc0nD8gUlghes33zpyznZoDqVOA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=birger-koblitz.de header.i=@birger-koblitz.de header.a=rsa-sha256 header.s=default header.b=JYDSTh1m;
	dkim=pass header.d=birger-koblitz.de header.i=@birger-koblitz.de header.a=rsa-sha256 header.s=default header.b=dZwmbhBY;
	dmarc=none header.from=birger-koblitz.de;
	spf=pass smtp.mailfrom=birger-koblitz.de;
	arc=fail smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 45446606A683;
	Fri,  4 Dec 2026 21:22:05 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=birger-koblitz.de header.i=@birger-koblitz.de header.a=rsa-sha256 header.s=default header.b=JYDSTh1m;
	dkim=pass (2048-bit key) header.d=birger-koblitz.de header.i=@birger-koblitz.de header.a=rsa-sha256 header.s=default header.b=dZwmbhBY
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=23.88.97.239
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796419324;
	b=CVyaQG0aaaVWHR2xJSgYGXWTDQKP3uNCJOUrwY1kENaqCgp8Y01wIWJpcWhG+u/hAPsj
	 cZIWgmMq3EawlGuySLj7wkaCVQpOcntn12atsFHDEGK12N7auHE6nLUWXKh9AK6y/JtGd
	 H/hmSk5EF2H8iZFekntW2ocPItZ32noe9aC5Hy+yaIy2qyvhrFyHjLg17Z2FHpaYVxTl8
	 lAbyI5T812ALucJW2G+z0ctTxgFG+XhtXjlk/yVOM8WF9hGuJnaQ/ZvDErQCxgd7gHA9r
	 Fczcyx11DXkJd5z4M68xR/m9JxWTT2QGOoX1WY+uInHqXdJsoiMQY8mVJhveeTtCh7w==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796419324;
	h=DMARC-Filter:DKIM-Signature:Received:X-Spam-Checker-Version:
	 X-Spam-Level:X-Spam-Status:DKIM-Signature:Received:From:Subject:Date:
	 Message-Id:MIME-Version:Content-Type:Content-Transfer-Encoding:
	 X-B4-Tracking:X-Change-ID:To:Cc:X-Mailer;
	bh=nANbeKOcVtSeC2B+moy65b2aXfYcdljnJRt6SUvsv30=;
	b=aT15+hOnhb3CUZ2uyEefNMn9qvLEKR90VI5ewH49J1mYdFz8az5F0i78m+KM1HBjTIAK
	 GNS5xa/VN6zJ8eYOgXcTvpypT6vDaJyhBmq0Ej1+Imlk89vruBhazJDNho3esBEJUmQvx
	 KrFmE8ap+4wVHP8FhPhGAiYXLtfJAoy5+nacOQehN7XMffTnhY0JiBkbGDXcqoLrm//hw
	 yHoyXXXSnpNz/cIku0NAi2Kguf1vFObubj/l/PuILB3xPyn/961ChFRdF8AWezQGxxzX0
	 kOAOPzk0J6ya19drnP2mBc/JWP5AWFJWLC29k/WYVByp6TO16i/i6LkSZppnJNHRAFg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=birger-koblitz.de;
	spf=pass smtp.mailfrom=birger-koblitz.de;
	dkim=pass header.d=birger-koblitz.de header.i=@birger-koblitz.de header.a=rsa-sha256 header.s=default header.b=JYDSTh1m;
	dkim=pass header.d=birger-koblitz.de header.i=@birger-koblitz.de header.a=rsa-sha256 header.s=default header.b=dZwmbhBY;
	arc=none smtp.remote-ip=23.88.97.239
X-Received: from bkemail.birger-koblitz.de (bkemail.birger-koblitz.de [23.88.97.239])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id E610C606A32D;
	Fri,  4 Dec 2026 21:22:03 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E610C606A32D
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=birger-koblitz.de
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=birger-koblitz.de
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=birger-koblitz.de;
	s=default; t=1796419322;
	bh=MaDubI9WCfIfCCqoT+QTF30BsSQJyEZ3iG4H1cVKu+s=;
	h=From:Subject:Date:To:Cc:From;
	b=JYDSTh1mzNv3d8dkYCIU8x2Y9kmF4JmgB75rpIjzzJ+U/LgUfnc/krr2lQFLAEu7p
	 984nc3LiiFxvKNjFUUn25guFV75MM90GlREYcCscFdiezYClIWA4Y/+la1JtUfHv/n
	 ohlOA614vK1QSwS59ns0AO+njdhHXiEt8NUkgDEeDYwQv5VKiXOZgoLDK3yv7dMJKv
	 sYCMN3aRavAblB7LPdsqrXd9/Pb1y+cRlxwcFg+ViBxD+MCLnjvRaWRek+meZFZn38
	 r/ICGxTLaPAtvBjQNMAsvodEM2Oxi4EANQGKSpk4bBuE0srVuE98e3Zy1dPWvDrdrA
	 5EpjB0NvavFhA==
X-Received: by bkemail.birger-koblitz.de (Postfix, from userid 109)
	id 5D30C4A2B4; Fri,  4 Dec 2026 21:22:02 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=birger-koblitz.de;
	s=default; t=1796419320;
	bh=MaDubI9WCfIfCCqoT+QTF30BsSQJyEZ3iG4H1cVKu+s=;
	h=From:Subject:Date:To:Cc:From;
	b=dZwmbhBYqy+uDLIzrD3Uc2vLaq1tNjV9ybeaQ8Likbjbww0ObY19n0XoaIgrRhXzL
	 Zh9gUIBXBK6GbdnDjm+O48apUa943hCyCzlOEXxnO+Co1HQeJiqyMtLjylVxODJc4l
	 lal5w8A9qurFRBJDZuiGCufoYEP3wNdzFEUIO993G6jtWqxHREtKR6wRvMOsiFL1lN
	 GxEacy8Q8juTpdiHC9SpKcK9/5/RP/sflTV/03azvktxK/8uP8fo155Ef0Ubw9UB75
	 bX2WD787GDuhXUb4r+/HyjIFWZi9zi5TpiKcL2tyM6nijzhoztRVrW4RBQcRffLIGA
	 4hg59wm3dqhBg==
X-Received: from AMDDesktop.lan (unknown [IPv6:2a00:6020:47a3:e800:271c:c6c5:9fde:77cb])
	by bkemail.birger-koblitz.de (Postfix) with ESMTPSA id C09D14A2AF;
	Fri,  4 Dec 2026 21:22:00 +0000 (UTC)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-B4-Tracking: v=1; b=H4sIAOYuE2sC/3XMTQ7CIBCG4as0rMUwtEB05T2MC36GlmhaA01Tb
 Xp3CTXRhS4n3zzvQhLGgIkcq4VEnEIKQ5+PZlcR2+m+RRpcvglnXAJwSb1NVHtrTaOVdA5I/rx
 H9GEulTPpcaQ9ziO55KULaRzio+QnKPu7pEppAsoosw06ZCCMFycTYouRXgdzC+Nz77B0Jv5tD
 5vl2XrJnDTAhIa/tv5YzmCzdbbS1kIcQBlQ+Muu6/oCud53+iABAAA=
X-Change-ID: 20261126-fcs-afccb4a76dd1
X-Cc: netdev@vger.kernel.org, linux-usb@vger.kernel.org, 
 Benjamin Larsson <benjamin.larsson@genexis.eu>, 
 Birger Koblitz <mail@birger-koblitz.de>
X-Mailer: b4 0.14.2