diff options
author | Hauke Mehrtens | 2011-11-06 15:23:41 -0600 |
---|---|---|
committer | Luis R. Rodriguez | 2011-11-08 13:16:05 -0600 |
commit | 6dec5d85d22c7c7b34f936d04cc230f6abb2138a (patch) | |
tree | 80835e278b353586d112808e29ffa3860a5ff8b6 | |
parent | ee66508dbc6c9cd2419fff11d6b80bc75d139fd8 (diff) | |
download | compat-wireless-6dec5d85d22c7c7b34f936d04cc230f6abb2138a.tar.gz compat-wireless-6dec5d85d22c7c7b34f936d04cc230f6abb2138a.tar.xz compat-wireless-6dec5d85d22c7c7b34f936d04cc230f6abb2138a.zip |
compat-wireless: backport rtlwifi PM
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r-- | patches/11-dev-pm-ops.patch | 103 |
1 files changed, 101 insertions, 2 deletions
diff --git a/patches/11-dev-pm-ops.patch b/patches/11-dev-pm-ops.patch index 1e2e38f..294aaba 100644 --- a/patches/11-dev-pm-ops.patch +++ b/patches/11-dev-pm-ops.patch | |||
@@ -34,7 +34,7 @@ calls on compat code with only slight modifications. | |||
34 | /* | 34 | /* |
35 | --- a/drivers/net/ethernet/atheros/atlx/atl1.c | 35 | --- a/drivers/net/ethernet/atheros/atlx/atl1.c |
36 | +++ b/drivers/net/ethernet/atheros/atlx/atl1.c | 36 | +++ b/drivers/net/ethernet/atheros/atlx/atl1.c |
37 | @@ -2835,6 +2835,9 @@ static int atl1_resume(struct device *de | 37 | @@ -2833,6 +2833,9 @@ static int atl1_resume(struct device *de |
38 | return 0; | 38 | return 0; |
39 | } | 39 | } |
40 | 40 | ||
@@ -44,7 +44,7 @@ calls on compat code with only slight modifications. | |||
44 | static SIMPLE_DEV_PM_OPS(atl1_pm_ops, atl1_suspend, atl1_resume); | 44 | static SIMPLE_DEV_PM_OPS(atl1_pm_ops, atl1_suspend, atl1_resume); |
45 | #define ATL1_PM_OPS (&atl1_pm_ops) | 45 | #define ATL1_PM_OPS (&atl1_pm_ops) |
46 | 46 | ||
47 | @@ -3104,7 +3107,12 @@ static struct pci_driver atl1_driver = { | 47 | @@ -3102,7 +3105,12 @@ static struct pci_driver atl1_driver = { |
48 | .probe = atl1_probe, | 48 | .probe = atl1_probe, |
49 | .remove = __devexit_p(atl1_remove), | 49 | .remove = __devexit_p(atl1_remove), |
50 | .shutdown = atl1_shutdown, | 50 | .shutdown = atl1_shutdown, |
@@ -242,3 +242,102 @@ calls on compat code with only slight modifications. | |||
242 | }; | 242 | }; |
243 | 243 | ||
244 | int __must_check iwl_pci_register_driver(void) | 244 | int __must_check iwl_pci_register_driver(void) |
245 | --- a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | ||
246 | +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | ||
247 | @@ -381,21 +381,22 @@ MODULE_PARM_DESC(swlps, "Set to 1 to use | ||
248 | MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n"); | ||
249 | MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)"); | ||
250 | |||
251 | -static const struct dev_pm_ops rtlwifi_pm_ops = { | ||
252 | - .suspend = rtl_pci_suspend, | ||
253 | - .resume = rtl_pci_resume, | ||
254 | - .freeze = rtl_pci_suspend, | ||
255 | - .thaw = rtl_pci_resume, | ||
256 | - .poweroff = rtl_pci_suspend, | ||
257 | - .restore = rtl_pci_resume, | ||
258 | -}; | ||
259 | +static const SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume); | ||
260 | + | ||
261 | +compat_pci_suspend(rtl_pci_suspend) | ||
262 | +compat_pci_resume(rtl_pci_resume) | ||
263 | |||
264 | static struct pci_driver rtl92ce_driver = { | ||
265 | .name = KBUILD_MODNAME, | ||
266 | .id_table = rtl92ce_pci_ids, | ||
267 | .probe = rtl_pci_probe, | ||
268 | .remove = rtl_pci_disconnect, | ||
269 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) | ||
270 | .driver.pm = &rtlwifi_pm_ops, | ||
271 | +#elif defined(CONFIG_PM) | ||
272 | + .suspend = rtl_pci_suspend_compat, | ||
273 | + .resume = rtl_pci_resume_compat, | ||
274 | +#endif | ||
275 | }; | ||
276 | |||
277 | static int __init rtl92ce_module_init(void) | ||
278 | --- a/drivers/net/wireless/rtlwifi/rtl8192de/sw.c | ||
279 | +++ b/drivers/net/wireless/rtlwifi/rtl8192de/sw.c | ||
280 | @@ -391,21 +391,22 @@ MODULE_PARM_DESC(swlps, "Set to 1 to use | ||
281 | MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n"); | ||
282 | MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)"); | ||
283 | |||
284 | -static const struct dev_pm_ops rtlwifi_pm_ops = { | ||
285 | - .suspend = rtl_pci_suspend, | ||
286 | - .resume = rtl_pci_resume, | ||
287 | - .freeze = rtl_pci_suspend, | ||
288 | - .thaw = rtl_pci_resume, | ||
289 | - .poweroff = rtl_pci_suspend, | ||
290 | - .restore = rtl_pci_resume, | ||
291 | -}; | ||
292 | +static const SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume); | ||
293 | + | ||
294 | +compat_pci_suspend(rtl_pci_suspend) | ||
295 | +compat_pci_resume(rtl_pci_resume) | ||
296 | |||
297 | static struct pci_driver rtl92de_driver = { | ||
298 | .name = KBUILD_MODNAME, | ||
299 | .id_table = rtl92de_pci_ids, | ||
300 | .probe = rtl_pci_probe, | ||
301 | .remove = rtl_pci_disconnect, | ||
302 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) | ||
303 | .driver.pm = &rtlwifi_pm_ops, | ||
304 | +#elif defined(CONFIG_PM) | ||
305 | + .suspend = rtl_pci_suspend_compat, | ||
306 | + .resume = rtl_pci_resume_compat, | ||
307 | +#endif | ||
308 | }; | ||
309 | |||
310 | /* add global spin lock to solve the problem that | ||
311 | --- a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c | ||
312 | +++ b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c | ||
313 | @@ -403,21 +403,22 @@ MODULE_PARM_DESC(swlps, "Set to 1 to use | ||
314 | MODULE_PARM_DESC(fwlps, "Set to 1 to use FW control power save (default 1)\n"); | ||
315 | MODULE_PARM_DESC(debug, "Set debug level (0-5) (default 0)"); | ||
316 | |||
317 | -static const struct dev_pm_ops rtlwifi_pm_ops = { | ||
318 | - .suspend = rtl_pci_suspend, | ||
319 | - .resume = rtl_pci_resume, | ||
320 | - .freeze = rtl_pci_suspend, | ||
321 | - .thaw = rtl_pci_resume, | ||
322 | - .poweroff = rtl_pci_suspend, | ||
323 | - .restore = rtl_pci_resume, | ||
324 | -}; | ||
325 | +static const SIMPLE_DEV_PM_OPS(rtlwifi_pm_ops, rtl_pci_suspend, rtl_pci_resume); | ||
326 | + | ||
327 | +compat_pci_suspend(rtl_pci_suspend) | ||
328 | +compat_pci_resume(rtl_pci_resume) | ||
329 | |||
330 | static struct pci_driver rtl92se_driver = { | ||
331 | .name = KBUILD_MODNAME, | ||
332 | .id_table = rtl92se_pci_ids, | ||
333 | .probe = rtl_pci_probe, | ||
334 | .remove = rtl_pci_disconnect, | ||
335 | +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) | ||
336 | .driver.pm = &rtlwifi_pm_ops, | ||
337 | +#elif defined(CONFIG_PM) | ||
338 | + .suspend = rtl_pci_suspend_compat, | ||
339 | + .resume = rtl_pci_resume_compat, | ||
340 | +#endif | ||
341 | }; | ||
342 | |||
343 | static int __init rtl92se_module_init(void) | ||