diff options
author | Mohammed Shafi Shajakhan <mshajakhan@atheros.com> | 2010-12-14 02:48:28 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-15 17:03:54 -0500 |
commit | 4dc3530df7c0428b41c00399a7ee8c929406d181 (patch) | |
tree | 43a6c79e6984ce0479746e4a1a847f4a1b493538 /drivers/net | |
parent | 17b3c17ecde36db5db7760a2802990b3129a4d65 (diff) |
ath9k: Make PM-QOS value as user configurable
This patch allows the pm-qos value to be user configurable by making it as
a module parameter.This will help our customers to configure the pm-qos
value according to the effect in throughput due to the DMA latency problem
which was observed in Intel Pinetrail platforms.
The tested value of '55' will be filled as the default
pm-qos-value incase the user does not specifies pm-qos value as a
module parameter.
example usage: sudo modprobe ath9k pmqos=65
Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ath9k.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 9b5501f90010..b0b1216dae0a 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -57,6 +57,8 @@ struct ath_node; | |||
57 | 57 | ||
58 | #define A_MAX(a, b) ((a) > (b) ? (a) : (b)) | 58 | #define A_MAX(a, b) ((a) > (b) ? (a) : (b)) |
59 | 59 | ||
60 | #define ATH9K_PM_QOS_DEFAULT_VALUE 55 | ||
61 | |||
60 | #define TSF_TO_TU(_h,_l) \ | 62 | #define TSF_TO_TU(_h,_l) \ |
61 | ((((u32)(_h)) << 22) | (((u32)(_l)) >> 10)) | 63 | ((((u32)(_h)) << 22) | (((u32)(_l)) >> 10)) |
62 | 64 | ||
@@ -663,6 +665,7 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz) | |||
663 | extern struct ieee80211_ops ath9k_ops; | 665 | extern struct ieee80211_ops ath9k_ops; |
664 | extern int modparam_nohwcrypt; | 666 | extern int modparam_nohwcrypt; |
665 | extern int led_blink; | 667 | extern int led_blink; |
668 | extern int ath9k_pm_qos_value; | ||
666 | 669 | ||
667 | irqreturn_t ath_isr(int irq, void *dev); | 670 | irqreturn_t ath_isr(int irq, void *dev); |
668 | int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid, | 671 | int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid, |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index b2983ce19dfb..12387950b449 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -41,6 +41,10 @@ static int ath9k_btcoex_enable; | |||
41 | module_param_named(btcoex_enable, ath9k_btcoex_enable, int, 0444); | 41 | module_param_named(btcoex_enable, ath9k_btcoex_enable, int, 0444); |
42 | MODULE_PARM_DESC(btcoex_enable, "Enable wifi-BT coexistence"); | 42 | MODULE_PARM_DESC(btcoex_enable, "Enable wifi-BT coexistence"); |
43 | 43 | ||
44 | int ath9k_pm_qos_value = ATH9K_PM_QOS_DEFAULT_VALUE; | ||
45 | module_param_named(pmqos, ath9k_pm_qos_value, int, S_IRUSR | S_IRGRP | S_IROTH); | ||
46 | MODULE_PARM_DESC(pmqos, "User specified PM-QOS value"); | ||
47 | |||
44 | /* We use the hw_value as an index into our private channel structure */ | 48 | /* We use the hw_value as an index into our private channel structure */ |
45 | 49 | ||
46 | #define CHAN2G(_freq, _idx) { \ | 50 | #define CHAN2G(_freq, _idx) { \ |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index c68205dea1fa..36f4f5afe738 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1196,7 +1196,7 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
1196 | ath9k_btcoex_timer_resume(sc); | 1196 | ath9k_btcoex_timer_resume(sc); |
1197 | } | 1197 | } |
1198 | 1198 | ||
1199 | pm_qos_update_request(&sc->pm_qos_req, 55); | 1199 | pm_qos_update_request(&sc->pm_qos_req, ath9k_pm_qos_value); |
1200 | 1200 | ||
1201 | if (ah->caps.pcie_lcr_extsync_en && common->bus_ops->extn_synch_en) | 1201 | if (ah->caps.pcie_lcr_extsync_en && common->bus_ops->extn_synch_en) |
1202 | common->bus_ops->extn_synch_en(common); | 1202 | common->bus_ops->extn_synch_en(common); |