Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

gnrc_netif: move option_tested to default init function #18284

Merged
merged 1 commit into from
Jul 11, 2022

Conversation

jia200x
Copy link
Member

@jia200x jia200x commented Jun 29, 2022

Contribution description

This PR moves the netdev specific options_tested to the gnrc_netif_default_init.
Although the current implementation of gnrc_netif is still dependent to netdev, this allows to encapsulate all netdev specific calls in the gnrc_netif_ops_t functions.

Testing procedure

Probably a compile test should suffice...

Issues/PRs references

Required by #18156

@PeterKietzmann
Copy link
Member

I do not really see through the gnrc_netif.c file and its organization, and was not aware of options_tested. Could you maybe explain (at the example of openDSME) why you have to move that assertion?

@jia200x
Copy link
Member Author

jia200x commented Jul 4, 2022

This option_tested variable simply asserts that the "test" for netdev device ran (usually called by netif->ops->init).
Therefore, it's a netdev specific thing.

In case of netdev-less GNRC netif implementations (e,g openDSME) this will simply assert because for obvious reasons netdev is not tested.

@benpicco benpicco added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer labels Jul 11, 2022
@benpicco benpicco merged commit 2198eb8 into RIOT-OS:master Jul 11, 2022
@chrysn chrysn added this to the Release 2022.07 milestone Aug 25, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Area: network Area: Networking Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants