ref: f5db3bf0e0d3778ca9474d9b4f7198edf109fd6b
parent: 2cdc8075f8109b69895bc56bd4d3f59deb6da360
author: Sigrid <[email protected]>
date: Tue Apr 20 14:08:58 EDT 2021
nusb/ether: rndis: add standard class code (tested by jmi2k with OnePlus 8)
--- a/sys/src/cmd/nusb/ether/rndis.c
+++ b/sys/src/cmd/nusb/ether/rndis.c
@@ -112,6 +112,7 @@
{
uchar res[128];
int r, i, off, sz;
+ ulong csp;
Ep *ep;
r = 0;
@@ -118,8 +119,9 @@
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(ep->iface->csp == 0xff0202 || ep->iface->csp == 0x000301e0)
+ if(csp == 0xff0202 || csp == 0x0301e0 || csp == 0x0104ef)
r = 1;
}
if(!r){