nusb/ether: remove csp check for rndis, already done in nusbrc
This commit is contained in:
parent
0e3a955652
commit
9cd55a085d
2 changed files with 2 additions and 18 deletions
|
@ -33,7 +33,7 @@ if(! nusb/usbd)
|
||||||
switch($4){
|
switch($4){
|
||||||
case *03
|
case *03
|
||||||
nusb/kb $id
|
nusb/kb $id
|
||||||
case ff0202 0104ef
|
case ff0202 0104ef 0301e0
|
||||||
nusb/ether -t rndis $etherargs $id
|
nusb/ether -t rndis $etherargs $id
|
||||||
case *02
|
case *02
|
||||||
# CDC ethernet
|
# CDC ethernet
|
||||||
|
|
|
@ -111,23 +111,7 @@ int
|
||||||
rndisinit(Dev *d)
|
rndisinit(Dev *d)
|
||||||
{
|
{
|
||||||
uchar res[128];
|
uchar res[128];
|
||||||
int r, i, off, sz;
|
int off, sz, r;
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* initialize */
|
/* initialize */
|
||||||
PUT4(minit+20, 1580); /* max xfer = 1580 */
|
PUT4(minit+20, 1580); /* max xfer = 1580 */
|
||||||
|
|
Loading…
Reference in a new issue