diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-09-20 10:42:45 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-09-20 10:42:45 +0000 |
commit | 249aee9ff919aa498c2bbff48e043fd0e72d9b5d (patch) | |
tree | 133bbf748ab5b16aaa1387d92c920706d6e98c94 /package | |
parent | 22689b0428caa01c7fd64a0159a20e03b2e6506e (diff) | |
download | upstream-249aee9ff919aa498c2bbff48e043fd0e72d9b5d.tar.gz upstream-249aee9ff919aa498c2bbff48e043fd0e72d9b5d.tar.bz2 upstream-249aee9ff919aa498c2bbff48e043fd0e72d9b5d.zip |
ath9k: fix antenna gain calculation
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28261 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/mac80211/patches/581-ath9k_cleanup_txpower_handling.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/package/mac80211/patches/581-ath9k_cleanup_txpower_handling.patch b/package/mac80211/patches/581-ath9k_cleanup_txpower_handling.patch index 4978ba1302..029ce3d7af 100644 --- a/package/mac80211/patches/581-ath9k_cleanup_txpower_handling.patch +++ b/package/mac80211/patches/581-ath9k_cleanup_txpower_handling.patch @@ -155,7 +155,7 @@ + channel = chan->chan; + chan_pwr = min_t(int, channel->max_power * 2, MAX_RATE_POWER); + new_pwr = min_t(int, chan_pwr, reg->power_limit); -+ max_gain = new_pwr - chan_pwr + channel->max_antenna_gain * 2; ++ max_gain = chan_pwr - new_pwr + channel->max_antenna_gain * 2; + + ant_gain = get_antenna_gain(ah, chan); + if (ant_gain > max_gain) @@ -175,7 +175,7 @@ - int reg_pwr = min_t(int, MAX_RATE_POWER, limit); - int chan_pwr = channel->max_power * 2; -+ reg->power_limit = min_t(int, limit * 2, MAX_RATE_POWER); ++ reg->power_limit = min_t(int, limit, MAX_RATE_POWER); if (test) - reg_pwr = chan_pwr = MAX_RATE_POWER; + channel->max_power = MAX_RATE_POWER / 2; |