diff options
author | Christian Lamparter <chunkeey@googlemail.com> | 2012-01-21 19:59:10 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-27 23:56:57 +0400 |
commit | 67e43de6dbc9caf52fa7bcf4c813fd088ba6fbfc (patch) | |
tree | 9675462fdda6a5809740d26b192c63dfee590472 /drivers/net/wireless/ath/carl9170/main.c | |
parent | 94f9065648a2645b28187b44ec7778c30cf58758 (diff) | |
download | linux-67e43de6dbc9caf52fa7bcf4c813fd088ba6fbfc.tar.xz |
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.c | 11 |
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; |