aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/carl9170/main.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/main.c
parent{nl,cfg,mac}80211: Add support of setting non-forwarding entity in Mesh (diff)
downloadlinux-dev-67e43de6dbc9caf52fa7bcf4c813fd088ba6fbfc.tar.xz
linux-dev-67e43de6dbc9caf52fa7bcf4c813fd088ba6fbfc.zip
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/main.c')
-rw-r--r--drivers/net/wireless/ath/carl9170/main.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c
index 6ee7c55f75a8..8d2523b3f722 100644
--- a/drivers/net/wireless/ath/carl9170/main.c
+++ b/drivers/net/wireless/ath/carl9170/main.c
@@ -853,11 +853,6 @@ static int carl9170_op_config(struct ieee80211_hw *hw, u32 changed)
goto out;
}
- if (changed & IEEE80211_CONF_CHANGE_POWER) {
- /* TODO */
- err = 0;
- }
-
if (changed & IEEE80211_CONF_CHANGE_SMPS) {
/* TODO */
err = 0;
@@ -891,6 +886,12 @@ static int carl9170_op_config(struct ieee80211_hw *hw, u32 changed)
goto out;
}
+ if (changed & IEEE80211_CONF_CHANGE_POWER) {
+ err = carl9170_set_mac_tpc(ar, ar->hw->conf.channel);
+ if (err)
+ goto out;
+ }
+
out:
mutex_unlock(&ar->mutex);
return err;