drivers: ieee802154_nrf5: Fix initialization order
The driver was reworked recently so that driver capabilites are obtained at runtime. The function to obtain the capabilities was called after L2 initialization though, which is invalid as L2 initialization code already depends on certain driver capabilites. Move the capability initializer to an earliest possible stage (i. e. just after the core driver is initialized) to fix the issue. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
627c04f962
commit
56f9efdebf
|
@ -555,6 +555,8 @@ static int nrf5_init(const struct device *dev)
|
||||||
|
|
||||||
nrf_802154_init();
|
nrf_802154_init();
|
||||||
|
|
||||||
|
nrf5_get_capabilities_at_boot();
|
||||||
|
|
||||||
nrf5_radio_cfg->irq_config_func(dev);
|
nrf5_radio_cfg->irq_config_func(dev);
|
||||||
|
|
||||||
k_thread_create(&nrf5_radio->rx_thread, nrf5_radio->rx_stack,
|
k_thread_create(&nrf5_radio->rx_thread, nrf5_radio->rx_stack,
|
||||||
|
@ -581,7 +583,6 @@ static void nrf5_iface_init(struct net_if *iface)
|
||||||
nrf5_radio->iface = iface;
|
nrf5_radio->iface = iface;
|
||||||
|
|
||||||
ieee802154_init(iface);
|
ieee802154_init(iface);
|
||||||
nrf5_get_capabilities_at_boot();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nrf5_configure(const struct device *dev,
|
static int nrf5_configure(const struct device *dev,
|
||||||
|
|
Loading…
Reference in a new issue