From dacc4ff1248ee36d6a373ffcb140cd9787f7c56e Mon Sep 17 00:00:00 2001 From: Jose Alamos Date: Wed, 17 Aug 2022 13:35:06 +0200 Subject: [PATCH] ieee802154/radio: fix blocking cca function --- sys/include/net/ieee802154/radio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/include/net/ieee802154/radio.h b/sys/include/net/ieee802154/radio.h index c15eb3ada2..c8f71afa90 100644 --- a/sys/include/net/ieee802154/radio.h +++ b/sys/include/net/ieee802154/radio.h @@ -1267,9 +1267,9 @@ static inline int ieee802154_radio_cca(ieee802154_dev_t *dev) if (res < 0) { return res; } - while (ieee802154_radio_confirm_cca(dev) == -EAGAIN) {} + while ((res = ieee802154_radio_confirm_cca(dev)) == -EAGAIN) {} - return 0; + return res; } /**