Re: [PATCH] usb: gadget: legacy: ether: fix RNDIS for Windows hosts

From: Greg KH

Date: Fri Oct 30 2026 - 07:17:59 EST


On Fri, Oct 30, 2026 at 10:17:06AM +0100, amine-ayaou@xxxxxxxxxxx wrote:
> From: Amine Ayaou <amine-ayaou@xxxxxxxxxxx>
>
> Fix RNDIS for Windows hosts by adding Microsoft OS 1.0
> descriptor that allows Windows to identify the RNDIS function.

No, please no.

RNDIS should NEVER be used, it's not required by any shipping OS that I
know of these days, do you?

Why do you want this? And are you really still using the "legacy" USB
gadget drivers? If so, why? What is preventing you from using the
"new" ones?

I ask as we are about to delete these legacy drivers and I don't want to
have anyone add new features to them.

> g_ether currently advertises its RNDIS configuration using
> the legacy NetChip VID/PID and the RNDIS control interface
> class, subclass and protocol values provided by f_rndis
> (02/02/FF).
>
> While the Linux rndis_host driver still recognizes the legacy
> 02/02/FF RNDIS interface descriptors, modern Windows hosts
> do not bind the RNDIS driver to g_ether.

modern Windows hosts know that rndis is a lame protocol and should never
be used :)

Seriously, it's a broken one, there is no security for it and it's only
good for very very old desktop systems that never were updated to a
modern operating system. And even then I would argue it shouldn't be
used.

> Notes:
> g_ether's RNDIS is useful when a network interface via USB
> is needed early during boot, before a filesystem is available
> (e.g., nfsroot).

useful for which side? What can you do with this "during boot"? And
you are connecting to a nfs windows server with it?

> Alternatives for having a network interface via USB during
> boot are configfs and g_ncm.

YEs.

> Configuring the gadget through configfs requires userspace,
> which is unavailable before mounting the NFS root when
> no initramfs is used.

Then use an initramfs :)

> NCM (g_ncm) is not an option on hosts that only provide
> RNDIS support.

What hosts exactly are that? And why would you connect to them?

> Tested on BeagleBone Black with a Windows 11 host
> (Version 10.0.26200, Build 26200)
> RNDIS automatically bound with the patch.

And did your nfs server on that host work properly?

Sorry for the rant, but I really want to delete this stuff as it should
never be used anymore...

thanks,

greg k-h