drivers: ieee802154: cc13xx_cc26xx_subg: check radio op status
Not only the return code of TI's RF command queueing mechanism but also the command status need to be checked to assert that a command was executed successfully. This change introduces additional checking of the command status. Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
This commit is contained in:
parent
f2979edd5c
commit
4b0e730fb1
|
@ -598,7 +598,7 @@ static int ieee802154_cc13xx_cc26xx_subg_set_channel(
|
|||
drv_data->cmd_fs.fractFreq = fract;
|
||||
events = RF_runCmd(drv_data->rf_handle, (RF_Op *)&drv_data->cmd_fs,
|
||||
RF_PriorityNormal, NULL, 0);
|
||||
if (events != RF_EventLastCmdDone) {
|
||||
if (events != RF_EventLastCmdDone || drv_data->cmd_fs.status != DONE_OK) {
|
||||
LOG_DBG("Failed to set frequency: 0x%" PRIx64, events);
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -954,7 +954,7 @@ static int ieee802154_cc13xx_cc26xx_subg_init(const struct device *dev)
|
|||
drv_data->cmd_fs.fractFreq = fract;
|
||||
events = RF_runCmd(drv_data->rf_handle, (RF_Op *)&drv_data->cmd_fs,
|
||||
RF_PriorityNormal, NULL, 0);
|
||||
if (events != RF_EventLastCmdDone) {
|
||||
if (events != RF_EventLastCmdDone || drv_data->cmd_fs.status != DONE_OK) {
|
||||
LOG_ERR("Failed to set frequency: 0x%" PRIx64, events);
|
||||
return -EIO;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue