1
0

901-wifi-ath11k-pci-fix-compilation-in-5.16-and-older.patch 1.1 KB

1234567891011121314151617181920212223242526272829
  1. From 04178918e7f6b5f34dde81ec79ee8a1ccace3be3 Mon Sep 17 00:00:00 2001
  2. From: Robert Marko <robimarko@gmail.com>
  3. Date: Mon, 17 Oct 2022 11:45:03 +0200
  4. Subject: [PATCH] wifi: ath11k: pci: fix compilation in 5.16 and older
  5. Commit ("genirq/msi, treewide: Use a named struct for PCI/MSI attributes")
  6. changed the msi_desc structure a bit, however that is only available in
  7. kernels 5.17 and newer, so check for kernel version to allow compilation
  8. in 5.16 and older.
  9. Signed-off-by: Robert Marko <robimarko@gmail.com>
  10. ---
  11. drivers/net/wireless/ath/ath11k/pci.c | 4 ++++
  12. 1 file changed, 4 insertions(+)
  13. --- a/drivers/net/wireless/ath/ath11k/pci.c
  14. +++ b/drivers/net/wireless/ath/ath11k/pci.c
  15. @@ -458,7 +458,11 @@ static int ath11k_pci_alloc_msi(struct a
  16. pci_read_config_dword(pci_dev, pci_dev->msi_cap + PCI_MSI_ADDRESS_LO,
  17. &ab->pci.msi.addr_lo);
  18. +#if (LINUX_VERSION_CODE > KERNEL_VERSION(5, 17, 0))
  19. if (msi_desc->pci.msi_attrib.is_64) {
  20. +#else
  21. + if (msi_desc->msi_attrib.is_64) {
  22. +#endif
  23. pci_read_config_dword(pci_dev, pci_dev->msi_cap + PCI_MSI_ADDRESS_HI,
  24. &ab->pci.msi.addr_hi);
  25. } else {