Backport access to pcidev->is_pcie member for kernels < 2.6.24
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 13 Jan 2010 19:06:55 +0000 (11:06 -0800)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Wed, 13 Jan 2010 19:06:55 +0000 (11:06 -0800)
Older kernels than 2.6.24 do not have the is_pcie member as part of
the struct pci_dev, to help with that we use the compat-2.6.24.c supplied
compat_is_pcie() when needed.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
patches/20-pcidev.patch [new file with mode: 0644]

diff --git a/patches/20-pcidev.patch b/patches/20-pcidev.patch
new file mode 100644 (file)
index 0000000..b93ef33
--- /dev/null
@@ -0,0 +1,18 @@
+Older kernels than 2.6.24 do not have the is_pcie member as part of
+the struct pci_dev, to help with that we use the compat-2.6.24.c supplied
+compat_is_pcie() when needed.
+
+--- a/drivers/net/wireless/ath/ath9k/pci.c     2010-01-13 10:48:29.000000000 -0800
++++ b/drivers/net/wireless/ath/ath9k/pci.c     2010-01-13 10:49:52.000000000 -0800
+@@ -88,7 +88,11 @@ static void ath_pci_bt_coex_prep(struct 
+       struct pci_dev *pdev = to_pci_dev(sc->dev);
+       u8 aspm;
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
+       if (!pdev->is_pcie)
++#else
++      if (!compat_is_pcie(pdev))
++#endif
+               return;
+       pci_read_config_byte(pdev, ATH_PCIE_CAP_LINK_CTRL, &aspm);