mac80211: fix setting txpower (#12594)

SVN-Revision: 34594
This commit is contained in:
Felix Fietkau 2012-12-10 13:51:09 +00:00
parent 01513b7c8b
commit cb9c63048d

View File

@ -142,9 +142,9 @@
+ ant_gain = 0; + ant_gain = 0;
+ } else + } else
+ ant_gain -= local->user_antenna_gain; + ant_gain -= local->user_antenna_gain;
+ power = min(power, max_power);
+ } + }
+ +
+ power = min(chan->max_power, max_power);
+ if (local->hw.conf.power_level != power || + if (local->hw.conf.power_level != power ||
+ local->hw.conf.max_antenna_gain != ant_gain) { + local->hw.conf.max_antenna_gain != ant_gain) {
changed |= IEEE80211_CONF_CHANGE_POWER; changed |= IEEE80211_CONF_CHANGE_POWER;