aboutsummaryrefslogtreecommitdiffstats
path: root/utils/keytable/bpf_protocols/imon_rsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/keytable/bpf_protocols/imon_rsc.c')
-rw-r--r--utils/keytable/bpf_protocols/imon_rsc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/keytable/bpf_protocols/imon_rsc.c b/utils/keytable/bpf_protocols/imon_rsc.c
index 14c4ec37..e163f217 100644
--- a/utils/keytable/bpf_protocols/imon_rsc.c
+++ b/utils/keytable/bpf_protocols/imon_rsc.c
@@ -19,7 +19,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),
@@ -34,14 +34,14 @@ struct bpf_map_def SEC("maps") decoder_state_map = {
// actual value (either overridden or taken from the data segment).
int margin = 325;
-#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("imon_rsc")
+SEC("lirc_mode2/imon_rsc")
int bpf_decoder(unsigned int *sample)
{
unsigned int key = 0;

Privacy Policy