diff options
Diffstat (limited to 'utils/keytable/bpf_protocols/raw.c')
-rw-r--r-- | utils/keytable/bpf_protocols/raw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/keytable/bpf_protocols/raw.c b/utils/keytable/bpf_protocols/raw.c index a0ee78b4..5084264d 100644 --- a/utils/keytable/bpf_protocols/raw.c +++ b/utils/keytable/bpf_protocols/raw.c @@ -27,7 +27,7 @@ struct decoder_state { DECLARE_BITMAP(nomatch, MAX_PATTERNS); }; -struct bpf_map_def SEC("maps") decoder_state_map = { +struct bpf_map_def SEC("lirc_mode2/maps") decoder_state_map = { .type = BPF_MAP_TYPE_ARRAY, .key_size = sizeof(unsigned int), .value_size = sizeof(struct decoder_state), @@ -40,7 +40,7 @@ struct raw_pattern { }; // ir-keytable will load the raw patterns here -struct bpf_map_def SEC("maps") raw_map = { +struct bpf_map_def SEC("lirc_mode2/maps") raw_map = { .type = BPF_MAP_TYPE_ARRAY, .key_size = sizeof(unsigned int), .value_size = sizeof(struct raw_pattern), // this is not used @@ -60,14 +60,14 @@ int rc_protocol = 68; int trail_space = 1000; int max_length = 1; -#define BPF_PARAM(x) (int)(&(x)) +#define BPF_PARAM(x) (int)(long)(&(x)) static inline int eq_margin(unsigned d1, unsigned d2) { return ((d1 > (d2 - BPF_PARAM(margin))) && (d1 < (d2 + BPF_PARAM(margin)))); } -SEC("raw") +SEC("lirc_mode2/raw") int bpf_decoder(unsigned int *sample) { unsigned int key = 0; |