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:
commit
f2720940d7
@ -124,6 +124,11 @@ static bool _l2filter(uint8_t *mhr)
|
|||||||
|
|
||||||
int addr_len = ieee802154_get_dst(mhr, dst_addr, &dst_pan);
|
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 */
|
/* filter PAN ID */
|
||||||
/* Will only work on little endian platform (all?) */
|
/* 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;
|
(void) dev;
|
||||||
|
|
||||||
int res = -EBUSY;
|
int res = -EBUSY;
|
||||||
int state;
|
int state = STATE_IDLE;
|
||||||
|
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case IEEE802154_HAL_OP_TRANSMIT:
|
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;
|
state = STATE_IDLE;
|
||||||
enable_shorts = true;
|
enable_shorts = true;
|
||||||
|
if (info) {
|
||||||
|
info->status = (_state == STATE_CCA_BUSY) ? TX_STATUS_MEDIUM_BUSY : TX_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case IEEE802154_HAL_OP_SET_RX:
|
case IEEE802154_HAL_OP_SET_RX:
|
||||||
eagain = (radio_state == RADIO_STATE_STATE_RxRu);
|
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;
|
_state = state;
|
||||||
|
|
||||||
if (info) {
|
|
||||||
info->status = (_state == STATE_CCA_BUSY) ? TX_STATUS_MEDIUM_BUSY : TX_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enable_shorts) {
|
if (enable_shorts) {
|
||||||
NRF_RADIO->SHORTS = DEFAULT_SHORTS;
|
NRF_RADIO->SHORTS = DEFAULT_SHORTS;
|
||||||
DEBUG("[nrf802154] TX Finished\n");
|
DEBUG("[nrf802154] TX Finished\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user