summaryrefslogtreecommitdiff
path: root/sys/src
diff options
context:
space:
mode:
authorSigrid <ftrvxmtrx@gmail.com>2021-04-20 18:08:58 +0200
committerSigrid <ftrvxmtrx@gmail.com>2021-04-20 18:08:58 +0200
commitf5db3bf0e0d3778ca9474d9b4f7198edf109fd6b (patch)
treea6c043c630acc2f899ff78fb27d33270cd22080c /sys/src
parent2cdc8075f8109b69895bc56bd4d3f59deb6da360 (diff)
nusb/ether: rndis: add standard class code (tested by jmi2k with OnePlus 8)
Diffstat (limited to 'sys/src')
-rw-r--r--sys/src/cmd/nusb/ether/rndis.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/src/cmd/nusb/ether/rndis.c b/sys/src/cmd/nusb/ether/rndis.c
index 71640f7c7..7e54703a1 100644
--- a/sys/src/cmd/nusb/ether/rndis.c
+++ b/sys/src/cmd/nusb/ether/rndis.c
@@ -112,14 +112,16 @@ 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(ep->iface->csp == 0xff0202 || ep->iface->csp == 0x000301e0)
+ if(csp == 0xff0202 || csp == 0x0301e0 || csp == 0x0104ef)
r = 1;
}
if(!r){