diff --git a/tests/ieee802154_hal/main.c b/tests/ieee802154_hal/main.c index 40cbee090d..6ba798657b 100644 --- a/tests/ieee802154_hal/main.c +++ b/tests/ieee802154_hal/main.c @@ -216,9 +216,16 @@ static void _send(iolist_t *pkt) /* Block until the radio confirms the state change */ while(ieee802154_radio_confirm_set_trx_state(&_radio[0]) == -EAGAIN); - /* Trigger the transmit and wait for the mutex unlock (TX_DONE event) */ + /* Set the frame filter to receive ACKs */ ieee802154_radio_set_frame_filter_mode(&_radio[0], IEEE802154_FILTER_ACK_ONLY); - ieee802154_radio_request_transmit(&_radio[0]); + + /* Trigger the transmit and wait for the mutex unlock (TX_DONE event). + * Spin if the radio is busy before transmission (this indicates the + * transmission is requested before the end of the IFS). + * This won't be necessary anymore when the upper layers take care + * of the IFS. + */ + while (ieee802154_radio_request_transmit(&_radio[0]) == -EBUSY) {} mutex_lock(&lock); event_post(EVENT_PRIO_HIGHEST, &_tx_finish_ev);