[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220209101823.1270489-1-horatiu.vultur@microchip.com>
Date: Wed, 9 Feb 2022 11:18:23 +0100
From: Horatiu Vultur <horatiu.vultur@...rochip.com>
To: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <UNGLinuxDriver@...rochip.com>, <davem@...emloft.net>,
<kuba@...nel.org>, Horatiu Vultur <horatiu.vultur@...rochip.com>,
kernel test robot <lkp@...el.com>
Subject: [PATCH net-next] net: lan966x: Fix when CONFIG_IPV6 is not set
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.
Fixes: 47aeea0d57e80c ("net: lan966x: Implement the callback SWITCHDEV_ATTR_ID_BRIDGE_MC_DISABLED")
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: Horatiu Vultur <horatiu.vultur@...rochip.com>
---
drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
index d62484f14564..526dc41e98f8 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
@@ -439,10 +439,12 @@ static bool lan966x_hw_offload(struct lan966x *lan966x, u32 port,
ip_hdr(skb)->protocol == IPPROTO_IGMP)
return false;
+#if IS_ENABLED(CONFIG_IPV6)
if (skb->protocol == htons(ETH_P_IPV6) &&
ipv6_addr_is_multicast(&ipv6_hdr(skb)->daddr) &&
!ipv6_mc_check_mld(skb))
return false;
+#endif
return true;
}
--
2.33.0
Powered by blists - more mailing lists