-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM:+1:
There was a problem hiding this 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!
examples/platforms/cc2538/radio.c
Outdated
sReceiveFrame.mInfo.mRxInfo.mMsec = otPlatAlarmMilliGetNow(); | ||
sReceiveFrame.mInfo.mRxInfo.mUsec = 0; // Don't support microsecond timer for now. | ||
#endif | ||
if (otPlatRadioGetPromiscuous(NULL)) |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
Sniffing using radio only mode firmware results in packets without timestamp information. This PR attaches timestamp info when in promiscuous mode.