aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorVladimir Kondratyev <wulf@FreeBSD.org>2021-02-13 18:19:02 +0000
committerVladimir Kondratyev <wulf@FreeBSD.org>2021-02-13 18:19:02 +0000
commitf988d7fa050e4886cdeb9483a039e75d58c31883 (patch)
treef43f8d3a6fd9158d5232e3154cb0b6768fa3eba4 /sys/dev
parent812c59ed614df94380e0b1f9ff4a3d15b78ce1bf (diff)
downloadsrc-f988d7fa050e4886cdeb9483a039e75d58c31883.tar.gz
src-f988d7fa050e4886cdeb9483a039e75d58c31883.zip
hidraw: Make HIDIOCGRDESCSIZE ioctl return report descriptor size
defined by hardware rather than cached one to match HIDIOCGRDESC ioctl. This fixes errors reported by hid-tools being run against /dev/hidraw# device node belonging to driver which overloads report descriptor. MFC after: 1 week
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/hid/hidraw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/hid/hidraw.c b/sys/dev/hid/hidraw.c
index 6cc67ff14d23..e71b2e2c7d5d 100644
--- a/sys/dev/hid/hidraw.c
+++ b/sys/dev/hid/hidraw.c
@@ -703,7 +703,7 @@ hidraw_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
return (0);
case HIDIOCGRDESCSIZE:
- *(int *)addr = sc->sc_rdesc->len;
+ *(int *)addr = sc->sc_hw->rdescsize;
return (0);
case HIDIOCGRDESC: