ref: 9cd55a085de274abb937a2d586b3d0a4e4d0e1b1
parent: 0e3a955652d4065e18197fffb5b5421308b92a47
author: cinap_lenrek <[email protected]>
date: Wed Feb 23 12:59:13 EST 2022
nusb/ether: remove csp check for rndis, already done in nusbrc
--- a/sys/src/9/boot/nusbrc
+++ b/sys/src/9/boot/nusbrc
@@ -33,7 +33,7 @@
switch($4){
case *03
nusb/kb $id
- case ff0202 0104ef
+ case ff0202 0104ef 0301e0
nusb/ether -t rndis $etherargs $id
case *02
# CDC ethernet
--- a/sys/src/cmd/nusb/ether/rndis.c
+++ b/sys/src/cmd/nusb/ether/rndis.c
@@ -111,23 +111,7 @@
rndisinit(Dev *d)
{
uchar res[128];
- int r, i, off, sz;
- ulong csp;
- Ep *ep;
-
- r = 0;
- for(i = 0; i < nelem(d->usb->ep); i++){
- if((ep = d->usb->ep[i]) == nil)
- continue;
- csp = ep->iface->csp;
- // ff0202 is canonical CSP per Linux kernel; 301e0 used by Nexus 5
- if(csp == 0xff0202 || csp == 0x0301e0 || csp == 0x0104ef)
- r = 1;
- }
- if(!r){
- werrstr("no rndis found");
- return -1;
- }
+ int off, sz, r;
/* initialize */
PUT4(minit+20, 1580); /* max xfer = 1580 */