return 0;
}
-SEC("struct_ops/device_event")
+SEC("struct_ops/hid_device_event")
int BPF_PROG(hid_event, struct hid_bpf_ctx *hctx, enum hid_report_type type)
{
int ret = hid_y_event(hctx);
}
-SEC("struct_ops/rdesc_fixup")
+SEC("struct_ops/hid_rdesc_fixup")
int BPF_PROG(hid_rdesc_fixup, struct hid_bpf_ctx *hctx)
{
__u8 *data = hid_bpf_get_data(hctx, 0 /* offset */, 4096 /* size */);
SEC(".struct_ops.link")
struct hid_bpf_ops mouse_invert = {
- .rdesc_fixup = (void *)hid_rdesc_fixup,
- .device_event = (void *)hid_event,
+ .hid_rdesc_fixup = (void *)hid_rdesc_fixup,
+ .hid_device_event = (void *)hid_event,
};
char _license[] SEC("license") = "GPL";
#define HID_UP_BUTTON 0x0009
#define HID_GD_WHEEL 0x0038
-SEC("struct_ops/device_event")
+SEC("struct_ops/hid_device_event")
int BPF_PROG(hid_event, struct hid_bpf_ctx *hctx)
{
__u8 *data = hid_bpf_get_data(hctx, 0 /* offset */, 9 /* size */);
}
/* Convert REL_DIAL into REL_WHEEL */
-SEC("struct_ops/rdesc_fixup")
+SEC("struct_ops/hid_rdesc_fixup")
int BPF_PROG(hid_rdesc_fixup, struct hid_bpf_ctx *hctx)
{
__u8 *data = hid_bpf_get_data(hctx, 0 /* offset */, 4096 /* size */);
SEC(".struct_ops.link")
struct hid_bpf_ops surface_dial = {
- .rdesc_fixup = (void *)hid_rdesc_fixup,
- .device_event = (void *)hid_event,
+ .hid_rdesc_fixup = (void *)hid_rdesc_fixup,
+ .hid_device_event = (void *)hid_event,
};
char _license[] SEC("license") = "GPL";