All of lore.kernel.org
 help / color / mirror / Atom feed
From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: Legacy configuration for NCM/RNDIS does not work for Win >= 10
Date: Thu, 16 Mar 2023 11:56:49 +0100	[thread overview]
Message-ID: <ZBL18fPCgckibrcg@kroah.com> (raw)
In-Reply-To: <7d2287ea03069b702b8da2157f8148b820de4446.camel@infinera.com>

On Tue, Mar 14, 2023 at 01:19:25PM +0000, Joakim Tjernlund wrote:
> On Fri, 2023-03-10 at 13:27 +0100, Joakim Tjernlund wrote:
> > On Fri, 2023-03-10 at 10:55 +0100, gregkh@linuxfoundation.org wrote:
> > > On Fri, Mar 10, 2023 at 09:44:26AM +0000, Joakim Tjernlund wrote:
> > > > The old RNDIS/NCM configs does not work against modern Windows. I wonder if there
> > > > should/could be updated to working state ?
> > > 
> > > Please never use RNDIS on modern systems unless you fully trust the
> > > "other side" of the connection as it is not a secure protocol by any
> > > means.
> > 
> > Yes, we will move to NCM (new in >= Windows 10)
> > 
> > > 
> > > NCM should "just work" instead.  What exactly is failing, and what
> > > specifically do you mean by "modern Windows"?
> > 
> > NCM does not just work on Windows >= 10 it needs configfs settings:
> > 
> > NCM snipped:
> > 	echo 1       > os_desc/use
> > 	echo 0xbc    > os_desc/b_vendor_code
> > 	echo MSFT100 > os_desc/qw_sign
> > 
> > 	mkdir functions/ncm.usb0
> > 	mkdir -p functions/ncm.usb0/os_desc/interface.ncm
> >     #Set compatible id so that Windows 10 can match this function to
> >     # NCM driver more easily.
> > 	echo WINNCM   > functions/ncm.usb0/os_desc/interface.ncm/compatible_id
> > 
> > 	mkdir -p configs/c.1
> > 	mkdir -p configs/c.1/strings/0x409
> > 	echo "conf1" > configs/c.1/strings/0x409/configuration
> > 	ln -s functions/ncm.usb0 configs/c.1
> > 	if [ ! -L os_desc/c.1 ]
> > 	then
> > 		 ln -s configs/c.1 os_desc
> > 	fi
> > 
> > New RNDIS in Windows >= 10
> > 	echo 1       > os_desc/use
> > 	echo 0xbc    > os_desc/b_vendor_code
> > 	echo MSFT100 > os_desc/qw_sign
> > 
> > 	mkdir functions/rndis.usb0
> > 	mkdir -p functions/rndis.usb0/os_desc/interface.rndis
> > 
> > 	#Set compatible / sub-compatible id's so that Windows can match this
> >     # function to RNDIS6 driver more easily.
> > 	echo RNDIS   > functions/rndis.usb0/os_desc/interface.rndis/compatible_id
> > 	echo 5162001 > functions/rndis.usb0/os_desc/interface.rndis/sub_compatible_id
> > 
> > 	mkdir -p configs/c.1
> > 	mkdir -p configs/c.1/strings/0x409
> > 	echo "conf1" > configs/c.1/strings/0x409/configuration
> > 	ln -s functions/rndis.usb0 configs/c.1
> > 	if [ ! -L os_desc/c.1 ]
> > 	then
> > 	 	ln -s configs/c.1 os_desc
> 
> 
> Did this make any sense to you ? The old legacy/builtin configs does not do any of this.

Sorry, I do not have any Windows machines to test with so I really do
not know.  If you think the defaults are currently wrong, please submit
a patch to fix them up.

thanks,

greg k-h

  reply	other threads:[~2023-03-16 10:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10  9:44 Legacy configuration for NCM/RNDIS does not work for Win >= 10 Joakim Tjernlund
2023-03-10  9:55 ` gregkh
2023-03-10 12:27   ` Joakim Tjernlund
2023-03-14 13:19     ` Joakim Tjernlund
2023-03-16 10:56       ` gregkh [this message]
2023-03-16 11:19         ` Joakim Tjernlund

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=ZBL18fPCgckibrcg@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Joakim.Tjernlund@infinera.com \
    --cc=linux-usb@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.