shithub: plan9front

Download patch

ref: f5db3bf0e0d3778ca9474d9b4f7198edf109fd6b
parent: 2cdc8075f8109b69895bc56bd4d3f59deb6da360
author: Sigrid <ftrvxmtrx@gmail.com>
date: Tue Apr 20 12: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	Mon Apr 19 19:40:31 2021
+++ b/sys/src/cmd/nusb/ether/rndis.c	Tue Apr 20 12:08:58 2021
@@ -112,14 +112,16 @@
 {
 	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){