summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@cvs.openbsd.org>2021-10-29 15:43:56 +0000
committerAnton Lindqvist <anton@cvs.openbsd.org>2021-10-29 15:43:56 +0000
commiteb380d8f0a5bde735b8cc35ed1d765e6953a8857 (patch)
treef5a3735997ab53697ced1cb2db58ffa105827239 /sys/dev/usb
parent0bad372724b73d127418757789ca8e0e857354e5 (diff)
A USB HID report ID must be represented using a single byte ranging
between 1-255 where 0 is reserved. The pseudo report ID UHIDEV_CLAIM_MULTIPLE_REPORTID is currently colliding with the valid report ID 255. Therefore crank it which gets rid of the collision and increase the related fields in order to cope with larger integers. Thanks to Damien Couderc <openbsd at petrocore dot eu> for reporting and testing.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/uhidev.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/uhidev.h b/sys/dev/usb/uhidev.h
index eb7894374cc..84730ca3a81 100644
--- a/sys/dev/usb/uhidev.h
+++ b/sys/dev/usb/uhidev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhidev.h,v 1.32 2021/09/12 06:58:08 anton Exp $ */
+/* $OpenBSD: uhidev.h,v 1.33 2021/10/29 15:43:55 anton Exp $ */
/* $NetBSD: uhidev.h,v 1.3 2002/10/08 09:56:17 dan Exp $ */
/*
@@ -80,9 +80,9 @@ struct uhidev {
struct uhidev_attach_arg {
struct usb_attach_arg *uaa;
struct uhidev_softc *parent;
- uint8_t reportid;
-#define UHIDEV_CLAIM_MULTIPLE_REPORTID 255
- uint8_t nreports;
+ u_int reportid;
+#define UHIDEV_CLAIM_MULTIPLE_REPORTID 256
+ u_int nreports;
uint8_t *claimed;
};