Repository navigation
usbnet: ipheth: add CDC NCM support - #15209
Merged
openwrt-bot merged 1 commit intoApr 21, 2024
Merged
Conversation
1 task done
Contributor
Author
Contributor
|
Summarize the changes instead of posting each patch description in the commit message. Maybe something like: |
httpstorm
force-pushed
the
usbnet-ipheth-add-CDC-NCM-support
branch
from
April 20, 2024 09:14
4cfb15d to
1584be9
Compare
Contributor
Author
|
@neheb |
Ansuel
force-pushed
the
usbnet-ipheth-add-CDC-NCM-support
branch
2 times, most recently
from
April 21, 2024 20:50
7e53724 to
7fad44f
Compare
Fixes no communication with tethered iOS devices in CDC NCM mode. Freshly booted iOS devices start in legacy mode, but are put into NCM mode by the official Apple driver. [1] torvalds/linux@a2d274c Fixes: openwrt#12566 Tested-by: Georgi Valkov <[email protected]> Signed-off-by: Foster Snowhill <[email protected]> Signed-off-by: Georgi Valkov <[email protected]> [ better reference fixed issue ] Signed-off-by: Christian Marangi <[email protected]>
Ansuel
force-pushed
the
usbnet-ipheth-add-CDC-NCM-support
branch
from
April 21, 2024 20:50
7fad44f to
680f873
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[PATCH 1/4] usbnet: ipheth: fix risk of NULL pointer deallocation
The cleanup precedure in
ipheth_probewill attempt to free aNULLpointer indev->ctrl_bufif the memory allocation for this buffer is not successful. While kfree ignoresNULLpointers, and the existing code is safe, it is a better design to rearrange the goto labels and avoid this.[PATCH 2/4] usbnet: ipheth: transmit URBs without trailing padding
The behaviour of the official iOS tethering driver on macOS is to not transmit any trailing padding at the end of URBs. This is applicable to both NCM and legacy modes, including older devices.
Adapt the driver to not include trailing padding in TX URBs, matching the behaviour of the official macOS driver.
[PATCH 3/4] usbnet: ipheth: add CDC NCM support
Recent iOS releases support CDC NCM encapsulation on RX. This mode is the default on macOS and Windows. In this mode, an iOS device may include one or more Ethernet frames inside a single URB.
Freshly booted iOS devices start in legacy mode, but are put into NCM mode by the official Apple driver. When reconnecting such a device from a macOS/Windows machine to a Linux host, the device stays in NCM mode, making it unusable with the legacy
iphethdriver code.To correctly support such a device, the driver has to either support the NCM mode too, or put the device back into legacy mode.
To match the behaviour of the macOS/Windows driver, and since there is no documented control command to revert to legacy mode, implement NCM support. The device is attempted to be put into NCM mode by default, and falls back to legacy mode if the attempt fails.
[PATCH 4/4] usbnet: ipheth: update Kconfig description
This module has for a long time not been limited to iPhone <= 3GS. Update description to match the actual state of the driver.
Remove dead link from 2010, instead reference an existing userspace iOS device pairing implementation as part of libimobiledevice.
Tested on: WRT3200ACM, TL-WR1043ND.
Fixes: #12566 ipv4 tethering not working with iPhone 14 pro max with nanoPI r1