summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/carl9170/tx.c
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@googlemail.com>2012-01-21 16:59:10 +0100
committerJohn W. Linville <linville@tuxdriver.com>2012-01-27 14:56:57 -0500
commit67e43de6dbc9caf52fa7bcf4c813fd088ba6fbfc (patch)
tree9675462fdda6a5809740d26b192c63dfee590472 /drivers/net/wireless/ath/carl9170/tx.c
parent94f9065648a2645b28187b44ec7778c30cf58758 (diff)
carl9170: allow users to lower output power level
This patch implements a simple way of reducing the output power of the device by a configurable upper limit. Requested-by: Harshal Chhaya <harshal@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/carl9170/tx.c')
-rw-r--r--drivers/net/wireless/ath/carl9170/tx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c
index d19a9ee9d05..771e1a9294c 100644
--- a/drivers/net/wireless/ath/carl9170/tx.c
+++ b/drivers/net/wireless/ath/carl9170/tx.c
@@ -719,6 +719,8 @@ static void carl9170_tx_rate_tpc_chains(struct ar9170 *ar,
else
*chains = AR9170_TX_PHY_TXCHAIN_2;
}
+
+ *tpc = min_t(unsigned int, *tpc, ar->hw->conf.power_level * 2);
}
static __le32 carl9170_tx_physet(struct ar9170 *ar,