[riot-notifications] [RIOT-OS/RIOT] ieee802154/submac: fix initialization code (#16533)

Leandro Lanzieri notifications at github.com
Tue Jun 15 08:57:22 CEST 2021


@leandrolanzieri commented on this pull request.



> @@ -382,6 +382,7 @@ int ieee802154_submac_init(ieee802154_submac_t *submac, const network_uint16_t *
                                               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) {};

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.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16533#pullrequestreview-682680971
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210614/8a22d83d/attachment.htm>


More information about the notifications mailing list