Commit 10598c12 authored by Vivek Natarajan's avatar Vivek Natarajan Committed by John W. Linville

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: default avatarVivek Natarajan <vnatarajan@atheros.com>
CC: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5f841b41
...@@ -675,6 +675,7 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz) ...@@ -675,6 +675,7 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz)
} }
extern struct ieee80211_ops ath9k_ops; extern struct ieee80211_ops ath9k_ops;
extern struct pm_qos_request_list ath9k_pm_qos_req;
extern int modparam_nohwcrypt; extern int modparam_nohwcrypt;
extern int led_blink; extern int led_blink;
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
*/ */
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/pm_qos_params.h>
#include "ath9k.h" #include "ath9k.h"
...@@ -179,6 +180,8 @@ static const struct ath_ops ath9k_common_ops = { ...@@ -179,6 +180,8 @@ static const struct ath_ops ath9k_common_ops = {
.write = ath9k_iowrite32, .write = ath9k_iowrite32,
}; };
struct pm_qos_request_list ath9k_pm_qos_req;
/**************************/ /**************************/
/* Initialization */ /* Initialization */
/**************************/ /**************************/
...@@ -756,6 +759,9 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid, ...@@ -756,6 +759,9 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
ath_init_leds(sc); ath_init_leds(sc);
ath_start_rfkill_poll(sc); ath_start_rfkill_poll(sc);
pm_qos_add_request(&ath9k_pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
PM_QOS_DEFAULT_VALUE);
return 0; return 0;
error_world: error_world:
...@@ -811,6 +817,8 @@ void ath9k_deinit_device(struct ath_softc *sc) ...@@ -811,6 +817,8 @@ void ath9k_deinit_device(struct ath_softc *sc)
ath9k_ps_wakeup(sc); ath9k_ps_wakeup(sc);
pm_qos_remove_request(&ath9k_pm_qos_req);
wiphy_rfkill_stop_polling(sc->hw->wiphy); wiphy_rfkill_stop_polling(sc->hw->wiphy);
ath_deinit_leds(sc); ath_deinit_leds(sc);
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
*/ */
#include <linux/nl80211.h> #include <linux/nl80211.h>
#include <linux/pm_qos_params.h>
#include "ath9k.h" #include "ath9k.h"
#include "btcoex.h" #include "btcoex.h"
...@@ -1239,6 +1240,8 @@ static int ath9k_start(struct ieee80211_hw *hw) ...@@ -1239,6 +1240,8 @@ static int ath9k_start(struct ieee80211_hw *hw)
ath9k_btcoex_timer_resume(sc); ath9k_btcoex_timer_resume(sc);
} }
pm_qos_update_request(&ath9k_pm_qos_req, 55);
mutex_unlock: mutex_unlock:
mutex_unlock(&sc->mutex); mutex_unlock(&sc->mutex);
...@@ -1416,6 +1419,8 @@ static void ath9k_stop(struct ieee80211_hw *hw) ...@@ -1416,6 +1419,8 @@ static void ath9k_stop(struct ieee80211_hw *hw)
sc->sc_flags |= SC_OP_INVALID; sc->sc_flags |= SC_OP_INVALID;
pm_qos_update_request(&ath9k_pm_qos_req, PM_QOS_DEFAULT_VALUE);
mutex_unlock(&sc->mutex); mutex_unlock(&sc->mutex);
ath_print(common, ATH_DBG_CONFIG, "Driver halt\n"); ath_print(common, ATH_DBG_CONFIG, "Driver halt\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment