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:
Keith Short 2021-10-05 17:15:46 -06:00 committed by Anas Nashif
commit 93f665e619

View file

@ -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