Skip to content

Commit 1ef6b48

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 3ea2951 commit 1ef6b48

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_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
@@ -552,7 +552,7 @@ static struct dsa_api dsa_netc_api = {
552552
.phy_mode = NETC_PHY_MODE(port), \
553553
}; \
554554
struct dsa_port_config dsa_##n##_##port##_config = { \
555-
.use_random_mac_addr = DT_NODE_HAS_PROP(port, zephyr_random_mac_address), \
555+
.use_random_mac_addr = DT_PROP(port, zephyr_random_mac_address), \
556556
.mac_addr = DT_PROP_OR(port, local_mac_address, {0}), \
557557
.port_idx = DT_REG_ADDR(port), \
558558
.phy_dev = DEVICE_DT_GET_OR_NULL(DT_PHANDLE(port, phy_handle)), \

0 commit comments

Comments
 (0)