summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraiju <devnull@localhost>2018-03-07 10:04:27 +0000
committeraiju <devnull@localhost>2018-03-07 10:04:27 +0000
commita2d8dcfd8235547ca1e14dcca42de70e06a0ec96 (patch)
tree80342c087fff0a820583427dc9c1a8f396b1122f
parent56405e091963c8b2dc9d71aa624e33c582102949 (diff)
downloadplan9front-a2d8dcfd8235547ca1e14dcca42de70e06a0ec96.tar.xz
usb lib: add maxpkt and ntds to Altc struct
-rw-r--r--sys/src/cmd/nusb/lib/parse.c2
-rw-r--r--sys/src/cmd/nusb/lib/usb.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/src/cmd/nusb/lib/parse.c b/sys/src/cmd/nusb/lib/parse.c
index 2f7e6ae55..21cd83115 100644
--- a/sys/src/cmd/nusb/lib/parse.c
+++ b/sys/src/cmd/nusb/lib/parse.c
@@ -145,6 +145,8 @@ parseendpt(Usbdev *d, Conf *c, Iface *ip, Altc *altc, uchar *b, int n, Ep **epp)
ep->maxpkt = GET2(dep->wMaxPacketSize);
ep->ntds = 1 + ((ep->maxpkt >> 11) & 3);
ep->maxpkt &= 0x7FF;
+ altc->maxpkt = ep->maxpkt;
+ altc->ntds = ep->ntds;
ep->addr = addr;
ep->type = type;
ep->isotype = (dep->bmAttributes>>2) & 0x03;
diff --git a/sys/src/cmd/nusb/lib/usb.h b/sys/src/cmd/nusb/lib/usb.h
index 4c90e8938..6a0f790ad 100644
--- a/sys/src/cmd/nusb/lib/usb.h
+++ b/sys/src/cmd/nusb/lib/usb.h
@@ -221,6 +221,8 @@ struct Altc
{
int attrib;
int interval;
+ int maxpkt;
+ int ntds;
void* aux; /* for the driver program */
};