mac80211: correct wext transmit power handler
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 7 Apr 2009 13:22:28 +0000 (15:22 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 16 Apr 2009 14:39:08 +0000 (10:39 -0400)
commit47afbaf5af9454a7a1a64591e20cbfcc27ca67a8
treede3a92c6fa90d0b7830bbb538869b8ff41e8b0ea
parent853da11b94e674445e93660f47a5f0aeeea09623
mac80211: correct wext transmit power handler

Wext makes no assumptions about the contents of
data->txpower.fixed and data->txpower.value when
data->txpower.disabled is set, so do not update
the user-requested power level while disabling.

Also, when wext configures a really _fixed_ power
output [1], we should reject it instead of limiting it
to the regulatory constraint. If the user wants to set
a _limit_ [2] then we should honour that.

[1] iwconfig wlan0 txpower 20dBm fixed
[2] iwconfig wlan0 txpower 10dBm

This fixes
http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1942

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/main.c
net/mac80211/wext.c