public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wifi: iwlwifi: fix iwlmld-test link failure
@ 2025-05-23 12:10 Arnd Bergmann
  2025-05-23 12:14 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2025-05-23 12:10 UTC (permalink / raw)
  To: Miri Korenblit, Johannes Berg, Avraham Stern, Yedidya Benshimol,
	Benjamin Berg
  Cc: Arnd Bergmann, Daniel Gabay, Anjaneyulu, linux-wireless,
	linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

If the driver is built-in but the test is in a loadable module, the symbols
are not exported, resulting in a link failure:

ERROR: modpost: "iwl_get_cmd_string" [drivers/net/wireless/intel/iwlwifi/mld/tests/iwlmld-tests.ko] undefined!
ERROR: modpost: "__iwl_dbg" [drivers/net/wireless/intel/iwlwifi/mld/tests/iwlmld-tests.ko] undefined!

Enable CONFIG_IWLWIFI_OPMODE_MODULAR in this configuration, to
make those symbols visible.

Fixes: d1e879ec600f ("wifi: iwlwifi: add iwlmld sub-driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/wireless/intel/iwlwifi/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/Kconfig b/drivers/net/wireless/intel/iwlwifi/Kconfig
index 82f577da1a8b..153a8368b412 100644
--- a/drivers/net/wireless/intel/iwlwifi/Kconfig
+++ b/drivers/net/wireless/intel/iwlwifi/Kconfig
@@ -97,6 +97,7 @@ config IWLWIFI_OPMODE_MODULAR
 	default y if IWLDVM=m
 	default y if IWLMVM=m
 	default y if IWLMLD=m
+	default y if IWLWIFI_KUNIT_TESTS=m
 
 comment "WARNING: iwlwifi is useless without IWLDVM or IWLMVM or IWLMLD"
 	depends on IWLDVM=n && IWLMVM=n && IWLMLD=n
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-23 12:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23 12:10 [PATCH] wifi: iwlwifi: fix iwlmld-test link failure Arnd Bergmann
2025-05-23 12:14 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox