Commit 93f665e6 authored by Keith Short's avatar Keith Short Committed by Anas Nashif
Browse files

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: default avatarKeith Short <keithshort@google.com>
parent 2453f160
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -2394,10 +2394,11 @@ struct net_if_api {
#define NET_DEVICE_DT_DEFINE_INSTANCE(node_id, instance, init_fn,	\
				      pm_control_fn, data, cfg, prio,	\
				      api, l2, l2_ctx_type, mtu)	\
	Z_NET_DEVICE_INIT_INSTANCE(node_id, node_id, DT_LABEL(node_id),	\
				   instance, init_fn, pm_control_fn,	\
				   data, cfg, prio, api, l2,		\
				   l2_ctx_type, mtu)
	Z_NET_DEVICE_INIT_INSTANCE(node_id,				\
				   Z_DEVICE_DT_DEV_NAME(node_id),	\
				   DT_LABEL(node_id), instance,		\
				   pm_control_fn, data, cfg, prio, api,	\
				   l2, l2_ctx_type, mtu)

/**
 * @def NET_DEVICE_DT_INST_DEFINE_INSTANCE