net/ieee802154_security: remove radio hal dependency and cleanup#15909
net/ieee802154_security: remove radio hal dependency and cleanup#15909miri64 merged 2 commits intoRIOT-OS:masterfrom
Conversation
|
lgtm. Maybe @fabian18 could also take a look, since he authored the code. |
|
First of all it sill works with and without hardware support. 👍 |
I tend to agree that avoiding an if-else could look cleaner, but I see some cons:
|
|
So, how should we move forward? Any strong opinion against keeping the conditional? |
|
I have no objections, going with the master: this branch: |
|
Thanks for the review! |
Contribution description
This PR does two things:
Removes duplicated definitions that were added to the radio HAL, which are already defined in
ieee802154_security.hThe shortcut functions are removed from the radio HAL. After a discussion with @jia200x, a
ieee802154_sec_context_twill likely find a place on the newly introduced submac later on. For now, as radios that use the radio HAL are still accessed via thenetdev_ieee802154_submac, the current status will still work. This allows to remove an avoidable dependency and reduce code duplication.Makes the default implementations of the cipher operations of ieee802154_security private
This makes the API of the module simpler, as the fallback implementations are kept private. Now the default cipher operations driver holds
NULLpointers, which indicates to use the fallback implementation. Documentation on this has been added.ROM usage seems not to be negatively impacted by the change. In fact, while compiling
examples/gnrc_networkingusingieee802154_securityforsamr21-xpro, thetextsection is reduced by 4 bytes.Testing procedure
Same procedure as for #15150:
Issues/PRs references
#15150