Skip to contentSkip to conversation

iwlwifi: fix link error without CONFIG_IWLMVM

PATCH In review Arnd Bergmann 2 participants 2 messages Feb 25, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iwlwifi: fix link error without CONFIG_IWLMVM

From: Arnd Bergmann <[email protected]>

A runtime check that was introduced recently failed to check for the matching Kconfig symbol:

ld.lld: error: undefined symbol: iwl_so_trans_cfg

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

referenced by drv.c
net/wireless/intel/iwlwifi/pcie/drv.o:(iwl_pci_probe)

Fixes 930be4e76f26 ("iwlwifi: add support for SnJ with Jf devices")
---
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/pcie/drv.c +2 -1
index 314fec4a89ad..a2f5c4fc2324 100644
@@ -1113,7 +1113,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	 * here.  But if we detect that the MAC type is actually SnJ,
 	 * we should switch to it here to avoid problems later.
 	 */
-	if (CSR_HW_REV_TYPE(iwl_trans->hw_rev) == IWL_CFG_MAC_TYPE_SNJ)
+	if (IS_ENABLED(CONFIG_IWLMVM) &&
+	    CSR_HW_REV_TYPE(iwl_trans->hw_rev) == IWL_CFG_MAC_TYPE_SNJ)
 		iwl_trans->trans_cfg = &iwl_so_trans_cfg;
 
 #if IS_ENABLED(CONFIG_IWLMVM)
Signature · 1 line
2.29.2
#1 lore raw
Quoted 11 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

A runtime check that was introduced recently failed to check for the matching Kconfig symbol:

ld.lld: error: undefined symbol: iwl_so_trans_cfg

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

referenced by drv.c
net/wireless/intel/iwlwifi/pcie/drv.o:(iwl_pci_probe)

Fixes 930be4e76f26 ("iwlwifi: add support for SnJ with Jf devices")

A sent a similar patch this morning:

https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

But I forgot to include an Fixes tag, I'll add that to my patch during commit.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches