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>
This commit is contained in:

committed by
John W. Linville

parent
94f9065648
commit
67e43de6db
@@ -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;
|
||||
|
Reference in New Issue
Block a user