wifi: ath12k: fix QCOM_RPROC_COMMON dependency
PATCH RESEND 1/2 wifi: ath12k: fix QCOM_RPROC_COMMON dependency
From: Arnd Bergmann <[email protected]>
The AHB driver depends on the remoteproc interface, which could be in a loadable module when ath12k itself is built-in:
arm-linux-gnueabi-ld: drivers/net/wireless/ath/ath12k/ahb.o: in function `ath12k_ahb_probe':
ahb.c:(.text+0xb2c): undefined reference to `qcom_register_ssr_notifier'
arm-linux-gnueabi-ld: ahb.c:(.text+0x1000): undefined reference to `qcom_unregister_ssr_notifier'
arm-linux-gnueabi-ld: drivers/net/wireless/ath/ath12k/ahb.o: in function `ath12k_ahb_remove':
ahb.c:(.text+0x1146): undefined reference to `qcom_unregister_ssr_notifier'
Add a dependency to only allow the AHB portion to be enabled if either remoteproc support is built-in or ath12k is itself a loadable module.
A better way to fix this would be to make the driver more modular and ensure the AHB and PCI components are built into separate loadable modules like it is done for the ATH10K driver, but that is a much larger rework that someone else can do in the future.
--- drivers/net/wireless/ath/ath12k/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/ath12k/Kconfig +1 -0
@@ -17,6 +17,7 @@ config ATH12K config ATH12K_AHB bool "Qualcomm ath12k AHB support" depends on ATH12K && REMOTEPROC + depends on QCOM_RPROC_COMMON=y || ATH12K=m select QCOM_MDT_LOADER select QCOM_PAS help
Signature · 1 line
2.53.0
PATCH 2/2 wifi: ath12k: add GENERIC_MSI_IRQ dependency
From: Arnd Bergmann <[email protected]>
The platform_device_msi_init_and_alloc_irqs() interface can be disabled based on the configuration, though it is usually enabled. Without it, the driver now fails to build:
drivers/net/wireless/ath/ath12k/pcic.c: In function 'ath12k_pcic_config_irq':drivers/net/wireless/ath/ath12k/pcic.c:387:15: error: implicit declaration of function 'platform_device_msi_init_and_alloc_irqs' [-Wimplicit-function-declaration]
387 | ret = platform_device_msi_init_and_alloc_irqs(&pdev->dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath12k/pcic.c:424:9: error: implicit declaration of function 'platform_device_msi_free_irqs_all' [-Wimplicit-function-declaration]
424 | platform_device_msi_free_irqs_all(&pdev->dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Add a Kconfig dependency for it.
---
Note that this patch applied cleanly on top of another Kconfig fix that I sent a while ago that is also still required, see
https://lore.kernel.org/all/[email protected]/
--- drivers/net/wireless/ath/ath12k/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/ath/ath12k/Kconfig +1 -0
@@ -18,6 +18,7 @@ config ATH12K_AHB bool "Qualcomm ath12k AHB support" depends on ATH12K && REMOTEPROC depends on QCOM_RPROC_COMMON=y || ATH12K=m + depends on GENERIC_MSI_IRQ select QCOM_MDT_LOADER select QCOM_PAS help
Signature · 1 line
2.53.0
Re: [PATCH 2/2] wifi: ath12k: add GENERIC_MSI_IRQ dependency
Quoted 32 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The
platform_device_msi_init_and_alloc_irqs()interface can be disabled based on the configuration, though it is usually enabled. Without it, the driver now fails to build:
drivers/net/wireless/ath/ath12k/pcic.c: In function 'ath12k_pcic_config_irq':drivers/net/wireless/ath/ath12k/pcic.c:387:15: error: implicit declaration of function 'platform_device_msi_init_and_alloc_irqs' [-Wimplicit-function-declaration]
387 | ret = platform_device_msi_init_and_alloc_irqs(&pdev->dev,| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath12k/pcic.c:424:9: error: implicit declaration of function 'platform_device_msi_free_irqs_all' [-Wimplicit-function-declaration] 424 | platform_device_msi_free_irqs_all(&pdev->dev); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Add a
Kconfigdependency for it.Fixes b9bc9ef941bd ("wifi: ath12k: Add platform MSI support for CE")Signed-off-by Arnd Bergmann <[email protected]>---
Note that this patch applied cleanly on top of anotherKconfigfix that I sent a while ago that is also still required, see
https://lore.kernel.org/all/[email protected]/--- drivers/net/wireless/ath/ath12k/Kconfig | 1 + 1 file changed, 1 insertion(+)drivers/net/wireless/ath/ath12k/Kconfig +0
-0
drivers/net/wireless/ath/ath12k/Kconfig config ATH12K_AHB · line 24
Quoted 7 lines
drivers/net/wireless/ath/ath12k/Kconfig +1
-0@@ -18,6 +18,7 @@ config ATH12K_AHB bool "Qualcomm ath12k AHB support" depends on ATH12K && REMOTEPROC depends on QCOM_RPROC_COMMON=y || ATH12K=m + depends on GENERIC_MSI_IRQ select QCOM_MDT_LOADER select QCOM_PAS help
Perhaps because I picked up the original of the 1st patch 'b4 ty' didn't thank for this patch, but it has been picked up in my ath-next branch
/jeff