Skip to content

Commit 23408ac

Browse files
committed
drivers: eth_mcus: Conditionally wrap IPV4/6 code
Regression failure introduced problem where driver code was not properly wrapping code that only existed when compiled for IPv4/v6 applications. Fixes #65549 Signed-off-by: David Leach <[email protected]>
1 parent 1dc6279 commit 23408ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/ethernet/eth_mcux.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,7 @@ static int eth_init(const struct device *dev)
11631163
return 0;
11641164
}
11651165

1166+
#if defined(CONFIG_NET_NATIVE_IPV4) || defined(CONFIG_NET_NATIVE_IPV6)
11661167
static void net_if_mcast_cb(struct net_if *iface,
11671168
const struct net_addr *addr,
11681169
bool is_joined)
@@ -1185,15 +1186,18 @@ static void net_if_mcast_cb(struct net_if *iface,
11851186
ENET_LeaveMulticastGroup(context->base, mac_addr.addr);
11861187
}
11871188
}
1189+
#endif /* CONFIG_NET_NATIVE_IPV4 || CONFIG_NET_NATIVE_IPV6 */
11881190

11891191
static void eth_iface_init(struct net_if *iface)
11901192
{
11911193
const struct device *dev = net_if_get_device(iface);
11921194
struct eth_context *context = dev->data;
11931195

1196+
#if defined(CONFIG_NET_NATIVE_IPV4) || defined(CONFIG_NET_NATIVE_IPV6)
11941197
static struct net_if_mcast_monitor mon;
11951198

11961199
net_if_mcast_mon_register(&mon, iface, net_if_mcast_cb);
1200+
#endif /* CONFIG_NET_NATIVE_IPV4 || CONFIG_NET_NATIVE_IPV6 */
11971201

11981202
net_if_set_link_addr(iface, context->mac_addr,
11991203
sizeof(context->mac_addr),

0 commit comments

Comments
 (0)