Skip to content

Commit c524be6

Browse files
committed
nrf_802154: rev d90e3bd46f5153fc3075843b3f2817fe3dc2104b
This commit updates revision of the nrf_802154 component. Signed-off-by: Andrzej Kuros <[email protected]>
1 parent e3c7e71 commit c524be6

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

nrf_802154/driver/src/mac_features/nrf_802154_csma_ca.c

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,15 @@ static bool csma_ca_can_abort(nrf_802154_term_t term_lvl,
380380
return result;
381381
}
382382

383+
static void csma_ca_finish_failed(uint8_t * p_frame,
384+
nrf_802154_tx_error_t error,
385+
const nrf_802154_transmit_done_metadata_t * p_metadata)
386+
{
387+
nrf_802154_sl_atomic_store_u8((uint8_t *)&m_state, CSMA_CA_STATE_IDLE);
388+
nrf_802154_frame_parser_data_clear(&m_frame);
389+
nrf_802154_notify_transmit_failed(p_frame, error, p_metadata);
390+
}
391+
383392
static void csma_ca_failed(uint8_t * p_frame,
384393
nrf_802154_tx_error_t error,
385394
const nrf_802154_transmit_done_metadata_t * p_metadata,
@@ -396,18 +405,12 @@ static void csma_ca_failed(uint8_t * p_frame,
396405
case NRF_802154_TX_ERROR_TIMESLOT_ENDED:
397406
if (channel_busy())
398407
{
399-
nrf_802154_sl_atomic_store_u8((uint8_t *)&m_state, CSMA_CA_STATE_IDLE);
400-
nrf_802154_frame_parser_data_clear(&m_frame);
401-
nrf_802154_notify_transmit_failed(p_frame,
402-
NRF_802154_TX_ERROR_BUSY_CHANNEL,
403-
p_metadata);
408+
csma_ca_finish_failed(p_frame, error, p_metadata);
404409
}
405410
break;
406411

407412
default:
408-
nrf_802154_sl_atomic_store_u8((uint8_t *)&m_state, CSMA_CA_STATE_IDLE);
409-
nrf_802154_frame_parser_data_clear(&m_frame);
410-
nrf_802154_notify_transmit_failed(p_frame, error, p_metadata);
413+
csma_ca_finish_failed(p_frame, error, p_metadata);
411414
break;
412415
}
413416

nrf_802154/driver/src/nrf_802154_core.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2777,6 +2777,11 @@ nrf_802154_tx_error_t nrf_802154_core_transmit(nrf_802154_term_t te
27772777
if (result)
27782778
{
27792779
result = current_operation_terminate(term_lvl, req_orig, true);
2780+
2781+
if (!result)
2782+
{
2783+
error = NRF_802154_TX_ERROR_BUSY_CHANNEL;
2784+
}
27802785
}
27812786

27822787
if (result)

0 commit comments

Comments
 (0)