From 45ba9131c8f6aaf5322a53b087ed4ca67719306a Mon Sep 17 00:00:00 2001 From: Jose Alamos Date: Wed, 29 Jun 2022 17:39:30 +0200 Subject: [PATCH] drivers/nrf802154: do not filter broadcast PAN ID --- cpu/nrf52/radio/nrf802154/nrf802154_radio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpu/nrf52/radio/nrf802154/nrf802154_radio.c b/cpu/nrf52/radio/nrf802154/nrf802154_radio.c index fcb20a547a..1debb71af4 100644 --- a/cpu/nrf52/radio/nrf802154/nrf802154_radio.c +++ b/cpu/nrf52/radio/nrf802154/nrf802154_radio.c @@ -124,6 +124,11 @@ static bool _l2filter(uint8_t *mhr) int addr_len = ieee802154_get_dst(mhr, dst_addr, &dst_pan); + if ((mhr[0] & IEEE802154_FCF_TYPE_MASK) == IEEE802154_FCF_TYPE_BEACON) { + if ((memcmp(&nrf802154_pan_id, pan_bcast, 2) == 0)) { + return true; + } + } /* filter PAN ID */ /* Will only work on little endian platform (all?) */