From 14875e1380c1c88f8f83753aad6752b29c1ee00c Mon Sep 17 00:00:00 2001 From: Zhanglong Xia Date: Tue, 6 Aug 2019 01:42:14 +0800 Subject: [PATCH] [posix] fix time sync issue (#4057) #4015 missed setting the timestamp when TIME_SYNC is enabled. --- examples/platforms/posix/radio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/platforms/posix/radio.c b/examples/platforms/posix/radio.c index 4d0e9d4a9..f6bda6889 100644 --- a/examples/platforms/posix/radio.c +++ b/examples/platforms/posix/radio.c @@ -634,7 +634,9 @@ static void radioReceive(otInstance *aInstance) otEXPECT(sReceiveFrame.mChannel == sReceiveMessage.mChannel); otEXPECT(sState == OT_RADIO_STATE_RECEIVE || sState == OT_RADIO_STATE_TRANSMIT); +#if !OPENTHREAD_CONFIG_TIME_SYNC_ENABLE if (otPlatRadioGetPromiscuous(aInstance)) +#endif { // Unable to simulate SFD, so use the rx done timestamp instead. sReceiveFrame.mInfo.mRxInfo.mTimestamp = otPlatTimeGet();