From 312dad25785660641e7afadd1fd6f46c9e9fe908 Mon Sep 17 00:00:00 2001 From: Diego Ismirlian Date: Tue, 14 Jan 2020 10:46:09 -0300 Subject: [PATCH] [efr32] Radio: handle promiscuous mode for ACK packets (#4482) --- examples/platforms/efr32mg12/radio.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/examples/platforms/efr32mg12/radio.c b/examples/platforms/efr32mg12/radio.c index 0e5c27876..26f14e586 100644 --- a/examples/platforms/efr32mg12/radio.c +++ b/examples/platforms/efr32mg12/radio.c @@ -739,7 +739,9 @@ static void processNextRxPacket(otInstance *aInstance) } else { - otEXPECT(length != IEEE802154_ACK_LENGTH); + // signal MAC layer for each received frame if promiscous is enabled + // otherwise only signal MAC layer for non-ACK frame + otEXPECT(sPromiscuous || (length != IEEE802154_ACK_LENGTH)); sReceiveError = OT_ERROR_NONE; @@ -763,16 +765,11 @@ static void processNextRxPacket(otInstance *aInstance) else #endif { - // signal MAC layer for each received frame if promiscous is enabled - // otherwise only signal MAC layer for non-ACK frame - if (sPromiscuous || sReceiveFrame.mLength > IEEE802154_ACK_LENGTH) - { - otLogInfoPlat("Received %d bytes", sReceiveFrame.mLength); - otPlatRadioReceiveDone(aInstance, &sReceiveFrame, sReceiveError); + otLogInfoPlat("Received %d bytes", sReceiveFrame.mLength); + otPlatRadioReceiveDone(aInstance, &sReceiveFrame, sReceiveError); #if RADIO_CONFIG_DEBUG_COUNTERS_SUPPORT - sRailDebugCounters.mRailPlatRadioReceiveDoneCbCount++; + sRailDebugCounters.mRailPlatRadioReceiveDoneCbCount++; #endif - } } }