Skip to content

Commit

Permalink
ath9k: Make PM-QOS value as user configurable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mohammed Shafi Shajakhan authored and John W. Linville committed Dec 15, 2010
1 parent 17b3c17 commit 4dc3530
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/net/wireless/ath/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ struct ath_node;

#define A_MAX(a, b) ((a) > (b) ? (a) : (b))

#define ATH9K_PM_QOS_DEFAULT_VALUE 55

#define TSF_TO_TU(_h,_l) \
((((u32)(_h)) << 22) | (((u32)(_l)) >> 10))

Expand Down Expand Up @@ -663,6 +665,7 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz)
extern struct ieee80211_ops ath9k_ops;
extern int modparam_nohwcrypt;
extern int led_blink;
extern int ath9k_pm_qos_value;

irqreturn_t ath_isr(int irq, void *dev);
int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
Expand Down
4 changes: 4 additions & 0 deletions drivers/net/wireless/ath/ath9k/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ static int ath9k_btcoex_enable;
module_param_named(btcoex_enable, ath9k_btcoex_enable, int, 0444);
MODULE_PARM_DESC(btcoex_enable, "Enable wifi-BT coexistence");

int ath9k_pm_qos_value = ATH9K_PM_QOS_DEFAULT_VALUE;
module_param_named(pmqos, ath9k_pm_qos_value, int, S_IRUSR | S_IRGRP | S_IROTH);
MODULE_PARM_DESC(pmqos, "User specified PM-QOS value");

/* We use the hw_value as an index into our private channel structure */

#define CHAN2G(_freq, _idx) { \
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ static int ath9k_start(struct ieee80211_hw *hw)
ath9k_btcoex_timer_resume(sc);
}

pm_qos_update_request(&sc->pm_qos_req, 55);
pm_qos_update_request(&sc->pm_qos_req, ath9k_pm_qos_value);

if (ah->caps.pcie_lcr_extsync_en && common->bus_ops->extn_synch_en)
common->bus_ops->extn_synch_en(common);
Expand Down

0 comments on commit 4dc3530

Please sign in to comment.