Skip to content

Commit 91bb311

Browse files
author
Benjamin Tissoires
committed
HID: bpf: import new kfunc from v6.10 & v6.11
These kfunc are all in v6.10 except for the hid_bpf_try_input_report() which will be in v6.11. Import their definition once now so we can make use of it. Link: https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/merge_requests/114 Acked-by: Jiri Kosina <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent 4be9335 commit 91bb311

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

drivers/hid/bpf/progs/hid_bpf_helpers.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@ extern int hid_bpf_hw_request(struct hid_bpf_ctx *ctx,
1919
size_t buf__sz,
2020
enum hid_report_type type,
2121
enum hid_class_request reqtype) __ksym;
22+
extern int hid_bpf_hw_output_report(struct hid_bpf_ctx *ctx,
23+
__u8 *buf, size_t buf__sz) __weak __ksym;
24+
extern int hid_bpf_input_report(struct hid_bpf_ctx *ctx,
25+
enum hid_report_type type,
26+
__u8 *data,
27+
size_t buf__sz) __weak __ksym;
28+
extern int hid_bpf_try_input_report(struct hid_bpf_ctx *ctx,
29+
enum hid_report_type type,
30+
__u8 *data,
31+
size_t buf__sz) __weak __ksym;
32+
33+
/* bpf_wq implementation */
34+
extern int bpf_wq_init(struct bpf_wq *wq, void *p__map, unsigned int flags) __weak __ksym;
35+
extern int bpf_wq_start(struct bpf_wq *wq, unsigned int flags) __weak __ksym;
36+
extern int bpf_wq_set_callback_impl(struct bpf_wq *wq,
37+
int (callback_fn)(void *map, int *key, void *value),
38+
unsigned int flags__k, void *aux__ign) __ksym;
39+
#define bpf_wq_set_callback(wq, cb, flags) \
40+
bpf_wq_set_callback_impl(wq, cb, flags, NULL)
2241

2342
#define HID_MAX_DESCRIPTOR_SIZE 4096
2443
#define HID_IGNORE_EVENT -1

0 commit comments

Comments
 (0)