Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usbnet: ipheth: document scope of NCM implementation

Clarify that the "NCM" implementation in `ipheth` is very limited, as
iOS devices aren't compatible with the CDC NCM specification in regular
tethering mode.

For a standards-compliant implementation, one shall turn to
the `cdc_ncm` module.

Cc: stable@vger.kernel.org # 6.5.x
Signed-off-by: Foster Snowhill <forst@pen.gy>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Foster Snowhill and committed by
Paolo Abeni
be154b59 ee591f2b

+8
+8
drivers/net/usb/ipheth.c
··· 218 218 return ipheth_consume_skb(buf, len, dev); 219 219 } 220 220 221 + /* In "NCM mode", the iOS device encapsulates RX (phone->computer) traffic 222 + * in NCM Transfer Blocks (similarly to CDC NCM). However, unlike reverse 223 + * tethering (handled by the `cdc_ncm` driver), regular tethering is not 224 + * compliant with the CDC NCM spec, as the device is missing the necessary 225 + * descriptors, and TX (computer->phone) traffic is not encapsulated 226 + * at all. Thus `ipheth` implements a very limited subset of the spec with 227 + * the sole purpose of parsing RX URBs. 228 + */ 221 229 static int ipheth_rcvbulk_callback_ncm(struct urb *urb) 222 230 { 223 231 struct usb_cdc_ncm_nth16 *ncmh;