]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
usbnet: ipheth: document scope of NCM implementation
authorFoster Snowhill <forst@pen.gy>
Sat, 25 Jan 2025 23:54:09 +0000 (00:54 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 28 Jan 2025 11:16:32 +0000 (12:16 +0100)
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>
drivers/net/usb/ipheth.c

index 5347cd7e295b3362216ad917a5956db6d9d6ffc6..a19789b571905a36a587528d6f6651c6b35af11d 100644 (file)
@@ -218,6 +218,14 @@ static int ipheth_rcvbulk_callback_legacy(struct urb *urb)
        return ipheth_consume_skb(buf, len, dev);
 }
 
+/* In "NCM mode", the iOS device encapsulates RX (phone->computer) traffic
+ * in NCM Transfer Blocks (similarly to CDC NCM). However, unlike reverse
+ * tethering (handled by the `cdc_ncm` driver), regular tethering is not
+ * compliant with the CDC NCM spec, as the device is missing the necessary
+ * descriptors, and TX (computer->phone) traffic is not encapsulated
+ * at all. Thus `ipheth` implements a very limited subset of the spec with
+ * the sole purpose of parsing RX URBs.
+ */
 static int ipheth_rcvbulk_callback_ncm(struct urb *urb)
 {
        struct usb_cdc_ncm_nth16 *ncmh;