On Tue, 2009-04-28 at 23:42 +0200, Johannes Berg wrote: > Ok, that's confusing. It doesn't even change any code that is normally > executed, at least not significantly since local->user_power_level is > usually 0; checking > if (local->user_power_level) > vs. checking > if (local->user_power_level >= 0) > shouldn't make a difference in that case (although I admit that I forgot > a few cases in that commit, will fix). > > Can you please verify that the code behaves correctly if you revert just > this commit? Unless you're playing with "iwconfig wlan0 txpower .." I > don't see a reason for this to cause a problem. Scratch that, try this patch instead. Sorry, stupid mistake! mac80211 never asks the driver to set a txpower level, and keeps the variable set to 0, but the driver looks at it anyway. Bug on both accounts, I guess, but mac80211 should set the variable and tell the driver anyway. johannes --- net/mac80211/main.c | 1 + 1 file changed, 1 insertion(+) --- wireless-testing.orig/net/mac80211/main.c 2009-04-28 23:43:49.000000000 +0200 +++ wireless-testing/net/mac80211/main.c 2009-04-28 23:47:22.000000000 +0200 @@ -764,6 +764,7 @@ struct ieee80211_hw *ieee80211_alloc_hw( local->hw.conf.long_frame_max_tx_count = wiphy->retry_long; local->hw.conf.short_frame_max_tx_count = wiphy->retry_short; local->hw.conf.radio_enabled = true; + local->user_power_level = -1; INIT_LIST_HEAD(&local->interfaces); mutex_init(&local->iflist_mtx); -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html