Fix a packet receive issue in CC2538 radio driver (#969)

If a device sends an ACK required packet, but receives a packet other than ACK,
then it should trigger the ReceiveDone() method with the received packet.
This commit is contained in:
Shu Chen
2016-11-14 18:16:20 +08:00
committed by Jonathan Hui
parent 49144266e4
commit a7668d6475
+3 -1
View File
@@ -381,7 +381,9 @@ void cc2538RadioProcess(otInstance *aInstance)
{
readFrame();
if ((sState == kStateReceive) && (sReceiveFrame.mLength > 0))
if ((sState == kStateReceive && sReceiveFrame.mLength > 0) ||
(sState == kStateTransmit && sReceiveFrame.mLength > 0 &&
(sReceiveFrame.mPsdu[0] & IEEE802154_FRAME_TYPE_MASK) != IEEE802154_FRAME_TYPE_ACK))
{
#if OPENTHREAD_ENABLE_DIAG