1
0

0035-wifi-ath11k-Use-platform_get_irq-to-get-the-interrup.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From f117276638b7600b981b3fe28550823cfbe1ef23 Mon Sep 17 00:00:00 2001
  2. From: Douglas Anderson <dianders@chromium.org>
  3. Date: Wed, 1 Feb 2023 08:54:42 -0800
  4. Subject: [PATCH] wifi: ath11k: Use platform_get_irq() to get the interrupt
  5. As of commit a1a2b7125e10 ("of/platform: Drop static setup of IRQ
  6. resource from DT core"), we need to use platform_get_irq() instead of
  7. platform_get_resource() to get our IRQs because
  8. platform_get_resource() simply won't get them anymore.
  9. This was already fixed in several other Atheros WiFi drivers,
  10. apparently in response to Zeal Robot reports. An example of another
  11. fix is commit 9503a1fc123d ("ath9k: Use platform_get_irq() to get the
  12. interrupt"). ath11k seems to have been missed in this effort, though.
  13. Without this change, WiFi wasn't coming up on my Qualcomm sc7280-based
  14. hardware. Specifically, "platform_get_resource(pdev, IORESOURCE_IRQ,
  15. i)" was failing even for i=0.
  16. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
  17. Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core")
  18. Fixes: 00402f49d26f ("ath11k: Add support for WCN6750 device")
  19. Signed-off-by: Douglas Anderson <dianders@chromium.org>
  20. Tested-by: Jun Yu <junyuu@chromium.org>
  21. Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
  22. Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
  23. Link: https://lore.kernel.org/r/20230201084131.v2.1.I69cf3d56c97098287fe3a70084ee515098390b70@changeid
  24. ---
  25. drivers/net/wireless/ath/ath11k/ahb.c | 8 ++++----
  26. 1 file changed, 4 insertions(+), 4 deletions(-)
  27. --- a/drivers/net/wireless/ath/ath11k/ahb.c
  28. +++ b/drivers/net/wireless/ath/ath11k/ahb.c
  29. @@ -874,11 +874,11 @@ static int ath11k_ahb_setup_msi_resource
  30. ab->pci.msi.ep_base_data = int_prop + 32;
  31. for (i = 0; i < ab->pci.msi.config->total_vectors; i++) {
  32. - res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
  33. - if (!res)
  34. - return -ENODEV;
  35. + ret = platform_get_irq(pdev, i);
  36. + if (ret < 0)
  37. + return ret;
  38. - ab->pci.msi.irqs[i] = res->start;
  39. + ab->pci.msi.irqs[i] = ret;
  40. }
  41. set_bit(ATH11K_FLAG_MULTI_MSI_VECTORS, &ab->dev_flags);