aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2010-01-19 14:04:19 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-19 16:49:35 -0500
commitc9f6a6567f3e8dd69dd3f80a67e73d7d10884bea (patch)
tree9231272cab472a583640410ea93065c6f69fe602 /drivers/net/wireless
parent27e310c91c3433ab9997b925b3fd65e660634c76 (diff)
ath9k: make tx power config changes take effect immediatley
Users wishing to tweak tx power want it to happen immediately, try to respect that. This was tested by Lorenzo by measuring the received signal strength from an AP with ath9k and the patch. Changing the tx power on the AP produced these results: 1) iwconfig wlan0 txpower 20 ---> Rx power -37dbm 2) iwconfig wlan0 txpower 15 ---> Rx power -41dbm 3) iwconfig wlan0 txpower 10 ---> Rx power -45dbm 4) iwconfig wlan0 txpower 5 ---> Rx power -51dbm 5) iwconfig wlan0 txpower 0 ---> Rx power -37dbm The result with 0 is an anomoly and would need to be addressed through a separate patch. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Tested-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index c0c571c2e8c4..6f3e71c5071e 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1624,8 +1624,10 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
1624 } 1624 }
1625 1625
1626skip_chan_change: 1626skip_chan_change:
1627 if (changed & IEEE80211_CONF_CHANGE_POWER) 1627 if (changed & IEEE80211_CONF_CHANGE_POWER) {
1628 sc->config.txpowlimit = 2 * conf->power_level; 1628 sc->config.txpowlimit = 2 * conf->power_level;
1629 ath_update_txpow(sc);
1630 }
1629 1631
1630 spin_lock_bh(&sc->wiphy_lock); 1632 spin_lock_bh(&sc->wiphy_lock);
1631 disable_radio = ath9k_all_wiphys_idle(sc); 1633 disable_radio = ath9k_all_wiphys_idle(sc);