summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions/network/09-threaded-irq.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-02-13 21:40:37 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2013-02-13 21:41:16 +0100
commit1115b968eeffce2580d2c4928b15d088982df156 (patch)
treead80f831f83040b854a5f030d5fb28b6c3cc5208 /patches/collateral-evolutions/network/09-threaded-irq.patch
parentef946d75c1931ac0cd49d98c4c6ae07e571a6bc2 (diff)
compat-drivers: backport threaded IRQ for iwlwifi
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'patches/collateral-evolutions/network/09-threaded-irq.patch')
-rw-r--r--patches/collateral-evolutions/network/09-threaded-irq.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/patches/collateral-evolutions/network/09-threaded-irq.patch b/patches/collateral-evolutions/network/09-threaded-irq.patch
index 6c87a7f1..ac83bc16 100644
--- a/patches/collateral-evolutions/network/09-threaded-irq.patch
+++ b/patches/collateral-evolutions/network/09-threaded-irq.patch
@@ -61,6 +61,59 @@ thread in process context as well.
};
/* Data structure for the WLAN parts (802.11 cores) of the b43 chip. */
+--- a/drivers/net/wireless/iwlwifi/pcie/internal.h
++++ b/drivers/net/wireless/iwlwifi/pcie/internal.h
+@@ -286,6 +286,9 @@ struct iwl_trans_pcie {
+
+ /*protect hw register */
+ spinlock_t reg_lock;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
++ struct compat_threaded_irq irq_compat;
++#endif
+ };
+
+ /**
+--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
++++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
+@@ -759,12 +759,21 @@ void iwl_trans_pcie_free(struct iwl_tran
+ {
+ struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
++ compat_synchronize_threaded_irq(&trans_pcie->irq_compat);
++#else
+ synchronize_irq(trans_pcie->pci_dev->irq);
++#endif
+
+ iwl_pcie_tx_free(trans);
+ iwl_pcie_rx_free(trans);
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
++ compat_free_threaded_irq(&trans_pcie->irq_compat);
++ compat_destroy_threaded_irq(&trans_pcie->irq_compat);
++#else
+ free_irq(trans_pcie->pci_dev->irq, trans);
++#endif
+ iwl_pcie_free_ict(trans);
+
+ pci_disable_msi(trans_pcie->pci_dev);
+@@ -1570,9 +1579,16 @@ struct iwl_trans *iwl_trans_pcie_alloc(s
+ if (iwl_pcie_alloc_ict(trans))
+ goto out_free_cmd_pool;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
++ if (compat_request_threaded_irq(&trans_pcie->irq_compat,
++ pdev->irq, iwl_pcie_isr_ict,
++ iwl_pcie_irq_handler,
++ IRQF_SHARED, DRV_NAME, trans)) {
++#else
+ if (request_threaded_irq(pdev->irq, iwl_pcie_isr_ict,
+ iwl_pcie_irq_handler,
+ IRQF_SHARED, DRV_NAME, trans)) {
++#endif
+ IWL_ERR(trans, "Error allocating IRQ %d\n", pdev->irq);
+ goto out_free_ict;
+ }
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -5994,14 +5994,25 @@ static void wlcore_nvs_cb(const struct f