iwlwifi: pcie: fix iwl_so_trans_cfg link error when CONFIG_IWLMVM is disabled
authorKalle Valo <kvalo@codeaurora.org>
Thu, 25 Feb 2021 07:04:21 +0000 (09:04 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 26 Feb 2021 07:34:20 +0000 (09:34 +0200)
commit62541e266703549550e77fd46138422dbdc881f1
tree6ff67efebd0fc09ce5ce8ca0952e5279b8ec0f78
parent77d7e87128d4dfb400df4208b2812160e999c165
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.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: 930be4e76f26 ("iwlwifi: add support for SnJ with Jf devices")
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Acked-by: Luca Coelho <luciano.coelho@intel.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1614236661-20274-1-git-send-email-kvalo@codeaurora.org
drivers/net/wireless/intel/iwlwifi/pcie/drv.c