From 11b6854b21b2c571e744029ec062ad85434931bc Mon Sep 17 00:00:00 2001
From: Anders Roxell <anders.roxell@linaro.org>
Date: Mon, 9 Jun 2025 13:02:51 +0200
Subject: [PATCH] net: enetc: Fix build error by selecting NXP_NETC_LIB

Commit e3f4a0a8ddb4 ("net: enetc: add command BD ring support for i.MX95
ENETC") introduced calls to ntmp_* functions from the NXP NETC library,
but did not ensure that the required dependency (NXP_NETC_LIB) was
selected in Kconfig.

This leads to link errors in allmodconfig or other configurations where
FSL_ENETC_CORE is enabled but NXP_NETC_LIB is not.

Fix it by making FSL_ENETC_CORE select NXP_NETC_LIB.

Fixes: e3f4a0a8ddb4 ("net: enetc: add command BD ring support for i.MX95 ENETC")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 drivers/net/ethernet/freescale/enetc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/freescale/enetc/Kconfig b/drivers/net/ethernet/freescale/enetc/Kconfig
index e917132d3714..54d46a9105bb 100644
--- a/drivers/net/ethernet/freescale/enetc/Kconfig
+++ b/drivers/net/ethernet/freescale/enetc/Kconfig
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 config FSL_ENETC_CORE
 	tristate
+	select NXP_NETC_LIB
 	help
 	  This module supports common functionality between the PF and VF
 	  drivers for the NXP ENETC controller.
-- 
2.47.2

