aboutsummaryrefslogtreecommitdiffstats
path: root/utils/keytable/bpf_protocols/pulse_distance.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/keytable/bpf_protocols/pulse_distance.c')
-rw-r--r--utils/keytable/bpf_protocols/pulse_distance.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/keytable/bpf_protocols/pulse_distance.c b/utils/keytable/bpf_protocols/pulse_distance.c
index 9e9ea4ad..f2de8d27 100644
--- a/utils/keytable/bpf_protocols/pulse_distance.c
+++ b/utils/keytable/bpf_protocols/pulse_distance.c
@@ -22,7 +22,7 @@ struct decoder_state {
unsigned int count;
};
-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),
@@ -49,14 +49,14 @@ int reverse = 0;
int header_optional = 0;
int rc_protocol = 64;
-#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("pulse_distance")
+SEC("lirc_mode2/pulse_distance")
int bpf_decoder(unsigned int *sample)
{
unsigned int key = 0;

Privacy Policy