From c7a7d1e7f58b5018bc5f558bbe48db441b67cd3d Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Wed, 7 Aug 2019 00:11:42 +0800 Subject: [PATCH] [posix] always set timestamp (#4066) This sets frame rx timestamp regardless of promiscuous mode enabled or not. This is useful for debugging time related issues. --- examples/platforms/posix/radio.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/examples/platforms/posix/radio.c b/examples/platforms/posix/radio.c index f6bda6889..3c32f3e3c 100644 --- a/examples/platforms/posix/radio.c +++ b/examples/platforms/posix/radio.c @@ -634,13 +634,8 @@ 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(); - } + // Unable to simulate SFD, so use the rx done timestamp instead. + sReceiveFrame.mInfo.mRxInfo.mTimestamp = otPlatTimeGet(); if (sTxWait) {