Re: [PATCH net-next] net: lan966x: Fix when CONFIG_IPV6 is not set

From: Andrew Lunn
Date: Wed Feb 09 2022 - 08:54:39 EST


On Wed, Feb 09, 2022 at 11:18:23AM +0100, Horatiu Vultur wrote:
> When CONFIG_IPV6 is not set, then the compilation of the lan966x driver
> fails with the following error:
>
> drivers/net/ethernet/microchip/lan966x/lan966x_main.c:444: undefined
> reference to `ipv6_mc_check_mld'
>
> The fix consists in adding #ifdef around this code.

It might be better to add a stub function for when IPv6 is
disabled. We try to avoid #if in C code.

Andrew