From 2db31257187a7996995fb6a55f8f5efbc84fe57e Mon Sep 17 00:00:00 2001 From: Lukas-Luger Date: Mon, 18 Nov 2024 08:40:04 +0100 Subject: [PATCH] fixup! tests/drivers/nrf802154: test if Beacons can be received --- cpu/nrf52/radio/nrf802154/nrf802154_radio.c | 6 +++--- tests/drivers/nrf802154/main.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cpu/nrf52/radio/nrf802154/nrf802154_radio.c b/cpu/nrf52/radio/nrf802154/nrf802154_radio.c index 6f2d833138854..d5800a4c620ae 100644 --- a/cpu/nrf52/radio/nrf802154/nrf802154_radio.c +++ b/cpu/nrf52/radio/nrf802154/nrf802154_radio.c @@ -129,10 +129,10 @@ static bool _l2filter(uint8_t *mhr) int src_addr_len = ieee802154_get_src(mhr, src_addr, &src_pan); if ((mhr[0] & IEEE802154_FCF_TYPE_MASK) == IEEE802154_FCF_TYPE_BEACON) { - if(src_addr_len == IEEE802154_SHORT_ADDRESS_LEN || + if(src_addr_len == IEEE802154_SHORT_ADDRESS_LEN || src_addr_len == IEEE802154_LONG_ADDRESS_LEN){ - if ((memcmp(&nrf802154_pan_id, src_pan.u8, 2) == 0) || - (memcmp(&nrf802154_pan_id, pan_bcast, 2) == 0)) { + if ((memcmp(&nrf802154_pan_id, src_pan.u8, 2) == 0) || + (memcmp(&nrf802154_pan_id, pan_bcast, 2) == 0)) { return true; } } diff --git a/tests/drivers/nrf802154/main.c b/tests/drivers/nrf802154/main.c index fad3be5f9e13d..6761d29291c2d 100644 --- a/tests/drivers/nrf802154/main.c +++ b/tests/drivers/nrf802154/main.c @@ -96,10 +96,10 @@ int main(void) puts("Error initializing devices"); return 1; } - + /* start the shell */ puts("Initialization successful - starting the shell now"); - + char line_buf[SHELL_DEFAULT_BUFSIZE]; shell_run(shell_commands, line_buf, SHELL_DEFAULT_BUFSIZE);