aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-07-25 09:13:24 +0200
committerFelix Fietkau <nbd@nbd.name>2017-07-25 09:14:05 +0200
commit35868234e7c6f60af00ac648556ca798aee49ae8 (patch)
tree37a63da3f3f73a2548ed5629bdfcba341fef8a00 /package/kernel
parent9e64874fb2508e49e52898c238d817bd152bf2c2 (diff)
downloadupstream-35868234e7c6f60af00ac648556ca798aee49ae8.tar.gz
upstream-35868234e7c6f60af00ac648556ca798aee49ae8.tar.bz2
upstream-35868234e7c6f60af00ac648556ca798aee49ae8.zip
ath9k: fix typo in US tx power reduction fix
Use max_t instead of min_t to prevent the value from going below zero Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel')
-rw-r--r--package/kernel/mac80211/patches/330-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/kernel/mac80211/patches/330-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch b/package/kernel/mac80211/patches/330-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch
index 38b52644a3..d799ab4a62 100644
--- a/package/kernel/mac80211/patches/330-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch
+++ b/package/kernel/mac80211/patches/330-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch
@@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
+ /* FCC allows maximum antenna gain of 3 dBi */
+ if (reg->region == NL80211_DFS_FCC)
-+ ant_reduction = min_t(int, ant_reduction - 6, 0);
++ ant_reduction = max_t(int, ant_reduction - 6, 0);
+
ah->eep_ops->set_txpower(ah, chan, ctl, ant_reduction, new_pwr, test);
}