Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[platform] attach timestamp in promiscuous mode #2954

Merged
merged 4 commits into from
Aug 10, 2018

Conversation

bukepo
Copy link
Member

@bukepo bukepo commented Aug 9, 2018

Sniffing using radio only mode firmware results in packets without timestamp information. This PR attaches timestamp info when in promiscuous mode.

@bukepo bukepo requested review from jwhui and chshu August 9, 2018 08:23
Copy link
Member

@chshu chshu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM:+1:

Copy link
Contributor

@turon turon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thanks for adding timestamp support!

sReceiveFrame.mInfo.mRxInfo.mMsec = otPlatAlarmMilliGetNow();
sReceiveFrame.mInfo.mRxInfo.mUsec = 0; // Don't support microsecond timer for now.
#endif
if (otPlatRadioGetPromiscuous(NULL))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to pass the proper instance, rather than NULL. In this case, sInstance already exists. However, I understand, in some cases below, sInstance does not. Can we update the platform code to maintain sInstance?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@jwhui jwhui added the P3 label Aug 9, 2018
@jwhui jwhui merged commit 0c07c53 into openthread:master Aug 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants