-
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
netdev_ieee802154/radios: refactor PAN ID reset to generic ieee802154 reset #10384
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.
ACK on the code change. It removes a lot of duplicates of setting netdev_ieee802154_t::pan
for a device and centralizes it and the initialization of the value to the cental netdev_ieee802154_reset()
function, which is called by either the init or reset function of all touched devices.
One minor optimization proposal I'm not sure about: I think this can be removed:
RIOT/cpu/cc2538/radio/cc2538_rf_netdev.c
Lines 364 to 365 in 83ca890
netdev_ieee802154_set(&dev->netdev, NETOPT_NID, | |
&pan, sizeof(pan)); |
I'll test with the devices available to me as soon as I have access to them again.
Thanks, I already suspected that I was missing something in that driver. |
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.
Another question after scrolling through the code a bit again
Tested |
Also tested |
Murdock likes it (at least compilation-wise) so I guess we can put a (virtual) tick on that as well :-) |
|
|
@PeterKietzmann can you have a look with the |
@smlng do you have access to the missing devices? |
( |
remote-revb (cc2538) works as expected |
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.
PreACK, looks good to me
@smlng please don't approve a PR, if you did not test everything. A verbal ACK and the respective Reviewed:
labels should suffice.
Tested on |
Tested with mrf24j40 + nucleo-l476rg and gnrc_networking:
-> works as expected to I'll check the box above. |
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.
All drivers were tested. @bergzand please squash!
This commit adds the reset of the PAN ID to the generic ieee802154 reset function.
This write access is only required when a modification to the PAN ID happened directly via this function and not via a netdev::set operation. The only direct call was done in the reset function of the driver
This write access is only required when a modification to the PAN ID happened directly via this function and not via a netdev::set operation. The only direct call was done in the reset function of the driver
This write access is only required when a modification to the PAN ID happened directly via this function and not via a netdev::set operation. The only direct call was done in the reset function of the driver
This write access is only required when a modification to the PAN ID happened directly via this function and not via a netdev::set operation. The only direct call was done in the reset function of the driver
4d88490
to
2abf86a
Compare
Squashed, thanks for testing! |
Contribution description
This PR refactors the PAN ID from the radio reset function to the generic
netdev_ieee802154_reset
and sets it via thenetdev::set
call. This allows for removal of thedev->netdev
accesses in the radio specificset_pan
calls.Testing procedure
Verify that initialization and reset of the PAN ID works for the affected radios
Issues/PRs references
Chipping away at dependencies for #7736