From 26a0ef15c41430446221596c14b7946c94e30806 Mon Sep 17 00:00:00 2001 From: Florian Grandel Date: Fri, 29 Sep 2023 09:01:58 +0200 Subject: [PATCH] drivers: ieee802154: cc13xx_cc26xx_subg: check for RX up Checks whether the receiver is already on before trying to switch it on. This also closes a gap wrt the driver API specification. Signed-off-by: Florian Grandel --- drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c b/drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c index c3c1753b8d..0d0f091e18 100644 --- a/drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c +++ b/drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c @@ -423,6 +423,10 @@ static int drv_start_rx(const struct device *dev) struct ieee802154_cc13xx_cc26xx_subg_data *drv_data = dev->data; RF_CmdHandle cmd_handle; + if (drv_data->cmd_prop_rx_adv.status == ACTIVE) { + return -EALREADY; + } + #ifdef CONFIG_ASSERT if (CONFIG_ASSERT_LEVEL > 0) { /* ensure that all RX buffers are initialized and pending. */