Linux USB
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: amine-ayaou@hotmail.com
Cc: nkapron@google.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: legacy: ether: fix RNDIS for Windows hosts
Date: Fri, 30 Oct 2026 12:13:58 +0100	[thread overview]
Message-ID: <2026103022-skeptic-deskbound-3471@gregkh> (raw)
In-Reply-To: <MRVP191MB2786AD66C3EAB9F32E5B84F9EF6D2@MRVP191MB2786.EURP191.PROD.OUTLOOK.COM>

On Fri, Oct 30, 2026 at 10:17:06AM +0100, amine-ayaou@hotmail.com wrote:
> From: Amine Ayaou <amine-ayaou@hotmail.com>
> 
> 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

      parent reply	other threads:[~2026-10-30 11:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30  9:17 [PATCH] usb: gadget: legacy: ether: fix RNDIS for Windows hosts amine-ayaou
2026-10-30  9:27 ` sashiko-bot
2026-10-30 11:13 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2026103022-skeptic-deskbound-3471@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=amine-ayaou@hotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nkapron@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox