From: Johannes Berg <johannes@sipsolutions.net>
To: Arnd Bergmann <arnd@kernel.org>,
Miri Korenblit <miriam.rachel.korenblit@intel.com>,
Avraham Stern <avraham.stern@intel.com>,
Yedidya Benshimol <yedidya.ben.shimol@intel.com>,
Benjamin Berg <benjamin.berg@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Daniel Gabay <daniel.gabay@intel.com>,
Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wifi: iwlwifi: fix iwlmld-test link failure
Date: Fri, 23 May 2025 14:14:09 +0200 [thread overview]
Message-ID: <d7b656f2e44833f17cb4d15dc7fd985db8c9b485.camel@sipsolutions.net> (raw)
In-Reply-To: <20250523121019.2196490-1-arnd@kernel.org>
On Fri, 2025-05-23 at 14:10 +0200, Arnd Bergmann wrote:
> 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.
Hah, thanks. We were just debating exactly this fix, but I think if
CONFIG_INET is _also_ turned off, we still have another link issue, so
what we have now is actually the below (maybe the Fixes: is wrong then
though)
commit 800fe085168e073910d8a0b758df0399d3c38323
Author: Benjamin Berg <benjamin.berg@intel.com>
Date: Mon May 12 14:04:33 2025 +0200
[BUGFIX] wifi: iwlwifi: ensure iwl_average_neg_dbm is available for kunit
The function was not compiled if CONFIG_INET was not enabled. Change it
to always be compiled in. Also update the IWLWIFI_OPMODE_MODULAR check
so that the symbol is exported even if only the kunit tests are build
as a module.
Change-Id: I02014d338de26768533cd07225780563393b4591
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505120905.ceWoI4rO-lkp@intel.com/
Fixes: 1f52f7f0abe2 ("wifi: iwlwifi: move dBm averaging function into utils")
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
diff --git a/drivers/net/wireless/intel/iwlwifi/Kconfig b/drivers/net/wireless/intel/iwlwifi/Kconfig
index b2fb1dee59c0..e4a3fe2eaf57 100644
--- a/drivers/net/wireless/intel/iwlwifi/Kconfig
+++ b/drivers/net/wireless/intel/iwlwifi/Kconfig
@@ -105,6 +105,7 @@ config IWLWIFI_OPMODE_MODULAR
default y if IWLMVM=m
default y if IWLXVT=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
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-utils.c b/drivers/net/wireless/intel/iwlwifi/iwl-utils.c
index 9edb8f512058..0049a8ca60f3 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-utils.c
@@ -82,6 +82,7 @@ int iwl_tx_tso_segment(struct sk_buff *skb, unsigned int num_subframes,
return 0;
}
IWL_EXPORT_SYMBOL(iwl_tx_tso_segment);
+#endif /* CONFIG_INET */
static u32 iwl_div_by_db(u32 value, u8 db)
{
@@ -193,5 +194,3 @@ s8 iwl_average_neg_dbm(const u8 *neg_dbm_values, u8 len)
return clamp(average_magnitude - i, -128, 0);
}
IWL_EXPORT_SYMBOL(iwl_average_neg_dbm);
-
-#endif /* CONFIG_INET */
prev parent reply other threads:[~2025-05-23 12:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 12:10 Arnd Bergmann
2025-05-23 12:14 ` Johannes Berg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d7b656f2e44833f17cb4d15dc7fd985db8c9b485.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=avraham.stern@intel.com \
--cc=benjamin.berg@intel.com \
--cc=daniel.gabay@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=miriam.rachel.korenblit@intel.com \
--cc=pagadala.yesu.anjaneyulu@intel.com \
--cc=yedidya.ben.shimol@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®