-
Notifications
You must be signed in to change notification settings - Fork 2k
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
drivers/netdev_ieee802154: cleanup NETOPT_MAX_PACKET_SIZE #9864
drivers/netdev_ieee802154: cleanup NETOPT_MAX_PACKET_SIZE #9864
Conversation
hey @bergzand are you still looking into this? |
Thanks for the ping :) I'm missing socket_zep ( |
@@ -151,6 +151,13 @@ int netdev_ieee802154_get(netdev_ieee802154_t *dev, netopt_t opt, void *value, | |||
res = sizeof(l2filter_t **); | |||
break; | |||
#endif | |||
case NETOPT_MAX_PACKET_SIZE: | |||
assert(max_len >= sizeof(int16_t)); | |||
*((uint16_t *)val) = (IEEE802154_FRAME_LEN_MAX - |
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.
/home/hydrazine/dev/RIOT/drivers/netdev_ieee802154/netdev_ieee802154.c:156:27: error: 'val' undeclared (first use in this function)
I guess this should be value
instead ;)
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.
Oh oh. I fixed this right after PR, but i forgot to push it, sorry.
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.
No worries.
In the future please use a fixup commit instead of force pushing. Using fixup commits makes it easy for the reviewer to track changes between revisions and they can be automatically squashed before merging.
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.
You are right. This was meant to go into the PR and i just missed the push, this was allready fixed before and i just pushed it now without touching it, thats why i commented it. Sorry for the inconvenience :)
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.
It's fine, luckily for me this PR is not that big :)
@bergzand good to sqash? |
@bergzand did you start testing? I could support a bit now |
To track some A:
|
@PeterKietzmann Thanks for taking over with the testing! I'm mostly curious whether all radios still use the same |
Oh, you can proceed testing, but maybe i can get rid of some more defines. On first glance it seems that I may also delete |
Then please add the WIP label next time!!! I will stop testing now. Faced other problems when putting my hands on the cc2420. |
@PeterKietzmann Can you please specify the problems? Also it was not obvious to me that the named defines are redundant because, even though they are just the same as |
Unrelated to your changes, see #10043 |
@PeterKietzmann Am I correct when I conclude that this PR doesn't break/impact connectivity and packet loss? To prevent this PR from getting stuck, how about we merge this and assume that @SemjonKerner is going to provide a cleanup in the near future to remove the rest of the obsolete defines. @SemjonKerner Does this make sense? Is this okay with you? |
@bergzand I don't expect this PR to be the reason for the observed problems with packet loss, and i think the tests suggest the same. So yes, this makes sense to me. |
@SemjonKerner Murdock is pointing out a few build errors with |
@bergzand fixed. Just a missing typecast. |
This let me conclude you were about to continue working on this PR. The problems I pointed out don't relate to this PR. As one can see, results w/ and w/o are "the same". I won't block this PR. |
Thanks, and especially thanks for the thorough test you did on this! @SemjonKerner Please squash |
Thanks for the cleanup @SemjonKerner! |
This PR relieves code duplications in netdev interfaces and unifies them in the shared, generic ieee802154 netdev driver.
I focused on NETOPT_MAX_PACKET_SIZE by intent, if there are more obvious duplications, I will fix those separately.