Skip to content

Commit ee4a0fb

Browse files
committed
drivers: ethernet: dsa_nxp_imx_netc: fix zephyr random mac
zephyr,random-mac-address defaults to 0 or 1, which is always available in generated code. so we can use the value itself. Signed-off-by: Sven Ginka <s.ginka@sensry.de>
1 parent d77b58a commit ee4a0fb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/connectivity/networking/dsa.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ of i.MX NETC.
8383
.phy_mode = NETC_PHY_MODE(port), \
8484
}; \
8585
struct dsa_port_config dsa_##n##_##port##_config = { \
86-
.use_random_mac_addr = DT_NODE_HAS_PROP(port, zephyr_random_mac_address), \
86+
.use_random_mac_addr = DT_INST_PROP(port, zephyr_random_mac_address), \
8787
.mac_addr = DT_PROP_OR(port, local_mac_address, {0}), \
8888
.port_idx = DT_REG_ADDR(port), \
8989
.phy_dev = DEVICE_DT_GET_OR_NULL(DT_PHANDLE(port, phy_handle)), \

drivers/ethernet/dsa/dsa_nxp_imx_netc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static struct dsa_api dsa_netc_api = {
124124
.phy_mode = NETC_PHY_MODE(port), \
125125
}; \
126126
struct dsa_port_config dsa_##n##_##port##_config = { \
127-
.use_random_mac_addr = DT_NODE_HAS_PROP(port, zephyr_random_mac_address), \
127+
.use_random_mac_addr = DT_INST_PROP(port, zephyr_random_mac_address), \
128128
.mac_addr = DT_PROP_OR(port, local_mac_address, {0}), \
129129
.port_idx = DT_REG_ADDR(port), \
130130
.phy_dev = DEVICE_DT_GET_OR_NULL(DT_PHANDLE(port, phy_handle)), \

0 commit comments

Comments
 (0)