1f5c27da4SBenjamin Tissoires /* SPDX-License-Identifier: GPL-2.0-only */ 2f5c27da4SBenjamin Tissoires 3f5c27da4SBenjamin Tissoires #ifndef _BPF_HID_BPF_DISPATCH_H 4f5c27da4SBenjamin Tissoires #define _BPF_HID_BPF_DISPATCH_H 5f5c27da4SBenjamin Tissoires 6f5c27da4SBenjamin Tissoires #include <linux/hid.h> 7f5c27da4SBenjamin Tissoires 8f5c27da4SBenjamin Tissoires struct hid_bpf_ctx_kern { 9f5c27da4SBenjamin Tissoires struct hid_bpf_ctx ctx; 10f5c27da4SBenjamin Tissoires u8 *data; 11*75839101SBenjamin Tissoires bool from_bpf; 12f5c27da4SBenjamin Tissoires }; 13f5c27da4SBenjamin Tissoires 14ebc0d809SBenjamin Tissoires struct hid_device *hid_get_device(unsigned int hid_id); 15ebc0d809SBenjamin Tissoires void hid_put_device(struct hid_device *hid); 16ebc0d809SBenjamin Tissoires int hid_bpf_allocate_event_data(struct hid_device *hdev); 17ebc0d809SBenjamin Tissoires void __hid_bpf_ops_destroy_device(struct hid_device *hdev); 18ad190df1SBenjamin Tissoires int hid_bpf_reconnect(struct hid_device *hdev); 19f5c27da4SBenjamin Tissoires 20f5c27da4SBenjamin Tissoires struct bpf_prog; 21f5c27da4SBenjamin Tissoires 22f5c27da4SBenjamin Tissoires #endif 23