[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.
This commit is contained in:
Yakun Xu
2019-08-06 09:11:42 -07:00
committed by Jonathan Hui
parent 70a9046f79
commit c7a7d1e7f5
+2 -7
View File
@@ -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)
{