From eb380d8f0a5bde735b8cc35ed1d765e6953a8857 Mon Sep 17 00:00:00 2001 From: Anton Lindqvist Date: Fri, 29 Oct 2021 15:43:56 +0000 Subject: 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 for reporting and testing. --- sys/dev/usb/uhidev.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/dev/usb') 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; }; -- cgit v1.2.3