Skip to content

Commit

Permalink
usbnet: ipheth: document scope of NCM implementation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Foster Snowhill authored and Paolo Abeni committed Jan 28, 2025
1 parent ee591f2 commit be154b5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/net/usb/ipheth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit be154b5

Please sign in to comment.