[PATCH 52/75] patches: Adapt struct msi_desc reorganization

Hauke Mehrtens <[email protected]> Fri, 28 Jun 2024 01:47:38 +0200
Newsgroups org.kernel.vger.backports
Message-ID <[email protected]>
In kernel 5.17 the anonymous struct in struct msi_desc was extracted
into a own structure. Make the backports code use the old structure on
older kernel versions.

Signed-off-by: Hauke Mehrtens <[email protected]>
---
 patches/0110-msi-pci.patch | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 patches/0110-msi-pci.patch

diff --git a/patches/0110-msi-pci.patch b/patches/0110-msi-pci.patch
new file mode 100644
index 00000000..128922e6
--- /dev/null
+++ b/patches/0110-msi-pci.patch
@@ -0,0 +1,14 @@
+--- a/drivers/net/wireless/ath/ath11k/pci.c
++++ b/drivers/net/wireless/ath/ath11k/pci.c
+@@ -451,7 +451,11 @@ static int ath11k_pci_alloc_msi(struct a
+ 	pci_read_config_dword(pci_dev, pci_dev->msi_cap + PCI_MSI_ADDRESS_LO,
+ 			      &ab->pci.msi.addr_lo);
+ 
++#if LINUX_VERSION_IS_GEQ(5,17,0)
+ 	if (msi_desc->pci.msi_attrib.is_64) {
++#else
++	if (msi_desc->msi_attrib.is_64) {
++#endif
+ 		pci_read_config_dword(pci_dev, pci_dev->msi_cap + PCI_MSI_ADDRESS_HI,
+ 				      &ab->pci.msi.addr_hi);
+ 	} else {
-- 
2.45.2