-
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
at86rf2xx: Don't use netdev_ieee802154_t for link layer address #10401
Conversation
This change modifies the at86rf2xx driver to read the address directly from the device instead of returning the netdev_ieee802154_t member
This adds the link layer address retrieval to the netdev::get function. The consequence is that the address is directly read from the device and no longer from the netdev_ieee802154_t layer when requesting the address.
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'm not sure about the pulling in of the byteorder
dependency. I don't mind it, but other voices might disagree.
dev->netdev.short_addr[0] = (uint8_t)(addr); | ||
dev->netdev.short_addr[1] = (uint8_t)(addr >> 8); | ||
/* addr is in network byte order */ | ||
network_uint16_t ap; |
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.
What does ap
stand for? in the original code here I could imagine it meaning "address pointer", but this is not a pointer anymore... :-/
It can do without, the motivation for adding it here was to clarify the code a bit, at least to have it clear that the addresses here are already in big endian form. |
Question: How are |
Maybe put the introduction into a separate commit. That way we can easier test the size impact and also revert it if others don't like it. |
Do you mean after merging this PR or in current master? In current master they are set in the WIth this PR it is no longer set, but also no longer read. Instead it is directly read from the device driver. This way the behaviour matches the behaviour for ethernet drivers. |
Aren't they read/set by the |
I can't remove them yet since other drivers are not yet adapted. But the idea is to remove the |
Thanks, that and #7736 (comment) clarify the trajectory of this for me. |
Just remembered, |
I want to do a similar PR for the radio channel, I can imagine that waiting for that PR and testing them both at the same time can save some time :) |
We should wait merging this until #10537 is merged ;-) |
I believe |
#10537 got merged into master. Please rebase. |
Ping @bergzand? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
I guess this needs to be re-thought with #13943 around the corner. Let's close it as archived? |
Contribution description
This PR modifies the behaviour of the at86rf2xx driver to not propagate the link layer address to the
netdev_ieee802154_t
struct. This helps the goal of separating the netdev and the ieee802154_t layer by another bit. The end goal is to remove the short and long address from thenetdev_ieee802154_t
struct and match the behaviour of the ethernet drivers.The performance impact of this change should be negligible, the
NETOPT_ADDRESS(_LONG)
call is only used on initialization and by theifconfig
command.Testing procedure
Test whether:
Issues/PRs references
First part in a sequence to remove the link layer address from the
netdev_ieee802154_t
struct