iwlwifi: pcie: fix iwl_so_trans_cfg link error when CONFIG_IWLMVM is disabled
PATCH 1/1 iwlwifi: pcie: fix iwl_so_trans_cfg link error when CONFIG_IWLMVM is disabled
Randy reported an error on his randconfig builds:
ERROR: modpost: "iwl_so_trans_cfg" [drivers/net/wireless/intel/iwlwifi/iwlwifi.ko] undefined!
The problem was that when CONFIG_IWLMVM was disabled we were still accessing iwl_so_trans_cfg. Fix it by moving IS_ENABLED() check before the access.
--- 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
@@ -1106,6 +1106,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } } +#if IS_ENABLED (CONFIG_IWLMVM ) +/* * Workaround for problematic SnJ device: sometimes when * certain RF modules are connected to SnJ, the device ID
@@ -1116,7 +1118,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)if (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 )/* * special-case 7265D, it has the same PCI IDs. *
Signature · 1 line
2.7.4
Quoted 10 lines · Kalle Valo
Randy reported an error on his randconfig builds:
ERROR: modpost: "
iwl_so_trans_cfg" [drivers/net/wireless/intel/iwlwifi/iwlwifi.ko] undefined!The problem was that when
CONFIG_IWLMVMwas disabled we were still accessingiwl_so_trans_cfg. Fix it by movingIS_ENABLED()check before the access.Reported-by Randy Dunlap <[email protected]>Signed-off-by Kalle Valo <[email protected]>---
Thanks for the fix, Kalle! Please take it directly to wireless-drivers.
--
Cheers,
Luca.
Quoted 9 lines · Kalle Valo
Randy reported an error on his randconfig builds:
ERROR: modpost: "
iwl_so_trans_cfg" [drivers/net/wireless/intel/iwlwifi/iwlwifi.ko] undefined!The problem was that when
CONFIG_IWLMVMwas disabled we were still accessingiwl_so_trans_cfg. Fix it by movingIS_ENABLED()check before the access.Reported-by Randy Dunlap <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Thanks.
Quoted 26 lines
--- 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@@ -1106,6 +1106,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } } +#if IS_ENABLED (CONFIG_IWLMVM ) +/* * Workaround for problematic SnJ device: sometimes when * certain RF modules are connected to SnJ, the device ID @@ -1116,7 +1118,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)if (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 )/* * special-case 7265D, it has the same PCI IDs. *
Signature · 1 line
~Randy
Quoted 9 lines · Kalle Valo
Randy reported an error on his randconfig builds:
ERROR: modpost: "
iwl_so_trans_cfg" [drivers/net/wireless/intel/iwlwifi/iwlwifi.ko] undefined!The problem was that when
CONFIG_IWLMVMwas disabled we were still accessingiwl_so_trans_cfg. Fix it by movingIS_ENABLED()check before the access.Reported-by Randy Dunlap <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Re: [5.12] iwlwifi: pcie: fix iwl_so_trans_cfg link error when CONFIG_IWLMVM is disabled
In reply to Kalle ValoQuoted 4 lines · Kalle Valo
Randy reported an error on his randconfig builds:
ERROR: modpost: "
iwl_so_trans_cfg" [drivers/net/wireless/intel/iwlwifi/iwlwifi.ko] undefined!
Quoted 8 lines
The problem was that when
CONFIG_IWLMVMwas disabled we were still accessingiwl_so_trans_cfg. Fix it by movingIS_ENABLED()check before the access.Reported-by Randy Dunlap <[email protected]>Fixes 930be4e76f26 ("iwlwifi: add support for SnJ with Jf devices")Signed-off-by Kalle Valo <[email protected]>Acked-by Luca Coelho <[email protected]>
Patch applied to wireless-drivers.git, thanks.
62541e266703 iwlwifi: pcie: fix iwl_so_trans_cfg link error when CONFIG_IWLMVM is disabled
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches