[Bugme-new] [Bug 14642] New: ath9k txpower configuration only takes effect after scan
bugzilla-daemon at bugzilla.kernel.org
bugzilla-daemon at bugzilla.kernel.org
Thu Nov 19 11:21:00 PST 2009
http://bugzilla.kernel.org/show_bug.cgi?id=14642
Summary: ath9k txpower configuration only takes effect after
scan
Product: Drivers
Version: 2.5
Kernel Version: 2.6.32-rc7-wl
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: low
Priority: P1
Component: network-wireless
AssignedTo: drivers_network-wireless at kernel-bugs.osdl.org
ReportedBy: javier at cozybit.com
Regression: No
Changing the transmission power while the interface is up and associated has no
effect. The following sequence of commands will not affect the output power
(verified with a sniffer):
# iwconfig wlan0 txpower 20dbm
# iwconfig wlan0
wlan0 IEEE 802.11abgn ESSID:"cozyguest"
Mode:Managed Frequency:2.462 GHz Access Point: 00:13:10:XX:XX:XX
Bit Rate=54 Mb/s Tx-Power=20 dBm
...
# iwconfig wlan0 txpower 0dbm
# iwconfig wlan0
wlan0 IEEE 802.11abgn ESSID:"cozyguest"
Mode:Managed Frequency:2.462 GHz Access Point: 00:13:10:XX:XX:XX
Bit Rate=54 Mb/s Tx-Power=0 dBm
...
The changes will take effect if the interface is brought down and up or if a
scan is issued.
Some notes that may be useful to fix this:
After mac80211 sets IEEE80211_CONF_CHANGE_POWER the driver updates
sc->config.txpowlimit. The new value is sent to the card by
ath_update_txpow() which is only called by:
1 364 drivers/net/wireless/ath/ath9k/main.c <<ath_set_channel>>
ath_update_txpow(sc);
2 1230 drivers/net/wireless/ath/ath9k/main.c <<ath_radio_enable>>
ath_update_txpow(sc);
3 2021 drivers/net/wireless/ath/ath9k/main.c <<ath_reset>>
ath_update_txpow(sc);
4 2330 drivers/net/wireless/ath/ath9k/main.c <<ath9k_start>>
ath_update_txpow(sc);
The new power settings only take effect if one triggers one of these
functions, for instance by issuing a scan.
Don't have a fix at this time. The obvious fix did not solve the problem:
diff --git a/drivers/net/wireless/ath/ath9k/main.c
b/drivers/net/wireless/ath/ath9k/main.c
index 16bdb1b..b62012e 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2795,8 +2795,10 @@ static int ath9k_config(struct ieee80211_hw
*hw, u32 changed)
}
skip_chan_change:
- if (changed & IEEE80211_CONF_CHANGE_POWER)
+ if (changed & IEEE80211_CONF_CHANGE_POWER) {
sc->config.txpowlimit = 2 * conf->power_level;
+ ath_update_txpow(sc);
+ }
spin_lock_bh(&sc->wiphy_lock);
disable_radio = ath9k_all_wiphys_idle(sc);
But issuing a scan after changing the power did:
# iwconfig wlan0 txpower 10dbm; iw dev wlan0 scan
( Scanning seems to be the magic word that one must invoke to get
things done on ath9k: See also bug 14187 )
--
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Bugme-new
mailing list