#include <linux/bpf.h>
#include <linux/filter.h>
#include <linux/bpf_lirc.h>
#include "rc-core-priv.h"
#define lirc_rcu_dereference(p) …
const struct bpf_prog_ops lirc_mode2_prog_ops = …;
BPF_CALL_1(bpf_rc_repeat, u32*, sample)
{ … }
static const struct bpf_func_proto rc_repeat_proto = …;
BPF_CALL_4(bpf_rc_keydown, u32*, sample, u32, protocol, u64, scancode,
u32, toggle)
{ … }
static const struct bpf_func_proto rc_keydown_proto = …;
BPF_CALL_3(bpf_rc_pointer_rel, u32*, sample, s32, rel_x, s32, rel_y)
{ … }
static const struct bpf_func_proto rc_pointer_rel_proto = …;
static const struct bpf_func_proto *
lirc_mode2_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
{ … }
static bool lirc_mode2_is_valid_access(int off, int size,
enum bpf_access_type type,
const struct bpf_prog *prog,
struct bpf_insn_access_aux *info)
{ … }
const struct bpf_verifier_ops lirc_mode2_verifier_ops = …;
#define BPF_MAX_PROGS …
static int lirc_bpf_attach(struct rc_dev *rcdev, struct bpf_prog *prog)
{ … }
static int lirc_bpf_detach(struct rc_dev *rcdev, struct bpf_prog *prog)
{ … }
void lirc_bpf_run(struct rc_dev *rcdev, u32 sample)
{ … }
void lirc_bpf_free(struct rc_dev *rcdev)
{ … }
int lirc_prog_attach(const union bpf_attr *attr, struct bpf_prog *prog)
{ … }
int lirc_prog_detach(const union bpf_attr *attr)
{ … }
int lirc_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr)
{ … }