ar71xx: refresh patches
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 120-pm_qos_params.patch
1 --- a/drivers/net/wireless/ipw2x00/ipw2100.c
2 +++ b/drivers/net/wireless/ipw2x00/ipw2100.c
3 @@ -174,7 +174,9 @@ that only one external action is invoked
4 #define DRV_DESCRIPTION "Intel(R) PRO/Wireless 2100 Network Driver"
5 #define DRV_COPYRIGHT "Copyright(c) 2003-2006 Intel Corporation"
6
7 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
8 static struct pm_qos_request_list *ipw2100_pm_qos_req;
9 +#endif
10
11 /* Debugging stuff */
12 #ifdef CONFIG_IPW2100_DEBUG
13 @@ -1741,7 +1743,11 @@ static int ipw2100_up(struct ipw2100_pri
14 /* the ipw2100 hardware really doesn't want power management delays
15 * longer than 175usec
16 */
17 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
18 pm_qos_update_request(ipw2100_pm_qos_req, 175);
19 +#else
20 + pm_qos_update_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100", 175);
21 +#endif
22
23 /* If the interrupt is enabled, turn it off... */
24 spin_lock_irqsave(&priv->low_lock, flags);
25 @@ -1889,7 +1895,12 @@ static void ipw2100_down(struct ipw2100_
26 ipw2100_disable_interrupts(priv);
27 spin_unlock_irqrestore(&priv->low_lock, flags);
28
29 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
30 pm_qos_update_request(ipw2100_pm_qos_req, PM_QOS_DEFAULT_VALUE);
31 +#else
32 + pm_qos_update_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100",
33 + PM_QOS_DEFAULT_VALUE);
34 +#endif
35
36 /* We have to signal any supplicant if we are disassociating */
37 if (associated)
38 @@ -6669,7 +6680,11 @@ static int __init ipw2100_init(void)
39 if (ret)
40 goto out;
41
42 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
43 ipw2100_pm_qos_req = pm_qos_add_request(PM_QOS_CPU_DMA_LATENCY,
44 +#else
45 + pm_qos_add_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100",
46 +#endif
47 PM_QOS_DEFAULT_VALUE);
48 #ifdef CONFIG_IPW2100_DEBUG
49 ipw2100_debug_level = debug;
50 @@ -6692,7 +6707,11 @@ static void __exit ipw2100_exit(void)
51 &driver_attr_debug_level);
52 #endif
53 pci_unregister_driver(&ipw2100_pci_driver);
54 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
55 pm_qos_remove_request(ipw2100_pm_qos_req);
56 +#else
57 + pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100");
58 +#endif
59 }
60
61 module_init(ipw2100_init);