mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-03 22:44:27 -05:00 
			
		
		
		
	The removed patches were applied upstream. of_get_mac_address() was backported in our OpenWrt kernel, remove the change from backports. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
		
			
				
	
	
		
			25 lines
		
	
	
		
			761 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			761 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
From: Felix Fietkau <nbd@nbd.name>
 | 
						|
Date: Wed, 19 Jul 2017 08:49:31 +0200
 | 
						|
Subject: [PATCH] ath9k: adjust tx power reduction for US regulatory
 | 
						|
 domain
 | 
						|
 | 
						|
FCC regulatory rules allow for up to 6 dBi antenna gain. Account for
 | 
						|
this in the EEPROM based tx power reduction code.
 | 
						|
 | 
						|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
 | 
						|
---
 | 
						|
 | 
						|
--- a/drivers/net/wireless/ath/ath9k/hw.c
 | 
						|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
 | 
						|
@@ -2996,6 +2996,10 @@ void ath9k_hw_apply_txpower(struct ath_h
 | 
						|
 	if (ant_gain > max_gain)
 | 
						|
 		ant_reduction = ant_gain - max_gain;
 | 
						|
 
 | 
						|
+	/* FCC allows maximum antenna gain of 6 dBi */
 | 
						|
+	if (reg->region == NL80211_DFS_FCC)
 | 
						|
+		ant_reduction = max_t(int, ant_reduction - 12, 0);
 | 
						|
+
 | 
						|
 	ah->eep_ops->set_txpower(ah, chan, ctl,
 | 
						|
 				 ant_reduction, new_pwr, test);
 | 
						|
 }
 |