2023-05-11 10:22:08

by Georgi Valkov

[permalink] [raw]
Subject: net: usb: ipheth: add CDC NCM support






Attachments:
0001-net-usb-ipheth-add-CDC-NCM-support-PoC.patch (9.95 kB)

2023-05-11 12:10:32

by Forst

[permalink] [raw]
Subject: Re: net: usb: ipheth: add CDC NCM support

Hello,

> I added the author Foster Snowhill to this mail, as well as a link to his Github [1].
> If needed, we can ask him to add the tag Signed-off-by:

I do not mind my patch being reviewed and included in Linux kernel if it is deemed of good quality. I would like to point out that I wrote it for personal use and may have cut some corners, so I likely missed some places when it comes to code style and data validation. The latter is important from a security standpoint, so extra attention to that would be appreciated.

If I need to resubmit it myself, and maybe to a different mailing list, please advise on the appropriate procedure.

Thank you!

/ Foster

2023-05-11 13:09:36

by Jan Kiszka

[permalink] [raw]
Subject: Re: net: usb: ipheth: add CDC NCM support

On 11.05.23 14:02, Forst wrote:
> Hello,
>
>> I added the author Foster Snowhill to this mail, as well as a link to his Github [1].
>> If needed, we can ask him to add the tag Signed-off-by:
>
> I do not mind my patch being reviewed and included in Linux kernel if it is deemed of good quality. I would like to point out that I wrote it for personal use and may have cut some corners, so I likely missed some places when it comes to code style and data validation. The latter is important from a security standpoint, so extra attention to that would be appreciated.
>
> If I need to resubmit it myself, and maybe to a different mailing list, please advise on the appropriate procedure.
>

Sending it inline would be needed, and your signed-off. Regarding style,
use scripts/checkpatch.pl, regarding where to send it to,
scripts/get_maintainer.pl.

Thanks,
Jan

--
Siemens AG, Technology
Competence Center Embedded Linux


2023-05-11 14:49:19

by Jakub Kicinski

[permalink] [raw]
Subject: Re: net: usb: ipheth: add CDC NCM support

On Thu, 11 May 2023 12:47:56 +0300 Georgi Valkov wrote:
> Can you please review, and accept the following patch. I’ve been using it for one year.
> I added the author Foster Snowhill to this mail, as well as a link to his Github [1].
> If needed, we can ask him to add the tag Signed-off-by:
>
>
> From 257d843a7f90e4e519635f82fe5b73fba918ec33 Mon Sep 17 00:00:00 2001
> From: Foster Snowhill <[email protected]>
> Date: Fri, 22 Apr 2022 23:50:09 +0200
> Subject: [PATCH] net: usb: ipheth: add CDC NCM support (PoC)
>
> Recent iOS releases support CDC NCM encapsulation on RX. This mode is
> the default on macOS and Windows.
>
> When reconnecting a device from a macOS/Windows machine to a Linux
> machine, the device stays in NCM mode. Therefore to correctly support
> such a device, the driver has to either support the NCM mode too, or
> somehow put the device back into legacy mode.
>
> To match the behaviour of the macOS/Windows driver, and since there
> are no documented control commands to revert to legacy mode, I chose
> to implement basic NCM support.
>
> With this change, the device is attempted to be put into NCM mode by
> default, and falls back to legacy mode if said attempt failed.
>
> Tested-by: Georgi Valkov <[email protected]>

Take a look at submitting patches, the best way to send a change is
with git send-mail. And make sure you CC the right lists
(./scripts/get_maintainer.pl)