1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-23 23:46:16 +02:00

mac80211: fix setting txpower (#12594)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34594 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2012-12-10 13:51:09 +00:00
parent 99c88b5100
commit d392b70802

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;