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 <fgrandel@code-for-humans.de>
This commit is contained in:
Florian Grandel 2023-09-29 09:01:58 +02:00 committed by Johan Hedberg
parent 35cfe00e91
commit 26a0ef15c4

View file

@ -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. */