From 9f32a96590c8e6d1ca8a02f69609b8a37a8475b8 Mon Sep 17 00:00:00 2001 From: Edvard Pettersen Date: Fri, 16 Feb 2018 18:49:08 +0100 Subject: [PATCH] Removed unwanted check of RF cancel command --- arch/cpu/simplelink/dev/rf-ieee-mode.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/arch/cpu/simplelink/dev/rf-ieee-mode.c b/arch/cpu/simplelink/dev/rf-ieee-mode.c index c6b12d71f..393eaa3f4 100644 --- a/arch/cpu/simplelink/dev/rf-ieee-mode.c +++ b/arch/cpu/simplelink/dev/rf-ieee-mode.c @@ -533,18 +533,11 @@ static int set_rx(const PowerState state) { if (state == POWER_STATE_OFF || state == POWER_STATE_RESTART) { - const uint16_t status = g_vpCmdRx->status; - if (status != IDLE && status != IEEE_DONE_OK && status != IEEE_DONE_STOPPED) { - const uint8_t stopGracefully = 1; - const RF_Stat stat = RF_cancelCmd(g_rfHandle, g_cmdRxHandle, - stopGracefully); - if (stat != RF_StatSuccess) - { - PRINTF("set_rx(off): unable to cancel RX state=0x%02X\n", stat); - return CMD_RESULT_ERROR; - } - } + // Stop RX gracefully, don't care about the result + const uint8_t stopGracefully = 1; + RF_cancelCmd(g_rfHandle, g_cmdRxHandle, stopGracefully); } + if (state == POWER_STATE_ON || state == POWER_STATE_RESTART) { if (g_vpCmdRx->status == ACTIVE) { PRINTF("set_rx(on): already in RX\n");