aboutsummaryrefslogtreecommitdiffstats
path: root/utils/keytable/bpf_protocols/grundig.c
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2021-06-16 11:48:08 +0100
committerSean Young <sean@mess.org>2021-06-16 15:17:58 +0100
commit150de0ac2d15b82d874937fcca59675f8b24a13f (patch)
tree9fd6c008336bcde802fb499ce449da09ca352e98 /utils/keytable/bpf_protocols/grundig.c
parent154a4242117c6f407f2554e0129d21d195366fc1 (diff)
keytable: ensure BPF IR decoders use correct section name
The convention is to have the type ("lirc_mode2/") prefixed so the BPF loader knows what type it is. Signed-off-by: Sean Young <sean@mess.org>
Diffstat (limited to 'utils/keytable/bpf_protocols/grundig.c')
-rw-r--r--utils/keytable/bpf_protocols/grundig.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/keytable/bpf_protocols/grundig.c b/utils/keytable/bpf_protocols/grundig.c
index 4d8cc4b9..cdd551f9 100644
--- a/utils/keytable/bpf_protocols/grundig.c
+++ b/utils/keytable/bpf_protocols/grundig.c
@@ -22,7 +22,7 @@ struct decoder_state {
unsigned int last_space;
};
-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),
@@ -44,9 +44,9 @@ int header_pulse = 900;
int header_space = 2900;
int leader_pulse = 1300;
-#define BPF_PARAM(x) (int)(&(x))
+#define BPF_PARAM(x) (int)(long)(&(x))
-SEC("grundig")
+SEC("lirc_mode2/grundig")
int bpf_decoder(unsigned int *sample)
{
unsigned int key = 0;

Privacy Policy