net: if: Network interface was missing for offloaded drivers
The NET_IF_OFFLOAD_INIT() macro was not converted to use
Z_STRUCT_SECTION_ITERABLE() macros in commit 62580748e5
("net: Use section foreach macros"). This meant that for those boards
that use offloaded network stack, the network interface was not created
and network connectivity was lost.
Fixes #27037
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
b046ca5409
commit
2705a9d61b
1 changed files with 6 additions and 6 deletions
|
@ -2187,14 +2187,14 @@ struct net_if_api {
|
||||||
}
|
}
|
||||||
|
|
||||||
#define NET_IF_OFFLOAD_INIT(dev_name, sfx, _mtu) \
|
#define NET_IF_OFFLOAD_INIT(dev_name, sfx, _mtu) \
|
||||||
static struct net_if_dev (NET_IF_DEV_GET_NAME(dev_name, sfx)) __used \
|
static Z_STRUCT_SECTION_ITERABLE(net_if_dev, \
|
||||||
__attribute__((__section__(".net_if_dev.data"))) = { \
|
NET_IF_DEV_GET_NAME(dev_name, sfx)) = { \
|
||||||
.dev = &(__device_##dev_name), \
|
.dev = &(DEVICE_NAME_GET(dev_name)), \
|
||||||
.mtu = _mtu, \
|
.mtu = _mtu, \
|
||||||
}; \
|
}; \
|
||||||
static struct net_if \
|
static Z_DECL_ALIGN(struct net_if) \
|
||||||
(NET_IF_GET_NAME(dev_name, sfx))[NET_IF_MAX_CONFIGS] __used \
|
NET_IF_GET_NAME(dev_name, sfx)[NET_IF_MAX_CONFIGS] \
|
||||||
__attribute__((__section__(".net_if.data"))) = { \
|
__used __in_section(_net_if, static, net_if) = { \
|
||||||
[0 ... (NET_IF_MAX_CONFIGS - 1)] = { \
|
[0 ... (NET_IF_MAX_CONFIGS - 1)] = { \
|
||||||
.if_dev = &(NET_IF_DEV_GET_NAME(dev_name, sfx)), \
|
.if_dev = &(NET_IF_DEV_GET_NAME(dev_name, sfx)), \
|
||||||
NET_IF_CONFIG_INIT \
|
NET_IF_CONFIG_INIT \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue