1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #18283 from jia200x/pr/opendsme_nrf52840

drivers/nrf802154: do not filter broadcast PAN ID
This commit is contained in:
benpicco 2022-08-16 11:43:07 +02:00 committed by GitHub
commit f2720940d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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?) */
@ -197,7 +202,7 @@ static int _request_op(ieee802154_dev_t *dev, ieee802154_hal_op_t op, void *ctx)
(void) dev;
int res = -EBUSY;
int state;
int state = STATE_IDLE;
switch (op) {
case IEEE802154_HAL_OP_TRANSMIT:
@ -265,6 +270,10 @@ static int _confirm_op(ieee802154_dev_t *dev, ieee802154_hal_op_t op, void *ctx)
state = STATE_IDLE;
enable_shorts = true;
if (info) {
info->status = (_state == STATE_CCA_BUSY) ? TX_STATUS_MEDIUM_BUSY : TX_STATUS_SUCCESS;
}
break;
case IEEE802154_HAL_OP_SET_RX:
eagain = (radio_state == RADIO_STATE_STATE_RxRu);
@ -291,10 +300,6 @@ static int _confirm_op(ieee802154_dev_t *dev, ieee802154_hal_op_t op, void *ctx)
_state = state;
if (info) {
info->status = (_state == STATE_CCA_BUSY) ? TX_STATUS_MEDIUM_BUSY : TX_STATUS_SUCCESS;
}
if (enable_shorts) {
NRF_RADIO->SHORTS = DEFAULT_SHORTS;
DEBUG("[nrf802154] TX Finished\n");