net: if: Fix parameter in NET_DEVICE_DT_DEFINE_INSTANCE
The NET_DEVICE_DT_DEFINE_INSTANCE() macro was passing an invalid dev_name to Z_NET_DEVICE_INIT_INSTANCE(). Change this parameter to get device name based on the node_id, matching other macros. Signed-off-by: Keith Short <keithshort@google.com>
This commit is contained in:
parent
2453f16099
commit
93f665e619
1 changed files with 8 additions and 7 deletions
|
@ -2391,13 +2391,14 @@ struct net_if_api {
|
||||||
* @param l2_ctx_type Type of L2 context data.
|
* @param l2_ctx_type Type of L2 context data.
|
||||||
* @param mtu Maximum transfer unit in bytes for this network interface.
|
* @param mtu Maximum transfer unit in bytes for this network interface.
|
||||||
*/
|
*/
|
||||||
#define NET_DEVICE_DT_DEFINE_INSTANCE(node_id, instance, init_fn, \
|
#define NET_DEVICE_DT_DEFINE_INSTANCE(node_id, instance, init_fn, \
|
||||||
pm_control_fn, data, cfg, prio, \
|
pm_control_fn, data, cfg, prio, \
|
||||||
api, l2, l2_ctx_type, mtu) \
|
api, l2, l2_ctx_type, mtu) \
|
||||||
Z_NET_DEVICE_INIT_INSTANCE(node_id, node_id, DT_LABEL(node_id), \
|
Z_NET_DEVICE_INIT_INSTANCE(node_id, \
|
||||||
instance, init_fn, pm_control_fn, \
|
Z_DEVICE_DT_DEV_NAME(node_id), \
|
||||||
data, cfg, prio, api, l2, \
|
DT_LABEL(node_id), instance, \
|
||||||
l2_ctx_type, mtu)
|
pm_control_fn, data, cfg, prio, api, \
|
||||||
|
l2, l2_ctx_type, mtu)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def NET_DEVICE_DT_INST_DEFINE_INSTANCE
|
* @def NET_DEVICE_DT_INST_DEFINE_INSTANCE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue