[source] ath9k: fix typo in US tx power reduction fix

LEDE Commits lede-commits at lists.infradead.org
Tue Jul 25 00:14:23 PDT 2017


nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/35868234e7c6f60af00ac648556ca798aee49ae8

commit 35868234e7c6f60af00ac648556ca798aee49ae8
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Jul 25 09:13:24 2017 +0200

    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 at nbd.name>
---
 .../330-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 38b5264..d799ab4 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 at 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);
  }



More information about the lede-commits mailing list