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.
Reported-by: Randy Dunlap <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index 314fec4a89ad..ffaf973dae94 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -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.
*
--
2.7.4
On Thu, 2021-02-25 at 09:04 +0200, Kalle Valo wrote:
> 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.
>
> 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.
Acked-by: Luca Coelho <[email protected]>
--
Cheers,
Luca.
On 2/24/21 11:04 PM, Kalle Valo wrote:
> 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.
>
> Reported-by: Randy Dunlap <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>
Acked-by: Randy Dunlap <[email protected]> # build-tested
Thanks.
> ---
> drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
> index 314fec4a89ad..ffaf973dae94 100644
> --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
> +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
> @@ -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.
> *
>
--
~Randy
Kalle Valo <[email protected]> writes:
> 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.
>
> Reported-by: Randy Dunlap <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>
Fixes: 930be4e76f26 ("iwlwifi: add support for SnJ with Jf devices")
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Kalle Valo <[email protected]> wrote:
> 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.
>
> 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]>
> Acked-by: Randy Dunlap <[email protected]> # build-tested
Patch applied to wireless-drivers.git, thanks.
62541e266703 iwlwifi: pcie: fix iwl_so_trans_cfg link error when CONFIG_IWLMVM is disabled
--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches