ieee802154/submac: fix initialization code#16533
Conversation
|
done! |
| CONFIG_IEEE802154_CCA_THRESH_DEFAULT) >= 0); | ||
|
|
||
| ieee802154_radio_request_set_trx_state(dev, IEEE802154_TRX_STATE_RX_ON); | ||
| while(ieee802154_radio_confirm_set_trx_state(dev) == -EAGAIN) {}; |
There was a problem hiding this comment.
This comment also applies to all the previous radio HAL function calls: shouldn't we check for possible error return codes? Otherwise this function is always returning success.
There was a problem hiding this comment.
yes, this must be fixed. I will piggyback some changes
|
I added some commits that improve error checks. |
|
Murdock is not happy |
|
fixed! I also piggybacked another fix. I was calling one of the |
|
ping! I would like to move on with #16535, but this one is needed :) |
benpicco
left a comment
There was a problem hiding this comment.
Code looks good and both our sub-MAC drivers are still working.
|
thanks for the review! |
Contribution description
This PR does essentially 3 things:
netdev_submac_ieee802154_initto the actual_initfunction ofnetdev_driver_t. This is required in order to make sure the device is initialized before setting netdev stuff.confirm_set_trx_stateafter setting the state to RX_ON during initialization. In some cases, the radio was not ready to do a state transition becauserequest_set_trx_statedidn't finish.Testing procedure
gnrc_networkingandtests/ieee802154_halIssues/PRs references
None so far