From 8e6895352e17818d0a575e8570f61c20cc3a31f8 Mon Sep 17 00:00:00 2001 From: Jose Alamos Date: Tue, 7 Sep 2021 16:09:22 +0200 Subject: [PATCH] ieee802154/submac: add missing state transitions if radio doesn't stay in RX --- sys/net/link_layer/ieee802154/submac.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/net/link_layer/ieee802154/submac.c b/sys/net/link_layer/ieee802154/submac.c index 6ad22c3a5f..3025ef103a 100644 --- a/sys/net/link_layer/ieee802154/submac.c +++ b/sys/net/link_layer/ieee802154/submac.c @@ -153,11 +153,21 @@ static ieee802154_fsm_state_t _fsm_state_rx(ieee802154_submac_t *submac, ieee802 } else { ieee802154_radio_read(&submac->dev, NULL, 0, NULL); + + /* If the radio doesn't support RX Continuous, go to RX */ + if (!ieee802154_radio_has_rx_continuous(&submac->dev)) { + _req_set_trx_state_wait_busy(&submac->dev, IEEE802154_TRX_STATE_RX_ON); + } + /* Keep on current state */ return IEEE802154_FSM_STATE_RX; } case IEEE802154_FSM_EV_CRC_ERROR: ieee802154_radio_read(&submac->dev, NULL, 0, NULL); + /* If the radio doesn't support RX Continuous, go to RX */ + if (!ieee802154_radio_has_rx_continuous(&submac->dev)) { + _req_set_trx_state_wait_busy(&submac->dev, IEEE802154_TRX_STATE_RX_ON); + } /* Keep on current state */ return IEEE802154_FSM_STATE_RX;