ath9k: use per-device struct for pm_qos_* operations
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 590-ath9k-use-per-device-struct-for-pm_qos_-operations.patch
1 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
2 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
3 @@ -21,6 +21,7 @@
4 #include <linux/device.h>
5 #include <linux/leds.h>
6 #include <linux/completion.h>
7 +#include <linux/pm_qos_params.h>
8
9 #include "debug.h"
10 #include "common.h"
11 @@ -618,6 +619,8 @@ struct ath_softc {
12 struct ath_descdma txsdma;
13
14 struct ath_ant_comb ant_comb;
15 +
16 + struct pm_qos_request_list pm_qos_req;
17 };
18
19 struct ath_wiphy {
20 @@ -647,7 +650,6 @@ static inline void ath_read_cachesize(st
21 }
22
23 extern struct ieee80211_ops ath9k_ops;
24 -extern struct pm_qos_request_list ath9k_pm_qos_req;
25 extern int modparam_nohwcrypt;
26 extern int led_blink;
27
28 --- a/drivers/net/wireless/ath/ath9k/init.c
29 +++ b/drivers/net/wireless/ath/ath9k/init.c
30 @@ -15,7 +15,6 @@
31 */
32
33 #include <linux/slab.h>
34 -#include <linux/pm_qos_params.h>
35 #include <linux/ath9k_platform.h>
36
37 #include "ath9k.h"
38 @@ -195,8 +194,6 @@ static const struct ath_ops ath9k_common
39 .write = ath9k_iowrite32,
40 };
41
42 -struct pm_qos_request_list ath9k_pm_qos_req;
43 -
44 /**************************/
45 /* Initialization */
46 /**************************/
47 @@ -786,7 +783,7 @@ int ath9k_init_device(u16 devid, struct
48 ath_init_leds(sc);
49 ath_start_rfkill_poll(sc);
50
51 - pm_qos_add_request(&ath9k_pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
52 + pm_qos_add_request(&sc->pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
53 PM_QOS_DEFAULT_VALUE);
54
55 return 0;
56 @@ -857,7 +854,7 @@ void ath9k_deinit_device(struct ath_soft
57 }
58
59 ieee80211_unregister_hw(hw);
60 - pm_qos_remove_request(&ath9k_pm_qos_req);
61 + pm_qos_remove_request(&sc->pm_qos_req);
62 ath_rx_cleanup(sc);
63 ath_tx_cleanup(sc);
64 ath9k_deinit_softc(sc);
65 --- a/drivers/net/wireless/ath/ath9k/main.c
66 +++ b/drivers/net/wireless/ath/ath9k/main.c
67 @@ -15,7 +15,6 @@
68 */
69
70 #include <linux/nl80211.h>
71 -#include <linux/pm_qos_params.h>
72 #include "ath9k.h"
73 #include "btcoex.h"
74
75 @@ -1184,7 +1183,7 @@ static int ath9k_start(struct ieee80211_
76 ath9k_btcoex_timer_resume(sc);
77 }
78
79 - pm_qos_update_request(&ath9k_pm_qos_req, 55);
80 + pm_qos_update_request(&sc->pm_qos_req, 55);
81
82 mutex_unlock:
83 mutex_unlock(&sc->mutex);
84 @@ -1336,7 +1335,7 @@ static void ath9k_stop(struct ieee80211_
85
86 sc->sc_flags |= SC_OP_INVALID;
87
88 - pm_qos_update_request(&ath9k_pm_qos_req, PM_QOS_DEFAULT_VALUE);
89 + pm_qos_update_request(&sc->pm_qos_req, PM_QOS_DEFAULT_VALUE);
90
91 mutex_unlock(&sc->mutex);
92