diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2022-11-03 16:57:51 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2022-11-15 16:28:39 +0100 |
commit | ad190df11a024c1214fbc8dcaab72c592c79d9b5 (patch) | |
tree | 3ff7fc64a04187c78f64a37408001b93186de03a /drivers/hid/bpf/hid_bpf_dispatch.h | |
parent | 4f7153cf461ed0f78d8da8c9fd02d38728a76b90 (diff) |
HID: bpf: allow to change the report descriptor
Add a new tracepoint hid_bpf_rdesc_fixup() so we can trigger a
report descriptor fixup in the bpf world.
Whenever the program gets attached/detached, the device is reconnected
meaning that userspace will see it disappearing and reappearing with
the new report descriptor.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/bpf/hid_bpf_dispatch.h')
-rw-r--r-- | drivers/hid/bpf/hid_bpf_dispatch.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/bpf/hid_bpf_dispatch.h b/drivers/hid/bpf/hid_bpf_dispatch.h index e2d64faa3932..2eeab1f746dd 100644 --- a/drivers/hid/bpf/hid_bpf_dispatch.h +++ b/drivers/hid/bpf/hid_bpf_dispatch.h @@ -18,6 +18,7 @@ int __hid_bpf_attach_prog(struct hid_device *hdev, enum hid_bpf_prog_type prog_t void __hid_bpf_destroy_device(struct hid_device *hdev); int hid_bpf_prog_run(struct hid_device *hdev, enum hid_bpf_prog_type type, struct hid_bpf_ctx_kern *ctx_kern); +int hid_bpf_reconnect(struct hid_device *hdev); struct bpf_prog; |