-
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
mrf24j40: Don't use netdev_ieee802154_t for link layer address #10402
Conversation
The last commit replaces a number of shifts by |
blocking until #10537 is merged |
#10537 got merged into master. Please rebase. |
d69115a
to
4ea4aae
Compare
Rebased! |
@gschorcht can you test this? |
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.
Question
drivers/mrf24j40/mrf24j40_getset.c
Outdated
#ifdef MODULE_SIXLOWPAN | ||
/* https://tools.ietf.org/html/rfc4944#section-12 requires the first bit to | ||
* 0 for unicast addresses */ | ||
dev->netdev.short_addr[0] &= 0x7F; | ||
naddr.u8[0] &= 0xFF7F; |
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.
left is uint8_t
, right is signed
with at least 16-byte defined. Why don't keep it 0x7F
as in the original?
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
This change modifies the mrf24j40 driver to read the address directly from the device instead of returning the netdev_ieee802154_t member
4ea4aae
to
e29ebc7
Compare
Reworded the first commit message as it mentioned the |
Of course, I will do it tomorrow. |
ACK, my comment was addressed and now it only removes the (addressing) dependency from the netdev_ieee802154_t
struct.
*(uint64_t*)val = mrf24j40_get_addr_long(dev); | ||
res = sizeof(uint64_t); | ||
} | ||
break; |
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.
Ok this part is different, but it makes sense and is sane ;-)
work as expected |
@bergzand please squash |
e29ebc7
to
a6e7882
Compare
squashed! |
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.
ACK
Contribution description
This PR modifies the behaviour of the mrf24j40 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 the netdev_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 the ifconfig command.
Testing procedure
Test whether:
Issues/PRs references
related to #10401, part of #7736