mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
hidraw(4): Force switch to hidraw mode on HIDIOCGRDESC ioctl
To match documentation. Reported by: Ihor Dutchak <ihor.youw@gmail.com> PR: 286155 MFC after: 3 days
This commit is contained in:
parent
8d4d08d571
commit
fe4bdd889b
1 changed files with 3 additions and 0 deletions
|
|
@ -829,6 +829,9 @@ hidraw_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag,
|
|||
*/
|
||||
if (size >= HID_MAX_DESCRIPTOR_SIZE)
|
||||
return (EINVAL);
|
||||
mtx_lock(&sc->sc_mtx);
|
||||
sc->sc_state.uhid = false;
|
||||
mtx_unlock(&sc->sc_mtx);
|
||||
buf = HIDRAW_LOCAL_ALLOC(local_buf, size);
|
||||
error = hid_get_rdesc(sc->sc_dev, buf, size);
|
||||
if (error == 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue