[riot-notifications] [RIOT-OS/RIOT] gnrc_netif: move netdev initialization to ops->init (#16918)

José Alamos notifications at github.com
Thu Sep 30 11:00:36 CEST 2021

The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.

### Contribution description
This PR moves the netdev initialization in the gnrc_netif thread to the netif specific `ops`. This is required in order to remove the GNRC<-> netdev dependency and be able to use non netdev layers with GNRC netif (e.g `ieee802154_submac`).
It also has the advantage that the specific interface has control of the netdev callbacks, in cases where the default is replaced ( `gnrc_lorawan`, `gnrc_gomach`, etc).
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes

### Testing procedure
Make sure that the following modules still work.
- esp_now_gnrc
- nrfmin_gnrc
- gnrc_netif_cc1xxx
- gnrc_netif_nrf24l01p_ng
- gnrc_xbee
- nimble_netif
- gomach
- lwmac
- gnrc_netif_ethernet
- gnrc_netif_raw
- gnrc_netif_ieee802154
- gnrc_netif_lorawan

Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output

### Issues/PRs references
Same as https://github.com/RIOT-OS/RIOT/pull/13614/files, but this time going in smaller steps.
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * <a href="https://github.com/RIOT-OS/RIOT/pull/16918/commits/30f92cd4a1d2500102c58e8e35630a05a0421c0a">net/gnrc_netif: add return values to init</a>
  * <a href="https://github.com/RIOT-OS/RIOT/pull/16918/commits/4bd19ee8e979aa1ecd89bd9737201051db52087e">net/gnrc_netif: move netdev init code to ops->init</a>
  * <a href="https://github.com/RIOT-OS/RIOT/pull/16918/commits/f59bf922891ba6146ec90df679b617d341c4e250">pkg/nimble/netif: adapt ops->init to handle driver initialization</a>
  * <a href="https://github.com/RIOT-OS/RIOT/pull/16918/commits/fee330b342d46c537fb5e2b42a4e9af316bea828">net/gomach: adapt ops->init to handle driver initialization</a>
  * <a href="https://github.com/RIOT-OS/RIOT/pull/16918/commits/0c6d313bb55147db00592dae82246b9eb6a04710">net/lwmac: adapt ops->init to handle driver initialization</a>
  * <a href="https://github.com/RIOT-OS/RIOT/pull/16918/commits/942683dd4cbca44b4336ba7ec5de80e4c3197bbc">net/gnrc/lorawan: adapt ops->init to handle driver initialization</a>
  * <a href="https://github.com/RIOT-OS/RIOT/pull/16918/commits/a3487c342a204200f3fd757cdf1aedb2b7cd068b">tests/gnrc_netif: adapt ops->init to handle driver initialization</a>

-- File Changes --

    M pkg/nimble/netif/nimble_netif.c (12)
    M sys/include/net/gnrc/netif.h (25)
    M sys/net/gnrc/link_layer/gomach/gomach.c (15)
    M sys/net/gnrc/link_layer/lwmac/lwmac.c (14)
    M sys/net/gnrc/netif/gnrc_netif.c (23)
    M sys/net/gnrc/netif/lorawan/gnrc_netif_lorawan.c (14)
    M tests/gnrc_netif/main.c (13)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210930/e3668070/attachment.htm>

More information about the notifications mailing list