diff options
author | Vivek Natarajan <vnatarajan@atheros.com> | 2010-10-30 12:35:13 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-08 16:53:46 -0500 |
commit | 10598c124ecabbbfd7522f74de19b8f7d52a1bee (patch) | |
tree | 6cc409c018b6ee401e3fb3d4196fcc1e03b0e866 /drivers | |
parent | 5f841b4130a639e5f0fbcf4a9b26045d734e4ee6 (diff) |
ath9k: Fix a DMA latency issue for Intel Pinetrail platforms.
Throughput was severely affected in Intel Pinetrail platforms
because of a DMA problem in C3 state. This patch fixes this
issue.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
CC: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 5 |
3 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 9b8e7e3fcebd..170d44a35ccb 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -675,6 +675,7 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz) | |||
675 | } | 675 | } |
676 | 676 | ||
677 | extern struct ieee80211_ops ath9k_ops; | 677 | extern struct ieee80211_ops ath9k_ops; |
678 | extern struct pm_qos_request_list ath9k_pm_qos_req; | ||
678 | extern int modparam_nohwcrypt; | 679 | extern int modparam_nohwcrypt; |
679 | extern int led_blink; | 680 | extern int led_blink; |
680 | 681 | ||
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 95b41db0d86b..6a0d99eff404 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/pm_qos_params.h> | ||
18 | 19 | ||
19 | #include "ath9k.h" | 20 | #include "ath9k.h" |
20 | 21 | ||
@@ -179,6 +180,8 @@ static const struct ath_ops ath9k_common_ops = { | |||
179 | .write = ath9k_iowrite32, | 180 | .write = ath9k_iowrite32, |
180 | }; | 181 | }; |
181 | 182 | ||
183 | struct pm_qos_request_list ath9k_pm_qos_req; | ||
184 | |||
182 | /**************************/ | 185 | /**************************/ |
183 | /* Initialization */ | 186 | /* Initialization */ |
184 | /**************************/ | 187 | /**************************/ |
@@ -756,6 +759,9 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid, | |||
756 | ath_init_leds(sc); | 759 | ath_init_leds(sc); |
757 | ath_start_rfkill_poll(sc); | 760 | ath_start_rfkill_poll(sc); |
758 | 761 | ||
762 | pm_qos_add_request(&ath9k_pm_qos_req, PM_QOS_CPU_DMA_LATENCY, | ||
763 | PM_QOS_DEFAULT_VALUE); | ||
764 | |||
759 | return 0; | 765 | return 0; |
760 | 766 | ||
761 | error_world: | 767 | error_world: |
@@ -811,6 +817,8 @@ void ath9k_deinit_device(struct ath_softc *sc) | |||
811 | 817 | ||
812 | ath9k_ps_wakeup(sc); | 818 | ath9k_ps_wakeup(sc); |
813 | 819 | ||
820 | pm_qos_remove_request(&ath9k_pm_qos_req); | ||
821 | |||
814 | wiphy_rfkill_stop_polling(sc->hw->wiphy); | 822 | wiphy_rfkill_stop_polling(sc->hw->wiphy); |
815 | ath_deinit_leds(sc); | 823 | ath_deinit_leds(sc); |
816 | 824 | ||
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index cf6fa54a2fa3..09dcdd7882e6 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -15,6 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/nl80211.h> | 17 | #include <linux/nl80211.h> |
18 | #include <linux/pm_qos_params.h> | ||
18 | #include "ath9k.h" | 19 | #include "ath9k.h" |
19 | #include "btcoex.h" | 20 | #include "btcoex.h" |
20 | 21 | ||
@@ -1239,6 +1240,8 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
1239 | ath9k_btcoex_timer_resume(sc); | 1240 | ath9k_btcoex_timer_resume(sc); |
1240 | } | 1241 | } |
1241 | 1242 | ||
1243 | pm_qos_update_request(&ath9k_pm_qos_req, 55); | ||
1244 | |||
1242 | mutex_unlock: | 1245 | mutex_unlock: |
1243 | mutex_unlock(&sc->mutex); | 1246 | mutex_unlock(&sc->mutex); |
1244 | 1247 | ||
@@ -1416,6 +1419,8 @@ static void ath9k_stop(struct ieee80211_hw *hw) | |||
1416 | 1419 | ||
1417 | sc->sc_flags |= SC_OP_INVALID; | 1420 | sc->sc_flags |= SC_OP_INVALID; |
1418 | 1421 | ||
1422 | pm_qos_update_request(&ath9k_pm_qos_req, PM_QOS_DEFAULT_VALUE); | ||
1423 | |||
1419 | mutex_unlock(&sc->mutex); | 1424 | mutex_unlock(&sc->mutex); |
1420 | 1425 | ||
1421 | ath_print(common, ATH_DBG_CONFIG, "Driver halt\n"); | 1426 | ath_print(common, ATH_DBG_CONFIG, "Driver halt\n"); |