aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez2011-12-13 12:40:55 -0600
committerLuis R. Rodriguez2011-12-13 12:40:55 -0600
commitc486a4fcc5ddfb3232edfd0489fe63ffc1fa8aea (patch)
tree5222f589833dc20fd094d710748579f96506b934
parent84dbe2ccf309f2d4ba698568b41f4298ba7a8dec (diff)
downloadcompat-wireless-c486a4fcc5ddfb3232edfd0489fe63ffc1fa8aea.tar.gz
compat-wireless-c486a4fcc5ddfb3232edfd0489fe63ffc1fa8aea.tar.xz
compat-wireless-c486a4fcc5ddfb3232edfd0489fe63ffc1fa8aea.zip
compat-wireless: fix patches/09-threaded-irq.patch
This fixes patches/09-threaded-irq.patch hunk breakage caused due to changes in the upstream wireless-testing commit a390e85: Author: Felipe Balbi <balbi@ti.com> Date: Thu Oct 6 10:07:44 2011 +0300 wl12xx: move common init code from bus modules to main Move all common parts from sdio.c and spi.c to main.c, since they now can be handled as part of the platform driver. Signed-off-by: Felipe Balbi <balbi@ti.com> [forward-ported, cleaned-up and rephrased commit message] [added a bunch of fixes and a new pdata element] [moved some new code into main.c as well] Signed-off-by: Luciano Coelho <coelho@ti.com> This goes not compile tested, apart from *all* the things a390e85 changes one minor change was instead of using DRIVER_NAME in the request_threaded_irq() it now uses pdev->name, and pdev is struct platform_device. Too lazy to git checkout v2.6.30 to test compile against that kernel but at least: git blame include/linux/platform_device.h v2.6.30 seems to show that the pdev->name char was added by Russell King via bbbf508d on v2.6.15 so this should compile down to that kernel. mcgrof@tux ~/linux-2.6-allstable (git::master)$ git describe --contains bbbf508d v2.6.15-rc1~59^2~6^2~2 Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
-rw-r--r--patches/09-threaded-irq.patch48
1 files changed, 21 insertions, 27 deletions
diff --git a/patches/09-threaded-irq.patch b/patches/09-threaded-irq.patch
index e4d4bf1..694dde9 100644
--- a/patches/09-threaded-irq.patch
+++ b/patches/09-threaded-irq.patch
@@ -61,55 +61,49 @@ thread in process context as well.
61 }; 61 };
62 62
63 /* Data structure for the WLAN parts (802.11 cores) of the b43 chip. */ 63 /* Data structure for the WLAN parts (802.11 cores) of the b43 chip. */
64--- a/drivers/net/wireless/wl12xx/spi.c 64--- a/drivers/net/wireless/wl12xx/main.c
65+++ b/drivers/net/wireless/wl12xx/spi.c 65+++ b/drivers/net/wireless/wl12xx/main.c
66@@ -406,10 +406,14 @@ static int __devinit wl1271_probe(struct 66@@ -5183,14 +5183,25 @@ static int __devinit wl12xx_probe(struct
67 wl->tcxo_clock = pdata->board_tcxo_clock; 67
68 wl->platform_quirks = pdata->platform_quirks; 68 platform_set_drvdata(pdev, wl);
69 69
70+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) 70+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
71+ irqflags = IRQF_TRIGGER_RISING; 71+ irqflags = IRQF_TRIGGER_RISING
72+#else 72+#else
73 if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ) 73 if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ)
74 irqflags = IRQF_TRIGGER_RISING; 74 irqflags = IRQF_TRIGGER_RISING;
75 else 75 else
76 irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT; 76 irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT;
77+#endif
78
79 wl->irq = spi->irq;
80 if (wl->irq < 0) {
81@@ -418,9 +422,16 @@ static int __devinit wl1271_probe(struct
82 goto out_free;
83 }
84 77
78+#endif
85+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) 79+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
86+ ret = compat_request_threaded_irq(&wl->irq_compat, wl->irq, 80+ ret = compat_request_threaded_irq(&wl->irq_compat, wl->irq,
87+ wl1271_hardirq, wl1271_irq, 81+ wl1271_hardirq, wl1271_irq,
88+ irqflags, 82+ irqflags,
89+ DRIVER_NAME, wl); 83+ pdev->name, wl);
90+#else 84+#else
91 ret = request_threaded_irq(wl->irq, wl1271_hardirq, wl1271_irq, 85 ret = request_threaded_irq(wl->irq, wl12xx_hardirq, wl1271_irq,
92 irqflags, 86 irqflags,
93 DRIVER_NAME, wl); 87 pdev->name, wl);
94+#endif 88+#endif
95 if (ret < 0) { 89 if (ret < 0) {
96 wl1271_error("request_irq() failed: %d", ret); 90 wl1271_error("request_irq() failed: %d", ret);
97 goto out_free; 91 goto out_free_hw;
98@@ -439,7 +450,11 @@ static int __devinit wl1271_probe(struct 92@@ -5244,7 +5255,11 @@ out_bt_coex_state:
99 return 0; 93 device_remove_file(wl->dev, &dev_attr_bt_coex_state);
100 94
101 out_irq: 95 out_irq:
102+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) 96+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
103+ compat_free_threaded_irq(&wl->irq_compat); 97+ compat_free_threaded_irq(&wl->irq_compat);
104+#else 98+#else
105 free_irq(wl->irq, wl); 99 free_irq(wl->irq, wl);
106+#endif 100+#endif
107 101
108 out_free: 102 out_free_hw:
109 wl1271_free_hw(wl); 103 wl1271_free_hw(wl);
110@@ -452,7 +467,12 @@ static int __devexit wl1271_remove(struc 104@@ -5262,7 +5277,12 @@ static int __devexit wl12xx_remove(struc
111 struct wl1271 *wl = dev_get_drvdata(&spi->dev); 105 disable_irq_wake(wl->irq);
112 106 }
113 wl1271_unregister_hw(wl); 107 wl1271_unregister_hw(wl);
114+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) 108+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
115+ compat_free_threaded_irq(&wl->irq_compat); 109+ compat_free_threaded_irq(&wl->irq_compat);
@@ -122,10 +116,10 @@ thread in process context as well.
122 return 0; 116 return 0;
123--- a/drivers/net/wireless/wl12xx/wl12xx.h 117--- a/drivers/net/wireless/wl12xx/wl12xx.h
124+++ b/drivers/net/wireless/wl12xx/wl12xx.h 118+++ b/drivers/net/wireless/wl12xx/wl12xx.h
125@@ -632,6 +632,10 @@ struct wl1271 { 119@@ -484,6 +484,10 @@ struct wl1271 {
126 120
127 /* AP-mode - number of currently connected stations */ 121 /* last wlvif we transmitted from */
128 int active_sta_count; 122 struct wl12xx_vif *last_wlvif;
129+ 123+
130+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) 124+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
131+ struct compat_threaded_irq irq_compat; 125+ struct compat_threaded_irq irq_compat;