From f688218baa7128a1ef3f8377679fc5fcbc22fa2e Mon Sep 17 00:00:00 2001 From: Rokas Juras Date: Mon, 5 Oct 2026 10:48:52 +0300 Subject: rndis_host: enable RX aggregation for OnePlus Nord CE 2 USB tethering on the OnePlus Nord CE 2 (IV2201, USB ID 22d9:2766) running Android 13 has download speeds of approximately 2mbps with the default 2048-byte receive limit. The phone's published RNDIS code only enables packet batching when the computer reports a receive limit above 2048 bytes. Testing shows that increasing this limit to 2560 bytes restores normal speeds. Add a quirk for USB device 22d9:2766 to use and advertise a receive buffer of at least 16 KiB. This fits the phone code's default batch of ten packets at a 1500-byte MTU. Tested on 7.3.0-rc5 with the affected phone, including reconnecting USB tethering. Download speeds with the change exceed 100mpbs. Link: https://github.com/OnePlusOSS/android_kernel_oneplus_mt6877/blob/3c1e3d432d0c35afa7fded974b50fa6617219e0f/drivers/usb/gadget/function/f_rndis.c#L538-L551 Link: https://github.com/OnePlusOSS/android_kernel_oneplus_mt6877/blob/3c1e3d432d0c35afa7fded974b50fa6617219e0f/drivers/usb/gadget/function/u_ether.c#L869-L874 Signed-off-by: Rokas Juras Link: https://patch.msgid.link/20261005074852.76818-1-asrokasjuras@gmail.com Signed-off-by: Jakub Kicinski --- include/linux/usb/rndis_host.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h index 489cfb1d00f6..3eaf57a9b282 100644 --- a/include/linux/usb/rndis_host.h +++ b/include/linux/usb/rndis_host.h @@ -182,8 +182,9 @@ struct rndis_keepalive_c { /* IN (optionally OUT) */ #define FLAG_RNDIS_PHYM_WIRELESS 0x0002 /* Flags for driver_info::data */ -#define RNDIS_DRIVER_DATA_POLL_STATUS 1 /* poll status before control */ -#define RNDIS_DRIVER_DATA_DST_MAC_FIXUP 2 /* device ignores configured MAC address */ +#define RNDIS_DRIVER_DATA_POLL_STATUS 1 /* poll status before control */ +#define RNDIS_DRIVER_DATA_DST_MAC_FIXUP 2 /* device ignores configured MAC address */ +#define RNDIS_DRIVER_DATA_RX_AGGREGATION 4 /* needs RX limit > 2048 */ extern void rndis_status(struct usbnet *dev, struct urb *urb); extern int -- cgit v1.2.3